:root{
  --bg:#0f141c;
  --panel:#171e29;
  --panel2:#1c2533;
  --line:#2b3445;
  --text:#d9e1ec;
  --muted:#93a1b6;
  --accent:#5da8ff;
  --good:#63d471;
  --warn:#ffb15c;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:14px/1.45 "Segoe UI",Tahoma,Arial,sans-serif}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
.forum-wrap{max-width:1180px;margin:0 auto;padding:14px}
.forum-topbar{display:flex;justify-content:space-between;align-items:center;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:10px 14px;margin-bottom:14px}
.forum-topbar__left,.forum-topbar__right{display:flex;align-items:center;gap:10px}
.forum-logo{font-weight:700;color:#fff;background:#273246;padding:7px 10px;border-radius:8px}
.forum-navlink{color:var(--muted)}
.forum-user-chip{color:var(--text)}
.forum-btn{display:inline-block;padding:8px 12px;border-radius:8px;border:1px solid var(--line);background:var(--panel2);color:#fff}
.forum-btn--ghost{background:transparent}
.forum-btn--danger{border-color:#603237;color:#ffc0c0}
.forum-btn--small{padding:5px 9px;font-size:12px}
.forum-headline{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}
.forum-card{background:var(--panel);border:1px solid var(--line);border-radius:10px;overflow:hidden;margin-bottom:14px}
.forum-card__title{background:#202a3a;border-bottom:1px solid var(--line);padding:10px 12px;font-weight:700;display:flex;justify-content:space-between;align-items:center}
.forum-table{width:100%;border-collapse:collapse}
.forum-table th,.forum-table td{padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:top}
.forum-table tr:last-child td{border-bottom:none}
.forum-table th{color:var(--muted);font-weight:600;text-align:left;background:rgba(255,255,255,.02)}
.forum-name{font-weight:600;color:#fff}
.forum-desc{color:var(--muted);font-size:12px;margin-top:4px}
.forum-meta{color:var(--muted);font-size:12px}
.forum-lastpost{font-size:12px;color:var(--muted)}
.forum-breadcrumbs{display:flex;gap:8px;align-items:center;margin-bottom:10px;color:var(--muted);flex-wrap:wrap}
.forum-breadcrumbs .sep{opacity:.6}
.topic-row--pinned .topic-title::before{content:"📌 ";opacity:.9}
.topic-row--locked .topic-title::before{content:"🔒 ";opacity:.9}
.topic-title{font-weight:600;color:#fff}
.topic-title small{color:var(--muted);font-weight:400;margin-left:4px}
.post{display:grid;grid-template-columns:220px 1fr;background:var(--panel);border:1px solid var(--line);border-radius:10px;overflow:hidden;margin-bottom:12px}
.post__sidebar{background:#141b25;border-right:1px solid var(--line);padding:12px}
.post__content{padding:12px}
.post__author{font-weight:700}
.post__rank{font-size:12px;color:var(--muted);margin-top:2px}
.post__meta{font-size:12px;color:var(--muted);margin-bottom:10px;display:flex;justify-content:space-between;gap:8px}
.post__body{white-space:normal;word-break:break-word}
.post__actions{margin-top:10px;display:flex;gap:8px;flex-wrap:wrap}
.editor-box{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:12px;margin-bottom:14px}
.editor-box label{display:block;margin-bottom:6px;font-weight:600}
.editor-box input[type=text], .editor-box select, .editor-box textarea{
  width:100%;background:#101722;border:1px solid var(--line);color:#fff;border-radius:8px;padding:10px
}
.editor-box textarea{min-height:180px;resize:vertical}
.editor-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.notice{padding:10px 12px;border-radius:8px;border:1px solid var(--line);background:var(--panel2);margin-bottom:12px}
.notice--error{border-color:#5d2c2c;color:#ffd3d3}
.notice--ok{border-color:#2c5d36;color:#d1ffd7}
.forum-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.stat-box{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:12px}
.stat-box .label{color:var(--muted);font-size:12px}
.stat-box .value{font-size:22px;font-weight:700;margin-top:4px}
.forum-pagination{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0 14px}
.forum-pagination a{display:inline-block;padding:6px 10px;background:var(--panel);border:1px solid var(--line);border-radius:8px;color:#fff}
.forum-pagination a.active{background:#223047;border-color:#3a4f71}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.badge{display:inline-block;padding:2px 7px;border-radius:20px;font-size:11px;border:1px solid var(--line);background:#1f2836;color:#d7e0ec}
.align-right{text-align:right}
.muted{color:var(--muted)}
@media (max-width:900px){
  .post{grid-template-columns:1fr}
  .post__sidebar{border-right:none;border-bottom:1px solid var(--line)}
  .forum-stats{grid-template-columns:1fr}
  .forum-table th:nth-child(3), .forum-table td:nth-child(3),
  .forum-table th:nth-child(4), .forum-table td:nth-child(4){display:none}
}


/* Integracja z layoutem strony */
:root{
  --bg:#000;
  --panel:#161616;
  --panel2:#111;
  --line:#222;
  --text:#ddd;
  --muted:#8d8d8d;
  --accent:#f39c12;
  --good:#2ecc71;
  --warn:#f1c40f;
}
.forum-wrap--embedded{max-width:none;margin:0;padding:0}
.forum-wrap--embedded .forum-headline h1,
.forum-wrap--embedded .forum-card__title{color:#f39c12}
.forum-card{border-color:#222;background:#161616;box-shadow:none}
.forum-card__title{background:#111;border-bottom-color:#222}
.forum-table th,.forum-table td{border-bottom-color:#222}
.forum-table th{background:#101010;color:#aaa}
.forum-name,.topic-title,.post__author{color:#f2f2f2}
.forum-btn{background:#1a1a1a;border-color:#333;color:#f39c12}
.forum-btn:hover{text-decoration:none;border-color:#f39c12;box-shadow:0 0 0 1px rgba(243,156,18,.15) inset}
.forum-btn--ghost{background:transparent;color:#ddd}
.forum-btn--danger{color:#ff8c8c;border-color:#5a2a2a}
.editor-box{background:#161616;border-color:#222}
.editor-box input[type=text], .editor-box select, .editor-box textarea{background:#0d0d0d;border-color:#2a2a2a;color:#eee}
.post{background:#161616;border-color:#222}
.post__sidebar{background:#101010;border-right-color:#222}
.badge{background:#1a1a1a;border-color:#333;color:#f3c36a}
.notice{background:#141414;border-color:#2a2a2a}
.notice--error{background:#1d1111;border-color:#5d2c2c}
.stat-box{background:#111;border-color:#222}
.forum-pagination a{background:#161616;border-color:#2a2a2a;color:#ddd}
.forum-pagination a.active{background:#2a1b07;border-color:#7a4a08;color:#ffd18f}

/* ===== Forum list/topic layout tweaks ===== */
.forum-headline--actions{justify-content:flex-end;margin-bottom:12px}
.forum-headline--actions:empty{display:none}
.forum-table--topics thead th:first-child{min-width:420px}
.forum-section-inline{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.forum-section-inline__title{color:var(--accent);font-weight:700}
.forum-section-inline small{color:var(--muted);font-weight:400;font-size:11px}

/* ===== Admin Forum UX (Fora / Działy) ===== */
.admin-card__body{padding:12px}
.admin-form-grid{display:grid;gap:10px;align-items:end}
.admin-form-grid--3{grid-template-columns:minmax(180px,220px) minmax(220px,1fr) minmax(110px,120px)}
.admin-form-grid--2{grid-template-columns:minmax(200px,260px) minmax(220px,1fr)}
.admin-form-grid__actions{grid-column:1 / -1;margin-top:0;justify-content:flex-start}
.admin-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.admin-field label{display:block;margin:0;font-weight:600}
.admin-field--grow{min-width:0}
.admin-field--small{max-width:140px}
.admin-field--checkbox{justify-content:flex-end}
.admin-field--checkbox label{display:flex;align-items:center;gap:8px;font-weight:500;color:var(--text);margin-top:4px}
.admin-field--checkbox input[type="checkbox"]{width:auto}

.admin-entity-list{display:flex;flex-direction:column;gap:10px}
.admin-entity{border:1px solid var(--line);border-radius:10px;background:#121212;overflow:hidden}
.admin-entity > summary{list-style:none;display:flex;justify-content:space-between;gap:10px;align-items:center;padding:12px;cursor:pointer}
.admin-entity > summary::-webkit-details-marker{display:none}
.admin-entity > summary::after{content:'Rozwiń';color:var(--muted);font-size:12px;white-space:nowrap}
.admin-entity[open] > summary::after{content:'Zwiń'}
.admin-entity[open] > summary{border-bottom:1px solid var(--line);background:#101010}
.admin-entity__titleWrap{min-width:0;display:flex;flex-direction:column;gap:3px}
.admin-entity__title{font-weight:700;color:#f1f1f1}
.admin-entity__desc{color:var(--muted);font-size:12px;line-height:1.35}
.admin-entity__chips{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.admin-entity__body{padding:12px;display:flex;flex-direction:column;gap:10px}
.admin-delete-form{margin:0}
.badge--muted{opacity:.75}

@media (max-width: 980px){
  .admin-form-grid--3,
  .admin-form-grid--2{grid-template-columns:1fr}
  .admin-field--small{max-width:none}
  .admin-entity > summary{align-items:flex-start;flex-direction:column}
  .admin-entity__chips{justify-content:flex-start}
}

/* ===== Admin Forum UX (Rangi) ===== */
.forum-ranks-layout{display:grid;grid-template-columns:minmax(320px,420px) minmax(0,1fr);gap:14px;align-items:start}
.rank-create-card,.rank-list-card{margin-bottom:0}
.rank-card-title{margin:0 0 10px;font-size:20px;line-height:1.2}
.rank-form-stack{display:flex;flex-direction:column;gap:10px}
.rank-form-inline-2,.rank-form-inline-3{display:grid;gap:10px;align-items:end}
.rank-form-inline-2{grid-template-columns:minmax(0,1fr) 120px}
.rank-form-inline-3{grid-template-columns:minmax(180px,1fr) minmax(160px,220px) 120px}
.rank-field-pos{max-width:120px}
.rank-checklist{display:flex;flex-direction:column;gap:8px;padding:2px 0}
.rank-checklist--inline{flex-direction:row;flex-wrap:wrap;gap:16px}
.rank-check{
  display:inline-flex !important;
  align-items:center;
  gap:8px;
  margin:0 !important;
  font-weight:500 !important;
  color:var(--text);
  line-height:1.2;
}
.rank-check input[type="checkbox"]{
  width:16px;
  height:16px;
  margin:0;
  accent-color:#f39c12;
  flex:0 0 auto;
}
.rank-check span{display:inline-block}
.rank-list-wrap{padding:10px;display:flex;flex-direction:column;gap:10px}
.rank-item{border:1px solid var(--line);border-radius:10px;background:#121212;overflow:hidden}
.rank-item > summary{list-style:none;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;cursor:pointer}
.rank-item > summary::-webkit-details-marker{display:none}
.rank-item > summary::marker{display:none}
.rank-item > summary::after{content:'Rozwiń';margin-left:auto;color:var(--muted);font-size:12px;white-space:nowrap}
.rank-item[open] > summary::after{content:'Zwiń'}
.rank-item[open] > summary{border-bottom:1px solid var(--line);background:#101010}
.rank-item__left{min-width:0;display:flex;flex-direction:column;gap:3px}
.rank-item__nameRow{display:flex;align-items:center;gap:8px;min-width:0}
.rank-color-dot{width:10px;height:10px;border-radius:50%;display:inline-block;border:1px solid rgba(255,255,255,.15)}
.rank-item__name{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:420px}
.rank-item__sub{font-size:12px;color:var(--muted)}
.rank-item__chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.rank-item__body{padding:12px;display:flex;flex-direction:column;gap:10px}
.rank-edit-form{display:flex;flex-direction:column;gap:10px;max-width:820px}
.rank-item__body .admin-delete-form{margin-top:2px}
.rank-item .editor-actions{margin-top:0}

@media (max-width: 1080px){
  .forum-ranks-layout{grid-template-columns:1fr}
  .rank-create-card{position:static}
}
@media (max-width: 760px){
  .rank-form-inline-2,.rank-form-inline-3{grid-template-columns:1fr}
  .rank-field-pos{max-width:none}
  .rank-item > summary{flex-wrap:wrap;align-items:flex-start}
  .rank-item > summary::after{order:3;width:100%}
  .rank-item__chips{width:100%}
  .rank-checklist--inline{flex-direction:column;gap:8px}
}

/* ===== Admin Forum UX (Uprawnienia) ===== */
.perm-item{margin-bottom:12px}
.perm-item > summary{background:#121212}
.perm-item[open] > summary{background:#101010}
.perm-group-card{margin-bottom:10px}
.perm-group-card:last-child{margin-bottom:0}
.forum-table--perms th,
.forum-table--perms td{text-align:center;vertical-align:middle;padding:7px 6px;font-size:12px}
.forum-table--perms th:first-child,
.forum-table--perms td:first-child{text-align:left;min-width:230px;vertical-align:top}
.forum-table--perms th{white-space:nowrap;font-size:11px}
.forum-table--perms input[type="checkbox"]{width:15px;height:15px;accent-color:#f39c12;cursor:pointer}
.rank-item__body .forum-card.perm-group-card .forum-card__title{font-size:13px}
@media (max-width:760px){
  .forum-table--perms th:first-child,
  .forum-table--perms td:first-child{min-width:180px}
}

/* ===== Poddziały ===== */
.forum-subsections{margin-top:8px;padding-top:8px;border-top:1px dashed rgba(255,255,255,.06)}
.forum-subsections__label{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin-bottom:6px}
.forum-subsections__list{display:flex;flex-direction:column;gap:6px}
.forum-subsection-item{padding:7px 9px;border:1px solid var(--line);border-radius:8px;background:#111}
.forum-subsection-item__name{display:inline-block;font-weight:600;color:#eee}
.forum-subsection-item__meta{display:inline-block;margin-left:8px;font-size:11px;color:var(--muted)}
.forum-desc--sub{margin-top:3px}
.admin-tree-prefix,.perm-tree-prefix{color:var(--muted)}
.forum-name--sub{font-weight:600}

@media (max-width:900px){
  .forum-subsection-item__meta{display:block;margin:3px 0 0 0}
}


/* ===== FIX6: IPB-like inline subforums + cleaner child sections block ===== */
.forum-card--subsections{margin-bottom:10px}
.forum-card--subsections > .forum-card__title{display:none}

.forum-subsections--inline{
  margin-top:8px;
  padding-top:8px;
  border-top:1px dashed rgba(255,255,255,.06);
}
.forum-subsections__list--inline{
  display:flex;
  flex-wrap:wrap;
  gap:6px 10px;
  align-items:center;
}
.forum-subsection-link{
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:var(--muted);
  text-decoration:none;
  font-size:12px;
  line-height:1.2;
  white-space:nowrap;
}
.forum-subsection-link::before{
  content:'•';
  color:#666;
  margin-right:1px;
}
.forum-subsection-link__name{
  color:#ddd;
  font-weight:600;
}
.forum-subsection-link__meta{
  color:var(--muted);
  font-size:11px;
}
.forum-subsection-link:hover .forum-subsection-link__name{
  color:var(--accent);
}
.forum-subsection-link:hover{color:#aaa;text-decoration:none}

@media (max-width:900px){
  .forum-subsections__list--inline{
    gap:6px 8px;
  }
  .forum-subsection-link{
    white-space:normal;
  }
}

/* ===== FIX7: front UX / IPB-style tweaks ===== */
.forum-subsections--inline{
  margin-top:6px;
  padding-top:0;
  border-top:none;
}
.forum-subsections__list--inline{
  gap:4px 12px;
}
.forum-subsection-link{
  gap:0;
  color:#a9b3bf;
}
.forum-subsection-link::before{display:none;content:none}
.forum-subsection-link__name{font-weight:500;color:#cfd7e0}
.forum-subsection-link__meta{display:none !important}

.forum-section-inline--bigger{display:flex;flex-direction:column;gap:2px;align-items:flex-start}
.forum-section-inline--bigger .forum-section-inline__title{font-size:28px;line-height:1.1;font-weight:700;color:#f0f0f0}
.forum-section-inline--bigger small{font-size:12px;color:#8e98a6;line-height:1.25}

.forum-table--subsections-clean th:first-child,
.forum-table--subsections-clean td:first-child{width:auto}

.forum-stats--4{grid-template-columns:repeat(4,1fr)}
@media (max-width:1100px){.forum-stats--4{grid-template-columns:repeat(2,1fr)}}
@media (max-width:680px){.forum-stats--4{grid-template-columns:1fr}}

/* 5 kolumn na szerokich ekranach; responsywnie schodzimy do 3/2/1 */
.forum-stats--5{grid-template-columns:repeat(5,1fr)}
@media (max-width:1350px){.forum-stats--5{grid-template-columns:repeat(3,1fr)}}
@media (max-width:900px){.forum-stats--5{grid-template-columns:repeat(2,1fr)}}
@media (max-width:680px){.forum-stats--5{grid-template-columns:1fr}}

.forum-editor-tools{
  display:flex;gap:6px;flex-wrap:wrap;
  margin:0 0 8px;
}
.forum-tool-btn{
  padding:6px 9px;border:1px solid var(--line);background:#111;color:#ddd;border-radius:7px;cursor:pointer;
  line-height:1;font-size:12px;
}
.forum-tool-btn:hover{background:#1b1b1b}
.forum-tool-btn.is-active{background:#1b2230;border-color:#425067;color:#e7eef8;box-shadow:inset 0 0 0 1px rgba(120,150,200,.14)}

.bbcode-quote{
  margin:8px 0;padding:0;border:1px solid #2a313c;background:#121821;border-radius:8px;overflow:hidden;
}
.bbcode-quote__who{
  font-size:12px;color:#b7c1cf;background:#1b2430;border-bottom:1px solid #2a313c;padding:6px 9px;
}
.bbcode-quote__body{padding:8px 10px;color:#dce5ef}
.bbcode-code{
  margin:8px 0;padding:10px;border-radius:8px;background:#0c1016;border:1px solid #242b36;color:inherit;overflow:auto;
}
.bbcode-code code{white-space:pre-wrap;word-break:break-word;font-family:Consolas, monospace;font-size:12px}
.bbcode-spoiler{
  margin:8px 0;border:1px solid #2a313c;background:#10151d;border-radius:8px;overflow:hidden;
}
.bbcode-spoiler > summary{
  cursor:pointer; padding:8px 10px; background:#171f2b; color:#d7e2f0; border-bottom:1px solid #2a313c; font-weight:700;
  user-select:none;
}
.bbcode-spoiler > summary::-webkit-details-marker{display:none}
.bbcode-spoiler > div{padding:10px; color:#dce5ef}
.post__body img{max-width:100%;height:auto}
.post__actions{align-items:center}

/* szybka odpowiedź */
#quick-reply-content{min-height:150px}


/* ===== FIX8: subfora inline + lewy align + mniejszy nagłówek działu + live preview ===== */
.forum-subsections,
.forum-subsections--inline{ text-align:left !important; }
.forum-subsections--inline{
  margin-top:6px !important;
  padding-top:0 !important;
  border-top:none !important;
}
.forum-subsections__list--inline{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:wrap !important;
  justify-content:flex-start !important;
  align-items:flex-start !important;
  align-content:flex-start !important;
  gap:4px 12px !important;
  width:100%;
}
.forum-subsection-link{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  text-align:left !important;
  white-space:normal !important;
}
.forum-subsection-link::before{display:none !important;content:none !important}

/* Nazwa + opis działu w widoku działu mniejsze */
.forum-section-inline--bigger .forum-section-inline__title{
  font-size:17px !important;
  line-height:1.15 !important;
  font-weight:700;
}
.forum-section-inline--bigger small{
  font-size:9px !important;
  line-height:1.2 !important;
  color:#8d98a6 !important;
}

/* Sidebar posta */
.post__stat{margin-top:8px;font-size:12px;color:var(--muted)}
.post__stat b{color:#d9e1ec;font-weight:700}

/* Live preview edytora */
.forum-editor-preview{
  margin:10px 0 0;
  border:1px solid var(--line);
  border-radius:8px;
  background:#101010;
  overflow:hidden;
}
.forum-editor-preview__head{
  padding:7px 10px;
  border-bottom:1px solid var(--line);
  font-size:12px;
  color:var(--muted);
  background:#0d0d0d;
}
.forum-editor-preview__body{
  padding:10px;
  min-height:52px;
}
.forum-editor-preview__empty{color:var(--muted);font-style:italic}


/* ===== FIX9: post likes right side, quote left, edit in meta, inline subforums ===== */
.forum-subforums-inline-ips{
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
  text-align:left !important;
}
.forum-subforums-inline-ips__sep{display:inline; margin:0 4px 0 0; color:var(--muted)}
.forum-subforums-inline-ips__link{
  display:inline !important;
  white-space:normal;
  color:#cfd7e0;
  text-decoration:none;
  font-size:12px;
}
.forum-subforums-inline-ips__link:hover{color:var(--accent); text-decoration:none}

/* nadpisanie starszych wrapperów jeśli cache miesza style */
.forum-subsections,
.forum-subsections--inline{border-top:none !important; padding-top:0 !important; margin-top:4px !important; text-align:left !important}
.forum-subsections__list--inline{display:flex !important; flex-direction:row !important; flex-wrap:wrap !important; justify-content:flex-start !important; align-items:center !important; gap:2px 10px !important}
.forum-subsections__list--inline > *{display:inline-flex !important; width:auto !important; max-width:none !important; float:none !important; margin:0 !important}

/* mniejsza nazwa i opis działu (widok działu) */
.forum-table--topics .forum-section-inline--bigger .forum-section-inline__title{font-size:14px !important; line-height:1.15 !important}
.forum-table--topics .forum-section-inline--bigger small{font-size:8px !important; line-height:1.15 !important}

/* układ meta i akcji posta */
.post__meta{align-items:center}
.post__meta-left{display:flex; align-items:center; gap:6px; flex-wrap:wrap; min-width:0}
.post__meta-right{margin-left:auto}
.post__meta a{color:#b9c3cf}
.post__meta a:hover{color:var(--accent); text-decoration:none}

.post__actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:nowrap;
}
.post__actions-left,
.post__actions-right{display:flex; align-items:center; gap:8px; min-width:0}
.post__actions-right{margin-left:auto; justify-content:flex-end}
.post-like-form{margin:0; display:inline-flex}
.forum-btn--count{min-width:38px; text-align:center; pointer-events:none; color:#ddd}
.forum-btn--liked{border-color:#5a4424 !important; color:#ffd18f !important; background:#22160a !important}

@media (max-width:900px){
  .post__actions{flex-wrap:wrap; align-items:flex-start}
  .post__actions-right{width:100%; justify-content:flex-end}
}


/* ===== FIX10: WYSIWYG quick reply/editor + edit link meta-right ===== */
.forum-rich-editor{
  min-height:150px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#0d0d0d;
  color:#eee;
  padding:10px 12px;
  line-height:1.45;
  outline:none;
  white-space:pre-wrap;
  word-break:break-word;
}
.editor-box .forum-rich-editor{min-height:180px}
.forum-rich-editor:focus{
  border-color:#3a3f46;
  box-shadow:0 0 0 1px rgba(243,156,18,.18);
}
.forum-rich-editor:empty:before{
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events:none;
}
.forum-rich-editor p{margin:0 0 8px}
.forum-rich-editor p:last-child{margin-bottom:0}
.forum-rich-editor .bbcode-quote{margin:6px 0}
.forum-rich-editor .bbcode-code{margin:6px 0}
.forum-editor-source{display:none !important}
.forum-rich-editor ul,.forum-rich-editor ol{margin:6px 0; padding-left:24px; max-width:100%;}
.forum-rich-editor li{margin:2px 0; white-space:normal;}
.forum-rich-editor img{max-width:100%; height:auto;}
.forum-editor-tools{overflow-x:auto; flex-wrap:wrap;}
.forum-tool-select{color:#e6e6e6 !important; background:#101319 !important; min-width:110px;}
.forum-tool-select option{background:#101319; color:#e6e6e6;}

.post__meta-right a{font-weight:600}

/* ===== FIX11: post meta/avatar + stats online + stronger subforums inline ===== */
.post__avatar-wrap{margin:0 0 10px; display:flex; justify-content:center}
.post__avatar{
  width:72px; height:72px; border-radius:10px; object-fit:cover;
  border:1px solid var(--line); background:#0d0d0d; display:block;
}
.post__sidebar{display:flex; flex-direction:column; align-items:center; text-align:center}
.post__author,.post__rank,.post__stat{width:100%}
.post__number{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:34px; padding:4px 8px; border:1px solid var(--line); border-radius:999px;
  background:#121212; color:#c3ccd6; font-weight:600; text-decoration:none; cursor:default;
}
.post__meta-right{display:flex; align-items:center; gap:8px}
.post__meta-right a{order:1}
.post__meta-right .post__number{order:2}

.forum-stats-online-line{
  margin-top:10px; padding:10px 12px; border:1px solid var(--line); border-radius:10px;
  background:#111; color:var(--text); font-size:13px; line-height:1.45;
}
.forum-stats-online-line__label{color:var(--muted); margin-right:6px}
.forum-stats-online-line__user{color:#d9e1ec}

/* super-silne wymuszenie układu poddziałów inline jak IPB */
.forum-subforums-inline-ips{
  display:block !important;
  margin-top:4px !important;
  text-align:left !important;
  width:100% !important;
}
.forum-subforums-inline-ips__sep{
  display:inline !important;
  margin:0 4px 0 0 !important;
}
.forum-subforums-inline-ips__link{
  display:inline !important;
  width:auto !important;
  white-space:normal !important;
  float:none !important;
  margin:0 !important;
  text-align:left !important;
}

/* ===== IPS-like quick reply (collapsed -> expanded) ===== */
.quick-reply-box{
  padding:0;
  overflow:hidden;
}
.quick-reply-box__collapsed{
  display:none;
  align-items:center;
  gap:12px;
  padding:12px;
  cursor:text;
  background:#161616;
}
.quick-reply-box__collapsed:focus{
  outline:none;
  box-shadow:inset 0 0 0 1px rgba(243,156,18,.22);
}
.quick-reply-box__avatar{
  width:38px;
  flex:0 0 38px;
}
.quick-reply-box__avatar img{
  width:38px;
  height:38px;
  border-radius:8px;
  object-fit:cover;
  border:1px solid var(--line);
  background:#0d0d0d;
  display:block;
}
.quick-reply-box__placeholder{
  flex:1 1 auto;
  min-height:42px;
  border:1px solid #3a3a3a;
  border-radius:6px;
  background:#1b1714;
  color:#9fb2d8;
  display:flex;
  align-items:center;
  padding:0 12px;
}
.quick-reply-box__body{
  display:block;
  padding:12px;
  border-top:1px solid var(--line);
}
html.js .quick-reply-box__collapsed{display:flex}
html.js .quick-reply-box.is-collapsed .quick-reply-box__body{display:none}
html.js .quick-reply-box.is-expanded .quick-reply-box__body{display:block}
html.js .quick-reply-box.is-expanded .quick-reply-box__placeholder{color:#7f8da5}
.quick-reply-box .editor-actions{justify-content:flex-end}
.quick-reply-box .forum-editor-tools{
  padding:8px 8px 0;
  margin:0 0 8px;
  border:1px solid var(--line);
  border-bottom:none;
  border-radius:8px 8px 0 0;
  background:#141414;
}
.quick-reply-box .forum-rich-editor,
.quick-reply-box textarea{
  border-top-left-radius:0 !important;
  border-top-right-radius:0 !important;
}
.quick-reply-box .forum-rich-editor{
  min-height:220px;
}

/* ===== Panel moderatora (dropdown) ===== */
.mod-panel-dropdown{
  position:relative;
  display:inline-block;
}
.mod-panel-dropdown > summary{
  list-style:none;
  cursor:pointer;
  user-select:none;
  background:#5b1717;
  border-color:#7d2929;
  color:#ffd9d9;
}
.mod-panel-dropdown > summary:hover{
  border-color:#b33d3d;
  color:#fff0f0;
  box-shadow:0 0 0 1px rgba(179,61,61,.18) inset;
}
.mod-panel-dropdown > summary::-webkit-details-marker{display:none}
.mod-panel-dropdown[open] > summary{
  background:#6a1b1b;
  border-color:#b33d3d;
  color:#fff0f0;
}
.mod-panel-dropdown__menu{
  position:absolute;
  right:0;
  top:calc(100% + 6px);
  min-width:180px;
  z-index:30;
  border:1px solid var(--line);
  border-radius:10px;
  background:#121212;
  box-shadow:0 10px 28px rgba(0,0,0,.35);
  overflow:hidden;
}
.mod-panel-dropdown__item-form{margin:0}
.mod-panel-dropdown__item{
  width:100%;
  text-align:left;
  border:0;
  background:transparent;
  color:#ddd;
  padding:10px 12px;
  cursor:pointer;
  font:inherit;
}
.mod-panel-dropdown__item:hover{
  background:#1c1c1c;
  color:var(--accent);
}
.mod-panel-dropdown__item-form + .mod-panel-dropdown__item-form .mod-panel-dropdown__item{
  border-top:1px solid rgba(255,255,255,.04);
}


.forum-stats-online-line__list{display:block;margin-top:4px}

/* ===== FIX13: Quick reply IPS-like cleanup + mod panel polish + selected quote popup ===== */
.quick-reply-box{
  padding:0 !important;
  border-radius:12px;
  overflow:hidden;
  background:linear-gradient(180deg,#151515,#121212);
}
.quick-reply-box__collapsed{
  display:none !important;
  align-items:center;
  gap:14px;
  padding:14px;
  cursor:text;
  border-bottom:1px solid transparent;
  background:linear-gradient(180deg,#171717,#141414);
}
.quick-reply-box.is-collapsed .quick-reply-box__body{display:none !important}
.quick-reply-box.is-collapsed .quick-reply-box__collapsed{display:flex !important}
.quick-reply-box.is-expanded .quick-reply-box__body{display:block !important}
.quick-reply-box.is-expanded .quick-reply-box__collapsed{
  display:none !important;
  border-bottom-color:var(--line);
  background:linear-gradient(180deg,#1a1714,#151311);
}
.quick-reply-box__placeholder{
  min-height:40px;
  border-radius:7px;
  border:1px solid #4a3a2d;
  background:#1a1511;
  color:#9ec0ff;
  font-size:14px;
}
.quick-reply-box__body{
  padding:0 !important;
  background:linear-gradient(180deg,#121212,#131313);
}
.quick-reply-box__body form{padding:12px}
.quick-reply-box .forum-editor-tools{
  gap:8px;
  padding:8px;
  margin:0;
  border:1px solid #262626;
  border-bottom:none;
  border-radius:8px 8px 0 0;
  background:#121212;
}
.quick-reply-box .forum-tool-btn{
  min-width:31px;
  height:28px;
  padding:0 9px;
  border-radius:8px;
  font-weight:600;
  font-size:12px;
  background:#0d0f12;
  border-color:#28303a;
}
.quick-reply-box .forum-tool-btn:hover{
  background:#161b21;
  border-color:#3b4654;
}
.quick-reply-box .forum-rich-editor,
.quick-reply-box textarea{
  margin:0;
  border:1px solid #262626 !important;
  border-top:none !important;
  border-radius:0 0 8px 8px !important;
  background:#090a0c !important;
  min-height:180px !important;
}
.quick-reply-box .editor-actions{
  padding-top:10px;
}
.quick-reply-box .editor-actions .forum-btn{
  min-width:160px;
}

/* moderator panel - bardziej IPS-like + czerwony dymek */
.mod-panel-dropdown > summary{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:linear-gradient(180deg,#7e1f1f,#601616) !important;
  border-color:#9e3333 !important;
  color:#ffe4e4 !important;
  box-shadow:0 0 0 1px rgba(180,64,64,.18) inset;
}
.mod-panel-pill__dot{
  width:8px;height:8px;border-radius:50%;background:#ff7d7d;display:inline-block;
  box-shadow:0 0 10px rgba(255,80,80,.45);
}
.mod-panel-dropdown__menu{
  min-width:230px !important;
  border-color:#2b2b2b !important;
  background:linear-gradient(180deg,#141414,#101010) !important;
  box-shadow:0 14px 34px rgba(0,0,0,.45) !important;
  padding:6px;
}
.mod-panel-dropdown__section-title{
  padding:8px 10px 6px;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#8d98a6;
}
.mod-panel-dropdown__item-form + .mod-panel-dropdown__section-title{
  margin-top:4px;
  border-top:1px solid rgba(255,255,255,.05);
}
.mod-panel-dropdown__item{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  border-radius:8px;
  margin:1px 0;
  padding:9px 10px !important;
}
.mod-panel-dropdown__icon{width:18px;display:inline-flex;justify-content:center;opacity:.95}

/* popup cytowania zaznaczenia */
.forum-selection-quote-pop{
  position:absolute;
  z-index:999;
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid #3b4654;
  background:#0f141a;
  color:#dbe6f2;
  border-radius:999px;
  padding:7px 11px;
  font:600 12px/1.1 inherit;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(0,0,0,.35);
}
.forum-selection-quote-pop:hover{
  border-color:#55657b;
  color:#fff;
}

/* drobny fix - post actions niech się nie rozjeżdżają przy długich elementach */
.post__actions-left, .post__actions-right{flex-wrap:wrap}

/* ===== FIX14: IPS-like status icon + latest topic snippet columns ===== */
.forum-topic-state{
  display:inline-flex;
  width:16px;
  height:16px;
  margin-right:8px;
  vertical-align:-3px;
  border-radius:50%;
  position:relative;
  border:1px solid #3a3a3a;
  background:#171717;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.02);
}
.forum-topic-state::before{
  content:'💬';
  font-size:10px;
  line-height:1;
  position:absolute;
  left:2px;
  top:1px;
  opacity:.82;
  filter:grayscale(.2);
}
.forum-topic-state--new{
  border-color:#8e5c15;
  background:radial-gradient(circle at 35% 30%, #ffcc73 0%, #e59a1b 45%, #7b4a08 100%);
  box-shadow:0 0 0 1px rgba(243,156,18,.14) inset, 0 0 10px rgba(243,156,18,.18);
}
.forum-topic-state--new::before{opacity:1; filter:none}
.forum-topic-state--old{
  background:radial-gradient(circle at 35% 30%, #616161 0%, #383838 45%, #1f1f1f 100%);
  border-color:#454545;
}
.forum-lastpost-time{color:#d8d8d8}
.forum-lastpost-time:hover{color:var(--accent); text-decoration:none}
.forum-lastpost-topic{
  display:inline-block;
  margin-top:3px;
  color:#b8c5d7;
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  vertical-align:top;
}
.forum-lastpost-topic:hover{text-decoration:none;color:var(--accent)}

@media (max-width:900px){
  .forum-table th:nth-child(4), .forum-table td:nth-child(4),
  .forum-table th:nth-child(5), .forum-table td:nth-child(5){display:none}
}

/* ===== FIX15: toolbar selects/separators + cleaner IPS-like state icon ===== */
.forum-tool-sep{
  width:1px;
  align-self:stretch;
  background:rgba(255,255,255,.08);
  margin:0 2px;
}
.forum-tool-select{
  height:30px;
  border:1px solid #2b3139;
  border-radius:8px;
  background:#0d0f12;
  color:#d7dee8;
  padding:0 8px;
  font-size:12px;
  min-width:88px;
}
.forum-tool-select:focus{
  outline:none;
  border-color:#4b5768;
  box-shadow:0 0 0 2px rgba(80,110,160,.18);
}
.forum-tool-btn[data-prompt-color="1"]{
  font-weight:700;
  color:#ffcc7a;
}
.quick-reply-box .forum-tool-select{
  height:28px;
  background:#0d0f12;
  border-color:#28303a;
  border-radius:8px;
  min-width:82px;
}
.quick-reply-box .forum-tool-sep{background:rgba(255,255,255,.06)}

/* speech bubble icon closer to IPS vibe (new/old) */
.forum-topic-state{
  width:18px;
  height:18px;
  border-radius:50%;
  background:radial-gradient(circle at 30% 30%, #3a3a3a 0%, #222 58%, #151515 100%);
  border:1px solid #4a4a4a;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03);
}
.forum-topic-state::before,
.forum-topic-state::after{
  content:'';
  position:absolute;
  display:block;
  border:2px solid currentColor;
  border-radius:10px;
  background:transparent;
}
.forum-topic-state::before{
  width:8px;
  height:6px;
  left:3px;
  top:4px;
  border-color:currentColor;
  border-bottom-left-radius:2px;
}
.forum-topic-state::after{
  width:4px;
  height:4px;
  right:2px;
  top:6px;
  border-width:2px;
  border-radius:8px;
}
.forum-topic-state{color:#8a8a8a}
.forum-topic-state--old{color:#8a8a8a}
.forum-topic-state--new{
  color:#d6972d;
  border-color:#9e6a1a;
  background:radial-gradient(circle at 30% 30%, #3c2c11 0%, #2a1f0c 55%, #16120b 100%);
  box-shadow:inset 0 0 0 1px rgba(255,208,128,.04), 0 0 10px rgba(233,161,39,.17);
}
.forum-topic-state--new::before,
.forum-topic-state--new::after{
  filter:drop-shadow(0 0 4px rgba(243,156,18,.35));
}


/* ===== FIX16: forum lists/cards closer to IPS + read haze ===== */
.forum-rows-ips .forum-table tbody tr td{vertical-align:middle;}
.forum-rows-ips .forum-last-snippet{
  display:flex; flex-direction:column; gap:2px; min-width:0;
  padding:6px 8px; border:1px solid #222831; border-radius:10px;
  background:linear-gradient(180deg,#131722,#10131a);
}
.forum-rows-ips .forum-last-snippet__title{
  color:#dfe7f3; font-weight:600; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.forum-rows-ips .forum-last-snippet__meta{
  color:#9aa6b6; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.forum-rows-ips .forum-activity-badge{
  display:inline-flex; min-width:52px; justify-content:center; align-items:center;
  padding:8px 10px; border-radius:999px; border:1px solid #2c3340;
  background:#161b24; color:#dce6f5; font-weight:700;
}
.forum-rows-ips .forum-activity-badge small{display:block; font-size:10px; font-weight:500; color:#9fb0c6; margin-top:1px;}
.forum-row--read td,.forum-card--read{opacity:.78; filter:saturate(.65) contrast(.95);}
.forum-row--read:hover td{opacity:.92; filter:saturate(.8) contrast(1);}
.forum-state-dot{width:14px;height:14px;border-radius:50%;display:inline-block;position:relative;}
.forum-state-dot--new{background:radial-gradient(circle at 35% 35%, #ffdb8b, #f39c12 65%, #8a4e05); box-shadow:0 0 10px rgba(243,156,18,.35);} 
.forum-state-dot--old{background:radial-gradient(circle at 35% 35%, #8b8b8b, #555 65%, #2f2f2f); opacity:.55;}
.forum-section-main{display:flex; align-items:flex-start; gap:10px; min-width:0;}
.forum-section-main__txt{min-width:0;}
.forum-section-main__title{display:block; font-weight:700; color:#e6edf8; margin-bottom:2px;}
.forum-section-main__desc{color:#96a3b5; font-size:13px; line-height:1.25;}
.forum-table--topics .forum-topic-title-wrap{display:flex; align-items:center; gap:8px; min-width:0;}
.forum-table--topics .forum-topic-title-wrap .forum-topic-title{min-width:0;}
.forum-table--topics .forum-topic-last-cell{min-width:220px;}
.quick-reply-box .forum-editor-tools{overflow:visible;}
.quick-reply-box .forum-rich-editor{overflow:auto;}


/* ===== FIX17: stabilizacja v7 (toolbar/selects/lists/unread/forum rows) ===== */
.forum-rows-ips thead{display:none;}

.forum-rows-ips .forum-activity-badge{
  width:42px !important;
  min-width:42px !important;
  height:42px !important;
  padding:0 !important;
  border-radius:50% !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:13px;
  line-height:1;
}
.forum-rows-ips td.forum-meta{white-space:nowrap; text-align:center;}

.forum-tool-select{
  flex:0 0 auto !important;
  width:132px !important;
  min-width:132px !important;
  max-width:160px;
  padding:0 28px 0 10px !important;
  line-height:28px !important;
  -webkit-appearance: menulist;
  appearance: auto;
  text-indent:0;
}
.quick-reply-box .forum-tool-select{
  width:122px !important;
  min-width:122px !important;
  max-width:140px !important;
}
.forum-tool-select[data-font-size],
select.forum-tool-select[data-font-size]{
  width:120px !important;
  min-width:120px !important;
}
.forum-tool-select option{
  color:#e8edf5 !important;
  background:#101319 !important;
}

.forum-rich-editor,
.post__body{
  overflow-wrap:anywhere;
}
.forum-rich-editor ul,
.forum-rich-editor ol{
  margin:6px 0 !important;
  margin-left:0 !important;
  padding-left:1.35em !important;
  list-style-position:inside;
}
.forum-rich-editor li{
  margin:2px 0 !important;
  padding-left:2px;
}
.post__body ul,
.post__body ol,
.bbcode-quote__body ul,
.bbcode-quote__body ol{
  margin:8px 0 8px 0;
  padding-left:1.35em;
  list-style-position:inside;
}
.post__body li,
.bbcode-quote__body li{
  margin:2px 0;
}

.forum-state-dot{
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.forum-state-dot--new{
  background:radial-gradient(circle at 35% 35%, #ffd27a 0%, #f39c12 55%, #7a4305 100%) !important;
  box-shadow:
    0 0 0 1px rgba(243,156,18,.24) inset,
    0 0 10px rgba(243,156,18,.42),
    0 0 18px rgba(243,156,18,.18) !important;
}
.forum-state-dot--old{
  opacity:.68 !important;
}


/* ===== IPS STABILIZATION OVERRIDES v8 ===== */
.forum-table.forum-rows-ips thead{display:none}
.forum-table.forum-rows-ips{table-layout:fixed}
.forum-table.forum-rows-ips > tbody > tr > td{vertical-align:middle}
.forum-table.forum-rows-ips > tbody > tr > td:first-child{width:auto}
.forum-table.forum-rows-ips > tbody > tr > td.forum-meta{width:92px;min-width:92px;text-align:center}
.forum-table.forum-rows-ips > tbody > tr > td.forum-lastpost{width:340px;max-width:340px}
.forum-table.forum-rows-ips > tbody > tr > td.forum-lastpost .forum-last-snippet{width:100%;max-width:100%}
.forum-table.forum-rows-ips > tbody > tr > td.forum-lastpost .forum-last-snippet__title,
.forum-table.forum-rows-ips > tbody > tr > td.forum-lastpost .forum-last-snippet__meta{
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.forum-table.forum-rows-ips > tbody > tr > td.forum-lastpost .muted{
  display:inline-block;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis
}
.forum-table.forum-rows-ips .forum-state-dot{
  flex:0 0 12px;width:12px;height:12px;align-self:flex-start;margin-top:6px
}
.forum-table.forum-rows-ips .forum-state-dot--new{
  background:radial-gradient(circle at 35% 35%, #fff8d2 0 18%, #ffd166 22%, #ff9f1c 60%, #d46d00 100%);
  box-shadow:0 0 0 3px rgba(255,159,28,.14), 0 0 18px rgba(255,159,28,.45)
}
.forum-table.forum-rows-ips .forum-state-dot--old{
  background:radial-gradient(circle at 35% 35%, #b0bac7 0 15%, #6b7688 35%, #394152 100%);
  opacity:.6; filter:saturate(.7) brightness(.9)
}
.forum-table.forum-rows-ips .forum-activity-badge{
  min-width:44px;height:44px;border-radius:50%;
  display:inline-flex;align-items:center;justify-content:center;
  background:linear-gradient(180deg,#1a2030,#141926);
  border:1px solid rgba(167,196,255,.12);
  color:#eef3ff;font-weight:800;font-size:16px;line-height:1
}
.forum-table.forum-rows-ips .forum-row--read .forum-activity-badge{opacity:.82; filter:saturate(.72)}
/* usuń nagłówki w listach działów i tematach stylu IPS */
.forum-card--subsections .forum-table thead{display:none}
/* fix uciekających elementów ostatniego posta */
.forum-last-snippet{box-sizing:border-box}
.forum-lastpost{overflow:hidden}
.forum-lastpost .forum-last-snippet{max-width:100%}
.forum-lastpost .forum-last-snippet__meta{display:block}
.forum-lastpost .forum-last-snippet__meta, .forum-lastpost .forum-last-snippet__title{overflow:hidden;text-overflow:ellipsis}
/* toolbar selects */
.forum-editor-tools .forum-tool-select{
  min-width:128px !important;
  width:auto;
  padding:0 34px 0 12px;
  color:#eaf0fb;
  line-height:36px;
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden;
}
.forum-editor-tools .forum-tool-select option{color:#111;background:#fff}
.quick-reply-box .forum-editor-tools .forum-tool-select{min-width:132px !important}
/* rich editor list/code stability */
.forum-rich-editor{
  overflow-x:hidden;
  word-break:break-word;
}
.forum-rich-editor ul,
.forum-rich-editor ol{
  list-style-position:outside;
  margin: .35em 0 .35em 1.35em !important;
  padding-left: 1.1em !important;
}
.forum-rich-editor li{margin:.15em 0}
.forum-rich-editor pre.bbcode-code code{
  display:block;
  white-space:pre-wrap;
  word-break:break-word;
}
.forum-rich-editor details.bbcode-spoiler > summary{
  cursor:pointer;
}
/* compact tables on medium widths */
@media (max-width: 1200px){
  .forum-table.forum-rows-ips > tbody > tr > td.forum-lastpost{width:280px;max-width:280px}
}
@media (max-width: 900px){
  .forum-table.forum-rows-ips > tbody > tr > td.forum-lastpost{width:auto;max-width:none}
  .forum-table.forum-rows-ips > tbody > tr > td.forum-meta{width:72px;min-width:72px}
  .forum-table.forum-rows-ips .forum-activity-badge{min-width:38px;height:38px;font-size:14px}
}
/* hide textual helper headers user requested */
.forum-card .forum-table.forum-rows-ips thead tr th{display:none !important}

/* inline edit in topic */
.post__inline-edit{margin-top:10px;border:1px solid var(--line);border-radius:10px;background:linear-gradient(180deg,#121212,#141414);overflow:hidden}
.post__inline-edit[hidden]{display:none!important}
.post__inline-edit-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border-bottom:1px solid var(--line);font-weight:700}
.post__inline-edit-body{padding:10px}
.post__inline-edit .forum-editor-tools{margin:0 0 8px;padding:8px;border:1px solid #262626;border-bottom:none;border-radius:8px 8px 0 0;background:#121212}
.post__inline-edit .forum-rich-editor,.post__inline-edit textarea{border:1px solid #262626!important;border-top-left-radius:0!important;border-top-right-radius:0!important;min-height:180px}
.post__inline-edit .editor-actions{justify-content:flex-end}
.post__edit-error{margin-bottom:8px}


/* ===== HOTFIX v8.1 editor + inline edit + IPS rows ===== */
.post.is-inline-editing [data-post-body="1"],
.post.is-inline-editing .post__actions,
.post.is-inline-editing .post__meta--edited{
  display:none !important;
}
.post.is-inline-editing .post__inline-edit{
  margin-top:10px;
}
.quick-reply-box .forum-rich-editor[data-placeholder=""]:empty:before{
  content:'';
}
.forum-rich-editor ul,
.forum-rich-editor ol,
.post__body ul,
.post__body ol,
.bbcode-quote__body ul,
.bbcode-quote__body ol{
  list-style-position: outside !important;
  margin-left: 1.15em !important;
  padding-left: 1.15em !important;
}
.forum-rich-editor li,
.post__body li,
.bbcode-quote__body li{
  padding-left: 0 !important;
}
.forum-table.forum-rows-ips > tbody > tr > td.forum-lastpost{
  width: 360px;
  max-width: 360px;
}
.forum-table.forum-rows-ips .forum-last-snippet{
  padding: 10px 12px;
}
@media (max-width: 1400px){
  .forum-table.forum-rows-ips > tbody > tr > td.forum-lastpost{width:320px;max-width:320px}
}

/* IPS-like color button marker */
.forum-tool-btn[data-prompt-color="1"]{position:relative;padding-left:10px;padding-right:10px}
.forum-tool-btn[data-prompt-color="1"]::before{content:'';display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px;vertical-align:-1px;background:linear-gradient(135deg,#ff5959,#ffd166,#4dabf7,#9775fa);border:1px solid rgba(255,255,255,.18)}


/* list marker usability + keep marker separate from text styling */
.forum-rich-editor li::marker,
.post__body li::marker,
.bbcode-quote__body li::marker{
  -webkit-user-select: none;
  user-select: none;
}


/* ===== HOTFIX v9 list UX + markers ===== */
.forum-rich-editor li,
.post__body li,
.bbcode-quote__body li{
  cursor:text;
}
.forum-rich-editor li::marker,
.post__body li::marker,
.bbcode-quote__body li::marker{
  color:#c7d0da;
}
.forum-rich-editor li > ul,
.forum-rich-editor li > ol{
  margin-top:.25em !important;
}

/* ===== v29: forum background + lepsze zarządzanie rangami ===== */
html,body{min-height:100%;}
body{
  background-color:#000;
  background-image:linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,.72)), url("../T%C5%82o.png");
  background-position:center top;
  background-repeat:no-repeat;
  background-size:cover;
  background-attachment:fixed;
}
.forum-topbar,
.forum-card,
.editor-box,
.post,
.stat-box,
.notice{
  backdrop-filter: blur(2px);
}

.forum-ranks-layout{
  grid-template-columns:minmax(320px, 390px) minmax(0, 1fr);
  gap:14px;
}
.forum-ranks-sidebar-stack{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.rank-form-inline-2{
  grid-template-columns:minmax(0,1fr) minmax(96px, 112px);
}
.rank-form-inline-3{
  grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(90px, 110px);
}
.rank-edit-form,
.rank-form-stack{
  width:100%;
}
.rank-inline-help{
  margin:2px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}
.rank-item__body{
  overflow:hidden;
}
.rank-item__body .editor-actions{
  flex-wrap:wrap;
}
.rank-field-pos input{
  text-align:center;
}
.rank-assign-card .notice{
  margin-top:10px;
}
.rank-assigned-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:12px;
}
.rank-assigned-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#111;
}
.rank-assigned-item__meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px;
  min-width:0;
}
.rank-assigned-item__meta strong{
  color:#fff;
}
.badge--muted{
  color:#b8b8b8;
  background:#141414;
  border-color:#2c2c2c;
}
@media (max-width: 1180px){
  .forum-ranks-layout{
    grid-template-columns:1fr;
  }
}
@media (max-width: 760px){
  .rank-assigned-item{
    flex-direction:column;
    align-items:flex-start;
  }
  .rank-form-inline-2,
  .rank-form-inline-3{
    grid-template-columns:1fr;
  }
}

/* ===== v30: forum z tym samym tłem co strona ===== */
body{
  background-color:#000;
  background-image:linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,.72)), url("../T%C5%82o.png");
  background-position:center top;
  background-repeat:no-repeat;
  background-size:cover;
  background-attachment:fixed;
}
.forum-topbar,
.forum-card,
.editor-box,
.notice,
.stat-box,
.post,
.post__sidebar{
  background:rgba(16,16,16,.88);
  backdrop-filter:blur(2px);
}

.post--hidden{outline:1px dashed rgba(243,156,18,.4);background:rgba(243,156,18,.04)}
.post{overflow:visible;}
.post__content,.post__actions,.post__actions-right{overflow:visible;}
.post__sidebar{border-radius:10px 0 0 10px;}
.mod-panel-dropdown[open]{z-index:80;}
.mod-panel-dropdown--post[open]{z-index:120;}
.mod-panel-dropdown__move-form{display:flex;flex-direction:column;gap:8px;padding:8px 10px 10px;border-top:1px solid rgba(255,255,255,.05)}
.mod-panel-dropdown__move-form select{width:100%;min-width:0}
.mod-panel-dropdown__move-label{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#8d98a6}
.mod-panel-dropdown__item--danger{color:#ffcdcd}
.mod-panel-dropdown__item--danger:hover{color:#fff3f3;background:#2b1515}

.mod-panel-dropdown--post > summary{
  min-width:38px;
  justify-content:center;
  padding:0 10px;
  gap:0;
  background:linear-gradient(180deg,#19222b,#121820) !important;
  border-color:#334050 !important;
  color:#dfe8f2 !important;
  box-shadow:none;
}
.mod-panel-dropdown--post > summary:hover,
.mod-panel-dropdown--post[open] > summary{
  background:linear-gradient(180deg,#202c38,#151d26) !important;
  border-color:#4a5b71 !important;
  color:#ffffff !important;
}
.mod-panel-dropdown--post .mod-panel-dropdown__menu{
  min-width:170px !important;
}
.mod-panel-dropdown__gear{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:15px;
  line-height:1;
}
.post__actions-right .mod-panel-dropdown{
  margin-left:2px;
}

.post{position:relative;}
.post.forum-post--mod-open{z-index:260;}
.post__actions-right{position:relative;}
.post__actions-right .mod-panel-dropdown--post .mod-panel-dropdown__menu{z-index:320;}
