/* Forum graczy NetCinema — klasyczne forum dyskusyjne w barwach gry.

   Zasady:
   1. Układ jak na zwykłym forum: tabela działów, tabela tematów, post z kolumną autora.
   2. Ciemne panele i złoto z gry; czerwień tylko jako alarm, ogłoszenie albo niebezpieczna akcja.
   3. Komiksowy sznyt tylko w kilku miejscach: przyciski (ciemna obwódka i przesunięty cień),
      płaskie żółte plakietki z liczbami, nagłówki h1 w Titan One, ikony działów z gry, awatary.
      Żółty przycisk = główna akcja (Nowy temat, Odpowiedz, Zaloguj się); reszta jest ciemna.
   4. Titan One tylko w h1 i w nazwie „Forum graczy”; Tw Cen na drobne etykiety i przyciski;
      treść i interfejs — systemowy krój bezszeryfowy.
   5. Animacje tylko przy najechaniu i fokusie; nic w pętli.

   Kurtyna z gry (images/game/tlo.jpg) jest tłem od 900 px; telefon i tablet bez kurtyn.
   Klasy, na których opierają się testy (tools/forum-test/e2e.js), zostają na swoich rolach. */

/* ==== Kroje z www/fonts ==== */
@font-face {
    font-family: 'Titan One';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/titan-one-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Titan One';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/titan-one-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Tw Cen MT Condensed Extra Bold V2';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/TwCenMTCondensedExtraBoldV2.woff2") format("woff2"),
        url("../fonts/TwCenMTCondensedExtraBoldV2.woff") format("woff");
}

/* ==== Tokeny (kontrast w komentarzach: względem --panel) ==== */
:root {
    --night: #0b0908;
    --panel: #1b1512;
    --panel-2: #241c18;       /* paski nagłówków, kolumna autora */
    --line: #3d3129;
    --line-2: #5a4a3d;        /* obwódki pól i przycisków-kciuków */
    --text: #f3ead8;          /* 15:1 */
    --dim: #bcae98;           /* 8:1 */
    --link: #f5d27a;          /* 12:1 */
    --gold: #ffc614;
    --gold-hi: #ffd43d;
    --gold-line: #c8952a;
    --ink: #1a1206;
    --alert: #c41d14;         /* biały tekst 5,9:1 */
    --blue: #4d8fd6;
    --f-display: "Titan One", "Arial Rounded MT Bold", Arial, sans-serif;
    --f-label: "Tw Cen MT Condensed Extra Bold V2", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
    --f-ui: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --shadow-btn: 2px 2px 0 rgba(0, 0, 0, 0.8);
    --shadow-panel: 0 6px 18px rgba(0, 0, 0, 0.45);
}

/* ==== Baza ==== */
* {
    box-sizing: border-box;
}
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body {
    margin: 0;
    background: var(--night);
    color: var(--text);
    font: 16px/1.5 var(--f-ui);
}
a {
    color: var(--link);
    text-decoration: none;
}
a:hover {
    color: #fff;
    text-decoration: underline;
}
.lead a,
.notice a,
.post-content a,
.login-box a:not(.btn),
.rules a { /* odnośniki w tekście zawsze podkreślone */
    text-decoration: underline;
    text-underline-offset: 2px;
}
:focus {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}
:focus:not(:focus-visible) {
    outline: none;
}
h1, h2, h3,
form {
    margin: 0;
}
h1, h2, h3 {
    line-height: 1.2;
}
button,
summary {
    cursor: pointer;
}
h1,
.rules > .sr-only + h3 { /* regulamin: nagłówek z panelu admina jest widocznym tytułem (h1 tylko dla czytników) */
    color: #fff4d6;
    font: 28px/1.2 var(--f-display);
    letter-spacing: 0.01em;
    text-shadow: 0 2px 0 #000;
    overflow-wrap: anywhere;
}
/* Tw Cen i Titan mają własną grubość — bez sztucznego pogrubienia */
.btn b,
.plaque,
.vote-count b,
.profile-stats b {
    font-weight: normal;
}
.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}
.muted {
    color: var(--dim);
}
.nowrap {
    white-space: nowrap;
}
.sr-only,
.cell-label { /* .cell-label: podpis liczby w tabeli — dla czytnika, na telefonie widoczny */
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.skip { /* „Przejdź do treści” — widoczny dopiero przy fokusie z klawiatury */
    position: absolute;
    z-index: 100;
    left: 8px;
    top: -80px;
    padding: 9px 14px 7px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--gold);
    color: var(--ink);
    font: 18px/1.2 var(--f-label);
}
.skip:focus {
    top: 8px;
    color: var(--ink);
    text-decoration: none;
}

/* ==== Nagłówek: [logo · Forum graczy … gracz] / [Szukaj · Regulamin · moderacja]
   (od 1200 px w jednym rzędzie), na dolnej krawędzi delikatny rząd żarówek ==== */
