/* Poligoners.pl, strona serwera TS3. Jasny motyw domyślnie, ciemny wg systemu albo przełącznika. */
:root {
  --bg: #f5f6f9; --card: #ffffff; --soft: #f0f2f6; --line: #e4e7ee; --text: #151922; --muted: #677085;
  --accent: #e2364a; --accent-2: #b4172c; --accent-soft: #fde8eb; --ok: #16a36a; --ok-soft: #e3f6ee;
  --warn: #d98a0b; --off: #a5adbd; --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  --radius: 16px; --hero-1: #1a0f14; --hero-2: #4a0f1c; --hero-3: #e2364a;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1117; --card: #161b24; --soft: #1d2430; --line: #262e3b; --text: #e8ebf1; --muted: #8d97aa;
    --accent-soft: #3a1820; --ok-soft: #12291f; --off: #556075; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1117; --card: #161b24; --soft: #1d2430; --line: #262e3b; --text: #e8ebf1; --muted: #8d97aa;
  --accent-soft: #3a1820; --ok-soft: #12291f; --off: #556075; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* atrybut hidden zawsze wygrywa z display z klasy (AUD5-001: formularz „przez nick” i „Wylogowano” były widoczne) */
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); overflow-x: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.hide { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- nagłówek ---- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(26, 15, 20, .92); backdrop-filter: saturate(1.4) blur(10px); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.top .wrap { max-width: 1400px; display: flex; align-items: center; gap: 18px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; color: #fff; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo b { color: var(--hero-3); }
.logo .mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #ff5d6e, #b4172c); display: grid; place-items: center; box-shadow: 0 4px 14px rgba(226, 54, 74, .45); }
.logo .mark svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2.4; stroke-linecap: round; }
.menu { display: flex; gap: 2px; flex: 1; align-items: center; }
.more { position: relative; }
.morebtn { display: inline-flex; align-items: center; gap: 4px; color: rgba(255, 255, 255, .72); padding: 8px 10px 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.morebtn:hover, .more.open .morebtn { color: #fff; background: rgba(255, 255, 255, .07); }
.morebtn.on { color: #fff; background: rgba(255, 255, 255, .12); }
.morebtn .i { width: 16px; height: 16px; transition: transform .2s; }
.more.open .morebtn .i { transform: rotate(180deg); }
.moredrop { position: absolute; left: 0; top: calc(100% + 8px); min-width: 210px; padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, .25); z-index: 40; display: none; }
.more.open .moredrop { display: grid; animation: fadeIn .15s ease-out; }
.menu .moredrop a { color: var(--text); padding: 10px 12px; border-radius: 9px; }
.menu .moredrop a:hover, .menu .moredrop a:focus-visible { background: var(--soft); color: var(--text); outline: none; }
.menu .moredrop a.on { background: var(--accent-soft); color: var(--accent); }
.menu::-webkit-scrollbar { display: none; }
.menu a { color: rgba(255, 255, 255, .72); padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.menu a:hover { color: #fff; background: rgba(255, 255, 255, .07); text-decoration: none; }
.menu a.on { color: #fff; background: rgba(255, 255, 255, .12); }
.actions { display: flex; align-items: center; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 11px; padding: 10px 16px; font-weight: 600; font-size: 14px; cursor: pointer; background: var(--accent); color: #fff; white-space: nowrap; transition: transform .08s, background .15s; }
.btn:hover { background: var(--accent-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.light { background: #fff; color: #1a0f14; }
.btn.light:hover { background: #f1e6e8; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--soft); }
.top .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .22); }
.top .btn.ghost:hover { background: rgba(255, 255, 255, .08); }
.iconbtn { width: 38px; height: 38px; padding: 0; border-radius: 11px; }
.burger { display: none; }

/* ---- hero ---- */
.hero { color: #fff; background:
  radial-gradient(900px 420px at 85% -10%, rgba(226, 54, 74, .55), transparent 60%),
  radial-gradient(700px 380px at 0% 120%, rgba(226, 54, 74, .25), transparent 60%),
  linear-gradient(160deg, var(--hero-1), var(--hero-2)); padding: 44px 0 92px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -160px; width: 520px; height: 520px; border-radius: 50%; border: 70px solid rgba(255, 255, 255, .04); }
.hero .wrap { display: flex; gap: 32px; align-items: flex-end; justify-content: space-between; position: relative; z-index: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(22, 163, 106, .16); color: #6ee7b7; border: 1px solid rgba(110, 231, 183, .25); }
.pill.down { background: rgba(226, 54, 74, .18); color: #ffb3bc; border-color: rgba(255, 179, 188, .3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(110, 231, 183, .18); flex: none; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.05; letter-spacing: -.03em; margin: 18px 0 14px; font-weight: 800; }
.hero h1 em { font-style: normal; color: #ff8593; }
.hero .meta { color: rgba(255, 255, 255, .72); font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.hero .meta b { color: #fff; }
.counter { text-align: right; flex: none; }
.counter .big { font-size: clamp(56px, 9vw, 96px); font-weight: 800; line-height: .9; letter-spacing: -.04em; }
.counter .big .of { font-size: .38em; color: rgba(255, 255, 255, .55); font-weight: 600; letter-spacing: 0; }
.counter .lbl { color: rgba(255, 255, 255, .7); font-size: 14px; margin-top: 8px; }

/* ---- karty statystyk ---- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: -56px; position: relative; z-index: 2; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; justify-content: space-between; gap: 12px; }
.tile .k { color: var(--muted); font-size: 13px; font-weight: 600; }
.tile .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.tile .v small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.tile .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }

/* ---- treść ---- */
main.wrap { padding-top: 24px; padding-bottom: 40px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid2.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.col { display: grid; gap: 20px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card h2, .card h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.card .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card .head .muted { font-size: 13px; }
.lead { color: var(--muted); margin: 4px 0 16px; font-size: 14px; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; font-size: 14px; }

/* kto gdzie siedzi */
.room { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.room .rh { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; background: var(--soft); font-weight: 600; font-size: 14px; }
.room .rh .n { color: var(--muted); font-weight: 600; font-size: 13px; }
.room .people { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
.person { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 600; max-width: 100%; }
.person > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person.admin { border-color: rgba(226, 54, 74, .45); }
.person.bot { border-color: rgba(22, 163, 106, .4); background: var(--ok-soft); }
.av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800; flex: none; text-transform: uppercase; }
.tag { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px; background: var(--soft); color: var(--muted); flex: none; }
.tag.bot { background: var(--ok); color: #fff; }
.tag.adm { background: var(--accent); color: #fff; }
.tag.away { background: var(--soft); }
.tree { font-size: 14px; max-height: 520px; overflow: auto; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 6px; }
.tree div { padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree .sp { color: var(--muted); font-size: 12px; }
.tree .cl { color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.switch input { accent-color: var(--accent); width: auto; margin: 0; }

/* ostatnio */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed li:last-child { border-bottom: 0; }
.feed .dot { width: 8px; height: 8px; box-shadow: none; }
.feed .in { color: var(--ok); }
.feed .out { color: var(--off); }
.feed b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.feed .t { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }

/* administracja */
.staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.member { border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; text-align: center; background: var(--soft); min-width: 0; }
.member .av { width: 40px; height: 40px; font-size: 15px; margin: 0 auto 8px; position: relative; }
.member .av::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--off); border: 2px solid var(--soft); }
.member.on .av::after { background: var(--ok); }
.member b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member > span { font-size: 12px; color: var(--muted); }
.member.on > span { color: var(--ok); font-weight: 600; }

/* ranking */
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(60px, 1.2fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rank li:last-child { border-bottom: 0; }
.rank .no { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--soft); color: var(--muted); }
.rank li:nth-child(1) .no { background: #fde68a; color: #7a4e00; }
.rank li:nth-child(2) .no { background: #e5e7eb; color: #374151; }
.rank li:nth-child(3) .no { background: #fed7aa; color: #7c2d12; }
.rank .who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.rank .who:hover { color: var(--accent); }
.bar { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff6b7b, var(--accent)); }
.rank .tm { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }
.rank.compact li { grid-template-columns: 28px minmax(0, 1fr) minmax(50px, 1fr) auto; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--soft); gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* wykresy */
.chart { display: block; max-width: 100%; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; }
.chart .area { fill: url(#fillGrad); }
.chart .ln { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.heat { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.heat td { height: 22px; border-radius: 4px; background: var(--soft); padding: 0; }
.heat th { font-size: 11px; color: var(--muted); font-weight: 600; text-align: left; width: 28px; }
.heat .hrs td { background: none; height: auto; font-size: 10px; color: var(--muted); text-align: center; }
.legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.heatwrap { overflow-x: auto; }
.heatwrap .heat { min-width: 520px; }

/* tabele, formularze */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list td, table.list th { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.list th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--soft); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
input, select { width: 100%; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg); outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row { display: flex; gap: 10px; align-items: flex-end; }
.row > * { flex: 1; min-width: 0; }
.row > .btn { flex: none; }
.form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-weight: 600; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.msg { margin-top: 12px; font-size: 14px; min-height: 1em; }
.ok { color: var(--ok); } .err { color: var(--accent); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.chip { border: 1px solid var(--line); background: var(--card); padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.chip:disabled { opacity: .4; cursor: default; border-color: var(--line); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.kv div { background: var(--soft); border-radius: 12px; padding: 10px 12px; }
.kv span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.kv b { font-size: 16px; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head .av { width: 52px; height: 52px; font-size: 20px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); }
.prose { white-space: pre-wrap; font-size: 15px; line-height: 1.7; }
.ticon { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; image-rendering: pixelated; }

.np { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--soft); margin: 4px 0 6px; }
.np .eq { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.np b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np > div { min-width: 0; }
.ctl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
input[type=range] { padding: 0; accent-color: var(--accent); border: 0; background: none; box-shadow: none; }
.state { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); }
.state.off { background: var(--soft); color: var(--muted); }

/* ---- podgląd serwera (jak klient TS) ---- */
.ts { font-size: 14px; }
.ts ul { list-style: none; margin: 0; padding: 0; }
.ts ul ul { margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line); }
.ts li.closed > ul { display: none; }
.ts .tr { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 3px 8px; border-radius: 9px; min-width: 0; transition: background .15s; }
.ts .tr:hover { background: var(--soft); }
.ts .tr > .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.ts .ch { font-weight: 600; }
.ts .ch .ci { color: var(--muted); width: 16px; height: 16px; flex: none; }
.ts .ch.full .ci, .ts .ch.lock .ci { color: var(--warn); }
.ts .ch.def .ci { color: var(--ok); }
.ts .caret { width: 18px; height: 18px; border: 0; background: none; padding: 0; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 5px; flex: none; transition: transform .2s; }
.ts .caret:hover { background: var(--line); color: var(--text); }
.ts li.closed > .tr .caret { transform: rotate(-90deg); }
.ts .caret.none { visibility: hidden; }
.ts .cnt { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--soft); border-radius: 7px; padding: 1px 7px; flex: none; }
.ts .tr:hover .cnt { background: var(--card); }
.ts .cnt.on { color: var(--accent); background: var(--accent-soft); }
.ts .sp { color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; padding: 2px 8px; min-height: 24px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; }
.ts .sp.c { justify-content: center; }
.ts .sp.r { justify-content: flex-end; }
.ts .sp.line::before { content: ""; flex: 1; border-top: 1px solid var(--line); }
.ts .sp.line.l-dash::before { border-top-style: dashed; }
.ts .sp.line.l-dot::before { border-top: 2px dotted var(--line); }
.ts .sp.line.l-dbl::before { border-top: 3px double var(--line); }
.ts .sp.rep { overflow: hidden; text-overflow: clip; letter-spacing: .1em; opacity: .7; }
.ts .cl { font-weight: 500; cursor: default; }
.ts .cl .st { width: 18px; height: 18px; flex: none; display: grid; place-items: center; }
.ts .cl .st svg { width: 16px; height: 16px; }
.ts .cl .st .idle { width: 8px; height: 8px; border-radius: 50%; background: var(--off); }
.ts .cl .st.talk .idle { background: var(--ok); box-shadow: 0 0 0 4px rgba(22, 163, 106, .22); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(22, 163, 106, .05); } }
.ts .cl .st.mute { color: var(--accent); }
.ts .cl .st.away { color: var(--warn); }
.ts .cl.admin .nm { color: var(--accent); font-weight: 700; }
.ts .gi { display: inline-flex; gap: 3px; align-items: center; flex: none; }
.ts .gi img { width: 16px; height: 16px; image-rendering: auto; }
.ts .path { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.ts .room-h { margin-top: 8px; }
.ts .room-h:first-child { margin-top: 0; }
.flag { width: 18px; height: 12px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); display: inline-block; }
.flag.txt { width: auto; height: auto; font-size: 10px; font-weight: 800; padding: 1px 4px; background: var(--soft); color: var(--muted); box-shadow: none; }
#tip { position: fixed; z-index: 50; pointer-events: none; background: #1a0f14; color: #fff; border-radius: 12px; padding: 10px 12px; font-size: 13px; max-width: 280px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
#tip.on { opacity: 1; transform: none; }
#tip b { display: block; font-size: 14px; margin-bottom: 4px; }
#tip .g { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
#tip .g span { background: rgba(255, 255, 255, .1); border-radius: 6px; padding: 1px 6px; font-size: 12px; }

/* ---- regulamin i tabela kar ---- */
.rules { display: grid; gap: 20px; }
.rules h3 { display: flex; align-items: center; gap: 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 12px; }
.rules ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rules li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rules li:last-child { border-bottom: 0; }
.rules .no { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.rules .sub { color: var(--muted); font-size: 14px; margin-top: 4px; display: grid; gap: 2px; }
.pen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pen .card { display: flex; flex-direction: column; gap: 10px; }
.pen .t { display: flex; gap: 12px; align-items: flex-start; font-weight: 700; }
.pen .t .no { width: 30px; height: 30px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; font-weight: 800; }
.pen ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pen li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 10px; background: var(--soft); border-radius: 9px; }
.pen li span { color: var(--muted); }
.pen li b { text-align: right; }
.pen li b.perm { color: var(--accent); }
.pen li b.kick { color: var(--warn); }
.pen .note { grid-column: 1 / -1; }

/* ---- rangi ---- */
.rank-cat { margin-bottom: 20px; }
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.rk { border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 14px; display: flex; gap: 12px; align-items: center; min-width: 0; transition: border-color .15s, transform .15s; }
.rk:hover { border-color: rgba(226, 54, 74, .45); transform: translateY(-1px); }
.rk.has { border-color: var(--ok); background: var(--ok-soft); }
.rk .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; flex: none; }
.rk .ico img { width: 24px; height: 24px; }
.rk .ico span { font-weight: 800; color: var(--accent); }
.rk .txt { min-width: 0; flex: 1; }
.rk .txt b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.3; }
.rk .txt span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.rk .btn { padding: 6px 10px; font-size: 12px; border-radius: 9px; flex: none; }
.limit { font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 8px; background: var(--soft); color: var(--muted); }
.limit.full { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 760px) { .pen { grid-template-columns: minmax(0, 1fr); } }

/* ---- ikony, awatary, linki do profili ---- */
svg.ci, svg.cv { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn svg.i { width: 16px; height: 16px; }
label svg.i { width: 14px; height: 14px; vertical-align: -2px; color: var(--muted); }
.av { position: relative; overflow: hidden; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.av.sm { width: 24px; height: 24px; font-size: 11px; }
.av.lg { width: 56px; height: 56px; font-size: 22px; }
.link { cursor: pointer; }
.link:hover { color: var(--accent); }
[role=link]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.member.link:hover { border-color: rgba(226, 54, 74, .45); }
.rank .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rank .who > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tip .hint { margin-top: 6px; font-size: 12px; color: rgba(255, 255, 255, .6); }
.hero .intro { color: rgba(255, 255, 255, .78); max-width: 560px; margin: 0 0 12px; font-size: 15px; }
.notice { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: 14px; }
.bullets { margin: 6px 0 14px; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.sub-h { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; }
.badge img { width: 16px; height: 16px; }
.btn.danger { color: var(--accent); border-color: rgba(226, 54, 74, .4); }
.btn.danger:hover { background: var(--accent-soft); }
.card.bot.offline { opacity: .75; }
.card.bot.offline .av { filter: grayscale(1); }
.np .eq { display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.np .eq i { width: 4px; height: 6px; border-radius: 2px; background: currentColor; display: block; }
.np.playing .eq i { animation: eq 1s ease-in-out infinite; }
.np.playing .eq i:nth-child(2) { animation-delay: .2s; }
.np.playing .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 6px; } 50% { height: 18px; } }
/* menu pod nickiem */
.usermenu { position: relative; }
.userbtn { padding: 5px 10px 5px 6px; gap: 8px; max-width: 220px; }
.userbtn .unick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: 0 14px 40px rgba(0, 0, 0, .22); z-index: 40; }
.dropdown a, .dropdown button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; color: var(--text); background: none; border: 0; cursor: pointer; font-size: 14px; text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--soft); text-decoration: none; }
.dropdown svg.i { color: var(--muted); }
@media (max-width: 640px) { .userbtn .unick { display: none; } .userbtn { padding: 4px; width: auto; } }

.report { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.report.closed { opacity: .65; }
.report .rh { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.report .rh .state { margin-left: auto; }
.report p { margin: 8px 0; }
.reply { border-left: 3px solid var(--accent-soft); padding: 4px 10px; margin: 6px 0; font-size: 14px; }
.warnrow td { color: var(--accent); }
.badge .dot { width: 8px; height: 8px; box-shadow: none; }
.badge .dot.in { color: var(--ok); } .badge .dot.out { color: var(--off); }
#chatList li span:nth-child(2) { flex: 1; min-width: 0; }

.member .grp { display: flex; align-items: center; justify-content: center; gap: 4px; font-style: normal; font-size: 11px; color: var(--muted); margin: 2px 0; overflow: hidden; white-space: nowrap; }
.member .grp img { width: 14px; height: 14px; }

textarea { width: 100%; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg); font: inherit; color: inherit; resize: vertical; outline: none; }
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#ct_capImg { border-radius: 8px; border: 1px solid var(--line); background: #fff; flex: none; }
.menu .count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; margin-left: 4px; }

.logo img.srv { width: 30px; height: 30px; image-rendering: auto; flex: none; filter: drop-shadow(0 2px 6px rgba(61, 123, 255, .35)); }
.fbrand { display: inline-flex; align-items: center; gap: 8px; }
.fbrand img.srv { width: 16px; height: 16px; }

footer { border-top: 1px solid var(--line); padding: 22px 0 34px; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; justify-content: center; text-align: center; gap: 10px; }  /* jedna wyśrodkowana linia */

/* ---- telefon / tablet ---- */
@media (max-width: 980px) {
  .grid2, .grid2.even { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1360px) {
  .actions .join span { display: none; }
  .actions .join { padding: 0; width: 38px; height: 38px; }
}
@media (max-width: 1100px) {
  .top .wrap { height: 58px; gap: 10px; }
  .burger { display: inline-flex; }
  .menu { position: absolute; left: 0; right: 0; top: 58px; flex-direction: column; align-items: stretch; background: #1a0f14; padding: 8px 12px 14px; display: none; }
  .menu.open { display: flex; }
  .menu a { padding: 12px; }
  .morebtn { display: none; }
  .moredrop, .more.open .moredrop { position: static; display: flex; flex-direction: column; background: none; border: 0; box-shadow: none; padding: 0; min-width: 0; animation: none; }
  .menu .moredrop a { color: rgba(255, 255, 255, .72); }
  .menu .moredrop a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
  .menu .moredrop a.on { color: #fff; background: rgba(255, 255, 255, .12); }
  .actions .join span { display: none; }
  .logo { flex: 1; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 28px 0 80px; }
  .hero .wrap { flex-direction: column; align-items: flex-start; gap: 18px; }
  .counter { text-align: left; }
  .tiles { gap: 10px; }
  .tile { padding: 12px 14px; }
  .tile .v { font-size: 20px; }
  .tile .ic { width: 34px; height: 34px; }
  .card { padding: 16px; }
  .form2 { grid-template-columns: 1fr; }
  .rank li { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .rank li .bar { display: none; }
  .actions .login span { display: none; }
  .actions { gap: 6px; }
  .logo { font-size: 16px; gap: 8px; min-width: 0; }
  .logo > span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .btn.iconbtn, .actions .btn { padding: 0; width: 36px; height: 36px; }
}
@media (max-width: 400px) {
  .actions .join { display: none; }
}

/* okno logowania */
.dlg { --ease: cubic-bezier(.2, .8, .2, 1); border: 0; padding: 0; background: transparent; color: var(--text); width: min(500px, calc(100vw - 32px)); max-width: none; overflow: visible; }
.dlg::backdrop { background: rgba(8, 10, 16, .58); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.dlg[open] { animation: dlgIn .25s var(--ease); }
.dlg[open]::backdrop { animation: fadeIn .25s var(--ease); }
.dlg.closing { animation: dlgOut .2s var(--ease) forwards; }
.dlg.closing::backdrop { animation: fadeOut .2s var(--ease) forwards; }
.dlg-in { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 12px 32px rgba(16, 24, 40, .14), 0 40px 80px rgba(16, 24, 40, .22); }
.ld-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ld-head h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.ld-head p { margin: 6px 0 0; color: var(--text); opacity: .78; font-size: 15px; }
.dlg .x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--soft); color: var(--text); cursor: pointer; display: grid; place-items: center; flex: none; transition: background .15s, transform .15s; }
.dlg .x:hover { background: var(--accent-soft); color: var(--accent); transform: rotate(90deg); }
.ld-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 22px 0 16px; }
.ld-progress span { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ld-progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ff5d6e, #e2364a); transition: width .45s var(--ease); }
.ld-progress span.done i, .ld-progress span.on i { width: 100%; }
.ld-progress span.done i { background: var(--ok); }
.ld-step { margin: 0 0 12px; font-size: 16px; font-weight: 800; }
.ld-body { position: relative; transition: height .3s var(--ease); }
.ld-body > [data-step] { animation: stepIn .3s var(--ease); }
.ld-state { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--soft); font-size: 15px; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 0 rgba(226, 54, 74, .55); animation: pulse 1.4s infinite; }
.ld-hints { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; }
.ld-hints b { color: var(--accent); }
.ld-text { margin: 0 0 14px; font-size: 15px; }
.btn-main { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 18px; padding: 14px 22px; border: 0; border-radius: 999px; cursor: pointer;
  font-size: 16px; font-weight: 800; color: #fff; text-decoration: none; background: linear-gradient(135deg, #ff5d6e, #e2364a 55%, #b4172c);
  box-shadow: 0 8px 22px rgba(226, 54, 74, .38); transition: transform .15s var(--ease), box-shadow .15s, opacity .15s; }
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(226, 54, 74, .45); text-decoration: none; }
.btn-main:active { transform: translateY(0) scale(.98); box-shadow: 0 4px 12px rgba(226, 54, 74, .35); }
.btn-main:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.btn-main .i { stroke: #fff; }
.ctiles { display: grid; gap: 10px; }
.ctile { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--soft); cursor: pointer; min-width: 0; transition: border-color .15s, transform .15s var(--ease), box-shadow .15s; }
.ctile:hover, .ctile:focus-visible { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(226, 54, 74, .16); outline: none; }
.ctile .av { width: 44px; height: 44px; font-size: 18px; }
.ctile .who { display: grid; min-width: 0; flex: 1; }
.ctile .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.ctile .who span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 4px 0 8px; }
.otp input { width: 100%; height: 62px; text-align: center; font-size: 26px; font-weight: 800; border-radius: 14px; border: 1.5px solid var(--line); background: var(--soft); padding: 0; min-width: 0;
  animation: boxIn .35s var(--ease) backwards; transition: border-color .15s, box-shadow .15s, transform .15s; }
.otp input:nth-child(2) { animation-delay: .04s; } .otp input:nth-child(3) { animation-delay: .08s; } .otp input:nth-child(4) { animation-delay: .12s; }
.otp input:nth-child(5) { animation-delay: .16s; } .otp input:nth-child(6) { animation-delay: .2s; }
.otp input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); transform: translateY(-1px); }
.otp.shake { animation: shake .4s; }
.otp.bad input { border-color: var(--accent); }
.ld-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.linkbtn { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 6px 0; font-weight: 700; font-size: 14px; }
.linkbtn:disabled { color: var(--muted); cursor: default; }
.ld-ok { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 0 6px; font-size: 18px; }
.ld-ok svg { width: 76px; height: 76px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ld-ok circle { stroke: var(--ok); stroke-width: 3; fill: var(--ok-soft); stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .5s var(--ease) forwards; }
.ld-ok path { stroke: var(--ok); stroke-width: 4; stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw .35s .35s var(--ease) forwards; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(226, 54, 74, .55); } 70% { box-shadow: 0 0 0 12px rgba(226, 54, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(226, 54, 74, 0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes dlgIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes dlgOut { to { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes stepIn { from { opacity: 0; transform: translateX(18px); } }
@keyframes boxIn { from { opacity: 0; transform: translateY(10px) scale(.9); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (max-width: 520px) { .dlg { width: calc(100vw - 32px); } .dlg-in { padding: 24px 20px; border-radius: 20px; } .otp { gap: 6px; } .otp input { height: 54px; font-size: 22px; } .ld-head h2 { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) {
  .dlg[open], .dlg.closing, .dlg[open]::backdrop, .ld-body > [data-step], .otp input, .otp.shake, .pulse, .ld-ok circle, .ld-ok path { animation: none !important; }
  .ld-ok circle, .ld-ok path { stroke-dashoffset: 0; } .ld-body, .ld-progress i { transition: none; }
}

/* profil gracza: sekcje i kafelki */
.kv.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kv.four div { min-width: 0; }
.kv.four b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .kv.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sec-h { display: flex; align-items: center; gap: 8px; margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.sec-h h3 { margin: 0; font-size: 15px; }
.sec-h .cnt { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--soft); border-radius: 8px; padding: 1px 8px; }
.sec-h + .badges { margin-top: 10px; }

/* panel: tabela kar */
.tablewrap { overflow-x: auto; min-width: 0; -webkit-overflow-scrolling: touch; }
.list.pun { min-width: 560px; }
.list.pun td.when { white-space: nowrap; }
.list.pun td.reason { min-width: 160px; }
.times { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); margin-left: 4px; }
.ptype { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .03em; padding: 2px 7px; border-radius: 6px; background: var(--soft); border: 1px solid var(--line); }
.ptype.ban { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.ptype.kick { background: rgba(217, 138, 11, .14); color: var(--warn); border-color: transparent; }
.dropdown .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }

/* wykresy interaktywne */
#chart { min-width: 0; }
.chartbox, .heatbox { position: relative; outline: none; touch-action: pan-y; }
.chartbox:focus-visible, .heatbox:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); border-radius: 12px; }
.chart .cursor { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--accent); stroke: var(--card); stroke-width: 2.5; transition: cx .08s linear, cy .08s linear; }
.chartbox .tip, .heatbox .tip { position: absolute; left: 0; top: 0; pointer-events: none; display: grid; gap: 1px; padding: 7px 10px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(16, 24, 40, .18); font-size: 12.5px; white-space: nowrap;
  transition: transform .08s linear; z-index: 2; }
.chartbox .tip b { font-size: 14px; }
.chartbox .tip span, .heatbox .tip span { color: var(--muted); }
.heatbox .tip span { color: var(--text); font-weight: 600; }
.heat td[data-w] { cursor: crosshair; }
.heat td.on { outline: 2px solid var(--text); outline-offset: -1px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .chart .dot, .chartbox .tip, .heatbox .tip { transition: none; } }
.chart .pt { fill: var(--accent); }
.chartbox .tip[hidden], .heatbox .tip[hidden] { display: none; }
/* strona 404 */
body.nf { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.nf-box { text-align: center; max-width: 420px; display: grid; justify-items: center; gap: 10px; }
.nf-box h1 { margin: 6px 0 0; font-size: 28px; }

/* ikony w nawigacji i nagłówkach (ten sam zestaw SVG, kolor z tekstu) */
.menu a, .menu .moredrop a { display: inline-flex; align-items: center; gap: 7px; }
.menu a .i { width: 16px; height: 16px; opacity: .85; flex: none; }
h2.ih { display: flex; align-items: center; gap: 9px; }
h2.ih .i { width: 20px; height: 20px; color: var(--accent); flex: none; }
@media (max-width: 1360px) and (min-width: 1101px) { .menu > a .i { display: none; } }
/* ikona kanału skrajnie po prawej jak w kliencie TS 3, licznik przed nią; stałe miejsce, żeby liczniki stały w linii */
.tr .chi { width: 16px; height: 16px; flex: none; margin-left: 6px; display: inline-block; }
.tr .chi img { width: 16px; height: 16px; display: block; }

/* przyciski w trakcie żądania i limit zmian kanału */
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.ghost.loading::after { border-color: var(--line); border-top-color: var(--accent); }
.limitinfo { font-size: 13px; color: var(--muted); margin: 14px 0 8px; }
.limitinfo.err { color: var(--accent); font-weight: 600; }

/* bany */
.search { max-width: 260px; }
.list.bans { min-width: 620px; }
.list.bans td.when { white-space: nowrap; }
@media (max-width: 640px) { .search { max-width: none; width: 100%; } }

/* panel: usuwanie */
.bulk { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.bulk .btn, .report .btn.danger { padding: 6px 10px; font-size: 12.5px; }
.btn.ghost.danger { color: var(--accent); }
.btn.ghost.danger:hover { background: var(--accent-soft); }
.report .pick { width: 16px; height: 16px; accent-color: var(--accent); margin: 0 4px 0 0; flex: none; }

/* zamykanie rozwijanych menu */
.dropdown:not(.hide) { animation: fadeIn .12s ease-out; }
.dropdown.closing, .moredrop.closing { animation: fadeOut .12s ease-in forwards; }

/* kontakt: komunikaty przy polach i licznik znaków */
.ferr { display: block; min-height: 1.2em; margin-top: 4px; }
.ferr:empty { min-height: 0; margin: 0; }
.ctrow { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
#ct_count.err { color: var(--accent); }

/* logo w nagłówku: obrazek w stylu banera (1x/2x), na wąskich ekranach sama ikona */
.logo .logo-full { display: block; height: 42px; width: auto; max-width: 100%; }
.logo .logo-icon { display: none; }
.logo img { flex: none; width: auto; max-width: 100%; object-fit: contain; }

/* kontakt: captcha w jednej linii (obrazek 120×40 z 2x, pole kodu, ikona odświeżania), osobny wiersz akcji */
.caprow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.capimg { width: 120px; height: 40px; border-radius: 10px; border: 1px solid var(--line); flex: none; }
.caprow .capin { width: 140px; height: 40px; flex: none; text-transform: uppercase; letter-spacing: .12em; }
.caprow .capin::placeholder { text-transform: none; letter-spacing: 0; }
.caprow .capnew { width: 40px; height: 40px; padding: 0; flex: none; }
.ctactions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.ctactions .msg { margin: 0; flex: 1; }
.ctactions .btn[disabled] { opacity: .7; cursor: progress; }
.ctdone { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); background: var(--ok-soft); margin-top: 8px; }
.ctdone.hide { display: none; }
.okmark { width: 28px; height: 28px; border-radius: 50%; background: var(--ok); flex: none; position: relative; }
.okmark::after { content: ""; position: absolute; left: 10px; top: 6px; width: 6px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
@media (max-width: 560px) {
  .ctactions { flex-direction: column-reverse; align-items: stretch; }
  .ctactions .btn { width: 100%; }
}

/* wylogowanie: małe okno w stylu logowania (spinner -> zielony znaczek) */
.dlg.dlg-sm { width: min(380px, calc(100vw - 32px)); }
.out-in { padding: 26px; text-align: center; }
.out-row { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 16px; }
.out-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.out-q { display: block; font-size: 17px; margin-bottom: 6px; }
.out-in .ctl { justify-content: center; margin-top: 14px; }
.out-in .ld-ok { margin: 0; }
.ctl.sessions { align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.btn.danger { background: var(--accent); color: #fff; } .btn.ghost.danger { background: transparent; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .out-spin { animation-duration: 2.4s; } }

/* przejścia między podstronami: krótkie wyjście starej, wejście nowej z lekkim przesunięciem, kaskada kart */
main.wrap.swapping { overflow-anchor: none; }
[data-page].pg-out { animation: pgOut .12s ease-in forwards; }
[data-page].pg-in { animation: pgIn .22s cubic-bezier(.2, .8, .2, 1) both; }
[data-page].pg-in > .card, [data-page].pg-in > .grid2 > *, [data-page].pg-in > .grid3 > * { animation: pgIn .24s cubic-bezier(.2, .8, .2, 1) both; }
[data-page].pg-in > :nth-child(2), [data-page].pg-in > .grid2 > :nth-child(2), [data-page].pg-in > .grid3 > :nth-child(2) { animation-delay: .035s; }
[data-page].pg-in > :nth-child(3), [data-page].pg-in > .grid3 > :nth-child(3) { animation-delay: .07s; }
[data-page].pg-in > :nth-child(4) { animation-delay: .105s; }
[data-page].pg-in > :nth-child(n+5) { animation-delay: .14s; }
@keyframes pgOut { to { opacity: 0; transform: translateY(-4px); } }
@keyframes pgIn { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { [data-page].pg-out, [data-page].pg-in, [data-page].pg-in > * , [data-page].pg-in > .grid2 > *, [data-page].pg-in > .grid3 > * { animation: none !important; } }

/* panel /admin: kontakt i zgłoszenia (pole na pełną szerokość, przyciski pod nim, podpisane notatki, własny checkbox) */
.report .field { margin-top: 10px; } .report .field input { width: 100%; }
.report .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.report .note { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--soft); border-left: 3px solid var(--line); }
.report .note .nh { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.report .note .nt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.report .note.long:not(.open) .nt { max-height: 4.4em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.linkbtn { border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; padding: 4px 0 0; cursor: pointer; }
.report .rt { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.btn.xs { padding: 4px 9px; font-size: 12px; border-radius: 8px; gap: 5px; }
.pickbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.pickbox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pickbox span { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line); background: var(--bg); display: inline-grid; place-items: center; transition: background .15s, border-color .15s; flex: none; }
.pickbox input:checked + span { background: var(--accent); border-color: var(--accent); }
.pickbox input:checked + span::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.pickbox input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.bulk .pickbox.all { margin-right: auto; }

/* przełącznik języka w nagłówku */
.langbtn { min-width: 40px; height: 36px; padding: 0 10px; font-weight: 700; font-size: 13px; letter-spacing: .04em; }

/* stopka przy przejściu stron: znika ze starą treścią, wraca po dociągnięciu nowej (bez widocznego skoku) */
footer { transition: opacity .2s ease; }
footer.ft-out { opacity: 0; transition: opacity .12s ease-in; }
@media (prefers-reduced-motion: reduce) { footer, footer.ft-out { transition: none; } }

/* FAQ: rozwijane pytania */
.faq { display: grid; gap: 12px; }
.faq details > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq details > summary::after { content: "+"; color: var(--accent); font-weight: 800; flex: none; }
.faq details[open] > summary::after { content: "−"; }
.faq summary::-webkit-details-marker { display: none; }
.faq .fa { margin-top: 10px; color: var(--text); } .faq .fa p { margin: 4px 0; overflow-wrap: anywhere; }

.ld-warn { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--accent); }

/* logowanie przez nick (zapasowe, okno logowania krok 1) */
.ld-nick { display: grid; gap: 8px; margin-top: 14px; text-align: left; }
.ld-nick label { font-size: .85rem; color: var(--muted, #8a8f99); }
.ld-nick #ldNick { width: 100%; }
#ldNickOpen { margin-top: 12px; }

/* ---- telefon (zgłoszenie właściciela, DECYZJE 221): bez przesuwania w bok, logo, okna nad klawiaturą ---- */
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
.top { padding-top: env(safe-area-inset-top); }
.top .wrap { min-width: 0; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.logo { min-width: 0; flex: 0 1 auto; overflow: hidden; }
.actions { flex: none; margin-left: auto; }
.actions .btn, .burger { flex: none; white-space: nowrap; }
footer { padding-bottom: env(safe-area-inset-bottom); }
.chartbox, .heatbox { max-width: 100%; overflow-x: auto; }
.chartbox svg { max-width: 100%; height: auto; }
.dlg { max-height: calc(100vh - 24px); max-height: calc(var(--vvh, 100dvh) - 24px); }
.dlg-in { max-height: calc(var(--vvh, 100dvh) - 24px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
@media (max-width: 520px) {
  /* okno u góry, nie na środku: klawiatura nie zasłania pola kodu */
  .dlg { margin: calc(env(safe-area-inset-top) + 12px) auto auto; width: calc(100vw - 32px); }
}
@media (max-width: 420px) {
  .logo .logo-full { height: 28px; }
  .top .wrap { gap: 8px; }
}
@media (max-width: 360px) {
  .logo .logo-full { display: none; }
  .logo .logo-icon { display: block; width: 32px; height: 32px; }
}
/* okno otwarte = strona pod spodem stoi (AUD5-003, app.js: scroll-lock z zapamiętanym scrollY) */
html.scroll-lock { overflow: hidden; }
html.scroll-lock body { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
@media (max-width: 520px) {
  /* telefon: okno przyklejone u góry, tylko fade i lekki zjazd w dół, bez skalowania; kroki bez zwijania wysokości */
  .dlg[open] { animation: dlgInTop .22s var(--ease); }
  .dlg.closing { animation: dlgOutTop .18s var(--ease) forwards; }
  .ld-body > [data-step] { animation: fadeIn .2s ease; }
  .ld-body { transition: none; }
}
@keyframes dlgInTop { from { opacity: 0; transform: translateY(-10px); } }
@keyframes dlgOutTop { to { opacity: 0; transform: translateY(-6px); } }
/* AUD5-011: przycisk zalogowanego na telefonie = sam okrągły avatar w ramce 36×36 (reguła `.actions .btn` 36 px
   łapała też .userbtn, a avatar 26 px + strzałka + odstęp wystawały na „Dołącz”) */
#userAv { display: grid; place-items: center; }
@media (max-width: 640px) {
  .actions .btn.userbtn { width: 36px; height: 36px; padding: 0; gap: 0; justify-content: center; max-width: none; }
  .actions .btn.userbtn svg.i { display: none; }
}
/* zalogowany na małym telefonie: bez „Dołącz” w nagłówku (logo, EN, motyw, avatar, menu); „Jak dołączyć” w menu */
@media (max-width: 520px) {
  html.logged-in .actions .join { display: none; }
}
/* AUD5-013: „Tworzę bota…” z kółkiem obok tekstu */
.spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite; flex: none; }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }
/* panel muzyki (zgłoszenie właściciela): karty w kolumnach bez dziur (różne wysokości), 1 kolumna na wąskim ekranie */
.botcols { columns: 2 420px; column-gap: 16px; }
.botcols > .card { break-inside: avoid; display: inline-block; width: 100%; margin: 0 0 16px; }
/* suwak głośności: tor, wypełnienie (--fill z app.js) i uchwyt w kolorach motywu, widoczny fokus z klawiatury */
.card.bot input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
.card.bot input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(to right, var(--accent) var(--fill, 50%), var(--line) var(--fill, 50%)); }
.card.bot input[type=range]::-moz-range-track { height: 6px; border-radius: 99px; background: var(--line); }
.card.bot input[type=range]::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--accent); }
.card.bot input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.card.bot input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); }
.card.bot input[type=range]:focus-visible { outline: none; }
.card.bot input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-soft); }
.card.bot input[type=range]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--accent-soft); }
/* podkanały kanału prywatnego (AUD5-016) */
#subBox { margin-top: 22px; }
.subrow { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.subrow .check, .subrow .btn { grid-column: 1 / -1; justify-self: start; }