.top {
    background: #130e0c;
    border-bottom: 2px solid var(--gold-line);
}
.wrap.top-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    padding-top: 10px;
    padding-bottom: 14px;
    background: radial-gradient(circle, rgba(255, 212, 107, 0.85) 0 1.5px, rgba(255, 212, 107, 0.18) 2.5px, transparent 3.5px) 0 100% / 14px 8px repeat-x;
}
.brand {
    order: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gold);
    font: 21px/1 var(--f-display);
    text-shadow: 0 2px 0 #000;
}
.brand:hover {
    color: var(--gold);
    text-decoration: none;
}
.brand img {
    display: block;
    height: 44px;
    width: auto;
}
.top-user {
    order: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}
.top-user .me { /* tekst to wyłącznie nick */
    display: inline-block;
    max-width: 220px;
    min-height: 40px;
    overflow: hidden;
    color: #fff;
    font: 600 15px/40px var(--f-ui);
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
.top-user .me:hover {
    color: var(--gold);
}
.top-nav {
    order: 3;
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
    border-top: 1px solid var(--line);
    padding-top: 4px;
}
.top-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    color: var(--text);
    font: 600 14px/1 var(--f-ui);
    white-space: nowrap;
}
.top-nav a:hover {
    color: var(--gold);
}
.top-nav a[aria-current] {
    color: var(--gold);
    box-shadow: inset 0 -2px 0 var(--gold);
}
.count { /* licznik zgłoszeń — czerwony jak licznik poczty w grze; wewnątrz tylko liczba */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--alert);
    color: #fff;
    font: 14px/1 var(--f-label);
}

/* Zakładki działów pod nagłówkiem (przewijają się w obrębie linii treści) */
.cat-tabs {
    display: flex;
    gap: 4px;
    margin-top: 14px;
    overflow-x: auto;
    border-bottom: 2px solid var(--gold-line);
    scrollbar-width: thin;
}
.cat-tab {
    flex: none;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 4px 14px 2px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: var(--panel);
    color: var(--text);
    font: 16px/1.1 var(--f-label);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}
.cat-tab:hover {
    background: var(--panel-2);
    color: var(--gold);
    text-decoration: none;
}
.cat-tab.here {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--ink);
}
.cat-tab:focus-visible { /* pasek zakładek przewija się w poziomie — obrys do środka, żeby nie był ucięty */
    outline-offset: -4px;
    outline-color: var(--ink);
}
.cat-tab:not(.here):focus-visible {
    outline-color: var(--gold);
}

/* ==== Przyciski (jak .btnComic w grze, stonowane) ==== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 6px 16px 5px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--gold);
    color: var(--ink);
    font: 18px/1.1 var(--f-label);
    letter-spacing: 0.03em;
    text-align: center;
    text-decoration: none;
    box-shadow: var(--shadow-btn);
    cursor: pointer;
    transition: transform 0.08s, box-shadow 0.08s, background-color 0.08s;
}
.btn:hover {
    background: var(--gold-hi);
    color: var(--ink);
    text-decoration: none;
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
}
.btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}
.btn-ghost {
    border-color: #000;
    background: #3a2f28;
    color: var(--text);
}
.btn-ghost:hover {
    background: #4a3c33;
    color: #fff;
}
.btn-danger,
.btn-danger:hover {
    background: #b3261e;
    color: #fff;
}
.btn-solve,
.btn-solve:hover {
    background: #2b6e2f;
    color: #fff;
}
.btn-small {
    min-height: 32px;
    padding: 4px 11px 3px;
    border-radius: 7px;
    font-size: 16px;
}
button.link {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
}
button.link:hover {
    text-decoration: underline;
}

/* ==== Układ strony ==== */
main.wrap {
    padding-top: 16px;
    padding-bottom: 32px;
}
.crumbs {
    margin: 0 0 14px;
    color: var(--dim);
    font-size: 14px;
    overflow-wrap: anywhere;
}
.crumbs .sep {
    margin: 0 4px;
}
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 14px 20px;
    margin: 0 0 18px;
}
.lead {
    max-width: 64ch;
    margin: 6px 0 0;
    color: var(--dim);
}
.page-head > div:first-child {
    flex: 1 1 360px;
}
.page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.search-inline input {
    width: 240px;
}
.cat-head {
    display: flex;
    align-items: center;
    gap: 14px;
}
.cat-head .cat-icon {
    width: 48px;
    height: 48px;
    margin: 0;
}

.panel {
    margin: 0 0 22px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--gold-line);
    border-radius: 10px;
    background: var(--panel);
    box-shadow: var(--shadow-panel);
}
.panel-title { /* pasek nagłówka panelu */
    margin: -16px -18px 16px;
    padding: 10px 18px 8px;
    border-bottom: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
    background: var(--panel-2);
    color: var(--gold);
    font: 19px/1.2 var(--f-label);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.panel.table-panel {
    padding: 0;
}
.table-panel .panel-title {
    margin: 0;
}
.empty {
    margin: 0;
    padding: 22px 18px;
    color: var(--dim);
    text-align: center;
}
.hint,
.file-list,
.chips-label,
.mod-field-label {
    color: var(--dim);
    font-size: 14px;
}
.hint {
    margin: 6px 0 0;
}
footer.foot { /* display: table — szerokość dopasowana do tekstu */
    display: table;
    max-width: calc(100% - 24px);
    margin: 28px auto;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(11, 9, 8, 0.9);
    color: var(--dim);
    font-size: 14px;
    text-align: center;
}

/* ==== Komunikaty ==== */
.notice {
    margin: 0 0 16px;
    padding: 10px 14px;
    border: 1px solid #2f4a6b;
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    background: #131b25;
    color: var(--text);
    font-size: 15px;
}
.notice.warn,
.notice.team {
    border-color: #6b4a14;
    border-left-color: var(--gold);
    background: #2a1f0b;
}

/* ==== Pola formularzy ==== */
input:not([type]),
input[type="search"],
input[type="text"],
input[type="password"],
input[type="file"],
select,
textarea {
    width: 100%;
    max-width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--line-2);
    border-radius: 6px;
    background: #120e0c;
    color: var(--text);
    font: 16px/1.4 var(--f-ui);
}
input::placeholder,
textarea::placeholder {
    color: #a89c8b;
    opacity: 1;
}
input:focus,
select:focus,
textarea:focus {
    border-color: var(--gold);
    outline: 2px solid var(--gold);
    outline-offset: 0;
}
textarea {
    min-height: 120px;
    line-height: 1.6;
    resize: vertical;
}
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0 8px 0 0;
    vertical-align: -3px;
    accent-color: var(--gold);
}
input[type="file"] {
    padding: 10px;
    border-style: dashed;
    color: var(--dim);
    font-size: 14px;
}
input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 4px 12px 3px;
    border: 2px solid #000;
    border-radius: 7px;
    background: #3a2f28;
    color: var(--text);
    font: 16px/1.1 var(--f-label);
    cursor: pointer;
}
.file-list {
    margin-top: 4px;
}
.file-list .error {
    color: #ff9a90;
    font-weight: bold;
}
.field {
    margin-bottom: 16px;
}
.compose label,
.compose .label {
    display: block;
    margin-bottom: 6px;
    font: 600 15px/1.3 var(--f-ui);
}
.compose label .muted,
.compose label.check {
    font-weight: normal;
}
.compose label.check {
    font-size: 16px;
}
.compose label.image-choice { /* edycja: zrzut ekranu z polem „usuń” pod spodem */
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    color: #ff9a90;
    font-size: 14px;
}
.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}
.search-big {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}

/* ==== Statusy i etykiety: małe pigułki ==== */
.tag,
.status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px 1px;
    border-radius: 999px;
    background: #d8d0c2;
    background: var(--c, #d8d0c2);
    color: var(--ink);
    color: var(--c-ink, var(--ink));
    font: 14px/1.2 var(--f-label);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}
.icon,
.thumb-icon {
    flex: none;
    fill: currentColor;
}
.status-open, .chip-open,
.status-considering, .chip-considering { --c: #a9d1ff; --c-ink: #0a2340; }
.status-solved, .chip-solved,
.status-fixed, .chip-fixed,
.status-done, .chip-done { --c: #a3e4a4; --c-ink: #0b2a0d; }
.status-confirmed, .chip-confirmed { --c: #ffc078; --c-ink: #3a1a00; }
.status-planned, .chip-planned { --c: #d6c2ff; --c-ink: #24124a; }
.status-rejected, .chip-rejected { --c: #ffb0a8; --c-ink: #3d0a05; }
.tag-info { --c: var(--alert); --c-ink: #fff; }
.tag-pinned { --c: var(--gold); }
.tag-helpful { --c: #2b6e2f; --c-ink: #fff; }
.tag-hidden { --c: #5a1410; --c-ink: #ffd0ca; letter-spacing: 0.02em; text-transform: none; white-space: normal; }
.topic-tags {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

/* Role */
.role {
    display: inline-block;
    padding: 2px 7px 1px;
    border-radius: 5px;
    font: 13px/1.25 var(--f-label);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}
.role-moderator {
    background: #1d5aa0;
    color: #fff;
}
.role-admin {
    background: #7a1d12;
    color: #ffe9a8;
}
.role-team {
    background: var(--gold);
    color: var(--ink);
}

/* Żółta plakietka z liczbą (jak liczniki w grze) — płaska, żeby nie udawała przycisku */
.plaque,
.vote-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 32px;
    padding: 3px 10px 1px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    background: var(--gold);
    color: var(--ink);
    font: 17px/1.15 var(--f-label);
    letter-spacing: 0.03em;
}

/* ==== Filtry statusów ==== */
.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.chip {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 4px 12px 2px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: var(--panel);
    color: var(--text);
    font: 15px/1 var(--f-label);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.chip[class*="chip-"]::before { /* kropka w kolorze statusu */
    content: "";
    width: 9px;
    height: 9px;
    flex: none;
    border-radius: 50%;
    background: var(--c, #d8d0c2);
}
.chip:hover {
    border-color: var(--gold-line);
    color: #fff;
    text-decoration: none;
}
.chip.active {
    border-color: var(--ink);
    background: var(--gold);
    color: var(--ink);
}
.chip.active::before {
    box-shadow: 0 0 0 1px var(--ink);
}
.chips-sort { /* sortowanie: przełącznik z podpisem, po prawej — inaczej niż filtry statusów */
    gap: 0;
    margin-left: auto;
}
.chips-label {
    align-self: center;
    margin-right: 8px;
}
.chips-sort .chip {
    border-radius: 0 999px 999px 0;
}
.chips-label + .chip {
    margin-right: -1px;
    border-radius: 999px 0 0 999px;
}

/* ==== Paginacja ==== */
.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 16px 0;
}
.pager a,
.pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 4px 10px;
    border: 1px solid var(--line-2);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
    font: 600 14px/1 var(--f-ui);
}
.pager a:hover {
    border-color: var(--gold);
    color: var(--gold);
    text-decoration: none;
}
.pager .current {
    border: 2px solid var(--ink);
    background: var(--gold);
    color: var(--ink);
}
.pager .gap {
    border-color: transparent;
    background: none;
}

/* ==== Tabele: działy (strona główna) i tematy ==== */
.forum-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.forum-table th,
.forum-table td {
    padding: 10px 14px;
    border-top: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}
.forum-table thead th {
    padding: 8px 14px 6px;
    border-top: 0;
    color: var(--dim);
    font: 14px/1.2 var(--f-label);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.forum-table .num {
    text-align: center;
}
.forum-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}
.last {
    font-size: 14px;
    line-height: 1.35;
}
.last a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.last-meta {
    display: block;
    color: var(--dim);
}

/* działy */
.categories col.col-icon { width: 66px; }
.categories col.col-num { width: 84px; }
.categories col.col-last { width: 250px; }
.categories td.cat-icon-cell {
    padding-right: 0;
    text-align: center;
}
.cat-icon {
    display: block;
    flex: none;
    width: 40px;
    height: 40px;
    margin: 0 auto;
    object-fit: contain;
    filter: drop-shadow(1px 2px 0 rgba(0, 0, 0, 0.6));
}
.cat-name {
    color: var(--link);
    font: 700 17px/1.3 var(--f-ui);
}
.cat-desc {
    margin: 2px 0 0;
    color: var(--dim);
    font-size: 14px;
    line-height: 1.45;
}
.category-zloty-klub td:first-child,
.grouped .topic-row.pinned td:first-child { /* wyróżniony dział i przypięte tematy: złota krawędź, lekko złote tło */
    box-shadow: inset 4px 0 0 var(--gold);
}
.category-zloty-klub,
.grouped .topic-row.pinned {
    background: rgba(255, 198, 20, 0.055);
}

/* tematy */
.topic-list th.num { width: 104px; }
.topic-list.with-votes th.num { width: 92px; }
.topic-list th.col-last { width: 200px; }
.topic-main {
    overflow-wrap: anywhere;
}
.topic-main .topic-tags {
    margin-right: 4px;
    vertical-align: 1px;
}
.topic-tags:empty {
    display: none;
}
.topic-title {
    color: #fbf3e2;
    font: 600 16px/1.35 var(--f-ui);
}
.topic-title:hover {
    color: var(--gold);
}
.topic-meta {
    margin-top: 2px;
    color: var(--dim);
    font-size: 14px;
}
.topic-row .tag-pinned,
.topic-row .tag-locked { /* w wierszu tylko ikonki: pinezka, kłódka */
    padding: 0;
    background: none;
    color: var(--gold);
}
.topic-row .tag-locked {
    color: var(--dim);
}
.topic-row .icon {
    width: 16px;
    height: 16px;
}
.topic-row.is-hidden .topic-title {
    color: var(--dim);
    text-decoration: line-through;
}
.group-head th {
    padding: 6px 14px 4px;
    background: var(--panel-2);
    color: var(--gold);
    font: 15px/1.2 var(--f-label);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Najczęściej pomagają */
.helper-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: helper;
}
.helper-list li::before {
    counter-increment: helper;
    content: counter(helper) ".";
    margin-right: 6px;
    color: var(--gold);
    font: 17px/1 var(--f-label);
}
.helped {
    color: #8ee38f;
    font-size: 14px;
}

/* ==== Temat: nagłówek, akcje, moderacja ==== */
.topic-head {
    margin-bottom: 18px;
}
.topic-title-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px 20px;
}
.topic-heading {
    flex: 1 1 420px;
    min-width: 0;
}
.topic-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-top: 10px;
}
.topic-sub .topic-meta {
    margin: 0;
}
.topic-head .tag-pinned,
.topic-head .tag-locked { /* znaczniki jako obrys — status zostaje pełną pigułką */
    padding: 2px 7px 0;
    border: 1px solid var(--line-2);
    background: transparent;
    color: var(--gold);
}
.topic-sub .topic-meta b {
    color: var(--text);
    font-weight: 600;
}
.topic-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.vote {
    display: flex;
    align-items: center;
    gap: 12px;
}
.topic-head .notice,
.topic-head > .hint {
    margin: 14px 0 0;
}
.mod-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    padding: 10px 12px;
    border: 1px solid #2f4a6b;
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    background: #131b25;
}
.mod-label {
    margin-right: 4px;
    color: #a9d1ff;
    font: 15px/1 var(--f-label);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.mod-tools form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.mod-tools select,
.mod-tools input:not([type="hidden"]) {
    width: auto;
    min-height: 32px;
    padding: 4px 8px;
    font-size: 14px;
}
.mod-tools input[name="reason"] {
    width: 190px;
}

/* ==== Posty: kolumna autora po lewej, po prawej pasek z datą i numerem,
   treść i akcje na dole ==== */
.post {
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    margin: 0 0 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    box-shadow: var(--shadow-panel);
    scroll-margin-top: 16px;
}
.post.by-team {
    border-color: var(--gold-line);
}
.post.is-helpful {
    border-color: #2b6e2f;
}
.post.is-hidden {
    border: 1px dashed #c4473f;
}
.post:target {
    box-shadow: 0 0 0 3px var(--gold), var(--shadow-panel);
}
.post-author {
    grid-column: 1;
    grid-row: 1 / 3;
    padding: 16px 12px;
    border-right: 1px solid var(--line);
    border-radius: 9px 0 0 9px;
    background: var(--panel-2);
    text-align: center;
}
.post-head {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--dim);
    font-size: 14px;
}
.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
}
.post-no {
    flex: none;
    color: var(--dim);
    font: 600 14px/1 var(--f-ui);
}
.post-body {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 14px 18px 10px;
}
.post-content {
    flex: 1 0 auto;
    max-width: 75ch;
    color: var(--text);
    font: 16px/1.6 var(--f-ui);
    overflow-wrap: anywhere;
}
.post-content strong {
    color: #fff;
}
.post-content blockquote,
.report-item blockquote {
    margin: 8px 0;
    padding: 8px 14px;
    border-left: 3px solid var(--gold-line);
    border-radius: 0 6px 6px 0;
    background: var(--panel-2);
    color: #e3d8c4;
}
.post-notice {
    margin: 0 0 12px;
}
.post-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 4px;
}
.post-images img {
    display: block;
    max-width: 220px;
    max-height: 160px;
    border: 1px solid var(--line-2);
    border-radius: 6px;
    object-fit: cover;
}
.post-images a:hover img {
    border-color: var(--gold);
}

/* autor */
.avatar { /* kolor z inline hsl */
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 64px;
    height: 64px;
    margin: 0 auto 8px;
    border: 2px solid var(--ink);
    border-radius: 12px;
    background-color: #4a3f36;
    color: #fff;
    font: 30px/1 var(--f-display);
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
    box-shadow: var(--shadow-btn);
}
.avatar:hover {
    color: #fff;
    text-decoration: none;
}
.avatar-gone {
    background: #6a6158;
}
.avatar-team { /* logo NetCinema zamiast litery */
    overflow: hidden;
    background: #161433;
}
.avatar img {
    display: block;
    width: 100%;
    height: 100%;
}
.author-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}
.author-name {
    color: var(--link);
    font: 700 16px/1.25 var(--f-ui);
    overflow-wrap: anywhere;
}
.author-name.author-team {
    color: var(--gold);
}
.rank { /* ranga (Widz → Legenda kina); pasek postępu tylko w profilu */
    color: var(--gold);
    font: 14px/1.2 var(--f-label);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.author-detail {
    color: var(--dim);
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.author-detail.helped {
    color: #8ee38f;
    font-weight: 600;
}
.stars {
    color: var(--gold);
    letter-spacing: 1px;
}

/* akcje pod postem: po lewej odnośniki, po prawej kciuki */
.post-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    margin-top: 14px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    font-size: 14px;
}
.post-actions a,
.post-actions button.link,
.post-actions summary {
    color: var(--link);
    font-weight: 600;
}
.post-actions button.link.danger,
.post-actions .hide-post summary {
    color: #ff9a90;
}
button.link.helpful-toggle.strong { /* „✓ Pomógł mi” u autora tematu: zielony obrys jak etykieta „Pomógł” */
    padding: 4px 10px 2px;
    border: 2px solid #2b6e2f;
    border-radius: 7px;
    color: #8ee38f;
    font: 16px/1.1 var(--f-label);
    letter-spacing: 0.03em;
}
button.link.helpful-toggle.strong:hover {
    background: #2b6e2f;
    color: #fff;
    text-decoration: none;
}
.report summary,
.hide-post summary {
    list-style: none;
}
.report summary::-webkit-details-marker,
.hide-post summary::-webkit-details-marker {
    display: none;
}
details.report[open],
details.hide-post[open] { /* rozwinięte „Zgłoś”/„Ukryj” na całą szerokość pod akcjami */
    flex-basis: 100%;
    order: 10;
}
.report form,
.hide-post form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    max-width: 440px;
    margin-top: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel-2);
}
.report label,
.hide-post label {
    display: block;
    width: 100%;
    color: var(--text);
    font-weight: normal;
}
.report textarea,
.hide-post input {
    margin-top: 4px;
}
.report textarea {
    min-height: 64px;
}
.thumbs,
.thumb-form {
    display: flex;
    align-items: center;
    gap: 6px;
}
.thumbs {
    margin-left: auto;
}
.thumb {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 3px 10px;
    border: 1px solid var(--line-2);
    border-radius: 16px;
    background: none;
    color: var(--dim);
    font: 600 14px/18px var(--f-ui);
    touch-action: manipulation;
}
@media (hover: hover) { /* na dotyku :hover „przykleja się” po dotknięciu */
    button.thumb:not(.readonly):hover {
        border-color: var(--text);
        color: var(--text);
    }
    button.thumb.on:not(.readonly):hover {
        color: #fff;
    }
}
.post-actions a.thumb { /* gość: kciuk prowadzi do logowania, wygląda jak licznik */
    color: var(--dim);
    font-weight: 600;
    text-decoration: none;
}
.thumb-up.on {
    border-color: #2b6e2f;
    background: #2b6e2f;
    color: #fff;
}
.thumb-down.on {
    border-color: #b3261e;
    background: #b3261e;
    color: #fff;
}
.thumb.readonly {
    border-color: transparent;
    cursor: default;
}
.post-actions a.thumb.readonly {
    cursor: pointer;
}
.thumb-why { /* powód nieaktywnych kciuków / błąd — pod akcjami, po prawej */
    flex-basis: 100%;
    order: 11;
    margin: 0;
    color: var(--dim);
    font-size: 13px;
    text-align: right;
}
.thumb-why:empty { /* pusty: niewidoczny, ale zostaje dla czytników ekranu (role=status) */
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
.thumb-form.busy .thumb {
    opacity: 0.6;
}

/* post ukryty — zwykła wyszarzona informacja dla innych */
.post.post-stub {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border: 1px dashed var(--line-2);
    background: rgba(27, 21, 18, 0.88);
    color: var(--dim);
    box-shadow: none;
}
.post-stub p {
    margin: 0;
    font-style: italic;
}
.post-stub b {
    color: var(--text);
}

/* odpowiedź */
.reply-box.reply-none {
    display: none;
}
.reply-box .empty p {
    margin: 0 0 12px;
}

/* ==== Profil ==== */
.profile-head {
    display: flex;
    align-items: center;
    gap: 20px;
}
.avatar-large {
    width: 96px;
    height: 96px;
    margin: 0;
    border-width: 3px;
    border-radius: 18px;
    font-size: 46px;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.8);
}
.profile-id {
    min-width: 0;
}
.profile-head h1 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}
.profile-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin: 8px 0 0;
    color: var(--dim);
    font-size: 15px;
}
.profile-facts b {
    color: var(--text);
}
.profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.profile-stats .stat { /* płaskie kafelki (nie przyciski), liczba w złocie */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-2);
    color: var(--text);
    font: 15px/1.2 var(--f-ui);
}
.profile-stats b {
    color: var(--gold);
    font: 21px/1 var(--f-label);
}
.profile-stats .thumb-icon {
    width: 17px;
    height: 17px;
}
.rank-progress {
    max-width: 440px;
    margin-top: 14px;
}
.rank-progress .hint {
    margin: 0 0 6px;
}
.rank-bar {
    height: 12px;
    border: 2px solid var(--ink);
    border-radius: 6px;
    background: #3a2f28;
    overflow: hidden;
}
.rank-bar span {
    display: block;
    height: 100%;
    background: var(--gold);
}
.profile .mod-tools,
.profile .notice {
    margin: 16px 0 0;
}

/* ==== Logowanie, komunikat, regulamin ==== */
.panel.login-box {
    max-width: 460px;
    margin: 12px auto 24px;
    padding: 22px 26px;
}
.login-box .lead {
    margin: 8px 0 18px;
    font-size: 15px;
}
.login-form .form-actions {
    gap: 16px;
}
.login-alt {
    margin: 16px 0 0;
}
.panel.message {
    max-width: 640px;
    margin: 12px auto 24px;
    padding: 24px 26px;
    text-align: center;
}
.message p {
    max-width: 56ch;
    margin: 10px auto 18px;
}
.message .form-actions {
    justify-content: center;
}
.panel.rules {
    max-width: 820px;
    margin: 0 auto 24px;
    padding: 22px 28px;
    line-height: 1.6;
}
.rules h1,
.rules > .sr-only + h3 {
    margin: 0 0 12px;
    text-transform: none;
}
.rules h2 {
    margin: 22px 0 6px;
    color: var(--gold);
    font: 22px/1.2 var(--f-label);
    letter-spacing: 0.03em;
}
.rules h3 {
    margin: 18px 0 6px;
    color: var(--gold);
    font: 18px/1.2 var(--f-label);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ==== Zgłoszenia i dziennik moderacji ==== */
.report-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.report-item {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--alert);
    border-radius: 8px;
    background: var(--panel-2);
}
.report-head {
    font-weight: 600;
    overflow-wrap: anywhere;
}
.report-head .muted {
    font-weight: normal;
}
.report-reason {
    color: var(--dim);
    font-size: 14px;
}
.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.report-list.compact {
    gap: 4px;
}
.report-list.compact .report-item {
    padding: 4px 0 4px 12px;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    background: none;
    font-size: 14px;
}
.table-wrap {
    overflow-x: auto;
}
table.log {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
table.log th,
table.log td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
table.log th {
    color: var(--dim);
    font: 14px/1.2 var(--f-label);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
table.log td.nowrap {
    color: var(--dim);
}

/* ==== Kurtyna (≥ 900 px): lambrekin u góry, zasłony po bokach, treść na scenie ==== */
@media (min-width: 900px) {
    body {
        padding-top: 6.6vw;
        background: #000 url("/images/game/tlo.jpg") no-repeat center top fixed;
        background-size: cover;
    }
    .wrap {
        max-width: 1080px;
        max-width: min(1080px, max(640px, 68vw));
    }
    .top {
        background: none;
        border: 0;
    }
    .wrap.top-inner { /* ciemny pasek z cienką złotą ramką */
        padding: 10px 18px 14px;
        border: 1px solid var(--gold-line);
        border-radius: 10px;
        background-color: #17110f; /* rząd żarówek z reguły ogólnej zostaje */
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
    }
    footer.foot {
        margin-bottom: 6vw;
    }
}

/* Szeroki ekran: nagłówek w jednym rzędzie [logo · menu … gracz]; administrator
   (dłuższe menu) zostaje przy dwóch rzędach */
@media (min-width: 1200px) {
    .top-inner:not(.nav-long) .top-nav {
        order: 2;
        flex-basis: auto;
        margin-left: 6px;
        padding-top: 0;
        border-top: 0;
    }
    .top-inner:not(.nav-long) .top-user {
        order: 3;
    }
}

/* Węższa scena (≤ 1199 px): węższe kolumny liczb i zakładki */
@media (max-width: 1199px) {
    .cat-tabs {
        gap: 2px;
    }
    .cat-tab {
        padding: 4px 9px 2px;
        font-size: 15px;
        letter-spacing: 0.02em;
    }
    .categories col.col-icon { width: 56px; }
    .categories col.col-num { width: 68px; }
    .categories col.col-last { width: 190px; }
    .topic-list th.num,
    .topic-list.with-votes th.num { width: 86px; }
    .topic-list th.col-last { width: 170px; }
    .forum-table th,
    .forum-table td {
        padding-left: 10px;
        padding-right: 10px;
    }
    .post {
        grid-template-columns: 150px minmax(0, 1fr);
    }
}

/* ==== Telefon (≤ 720 px): bez kurtyn, wiersze tabel jako bloki, cele dotyku ≥ 40 px ==== */
@media (max-width: 720px) {
    h1,
    .rules > .sr-only + h3 {
        font-size: 23px;
    }
    .wrap {
        padding: 0 12px;
    }
    .brand { /* logo nad napisem — w pierwszym rzędzie zostaje miejsce na gracza */
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        font-size: 15px;
    }
    .brand img {
        height: 28px;
    }
    .top-user .me {
        max-width: 110px;
    }
    .cat-tabs {
        margin-top: 10px;
    }
    /* menu, zakładki i filtry w jednym przewijanym rzędzie; obrys fokusu do środka */
    .top-nav,
    .chips {
        flex-wrap: nowrap;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: thin;
    }
    .filters > .chips {
        flex: 1 1 100%;
        margin-left: 0;
    }
    .top-nav a:focus-visible,
    .chip:focus-visible {
        outline-offset: -3px;
    }
    .crumb-here { /* tytuł bieżącej strony jest zaraz niżej w h1 */
        display: none;
    }
    /* cele dotyku ≥ 40 px */
    .top-nav a,
    .btn-small,
    .cat-tab,
    .chip,
    .pager a,
    .pager span,
    .thumb,
    .post-no,
    .author-name,
    .helper-list a,
    .compose label.check,
    .post-actions a,
    .post-actions button.link,
    .post-actions summary,
    .mod-tools select,
    .mod-tools input:not([type="hidden"]) {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
    }
    .pager a,
    .pager span {
        min-width: 40px;
    }
    .crumbs a {
        display: inline-block;
        padding: 9px 0;
    }
    .page-head {
        display: block;
    }
    .page-actions {
        margin-top: 12px;
    }
    .page-actions > *,
    .form-actions .btn {
        flex: 1 1 auto;
    }
    .search-inline input {
        width: 100%;
    }
    .search-big {
        flex-direction: column;
    }
    .cat-head .cat-icon {
        width: 40px;
        height: 40px;
    }
    .panel,
    .panel.rules,
    .panel.login-box,
    .panel.message {
        padding: 14px 12px;
    }
    .panel-title {
        margin: -14px -12px 14px;
        padding: 9px 12px 7px;
    }

    /* tabele jako bloki: tytuł, pod nim opis/autor, potem liczby; cały wiersz jest odnośnikiem */
    .forum-table,
    .forum-table tbody,
    .forum-table tr,
    .forum-table th,
    .forum-table td {
        display: block;
        padding: 0;
        border: 0;
    }
    .forum-table thead,
    .forum-table colgroup {
        display: none;
    }
    .forum-table tr {
        position: relative;
        padding: 10px 12px;
        border-top: 1px solid var(--line);
    }
    .forum-table tbody tr.group-head {
        padding: 0;
    }
    .forum-table .group-head th {
        padding: 6px 12px 4px;
    }
    .forum-table td.num,
    .forum-table td.last,
    .forum-table .last a,
    .forum-table .last-meta {
        display: inline;
        color: var(--dim);
        font-size: 14px;
        white-space: normal;
    }
    .forum-table td.num + td::before,
    .forum-table .last a + .last-meta::before {
        content: " · ";
    }
    .forum-table td.num b {
        color: var(--text);
    }
    .cell-label {
        position: static;
        width: auto;
        height: auto;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: normal;
    }
    .forum-table .topic-meta a { /* drugorzędne odnośniki — dotyk otwiera cały wiersz */
        color: var(--dim);
    }
    .forum-table .last a { /* „Ostatni post” nad nakładką wiersza, cel dotyku 40 px */
        position: relative;
        z-index: 1;
        padding: 11px 0;
        color: var(--link);
        text-decoration: underline;
        text-underline-offset: 2px;
    }
    .topic-title::after,
    .cat-name::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
    }
    .topic-title,
    .cat-name {
        display: block;
    }
    .topic-main,
    .categories td.cat-main {
        margin-bottom: 4px;
    }
    .topic-main .topic-tags {
        margin-bottom: 3px;
    }
    .grouped .topic-row.pinned td:first-child,
    .category-zloty-klub td:first-child {
        box-shadow: none;
    }
    .grouped .topic-row.pinned,
    .category-zloty-klub {
        box-shadow: inset 3px 0 0 var(--gold);
    }
    .categories tr {
        min-height: 64px;
        padding-left: 62px;
    }
    .categories td.cat-icon-cell {
        position: absolute;
        left: 12px;
        top: 12px;
    }
    .categories td.last {
        display: block;
        margin-top: 2px;
    }
    .categories td.num + td.last::before {
        content: none;
    }

    /* temat i moderacja */
    .topic-actions,
    .mod-label,
    .mod-tools form.inline-select {
        flex: 1 1 100%;
    }
    .mod-tools input[name="reason"] {
        flex: 1 1 120px;
        width: auto;
        min-width: 0;
    }

    /* post: autor w jednej linii nad treścią */
    .post {
        display: block;
    }
    .post-author {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        border-radius: 9px 9px 0 0;
        text-align: left;
    }
    .post-author .avatar {
        width: 40px;
        height: 40px;
        margin: 0;
        border-radius: 9px;
        font-size: 18px;
    }
    .author-info {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0 8px;
    }
    .author-detail {
        display: none;
    }
    .post-head {
        padding: 0 8px 0 12px;
    }
    .post-meta {
        padding: 6px 0;
    }
    .post-no {
        padding: 0 4px;
    }
    .post-body {
        padding: 12px 12px 8px;
    }
    .post-actions {
        gap: 0 14px;
    }
    .post-images img {
        max-width: 100%;
    }

    /* profil */
    .profile-head {
        align-items: flex-start;
        gap: 14px;
    }
    .avatar-large {
        width: 64px;
        height: 64px;
        border-radius: 12px;
        font-size: 30px;
    }
}

/* ==== Ruch: tylko gdy gracz nie wyłączył animacji ==== */
@media (prefers-reduced-motion: reduce) {
    .btn {
        transition: none;
    }
    .btn:hover,
    .btn:active {
        transform: none;
    }
}
