@font-face{font-family:Cinzel;font-style:normal;font-weight:500;font-display:swap;src:url(/f-cinzel-latin-ext-500-normal.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:Cinzel;font-style:normal;font-weight:500;font-display:swap;src:url(/f-cinzel-latin-500-normal.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:Cinzel;font-style:normal;font-weight:600;font-display:swap;src:url(/f-cinzel-latin-ext-600-normal.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:Cinzel;font-style:normal;font-weight:600;font-display:swap;src:url(/f-cinzel-latin-600-normal.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:Cinzel;font-style:normal;font-weight:700;font-display:swap;src:url(/f-cinzel-latin-ext-700-normal.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:Cinzel;font-style:normal;font-weight:700;font-display:swap;src:url(/f-cinzel-latin-700-normal.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:Spectral;font-style:normal;font-weight:400;font-display:swap;src:url(/f-spectral-latin-ext-400-normal.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:Spectral;font-style:normal;font-weight:400;font-display:swap;src:url(/f-spectral-latin-400-normal.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:Spectral;font-style:italic;font-weight:400;font-display:swap;src:url(/f-spectral-latin-ext-400-italic.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:Spectral;font-style:italic;font-weight:400;font-display:swap;src:url(/f-spectral-latin-400-italic.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:Spectral;font-style:normal;font-weight:600;font-display:swap;src:url(/f-spectral-latin-ext-600-normal.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:Spectral;font-style:normal;font-weight:600;font-display:swap;src:url(/f-spectral-latin-600-normal.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:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(/f-inter-latin-ext-400-normal.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:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(/f-inter-latin-400-normal.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:Inter;font-style:normal;font-weight:500;font-display:swap;src:url(/f-inter-latin-ext-500-normal.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:Inter;font-style:normal;font-weight:500;font-display:swap;src:url(/f-inter-latin-500-normal.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:Inter;font-style:normal;font-weight:600;font-display:swap;src:url(/f-inter-latin-ext-600-normal.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:Inter;font-style:normal;font-weight:600;font-display:swap;src:url(/f-inter-latin-600-normal.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: Fell; font-style: italic; src: url(/fell-it.woff2) format('woff2'); font-display: swap; }

/* Argonet v14: kierunek "hybryda A+B" - ciemne szkło nad mapą, złoto i żar, Cinzel / Inter / Spectral */
:root {
  --bg: #0b0b0e; --panel: rgba(16,15,19,.82); --panel-solid: #121116; --panel-2: rgba(255,255,255,.045);
  --ink: #ece4d3; --ink-2: #cfc6b3; --muted: #a49b88; --gold: #e2c272; --gold-2: #8f7638; --ember: #d0552f; --ember-2: #a8401f;
  --line: rgba(236,228,211,.12); --line-gold: rgba(226,194,114,.24); --ok: #7fb08a; --r: 16px; --r-s: 10px;
  --display: Cinzel, 'Trajan Pro', Georgia, serif; --ui: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; --read: Spectral, Georgia, serif;
  --rail: 92px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--ui);
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) 14px calc(28px + env(safe-area-inset-bottom));
}
body::before { content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: #0b0b0e url(/bg.jpg) center / cover no-repeat; filter: saturate(.75) brightness(.55); }
body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, rgba(11,11,14,.78), rgba(11,11,14,.96) 70%); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#top { position: relative; }

/* nawigacja: pasek z ikonami po lewej (komputer), dolny pasek (telefon) */
nav.tabs { display: flex; gap: 6px; }
nav.tabs .tb {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
  font: 500 11px/1.2 var(--ui); letter-spacing: .02em; color: var(--muted); background: none; border: 0; border-radius: 14px;
  padding: 9px 4px 8px; min-width: 64px; min-height: 56px; box-shadow: none; text-shadow: none;
}
nav.tabs .tb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
nav.tabs .tb:hover { color: var(--ink); background: rgba(255,255,255,.05); }
nav.tabs .tb.on { color: var(--gold); background: rgba(226,194,114,.14); }
nav.tabs .brand { display: flex; justify-content: center; padding: 6px 0 14px; }
nav.tabs .brand svg { width: 40px; height: 40px; }
nav.tabs .sp { flex: 1; }
nav.tabs .who { color: var(--muted); font-size: .72rem; text-align: center; word-break: break-all; padding: 0 6px; }
@media (min-width: 900px) {
  body:has(nav.tabs) { padding-left: calc(var(--rail) + 24px); padding-right: 24px; }
  nav.tabs { position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail); flex-direction: column; align-items: center; padding: 18px 0;
    background: rgba(12,11,15,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-right: 1px solid var(--line-gold); z-index: 30; overflow-y: auto; }
}
@media (max-width: 899px) {
  body:has(nav.tabs) { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; overflow-x: auto; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(12,11,15,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line-gold); scrollbar-width: none; }
  nav.tabs::-webkit-scrollbar { display: none; }
  nav.tabs .brand, nav.tabs .sp, nav.tabs .who { display: none; }
  nav.tabs .tb { flex: 1 0 auto; }
}

main {
  position: relative; max-width: 680px; margin: 28px auto 0;
  background: var(--panel); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-gold); border-radius: 22px; padding: 34px 32px 36px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
main > * { position: relative; }
main.wide { max-width: 1320px; margin-top: 24px; }

h1 { font-family: var(--display); font-weight: 600; font-size: 1.9rem; line-height: 1.2; margin: 0 0 14px; color: var(--ink); letter-spacing: .03em; }
h2 { font-family: var(--display); font-weight: 600; font-size: 1.15rem; letter-spacing: .06em; margin: 30px 0 12px; padding-bottom: 8px; color: var(--gold); border-bottom: 1px solid var(--line); }
h3 { font-family: var(--ui); font-weight: 600; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin: 18px 0 8px; color: var(--muted); }
p { margin: 0 0 12px; }
a { color: var(--gold); }
.seal { width: 78px; height: 78px; margin: 0 auto 16px; display: block; filter: drop-shadow(0 0 12px rgba(208,85,47,.5)); }
.center { text-align: center; }
.muted { color: var(--muted); font-size: .9rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }

button {
  font: 600 .92rem/1.2 var(--ui); letter-spacing: .01em; padding: 12px 20px; min-height: 44px; border-radius: 12px; cursor: pointer;
  color: #1c0d07; background: var(--ember); border: 1px solid transparent; box-shadow: 0 6px 18px rgba(208,85,47,.25); text-shadow: none;
}
/* v35: podświetlenie tylko tam, gdzie jest mysz - na telefonie po dotknięciu "przyklejało się" i przełącznik wyglądał na zaznaczony */
@media (hover: hover) { button:hover { background: #df6440; } }
button.ghost { background: rgba(255,255,255,.05); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
@media (hover: hover) { button.ghost:hover { background: rgba(255,255,255,.1); } }
button.ghost.act { border-color: var(--gold); color: var(--gold); background: rgba(226,194,114,.1); }
button.small { padding: 6px 12px; min-height: 34px; font-size: .84rem; border-radius: 10px; }
button.link { background: none; border: none; padding: 0; min-height: 0; color: var(--gold); text-decoration: underline; box-shadow: none; font: inherit; }
button:disabled { opacity: .5; cursor: default; }

label { display: block; margin: 16px 0 6px; font: 600 .82rem/1.3 var(--ui); letter-spacing: .02em; color: var(--ink-2); }
label small { font-weight: 400; color: var(--muted); display: block; font-size: .8rem; margin-top: 2px; }
input, textarea, select {
  width: 100%; font: 400 15px/1.4 var(--ui); padding: 10px 12px; color: var(--ink); min-height: 44px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: var(--r-s);
}
select option { background: var(--panel-solid); color: var(--ink); }
input[type=checkbox] { width: 1.2em; height: 1.2em; min-height: 0; accent-color: var(--ember); }
/* v45: etykieta z polem wyboru zawsze w jednym rzędzie - pole, obok tekst (nigdy tekst na środku) */
label:where(:has(> input[type=checkbox]), :has(> input[type=radio])) { display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
input[type=checkbox], input[type=radio] { flex: none; }
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.note { border: 1px solid rgba(208,85,47,.35); padding: 12px 16px; margin: 14px 0; background: rgba(208,85,47,.1); border-radius: 12px; }
.ok { border-color: rgba(127,176,138,.4); background: rgba(127,176,138,.1); }
.voice { font-family: var(--read); font-style: italic; font-size: 1.12rem; line-height: 1.6; padding: 0; margin: 0 0 18px; color: #ddd3bd; }
.voice::first-letter { font-family: var(--display); font-style: normal; font-size: 2.4em; float: left; line-height: .9; padding: 4px 8px 0 0; color: var(--gold); }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 .74rem/1.3 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
tr.item { cursor: pointer; }
tr.item:hover { background: rgba(226,194,114,.06); }
tr.detail td { background: rgba(0,0,0,.25); }
dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
dt { color: var(--muted); } dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; border: 1px solid var(--line); white-space: nowrap; background: rgba(255,255,255,.04); color: var(--muted); }
.tag.yes { background: rgba(127,176,138,.14); border-color: rgba(127,176,138,.5); color: #b6dcbf; }
.tag.no { background: rgba(208,85,47,.16); border-color: rgba(208,85,47,.5); color: #f0a184; }
.scroll { overflow-x: auto; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; color: var(--ink-2); }

/* karta postaci */
.sheet label { margin: 0 0 4px; font-size: .76rem; color: var(--muted); font-weight: 500; }
.grid { display: grid; gap: 10px; }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); } .g6 { grid-template-columns: repeat(6, 1fr); }
.abil, .box { text-align: center; padding: 12px 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; }
.abil input { text-align: center; padding: 4px 2px; width: 72%; min-height: 34px; }
.abil .mod { font-family: var(--display); font-weight: 600; font-size: 1.9rem; line-height: 1.25; color: var(--gold); }
.out { font-weight: normal; }
.box input, .box select { text-align: center; }
.box .out { font-family: var(--display); font-weight: 600; font-size: 1.6rem; color: var(--gold); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
.chk { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); font: 400 .95rem var(--ui); margin: 0; color: var(--ink); }
.chk .v { width: 2.6em; text-align: right; font-family: var(--display); font-weight: 600; color: var(--gold); }
.chk .n { flex: 1; } .chk .a { color: var(--muted); font-size: .74rem; letter-spacing: .08em; }
.chk select { width: auto; padding: 2px 6px; min-height: 30px; font-size: .82rem; }
.rows .r { display: grid; gap: 6px; margin-bottom: 6px; align-items: center; }
.r.atk { grid-template-columns: 2fr 1fr 1.4fr 2fr auto; }
.r.spl { grid-template-columns: 3.4em 2.4fr auto 1fr auto; }
.r.itm { grid-template-columns: 2.4fr 3.8em 2fr auto; }
.slots { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.slots div { text-align: center; font-family: var(--display); color: var(--gold); }
.slots input { text-align: center; padding: 4px 1px; margin-top: 2px; min-height: 34px; color: var(--ink); }
.saved { color: var(--ok); font-size: .86rem; }
.ref { color: var(--muted); font-size: .74rem; font-weight: 400; letter-spacing: 0; }
/* mapa */
.maphead { margin: 0 0 10px; }
.mapwrap { overflow: hidden; position: relative; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; border: 1px solid #000; box-shadow: 0 0 0 1px var(--gold-2), 0 10px 30px rgba(0,0,0,.6); background: #0d0d0f; }
.mapwrap.dragging { cursor: grabbing; }
.mapwrap.dragging .pin { cursor: grabbing; }
.mapwrap.painting { cursor: crosshair; }
.mapwrap.painting .pin { pointer-events: none; }
.map { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.map img { display: block; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.map .hex { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pin { position: absolute; transform: translate(-50%, -50%); padding: 0; border: none; background: none; box-shadow: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; text-shadow: none; }
.pin:hover { background: none; }
.pin i { display: block; width: 11px; height: 11px; background: #1a120b; border: 2px solid #f3e8c8; box-shadow: 0 0 0 1px #000, 0 2px 4px rgba(0,0,0,.7); }
.pin span { font-family: var(--display); font-size: 13px; letter-spacing: .05em; color: #f6ecd0; white-space: nowrap; margin-top: 2px;
  text-shadow: 0 0 2px #000, 0 0 3px #000, 0 1px 4px #000, 0 0 8px rgba(0,0,0,.9); }
.pin.k-cap i { width: 17px; height: 17px; background: var(--gold); border-color: #fff4d0; transform: rotate(45deg); box-shadow: 0 0 0 1px #000, 0 0 10px rgba(201,162,77,.9); }
.pin.k-cap span { font-family: var(--display); font-size: 16px; color: #ffe9b0; margin-top: 6px; }
.pin.k-city i { width: 12px; height: 12px; }
.pin.k-city span { font-size: 14px; }
.pin.k-town i { width: 8px; height: 8px; border-radius: 50%; border-width: 1.5px; }
.pin.k-town span { font-size: 12px; opacity: .92; }
.pin.k-vil i { width: 5px; height: 5px; border-radius: 50%; border-width: 1px; background: #f3e8c8; }
.pin.k-vil span { font-family: var(--read); font-style: italic; font-size: 11.5px; letter-spacing: 0; }
.pin.k-site i { background: var(--ember); transform: rotate(45deg); width: 12px; height: 12px; }
.pin.k-site span { margin-top: 5px; color: #ffd9cf; }
.pin.k-trail i { background: var(--ok); border-radius: 50%; }
.pin.k-land i, .pin.k-realm i { display: none; }
.pin.k-land span { font-family: var(--read); font-style: italic; font-size: 20px; letter-spacing: .16em; color: #efe4c8; opacity: .9; }
.pin.k-realm span { font-family: var(--display); font-size: 25px; letter-spacing: .14em; color: #f6ecd0; opacity: .92; }
/* przy oddaleniu: miasteczka bez podpisu, wsie ukryte */
.map.z1 .pin.k-vil { display: none; }
.map.z1 .pin.k-town span { display: none; }
.map.z2 .pin.k-vil span { display: none; }
.map.z1 .pin.k-town.sel span, .map.z2 .pin.k-vil.sel span, .map.z1 .pin.k-town:hover span, .map.z2 .pin.k-vil:hover span { display: block; }
.map.z3 .pin span, .map.z4 .pin span { font-size: 15px; }
.map.z3 .pin.k-realm span, .map.z4 .pin.k-realm span { font-size: 34px; }
.map.z3 .pin.k-land span, .map.z4 .pin.k-land span { font-size: 26px; }
.map.z3 .pin.k-cap span, .map.z4 .pin.k-cap span { font-size: 19px; }
.pin.hidden { opacity: .55; }
.pin.hidden i { border-style: dashed; }
.pin.sel i { box-shadow: 0 0 0 1px #000, 0 0 0 4px rgba(243,232,200,.9), 0 0 14px var(--gold); }
.pin.sel span { color: var(--gold); }
.entry { border-bottom: 1px solid var(--line); padding: 14px 0; }
.entry .b { white-space: pre-wrap; }
.entry .b::first-letter { font-family: var(--display); font-size: 2.2em; float: left; line-height: .9; padding: 4px 6px 0 0; color: var(--gold); }

@media (max-width: 640px) {
  body { font-size: 16px; padding-left: 8px; padding-right: 8px; }
  main { padding: 24px 16px 26px; border-radius: 18px; }
  h1 { font-size: 1.45rem; }
  .g6 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(2, 1fr); }
  .cols { grid-template-columns: 1fr; }
  .r.atk { grid-template-columns: 1fr 1fr; } .r.spl { grid-template-columns: 3em 1fr auto; } .r.itm { grid-template-columns: 1fr 3.4em; }
  .slots { grid-template-columns: repeat(5, 1fr); }
}

/* mgła wojny */
.map canvas.fog { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map canvas.fog.thin { opacity: .74; }
.fogbar { border: 1px solid var(--line); background: rgba(0,0,0,.25); padding: 10px 12px; margin: 0 0 12px; }
.fogbar .row { flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 0; }
.fogbar .row + .row { margin-top: 8px; }
.fogbar select { width: auto; min-width: 220px; flex: 0 1 auto; }

/* mapa w małym rozmiarze (telefon, pełne oddalenie) */
.map.z0 .pin.k-vil, .map.z0 .pin.k-town, .map.z0 .pin.k-trail { display: none; }
.map.z0 .pin.k-city span, .map.z0 .pin.k-site span { display: none; }
.map.z0 .pin.k-city i { width: 7px; height: 7px; border-width: 1.5px; }
.map.z0 .pin.k-site i { width: 8px; height: 8px; border-width: 1.5px; }
.map.z0 .pin.k-cap i { width: 11px; height: 11px; }
.map.z0 .pin.k-cap span { font-size: 11px; margin-top: 3px; }
.map.z0 .pin.k-realm span { font-size: 13px; letter-spacing: .06em; }
.map.z0 .pin.k-land span { font-size: 11px; letter-spacing: .08em; }
.map.z0 .pin.sel span { display: block; }

/* ilustracje miejsc, tło listu, przelot */
.locmedia { display: block; width: 100%; max-width: 960px; aspect-ratio: 16 / 9; object-fit: cover; margin: 14px 0 6px; border: 1px solid #000; box-shadow: 0 0 0 1px var(--gold-2), 0 8px 24px rgba(0,0,0,.6); background: #0d0d0f; }
.intro { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; align-items: center; justify-content: center; transition: opacity .8s; }
.intro.out { opacity: 0; }
.intro video { width: 100%; height: 100%; object-fit: cover; }
.intro button { position: absolute; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); }

.letterclip { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.sitefiles summary { cursor: pointer; font-family: var(--display); letter-spacing: .05em; color: var(--gold); }
.sitefiles[open] summary { margin-bottom: 10px; }
input[type=file] { font-family: var(--ui); font-size: 14px; color: var(--ink); width: 100%; }

/* pola obowiazkowe i listy informacji */
.req { color: #e0412f; font-family: Georgia, serif; font-size: 1.05em; margin-left: 3px; letter-spacing: 0; }
ul.meet { margin: 8px 0 14px; padding-left: 22px; }
ul.meet li { margin: 0 0 7px; }
.note ul.meet { margin: 4px 0; }
.sheet .n small { color: var(--muted); font-size: .8em; }

/* teren 3D */
.mapwrap.map3d canvas.gl { display: block; cursor: grab; touch-action: none; }
.mapwrap.map3d.dragging canvas.gl { cursor: grabbing; }
.map.pins3d { position: absolute; inset: 0; width: 100%; height: 100%; transform: none; will-change: auto; pointer-events: none; overflow: hidden; }
.map.pins3d .pin { pointer-events: auto; left: 0; top: 0; will-change: transform; }
.mapwrap.map3d.dragging .pin { pointer-events: none; }
.mapwrap.map3d .load3d { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; text-align: center; padding: 20px; margin: 0; }

/* frakcje i bastion */
.entry h2.eh { border: 0; margin: 0 0 4px; }
.entry .gmn { white-space: pre-wrap; border-left: 2px solid var(--line); padding: 2px 0 2px 12px; }
.lbl { font-family: var(--display); letter-spacing: .06em; color: var(--gold); font-size: .9rem; margin: 12px 0 3px; }
.stand { font-family: var(--display); letter-spacing: .05em; color: var(--gold); font-size: 1.05rem; }
.row.renown { margin-top: 6px; }
.order { border: 1px solid var(--line); border-left: 3px solid var(--gold-2); padding: 8px 12px; margin: 10px 0; background: rgba(255,255,255,.03); }
table.stock td { vertical-align: middle; }
table.stock td.q { width: 7em; text-align: right; }
table.stock input { padding: 4px 6px; }

/* strona logowania: mapa w tle, sam panel */
body.loginbg { overflow-x: hidden; }
.mapbg { position: fixed; inset: -6%; z-index: -1; background: #0b0a09 url(/bg.jpg) center / cover no-repeat;
  filter: brightness(.66) saturate(.9) sepia(.12); animation: drift 120s ease-in-out infinite alternate; will-change: transform; }
@keyframes drift { from { transform: scale(1.02) translate(-1.5%, -1%); } to { transform: scale(1.1) translate(2%, 1.5%); } }
@media (prefers-reduced-motion: reduce) { .mapbg { animation: none; } }
main.login { max-width: 420px; margin-top: 16vh; }
.mute { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 40; width: 42px; height: 42px; padding: 9px;
  border-radius: 50%; background: rgba(11,10,9,.7); border: 1px solid var(--gold-2); color: var(--gold); cursor: pointer; }
.mute svg { width: 100%; height: 100%; display: block; }
.mute .x { display: none; } .mute.off .x { display: inline; } .mute.off .w { display: none; } .mute.off { color: var(--muted); }

/* wprowadzenie */
.introtxt { margin: 6px 0 4px; }
.introtxt h1 { font-family: var(--display); color: var(--gold); letter-spacing: .03em; }
.introtxt p { font-size: 1.12rem; text-align: center; margin: 0 0 14px; font-style: italic; }
.iline { opacity: 0; transform: translateY(6px); transition: opacity 1.6s ease, transform 1.6s ease; }
.iline.on { opacity: 1; transform: none; }
.introbtns { justify-content: center; }

/* tła stron: list (Czterodroże), logowanie (mapa w ruchu) */
body.letterbg::before { background-image: url(/czterodroze.webp); filter: saturate(.9) brightness(.7); }
body.letterbg::after { background: linear-gradient(rgba(11,11,14,.35), rgba(11,11,14,.85)); }
body.loginbg::before, body.loginbg::after { display: none; }
body.loginbg { padding-left: 14px; padding-right: 14px; }
body.loginbg .mapbg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(11,11,14,.1), rgba(11,11,14,.88) 78%); }
.mute { background: rgba(12,11,15,.8); border-color: var(--line-gold); }
@media (max-width: 899px) { body:not(.loginbg) .mute { bottom: calc(92px + env(safe-area-inset-bottom)); } }
.pin span, .pin.k-cap span, .pin.k-realm span, .pin.k-land span { font-family: var(--display); font-weight: 600; }
.pin.k-vil span, .pin.k-land span { font-family: var(--read); }
.mapwrap { border-radius: 16px; border: 1px solid var(--line-gold); box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.locmedia { border-radius: 14px; border: 1px solid var(--line-gold); box-shadow: 0 12px 32px rgba(0,0,0,.55); }
.fogbar { border-radius: 14px; background: rgba(0,0,0,.25); }
.entry .b::first-letter { font-family: var(--display); }
.entry .b { font-family: var(--read); font-size: 1.06rem; line-height: 1.7; }
.order { border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); }
.introtxt p { font-family: var(--read); }
.req { color: #ff5a3d; font-family: var(--ui); }

/* ---------- kompendium ---------- */
main.kpwrap { padding: 0; overflow: hidden; }
.kp { display: flex; flex-direction: column; min-height: 70vh; }
.kp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 24px 28px 14px; }
.kp-title { flex: 1 1 260px; }
.kp-eyebrow { font: 600 12px/1 var(--display); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.kp-title h1 { margin: 8px 0 0; }
.kp-search { flex: 0 1 440px; display: flex; align-items: center; gap: 10px; margin: 0; padding: 0 14px; height: 48px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--line); }
.kp-search:focus-within { border-color: var(--gold); }
.kp-search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.kp-search input { flex: 1; border: 0; background: none; padding: 0; min-height: 0; outline: none; }
.kp-search kbd { font: 500 11px var(--ui); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }
.kp-sec { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 0 22px 14px; border-bottom: 1px solid var(--line-gold); }
.kp-sec button { flex: none; background: none; color: var(--ink-2); border: 1px solid transparent; box-shadow: none; padding: 9px 14px; min-height: 40px; font-weight: 500; border-radius: 10px; }
.kp-sec button:hover { background: rgba(255,255,255,.05); }
.kp-sec button.on { background: rgba(226,194,114,.14); color: var(--gold); }
.kp-body { flex: 1; }
.kp-wait, .kp-empty { color: var(--muted); padding: 28px; margin: 0; }
.kp-split { display: flex; flex-wrap: wrap; min-height: 64vh; }
.kp-list { flex: 0 0 300px; max-height: 78vh; overflow-y: auto; padding: 16px 12px 24px; border-right: 1px solid var(--line); }
.kp-main { flex: 999 1 520px; min-width: 0; padding: 28px 36px 48px; max-height: 78vh; overflow-y: auto; }
.kp-it { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; }
.kp-it small { color: var(--muted); font-size: .76rem; }
.kp-it:hover { background: rgba(255,255,255,.05); color: var(--ink); }
.kp-it.on { background: rgba(226,194,114,.13); color: var(--ink); }
.kp-toc { margin: 2px 0 8px 12px; border-left: 1px solid var(--line-gold); }
.kp-tl { display: block; padding: 5px 12px; font-size: .84rem; color: var(--muted); text-decoration: none; }
.kp-tl:hover { color: var(--gold); }
.kp-filt { margin: 0 4px 10px; border: 1px solid var(--line); border-radius: 12px; padding: 0 10px; }
.kp-filt summary { cursor: pointer; padding: 10px 2px; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.kp-filt[open] { padding-bottom: 4px; }
.kp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.kp-chip { background: rgba(255,255,255,.05); color: var(--ink-2); border: 1px solid var(--line); box-shadow: none; padding: 5px 11px; min-height: 32px; font-size: .78rem; font-weight: 500; border-radius: 999px; }
.kp-chip:hover { background: rgba(255,255,255,.1); }
.kp-chip.on { background: rgba(208,85,47,.2); border-color: rgba(208,85,47,.6); color: #f6b29a; }
.kp-count { color: var(--muted); font-size: .8rem; margin: 6px 12px 8px; }
.kp-back { display: none; background: none; color: var(--gold); border: 0; box-shadow: none; padding: 0; min-height: 40px; align-items: center; gap: 6px; font-weight: 500; }
.kp-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.kp-ch { margin-top: 0; font-size: 1.6rem; border: 0; color: var(--ink); letter-spacing: .03em; }
.kp-eh h2 { margin: 0; border: 0; padding: 0; font-size: 2.1rem; color: var(--ink); letter-spacing: .02em; line-height: 1.15; }
.kp-en { font-family: var(--read); font-style: italic; font-weight: 400; font-size: .6em; color: var(--muted); letter-spacing: 0; }
.kp-sub { font-family: var(--read); font-style: italic; color: var(--ink-2); margin: 6px 0 18px; font-size: 1.05rem; }
.kp-note { font-size: .84rem; color: #f0b49f; background: rgba(208,85,47,.1); border: 1px solid rgba(208,85,47,.3); border-radius: 10px; padding: 8px 12px; }
.kp-src, .kp-lic { color: var(--muted); font-size: .78rem; }
.kp-lic { padding: 14px 28px 20px; margin: 0; border-top: 1px solid var(--line); }
.kp-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 18px; }
.kp-dl div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.kp-dl dt { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.kp-dl dd { white-space: normal; font-weight: 500; }
.kp-prose { font-family: var(--read); font-size: 1.08rem; line-height: 1.7; color: #e3dccc; max-width: 72ch; }
.kp-prose h2 { font-size: 1.25rem; margin-top: 36px; scroll-margin-top: 16px; }
.kp-prose h3 { font-family: var(--display); font-size: 1.02rem; letter-spacing: .04em; text-transform: none; color: var(--ink); margin-top: 26px; scroll-margin-top: 16px; }
.kp-prose h4, .kp-prose h5 { font-family: var(--ui); font-size: .95rem; color: var(--gold); margin: 20px 0 6px; }
.kp-prose table { font-family: var(--ui); font-size: .88rem; margin: 12px 0 18px; display: block; overflow-x: auto; }
.kp-prose em { color: #efe6d2; }
.kp-prose strong { color: var(--ink); }
.kp-prose ul, .kp-prose ol { padding-left: 1.3em; }
.kp-prose hr { border: 0; border-top: 1px solid var(--line); }
.kp-results { padding: 18px 22px 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 22px; }
.kp-sg h3 { margin: 6px 12px 8px; }
.kp-art { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; border: 1px solid var(--line-gold); margin: 0 0 20px; background: #15131a; }
.kp-art-empty { aspect-ratio: auto; height: 110px; border-style: dashed; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .9rem; }
.kp-lore { font-family: var(--read); font-size: 1.15rem; line-height: 1.7; color: #e6dfcf; margin: 0 0 22px; max-width: 70ch; }
.kp-stat { background: rgba(23,20,14,.85); border: 1px solid rgba(226,194,114,.32); border-radius: 16px; padding: 20px 22px; margin: 6px 0 22px; max-width: 760px; }
.kp-stat-h { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--gold); padding-bottom: 12px; border-bottom: 1px solid rgba(226,194,114,.25); margin-bottom: 14px; }
.kp-gm { font: 600 10px var(--ui); letter-spacing: .16em; text-transform: uppercase; color: #b9974a; }
.kp-big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.kp-big div { background: rgba(255,255,255,.04); border-radius: 12px; padding: 8px; }
.kp-big b { display: block; font-family: var(--display); font-size: 1.5rem; color: var(--ink); }
.kp-big small { color: var(--muted); font-size: .74rem; }
.kp-speed { margin: 12px 0; }
.kp-ab { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; text-align: center; }
.kp-ab div { background: rgba(255,255,255,.035); border-radius: 10px; padding: 6px 2px; }
.kp-ab b { display: block; font-size: .7rem; letter-spacing: .1em; color: var(--muted); }
.kp-ab span { display: block; font-family: var(--display); font-size: 1.2rem; font-weight: 600; }
.kp-ab small { color: var(--muted); font-size: .72rem; }
.kp-abl { color: var(--muted); font-size: .72rem; text-align: right; margin: 4px 0 10px; }
.kp-lines p { margin: 0 0 4px; font-size: .92rem; }
.kp-acts h4 { font-family: var(--display); color: var(--gold); font-size: 1.02rem; margin: 18px 0 6px; padding-bottom: 4px; border-bottom: 1px solid rgba(226,194,114,.2); }
.kp-acts p { font-size: .95rem; margin: 0 0 8px; }
.kp-edit { border-top: 1px solid var(--line); padding-top: 8px; max-width: 760px; }
.kp-sw { display: flex; align-items: center; gap: 10px; font-size: .95rem; color: var(--ink); }
.kp-row { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
.kp-btn { }
.kp-ghost { background: rgba(255,255,255,.05); color: var(--ink); border: 1px solid var(--line); box-shadow: none; margin-top: 8px; }
.kp-saved { color: var(--ok); font-size: .86rem; }
.kp-add { margin: 14px 8px 0; width: calc(100% - 16px); background: rgba(255,255,255,.05); color: var(--ink); border: 1px dashed var(--line-gold); box-shadow: none; }
@media (max-width: 899px) {
  .kp-head { padding: 18px 16px 12px; }
  .kp-sec { padding: 0 10px 12px; }
  .kp-split { display: block; }
  .kp-list { max-height: none; border-right: 0; padding: 12px 8px 20px; }
  .kp-main { max-height: none; padding: 18px 16px 32px; display: none; }
  .kp-split.has-item .kp-list { display: none; }
  .kp-split.has-item .kp-main { display: block; }
  .kp-back { display: inline-flex; }
  .kp-search kbd { display: none; }
  .kp-eh h2 { font-size: 1.6rem; }
  .kp-ab { grid-template-columns: repeat(3, 1fr); }
  .kp-lic { padding: 12px 16px 16px; }
}
.kp-page { display: inline-block; font: 600 .78rem var(--ui); letter-spacing: .06em; color: var(--gold); border: 1px solid var(--line-gold); border-radius: 999px; padding: 3px 12px; margin: 0 0 14px; }
input[type=file]::file-selector-button { font: 600 13px var(--ui); color: var(--ink); background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; margin-right: 10px; cursor: pointer; }

/* ---------- stół ---------- */
main.stwrap { padding: 0; overflow: hidden; max-width: none; }
.st { display: flex; flex-direction: column; height: calc(100vh - 48px); min-height: 560px; }
.st-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-gold); }
.st-title { display: flex; flex-direction: column; gap: 4px; flex: 1 1 240px; min-width: 0; }
.st-title strong { font: 600 1.25rem var(--display); }
.st-title select { max-width: 360px; min-height: 40px; padding: 6px 10px; }
.st-eyebrow { font: 600 11px var(--display); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.st-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st-dd { position: relative; }
.st-dd > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 34px; padding: 6px 12px; border-radius: 10px; font: 600 .84rem var(--ui); background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--ink); }
.st-dd > summary.small:not(.ghost) { background: var(--ember); color: #1c0d07; border-color: transparent; }
.st-dd > summary::-webkit-details-marker { display: none; }
.st-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(420px, 92vw); max-height: 70vh; overflow-y: auto; padding: 14px 16px 16px; border-radius: 16px; background: rgba(16,15,19,.97); border: 1px solid var(--line-gold); box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.st-pop h3 { margin: 10px 0 6px; }
.st-pop label { margin: 10px 0 4px; }
.st-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 10px; }
.st-row label { flex: 1 1 90px; margin: 0; }
.st-row input, .st-row select { min-height: 38px; padding: 6px 10px; }
.st-add { margin: 0 6px 6px 0; }
.st-mr { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.st-mr span { flex: 1; } .st-mr small { display: block; color: var(--muted); font-size: .74rem; }
.st-main { flex: 1; display: flex; min-height: 0; }
.st-view { position: relative; flex: 1; min-width: 0; overflow: hidden; background: #0a0a0c; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.st-view.dragging { cursor: grabbing; }
.st-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; background: radial-gradient(ellipse at center, #1b1a1f, #0e0d11); }
.st-world img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.st-grid { position: absolute; inset: 0; pointer-events: none; }
.st-tokens { position: absolute; inset: 0; }
.st-t { position: absolute; transform: translate(-50%, -50%); padding: 0; min-height: 0; border-radius: 50%; border: 3px solid var(--c); background: #1a1714; box-shadow: 0 6px 14px rgba(0,0,0,.7); cursor: pointer; display: flex; align-items: center; justify-content: center; touch-action: none; }
.st-t:hover { background: #221e1a; }
.st-t img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; pointer-events: none; }
.st-t > span { font: 700 clamp(10px, 34%, 28px) var(--display); color: var(--ink); pointer-events: none; font-size: 1.1em; }
.st-t small { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px; white-space: nowrap; font: 600 12px var(--ui); color: #fff; text-shadow: 0 0 3px #000, 0 1px 4px #000; pointer-events: none; }
.st-t .hpb { position: absolute; left: 8%; right: 8%; bottom: -9px; height: 5px; border-radius: 3px; background: rgba(0,0,0,.7); overflow: hidden; pointer-events: none; }
.st-t .hpb b { display: block; height: 100%; background: linear-gradient(90deg, #b8402f, #e06a43); }
.st-t em { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--ember); color: #1c0d07; font: 700 11px/18px var(--ui); text-align: center; font-style: normal; pointer-events: none; }
.st-t.sel { box-shadow: 0 0 0 3px rgba(255,255,255,.85), 0 0 22px var(--c); }
.st-t.me { border-style: double; border-width: 5px; }
.st-t.turn { animation: stTurn 1.6s ease-in-out infinite; }
@keyframes stTurn { 50% { box-shadow: 0 0 0 4px rgba(226,194,114,.9), 0 0 26px rgba(226,194,114,.8); } }
@media (prefers-reduced-motion: reduce) { .st-t.turn { animation: none; box-shadow: 0 0 0 4px rgba(226,194,114,.9); } }
.st-t.hid { opacity: .45; border-style: dashed; }
.st-t.down { filter: grayscale(1) brightness(.6); }
.st-ruler { position: absolute; transform: translate(-50%, -100%); padding: 4px 10px; border-radius: 8px; background: rgba(10,10,12,.9); color: var(--gold); font: 600 13px var(--ui); white-space: nowrap; pointer-events: none; }
.st-zoom { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 6px; }
.st-zoom button { background: rgba(12,11,15,.85); }
.st-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.st-empty p { margin: 0 0 6px; font-family: var(--read); font-size: 1.15rem; }
.st-side { flex: 0 0 340px; overflow-y: auto; border-left: 1px solid var(--line-gold); padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.st-panel { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.st-ph { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.st-ph strong { font: 600 1rem var(--display); flex: 1; }
.st-x { background: none; border: 0; box-shadow: none; color: var(--muted); padding: 0 6px; min-height: 30px; font-size: 1.3rem; line-height: 1; }
.st-x:hover { background: none; color: var(--ink); }
.st-hp { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-hp span { color: var(--muted); font-size: .8rem; } .st-hp b { font: 600 1.1rem var(--display); padding: 0 6px; }
.st-colors { display: flex; gap: 6px; margin: 10px 0; }
.st-col { width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 50%; background: var(--c); border: 2px solid transparent; box-shadow: none; }
.st-col.on { border-color: #fff; }
.st-chk { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-weight: 400; font-size: .88rem; color: var(--ink); }
.st-conds { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.st-conds .kp-chip { min-height: 28px; padding: 3px 9px; font-size: .72rem; }
.st-ini { list-style: none; margin: 0; padding: 0; }
.st-ini li { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; }
.st-ini li span { flex: 1; } .st-ini li b { font-family: var(--display); color: var(--gold); }
.st-ini li input { width: 64px; min-height: 32px; padding: 4px 6px; text-align: center; }
.st-ini li.on { background: rgba(226,194,114,.14); color: var(--gold); }
.st-dq { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (max-width: 899px) { .st-dq { grid-template-columns: repeat(5, 1fr); } }
.st-dq button { min-width: 46px; }
.st-dq .st-die { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 66px; padding: 7px 2px 6px; }
.die-ic { width: 30px; height: 30px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.st-die:hover .die-ic { color: var(--gold); }
.st-die b { font: 600 .8rem/1 var(--ui); white-space: nowrap; }
.st-dice form input { flex: 1; min-height: 40px; }
.st-log { list-style: none; margin: 10px 0 0; padding: 0; max-height: 40vh; overflow-y: auto; }
.st-log li { padding: 8px 0; border-top: 1px solid var(--line); font-size: .84rem; }
.st-log li.hid { opacity: .7; }
.st-log li > div:first-child { display: flex; gap: 6px; align-items: baseline; }
.st-log small { margin-left: auto; color: var(--muted); font-size: .72rem; }
.st-res { display: flex; align-items: baseline; gap: 10px; }
.st-res strong { font: 700 1.5rem var(--display); color: var(--gold); min-width: 2ch; }
.st-res span { color: var(--muted); font-size: .78rem; }
.st-flash { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; padding: 10px 24px; border-radius: 16px; background: rgba(12,11,15,.92); border: 1px solid var(--line-gold); box-shadow: 0 14px 40px rgba(0,0,0,.6); transition: opacity .6s, transform .6s; pointer-events: none; }
.st-flash strong { font: 700 2.4rem/1.1 var(--display); color: var(--gold); }
.st-flash small, .st-flash span { font-size: .78rem; color: var(--muted); }
.st-flash.out { opacity: 0; transform: translate(-50%, -12px); }
@media (max-width: 899px) {
  .st { height: auto; min-height: 0; }
  .st-main { flex-direction: column; }
  .st-view { flex: none; height: 62vh; }
  .st-side { flex: none; border-left: 0; border-top: 1px solid var(--line-gold); }
  .st-pop { position: fixed; left: 4vw; right: 4vw; top: 12vh; width: auto; }
}
.st-cd { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; }
.st-cd summary { cursor: pointer; padding: 8px 0; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.st-cd .st-conds { margin: 0 0 10px; }
.st-cl { font-size: .86rem; color: #f0b49f; margin: 8px 0 0; }
.st-fog { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.st-view.painting { cursor: crosshair; }
.st-view.painting .st-t { pointer-events: none; }
.st-pop .st-chk { margin-top: 4px; }
.st-pop .muted { font-size: .8rem; margin: 8px 0 0; }
@media (max-width: 899px) { input, textarea, select { font-size: 16px; } }
.kp-subs { margin-top: 36px; max-width: 72ch; }
.kp-subs h2 { font-size: 1.25rem; }
.kp-sub-d { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; margin: 0 0 8px; background: var(--panel-2); }
.kp-sub-d summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.kp-sub-d summary small { font-weight: 400; color: var(--muted); }
.kp-sub-d[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.kp-sub-d .kp-prose { font-size: 1rem; }

/* v15: O świecie i opowieść postaci w karcie */
.world { max-width: 44rem; margin: 0 auto; font-family: var(--read); font-size: 1.14rem; line-height: 1.75; color: #ddd3bd; }
.world h1 { margin-bottom: 22px; color: var(--gold); letter-spacing: .12em; }
.world p { margin: 0 0 1.05em; }
.world strong { color: var(--gold); font-weight: 600; }
.world p:first-of-type::first-letter { font-family: var(--display); font-size: 2.4em; float: left; line-height: .9; padding: 4px 8px 0 0; color: var(--gold); }
.sheet .story { margin-top: 6px; }
.sheet .story > label { margin: 14px 0 4px; font-size: .86rem; color: var(--ink); }
.sheet .story textarea { min-height: 96px; }
.sheet .fnote { display: block; margin-top: 4px; font-size: .74rem; line-height: 1.35; color: var(--muted); }
.worldsep { height: 1px; margin: 34px auto 30px; max-width: 44rem; background: linear-gradient(90deg, transparent, var(--line), transparent); }
/* v16: zwijane sekcje kompendium i opisy podklas */
.kp-fold { border-top: 1px solid var(--line); }
.kp-fold:last-child { border-bottom: 1px solid var(--line); }
.kp-fold .kp-fold { border: 0; margin-left: 4px; }
.kp-fs { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px; -webkit-tap-highlight-color: transparent; }
.kp-fs::-webkit-details-marker { display: none; }
.kp-fs::before { content: '\25B8'; color: var(--gold); flex: none; font-size: .9em; transition: transform .15s ease; }
.kp-fold[open] > .kp-fs::before { transform: rotate(90deg); }
.kp-fs > h2, .kp-fs > h3 { flex: 1; margin: 12px 0; border: 0; padding: 0; }
.kp-fs:hover > h2, .kp-fs:hover > h3 { color: var(--ink); }
.kp-fb { padding: 0 0 10px; }
.kp-lead { font-family: var(--read); font-style: italic; font-size: 1.04rem; line-height: 1.6; color: #ddd3bd; margin: 0 0 12px; }
.kp-feat { margin: 16px 0 4px; }
@media (prefers-reduced-motion: reduce) { .kp-fs::before { transition: none; } }

/* v16: pula atrybutów i majątek startowy */
.poolbar { margin: 4px 0 12px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); font-weight: 600; font-size: .92rem; }
.poolbar.ok { border-color: rgba(127,176,138,.5); background: rgba(127,176,138,.12); color: #b6dcbf; }
.poolbar.bad { border-color: rgba(208,85,47,.45); background: rgba(208,85,47,.1); color: #f0a184; }
.abil .fin { font-size: .78rem; color: var(--muted); margin: -2px 0 6px; }
.abil .fin .out { font-family: var(--display); font-weight: 600; color: var(--ink); font-size: 1rem; }
.sheet .abil label.mini { font-size: .68rem; letter-spacing: .04em; margin: 6px 0 2px; text-transform: uppercase; }
.abil.bgab { box-shadow: inset 0 0 0 1px rgba(226,194,114,.45); border-radius: 12px; }
.abil select:disabled { opacity: .35; }
.bonusmsg { margin: 8px 0 0; font-size: .86rem; }
.bonusmsg.ok { color: var(--ok); }
.bonusmsg.bad { color: #f0a184; }
.starttotal { font-family: var(--display); color: var(--gold); font-size: 1.05rem; margin: 10px 0 4px; }
.sheet .sdesc { color: var(--ink-2); font-style: italic; }
.kitgrid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .kitgrid { grid-template-columns: 1fr 1fr; } }
.kitgrid .box select { width: 100%; }
.kitgrid .fnote { text-align: left; }
.kitgrid .kitapply { margin-top: 8px; width: 100%; }
.magicbox { margin-top: 12px; text-align: left; }
.magicbox select { width: 100%; }
.kp-intro { margin-bottom: 6px; }
.kp-tl.kp-tl2 { padding-left: 22px; font-size: .86em; opacity: .9; }
/* v17: premia z pochodzenia przyciskami, odnośniki do kompendium */
.bbtns { display: flex; gap: 6px; justify-content: center; }
.bbtn { min-width: 44px; padding: 8px 0; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font-weight: 600; cursor: pointer; }
.bbtn.on { background: rgba(226,194,114,.22); border-color: var(--gold); color: var(--gold); }
.bbtn:disabled { opacity: .3; cursor: not-allowed; }
/* v35: przełączniki B i S bez pomarańczowego wypełnienia po najechaniu - stan widać tylko po złotym zaznaczeniu */
.bbtn:hover { background: transparent; }
.bbtn.on:hover { background: rgba(226,194,114,.22); }
@media (hover: hover) { .bbtn:not(:disabled):hover { border-color: var(--gold); } }
.bbtns.none { font-size: .7rem; color: var(--muted); min-height: 38px; align-items: center; text-align: center; line-height: 1.2; }
.kplinks { margin: 8px 0 0; font-size: .86rem; }
.kplink { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
/* v18: ekwipunek z katalogiem i efektami */
.irows { display: grid; gap: 10px; }
.irow { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: rgba(255,255,255,.02); }
.irow.act { border-color: rgba(226,194,114,.55); box-shadow: inset 0 0 0 1px rgba(226,194,114,.2); }
.itop { display: flex; gap: 8px; align-items: flex-start; }
.iname { flex: 1; position: relative; min-width: 0; }
.iq { width: 70px; flex: none; }
.sugg { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #17141c; border: 1px solid var(--line); border-radius: 10px; margin-top: 4px; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.sugg:empty { display: none; }
.sugg button { display: flex; width: 100%; justify-content: space-between; gap: 10px; text-align: left; padding: 10px 12px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); cursor: pointer; font: inherit; }
.sugg button:last-child { border-bottom: 0; }
.sugg button small { color: var(--muted); white-space: nowrap; }
.sugg button:hover, .sugg button:focus { background: rgba(226,194,114,.12); }
.ictl { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 8px 0 4px; }
.ictl select { width: auto; min-width: 140px; flex: 1 1 140px; }
.ick { display: inline-flex; gap: 6px; align-items: center; font-size: .9rem; margin: 0; }
.isum { font-size: .82rem; color: var(--ink-2); margin: 6px 0; }
.idesc summary, .fromit summary { cursor: pointer; font-size: .85rem; color: var(--gold); margin: 4px 0; }
.idsc { font-size: .88rem; line-height: 1.5; color: var(--ink-2); padding: 4px 0 8px; }
.idsc table { font-size: .8rem; }
.irow > input[data-f="notes"] { margin-top: 6px; }
.autoatk { margin: 4px 0 12px; }
.aa { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 4px 10px; padding: 8px 10px; border: 1px solid rgba(226,194,114,.35); border-radius: 10px; margin-bottom: 6px; align-items: baseline; }
.aa b { color: var(--gold); }
.aa small { grid-column: 1 / -1; color: var(--muted); }
.mini2 { font-size: .8rem; color: var(--muted); margin: 6px 0; }
.fromit { border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; margin-bottom: 6px; }
@media (max-width: 640px) { .aa { grid-template-columns: 1fr 1fr; } .aa b { grid-column: 1 / -1; } }
.irows, .irow, .itop, .iname, .ictl { min-width: 0; max-width: 100%; }
.irow { overflow: visible; }
.itop > input.iq { width: 64px; flex: 0 0 64px; }
.itop > button { flex: 0 0 auto; }
.iname > input { width: 100%; }
.ictl select { flex: 1 1 120px; min-width: 0; max-width: 100%; width: auto; }
.sugg button { flex-direction: column; align-items: flex-start; gap: 2px; }
.sugg button span { font-weight: 500; }
.sugg button small { white-space: normal; font-size: .76rem; }
/* v20: biegłości przyciskami, czary z podpowiedziami */
.skbar { font-size: .84rem; color: var(--gold); margin: 6px 0 10px; }
.skr .skb { display: inline-flex; gap: 4px; flex: none; }
.skr .bbtn { min-width: 30px; padding: 4px 0; font-size: .78rem; border-radius: 8px; }
.sktag { font-size: .68rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; margin-left: 4px; }
.r.atk { position: relative; }
.r.atk .iname { position: relative; }
/* v20: PWA - instalacja i nowa wersja */
#pwaInst[hidden] { display: none; }
.pwadlg { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 18px; }
.pwabox { position: relative; max-width: 420px; width: 100%; background: var(--card, #1b1712); border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 16px; }
.pwabox h2 { margin-top: 0; padding-right: 30px; }
.pwabox ol { padding-left: 20px; }
.pwax { position: absolute; top: 10px; right: 10px; }
.pwaok { margin-top: 8px; }
.pwaupd { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 95; display: flex; gap: 10px; align-items: center;
  background: var(--card, #1b1712); border: 1px solid var(--gold); border-radius: 12px; padding: 8px 10px 8px 14px; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
@media (min-width: 900px) { .pwaupd { bottom: 24px; } }
.kp-know { display: grid; gap: 4px; margin-bottom: 8px; }
.kp-packs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.st-pop { padding-top: 34px; }
.st-popx { position: absolute; top: 4px; right: 4px; }
@media (max-width: 899px) { .st-pop { max-height: 76vh; overflow: auto; z-index: 60; } }
@media (max-width: 899px) { .st:has(.st-view.painting) #stFogDd .st-pop { top: auto; bottom: calc(90px + env(safe-area-inset-bottom)); max-height: 34vh; } }

/* ===== Stół, wersja 21: mapa na cały ekran i pływający interfejs ===== */
body.vtt { overflow: hidden; }
body.vtt main.stwrap { position: fixed; inset: 0; margin: 0; max-width: none; border: 0; border-radius: 0; box-shadow: none; background: #08080a; backdrop-filter: none; -webkit-backdrop-filter: none; z-index: 5; }
@media (min-width: 900px) { body.vtt main.stwrap { left: var(--rail); } }
@media (max-width: 899px) { body.vtt main.stwrap { bottom: calc(69px + env(safe-area-inset-bottom)); } body.vtt:not(.loginbg) .mute { bottom: auto; top: calc(8px + env(safe-area-inset-top)); right: 8px; } }
body.vt-tv nav.tabs, body.vt-tv .mute { display: none; }
body.vt-tv main.stwrap { left: 0; bottom: 0; }
.vt { position: absolute; inset: 0; overflow: hidden; --glass: rgba(13,12,16,.88); }
.vt .st-view { position: absolute; inset: 0; height: auto; flex: none; }
.vt .st-world { background: #0c0b0f; }
.vt-glow { mix-blend-mode: screen; }
.vt-mask { image-rendering: auto; }
.vt-walls { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.vt-w { stroke: #e9c46a; stroke-width: calc(4px / var(--k, 1)); stroke-linecap: round; fill: none; }
.vt-w.t1 { stroke: #6fb3e0; } .vt-w.t1.open { stroke-dasharray: calc(10px / var(--k, 1)); opacity: .7; }
.vt-w.t2 { stroke: #9fe3d6; stroke-dasharray: calc(4px / var(--k, 1)) calc(8px / var(--k, 1)); }
.vt-w.tmp { opacity: .85; } .vt-w.rul { stroke: #fff; stroke-dasharray: calc(8px / var(--k, 1)); stroke-width: calc(2.5px / var(--k, 1)); }
.vt-wp { fill: #e9c46a; stroke: #1a1408; stroke-width: calc(1px / var(--k, 1)); }
.vt-door { pointer-events: auto; cursor: pointer; }
.vt-door circle { fill: rgba(13,12,16,.9); stroke: #6fb3e0; stroke-width: calc(2px / var(--k, 1)); }
.vt-door path { fill: #6fb3e0; }
.vt-door.open circle { stroke: #7fb08a; } .vt-door.open path { fill: #7fb08a; }
.vt-door:hover circle { fill: #23303a; }
.vt-lr { fill: rgba(255,186,110,.06); stroke: rgba(255,186,110,.5); stroke-width: calc(1.5px / var(--k, 1)); stroke-dasharray: calc(6px / var(--k, 1)); }
.vt-lr.b { fill: rgba(255,186,110,.08); stroke-dasharray: none; }
.vt-lp { fill: #ffba6e; stroke: #1a1408; stroke-width: calc(2px / var(--k, 1)); }
.vt-lp.on, .vt-lr.on { stroke: #fff; }
.vt .st-ruler { z-index: 3; pointer-events: none; transform: translate(-50%, -100%) scale(calc(1 / var(--k, 1))); transform-origin: 50% 100%; }
.vt .st-view.tooling { cursor: crosshair; }

.vt-nav, .vt-tools, .vt-sub, .vt-side, .vt-hot, .vt-players, .vt-win, .vt-toast { position: absolute; z-index: 10; }
.vt-nav { top: 12px; left: 12px; right: 420px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; pointer-events: none; z-index: 13; }
.vt:has(.vt-side.closed) .vt-nav { right: 84px; }
.vt-chip { pointer-events: auto; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 14px; border-radius: 12px; background: var(--glass); color: var(--ink-2); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.45); font: 600 .84rem var(--ui); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap; }
button.vt-chip:hover { background: rgba(34,31,40,.95); color: var(--ink); }
.vt-chip.on { border-color: var(--gold); color: var(--gold); }
div.vt-chip { flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 16px; }
div.vt-chip strong { font: 600 1rem var(--display); color: var(--ink); }
.vt-chip.vt-plus { padding: 6px 13px; font-size: 1.1rem; }
.vt-chip.vt-act { background: var(--ember); color: #1c0d07; border-color: transparent; }
.vt-chip.vt-act.live { background: rgba(127,176,138,.18); color: #b6dcbf; border-color: rgba(127,176,138,.55); }
.vt-live { width: 8px; height: 8px; border-radius: 50%; background: #7fd08f; box-shadow: 0 0 8px #7fd08f; }

.vt-tools { top: calc(var(--vtnav, 40px) + 22px); left: 12px; display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line-gold); box-shadow: 0 10px 26px rgba(0,0,0,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.vt-tools:empty { display: none; }
.vt-tool { width: 42px; height: 42px; min-height: 0; padding: 0; display: grid; place-items: center; border-radius: 10px; background: none; color: var(--ink-2); border: 1px solid transparent; box-shadow: none; }
.vt-tool svg, .vt-tab svg, .st-zoom svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.vt-tool:hover { background: rgba(255,255,255,.08); color: var(--ink); }
.vt-tool.on { background: rgba(226,194,114,.16); color: var(--gold); border-color: var(--line-gold); }
.vt-sep { height: 1px; background: var(--line); margin: 2px 4px; }
.vt-sub { top: calc(var(--vtnav, 40px) + 22px); left: 74px; width: 290px; max-height: calc(100% - 150px); overflow-y: auto; padding: 12px 14px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line-gold); box-shadow: 0 10px 26px rgba(0,0,0,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.vt-sub strong { font: 600 1rem var(--display); display: block; margin-bottom: 8px; }
.vt-sub .muted { font-size: .78rem; margin: 10px 0 0; }
.vt-subx { position: absolute; top: 6px; right: 6px; }
.vt-seg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.vt-side { top: 0; right: 0; bottom: 0; display: flex; flex-direction: row-reverse; pointer-events: none; }
.vt-tabs { pointer-events: auto; width: 60px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; background: var(--glass); border-left: 1px solid var(--line-gold); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.vt-tab { width: 48px; min-height: 48px; padding: 5px 0 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 12px; background: none; color: var(--muted); border: 0; box-shadow: none; font: 500 10px/1.2 var(--ui); }
.vt-tab:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.vt-tab.on { background: rgba(226,194,114,.14); color: var(--gold); }
.vt-panes { pointer-events: auto; width: 328px; overflow-y: auto; padding: 14px 14px 20px; background: var(--glass); border-left: 1px solid var(--line-gold); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.vt-side.closed .vt-panes { display: none; }
.vt-pane > * + * { margin-top: 16px; }
.vt-pane h3 { margin: 14px 0 6px; }
.vt-form label { margin: 10px 0 4px; }
.vt-form .muted { font-size: .8rem; margin: 8px 0 0; }
.vt .st-log { max-height: none; }
.vt-tl { list-style: none; margin: 0; padding: 0; }
.vt-tli { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 5px 8px; border-radius: 10px; background: none; color: var(--ink); border: 0; box-shadow: none; font: 500 .86rem var(--ui); text-align: left; }
.vt-tli:hover { background: rgba(255,255,255,.06); }
.vt-tli.on { background: rgba(226,194,114,.14); color: var(--gold); }
.vt-tli i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.vt-tli span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-tli small { color: var(--muted); font-size: .72rem; } .vt-tli b { font: 600 .78rem var(--ui); color: var(--muted); }

.vt-hot { bottom: 12px; left: 50%; transform: translateX(calc(-50% - 160px)); display: flex; gap: 5px; padding: 6px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line-gold); box-shadow: 0 10px 26px rgba(0,0,0,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.vt:has(.vt-side.closed) .vt-hot { transform: translateX(-50%); }
.vt-slot { position: relative; width: 50px; height: 50px; min-height: 0; padding: 0; border-radius: 10px; background: rgba(255,255,255,.05); color: var(--ink); border: 1px solid var(--line); box-shadow: none; overflow: hidden; }
.vt-slot:hover { background: rgba(226,194,114,.16); border-color: var(--line-gold); }
.vt-slot b { display: block; font: 600 11.5px/1.15 var(--ui); padding: 0 3px; overflow-wrap: anywhere; }
.vt-slot i { position: absolute; right: 4px; bottom: 2px; font: 500 9px var(--ui); color: var(--muted); font-style: normal; }
.vt-slot.empty { color: var(--muted); border-style: dashed; }
.vt-slot.die { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.vt-slot.die .die-ic { width: 22px; height: 22px; }
.vt-slot.die b { font-size: 10.5px; line-height: 1; white-space: nowrap; }
.vt-slot.die i { top: 2px; bottom: auto; }
.vt-players { left: 12px; bottom: 12px; min-width: 150px; max-width: 220px; padding: 8px 12px 10px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); box-shadow: 0 10px 26px rgba(0,0,0,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.vt-players .st-eyebrow { display: block; font-size: 9.5px; margin-bottom: 4px; }
.vt-pl { display: flex; align-items: center; gap: 8px; font: 500 .84rem var(--ui); color: var(--ink-2); padding: 2px 0; }
.vt-pl i { width: 8px; height: 8px; border-radius: 50%; background: #7fd08f; flex: none; }
.vt-pl.gm { color: var(--gold); } .vt-pl.gm i { background: var(--gold); }
.vt .st-zoom { left: auto; right: 400px; bottom: 12px; z-index: 9; padding: 5px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); gap: 4px; }
.vt .vt-side.closed ~ .st-zoom, .vt .vt-side[hidden] ~ .st-zoom { right: 72px; }
.vt .st-zoom button { background: none; border-color: transparent; min-width: 36px; padding: 4px 8px; display: grid; place-items: center; font-size: 1.05rem; }
.vt .st-zoom button:hover { background: rgba(255,255,255,.08); }

.vt-win { top: calc(var(--vtnav, 40px) + 22px); left: 74px; width: 316px; max-height: calc(100% - var(--vtnav, 40px) - 120px); display: flex; flex-direction: column; border-radius: 14px; background: var(--glass); border: 1px solid var(--line-gold); box-shadow: 0 18px 40px rgba(0,0,0,.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 12; }
.vt:has(.vt-sub:not([hidden])) .vt-win { left: 376px; }
.vt-win .st-ph { margin: 0; padding: 10px 8px 10px 14px; border-bottom: 1px solid var(--line); }
.vt-drag { cursor: move; touch-action: none; user-select: none; -webkit-user-select: none; }
.vt-winb { padding: 12px 14px 14px; overflow-y: auto; }
.vt-win .st-cd label { margin: 8px 0 4px; }
.vt-toast { left: 50%; top: calc(var(--vtnav, 40px) + 26px); transform: translateX(-50%); padding: 10px 18px; border-radius: 12px; background: rgba(60,20,12,.95); border: 1px solid rgba(208,85,47,.6); color: #f6c9b8; font: 500 .9rem var(--ui); z-index: 20; max-width: 90%; text-align: center; }
.vt .st-flash { z-index: 15; top: calc(var(--vtnav, 40px) + 22px); }
.vt .st-empty { z-index: 1; }
body.vt-tv .st-zoom, body.vt-tv .vt-tools, body.vt-tv .vt-nav { display: none; }

@media (max-width: 899px) {
  .vt-nav { top: 8px; left: 8px; right: 58px; }
  .vt-chip { min-height: 36px; padding: 5px 12px; }
  .vt-tools { top: calc(var(--vtnav, 36px) + 16px); left: 8px; padding: 4px; gap: 4px; }
  .vt-tool { width: 40px; height: 40px; }
  .vt-sub { top: calc(var(--vtnav, 36px) + 16px); left: 62px; right: 8px; width: auto; max-height: 42%; }
  .vt-side { top: auto; left: 0; flex-direction: column-reverse; max-height: 62%; }
  .vt-tabs { width: auto; flex-direction: row; justify-content: space-around; padding: 3px 6px; border-left: 0; border-top: 1px solid var(--line-gold); }
  .vt-tab { width: auto; flex: 1; min-height: 46px; }
  .vt-panes { width: auto; border-left: 0; border-top: 1px solid var(--line-gold); border-radius: 16px 16px 0 0; min-height: 0; flex: 1; }
  .vt-hot, .vt-players { display: none; }
  .vt .st-zoom, .vt .vt-side.closed ~ .st-zoom { right: 8px; bottom: 62px; flex-direction: column; }
  .vt-win, .vt:has(.vt-sub:not([hidden])) .vt-win { top: auto; left: 8px !important; right: 58px; bottom: 62px; width: auto; max-height: 52%; }
  .vt-toast { top: calc(var(--vtnav, 36px) + 18px); }
}

.st-world video { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; object-fit: fill; }
/* v25: rysunki ścian, drzwi, okien i świateł (widzą je wszyscy), zasięg ruchu, stany na żetonach, tryby ruchu i blokady */
.vt-art, .vt-range { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.ar-wall { fill: #77706a; stroke: #221e1a; stroke-width: 2; }
.ar-joint { fill: none; stroke: #3d3732; stroke-width: 1.6; }
.ar-door { fill: #8b5a2e; stroke: #321e0f; stroke-width: 2; }
.ar-grain { fill: none; stroke: #643d1d; stroke-width: 1.2; }
.ar-hinge { fill: #2b2420; stroke: #b9a27a; stroke-width: 1.2; }
.ar-knob { fill: #e2c272; }
.ar-swing { fill: none; stroke: rgba(226,194,114,.55); stroke-width: 1.5; stroke-dasharray: 5 5; }
.ar-frame { fill: #5b4631; stroke: #221911; stroke-width: 1.6; }
.ar-glass { fill: rgba(173,222,242,.8); stroke: rgba(240,250,255,.95); stroke-width: 1; }
.ar-shine { fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; }
.ar-curtain { fill: #7c2f2a; stroke: #3d1412; stroke-width: 1; }
.ar-fold { fill: none; stroke: #4e1915; stroke-width: 1.2; }
.ar-halo { fill: rgba(255,170,80,.28); }
.ar-fl1 { fill: #e8743a; stroke: #6e2a10; stroke-width: 1; }
.ar-fl2 { fill: #ffd57a; }
.ar-bowl { fill: #4b4139; stroke: #1c1713; stroke-width: 1; }
.vt-rg { fill: rgba(120,214,112,.06); stroke: #7ed678; stroke-width: 2px; vector-effect: non-scaling-stroke; }
.vt-path { fill: none; stroke: #fff; stroke-width: 3px; stroke-dasharray: 7 6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.vt-door.vt-winm circle { stroke: #9fe3d6; }
.vt-door.vt-winm path { fill: none; stroke: #9fe3d6; stroke-width: calc(1.5px / var(--k, 1)); }
.vt-door.vt-winm.cur circle { stroke: #d0675b; }
.vt-door.vt-winm.cur path { stroke: #d0675b; }
.st-t .st-cond { position: absolute; display: grid; place-items: center; border-radius: 50%; background: #14110d; border: 1.5px solid var(--cc); box-shadow: 0 1px 4px rgba(0,0,0,.65); pointer-events: none; font-style: normal; z-index: 1; }
.st-cond svg { width: 70%; height: 70%; fill: none; stroke: var(--cc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-cchip { display: inline-flex; align-items: center; gap: 5px; }
.st-cchip svg, .st-cli svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--cc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-cli { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; white-space: nowrap; }
div.vt-chip.vt-modes { flex-direction: row; align-items: center; gap: 2px; padding: 3px; }
.vt-mode { min-height: 30px; padding: 4px 10px; border-radius: 9px; background: none; color: var(--ink-2); border: 0; box-shadow: none; font: 600 .8rem var(--ui); }
.vt-mode:hover { background: rgba(255,255,255,.08); color: var(--ink); }
.vt-mode.on { background: rgba(226,194,114,.18); color: var(--gold); }
.vt-lock svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vt-chip.vt-lock.on { background: rgba(208,85,47,.22); border-color: rgba(208,85,47,.65); color: #f6c9b8; }
.st-world.vt-strat .st-tokens { z-index: 2; }
/* v26: Wyczerpanie z poziomem w oknie żetonu */
.st-exh label span { display: inline-flex; align-items: center; gap: 6px; }
.st-exh svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--cc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* v26: poświata ruchu pod żetonem w rundzie (zielona - ma ruch, czerwona - nie ma) i licznik rundy u MG */
.st-t .st-glow { position: absolute; left: 50%; top: 50%; width: 190%; height: 190%; transform: translate(-50%, -50%); border-radius: 50%; z-index: -1; pointer-events: none;
  background: radial-gradient(circle closest-side, rgba(118,214,102,0) 50%, rgba(118,214,102,.95) 54%, rgba(118,214,102,.5) 70%, rgba(118,214,102,0) 100%); }
.st-t .st-glow.out { background: radial-gradient(circle closest-side, rgba(226,84,70,0) 50%, rgba(226,84,70,.95) 54%, rgba(226,84,70,.5) 70%, rgba(226,84,70,0) 100%); }
.vt-round > span { align-self: center; padding: 0 6px 0 4px; font: 600 .78rem var(--ui); color: var(--gold); white-space: nowrap; }
/* v26: kości lecące przez stół przy każdym rzucie */
.vt-dice { position: absolute; inset: 0; z-index: 14; pointer-events: none; overflow: hidden; }
.vt-die { position: absolute; left: 0; top: 0; width: var(--ds); height: var(--ds); display: grid; place-items: center; will-change: transform; filter: drop-shadow(0 7px 9px rgba(0,0,0,.65)); transition: opacity .5s; }
.vt-die .die-ic { position: absolute; inset: 0; width: 100%; height: 100%; fill: #221d17; stroke: #e2c272; stroke-width: 1.25; stroke-linejoin: round; }
.vt-die b { position: relative; padding: .14em .26em; border-radius: 50%; background: radial-gradient(closest-side, rgba(20,17,13,.95), rgba(20,17,13,.75) 65%, rgba(20,17,13,0)); font: 700 calc(var(--ds) * .38)/1 var(--display); color: #f6ecd6; text-shadow: 0 1px 3px #000, 0 0 6px #000; }
.vt-die.d4 b { top: calc(var(--ds) * .12); font-size: calc(var(--ds) * .27); }
.vt-die.done b { color: #ffd77a; }
.vt-die.done { animation: vtDieLand .28s ease-out; }
.vt-die.drop { opacity: .38; }
@keyframes vtDieLand { 0% { filter: drop-shadow(0 7px 9px rgba(0,0,0,.65)) brightness(1.6); } 100% { filter: drop-shadow(0 7px 9px rgba(0,0,0,.65)); } }
.vt-dice.out .vt-die { opacity: 0; }
/* pula kości w panelu: licznik na kości i pole rzutu z przyciskiem czyszczenia */
.st-dq .st-die { position: relative; }
.st-dq .st-die.on { border-color: var(--line-gold); background: rgba(226,194,114,.08); }
.st-cnt { position: absolute; top: 4px; right: 5px; font: 700 .72rem/1 var(--ui); font-style: normal; color: var(--gold); }
.st-dhint { font-size: .74rem; margin: 8px 0 0; }
.st-dfield { position: relative; flex: 1 1 140px; display: flex; }
.st-dfield input { flex: 1; min-width: 0; padding-right: 30px; }
.st-dfield .st-x { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
/* znaczek liczby na zakładce panelu */
.vt-tab { position: relative; }
.vt-badge { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--ember); color: #1c0d07; font: 700 10px/16px var(--ui); font-style: normal; text-align: center; }
/* v27: pełny ekran w oknie telewizora */
.vt-fs { position: absolute; right: 18px; bottom: 18px; z-index: 20; display: flex; align-items: center; gap: 8px; min-height: 0; padding: 9px 14px; border-radius: 12px; background: rgba(12,11,15,.8); border: 1px solid var(--line-gold); color: var(--ink); font: 600 .85rem var(--ui); box-shadow: 0 8px 24px rgba(0,0,0,.5); transition: opacity .4s; }
.vt-fs svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vt.idle .vt-fs { opacity: 0; pointer-events: none; }
.vt.idle, .vt.idle * { cursor: none !important; }

/* ===== v28: wybór sceny z listy (MG) ===== */
.vt-scp { position: relative; pointer-events: auto; flex: 0 1 auto; min-width: 0; }
.vt-scbtn { max-width: 340px; }
.vt-scn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 .9rem var(--ui); color: var(--ink); }
.vt-car { color: var(--gold); font-size: .78rem; transition: transform .2s; }
.vt-scbtn.open { border-color: var(--line-gold); }
.vt-scbtn.open .vt-car { transform: rotate(180deg); }
.vt-scmenu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; max-width: min(420px, 86vw); max-height: min(62vh, 540px); overflow-y: auto; padding: 8px; border-radius: 14px; background: #100e13; border: 1px solid var(--line-gold); box-shadow: 0 18px 40px rgba(0,0,0,.6); z-index: 30; display: flex; flex-direction: column; gap: 2px; }
.vt-scmenu .st-eyebrow { display: block; padding: 4px 8px 6px; font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-scmenu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 7px 10px; border-radius: 9px; background: none; border: 1px solid transparent; box-shadow: none; color: var(--ink-2); font: 500 .88rem var(--ui); text-align: left; }
.vt-scmenu button:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.vt-scmenu button.on { border-color: var(--line-gold); color: var(--gold); background: rgba(226,194,114,.08); }
.vt-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.18); flex: none; }
/* v31: długa lista scen - nagłówki i pozycje nie mogą się zgniatać w przewijanym menu */
.vt-scmenu > * { flex-shrink: 0; }
.vt-scmenu .vt-scgrp { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--gold); }
.vt-scmenu .vt-scnew { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; color: var(--gold); }
@media (max-width: 600px) { .vt-lock span { display: none; } .vt-scbtn { max-width: 210px; } .vt-mode { padding: 4px 8px; } }

/* ===== v28: komunikat o początku i końcu rundy ===== */
.vt-rban { position: absolute; left: 50%; top: 24%; transform: translate(-50%, -50%); z-index: 25; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 300px; max-width: 90%; padding: 18px 36px 20px; border-radius: 18px;
  background: radial-gradient(ellipse at center, rgba(44,30,14,.97), rgba(14,12,16,.97)); border: 1px solid var(--gold); box-shadow: 0 0 0 1px rgba(226,194,114,.25), 0 24px 60px rgba(0,0,0,.7), 0 0 44px rgba(226,194,114,.22); text-align: center; cursor: pointer;
  animation: vtRbIn .45s cubic-bezier(.2,.9,.3,1.2); transition: opacity .6s, transform .6s; }
.vt-rban small { font: 600 .72rem var(--ui); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.vt-rban strong { font: 600 2.5rem/1.1 var(--display); color: var(--gold); letter-spacing: .04em; text-shadow: 0 2px 14px rgba(226,194,114,.35); }
.vt-rban span { font: 500 .92rem var(--ui); color: var(--ink-2); }
.vt-rban.out { opacity: 0; transform: translate(-50%, -62%); }
@keyframes vtRbIn { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.82); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
body.vt-tv .vt-rban { padding: 26px 56px 28px; }
body.vt-tv .vt-rban strong { font-size: 4rem; }
body.vt-tv .vt-rban span { font-size: 1.2rem; }
@media (max-width: 899px) { .vt-rban { top: 32%; padding: 14px 22px 16px; min-width: 230px; } .vt-rban strong { font-size: 1.9rem; } }
@media (prefers-reduced-motion: reduce) { .vt-rban { animation: none; transition: none; } }

/* ===== v28: menu główne - na telefonie część pozycji w "Więcej" ===== */
nav.tabs .tb { position: relative; }
.nbadge { position: absolute; top: 5px; left: 50%; margin-left: 6px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--ember); color: #1c0d07; font: 700 10px/17px var(--ui); font-style: normal; text-align: center; box-shadow: 0 0 0 2px rgba(12,11,15,.9); }
@media (min-width: 900px) and (max-height: 860px) { nav.tabs .tb { min-height: 50px; padding: 6px 4px; } nav.tabs { gap: 2px; padding: 12px 0; } nav.tabs .brand { padding: 2px 0 8px; } }
@media (max-width: 899px) {
  nav.tabs { overflow: visible; justify-content: space-around; }
  nav.tabs .tb { flex: 1 1 0; min-width: 0; max-width: 92px; padding: 8px 2px 7px; }
  nav.tabs .tb.ov, nav.tabs .tbx { display: none; }
  nav.tabs .tb svg { width: 22px; height: 22px; }
}
.navpop { position: fixed; right: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 45; min-width: 220px; max-width: calc(100vw - 16px); max-height: 70vh; overflow-y: auto; padding: 8px; border-radius: 16px; background: rgba(16,14,19,.98); border: 1px solid var(--line-gold); box-shadow: 0 18px 44px rgba(0,0,0,.7); display: flex; flex-direction: column; gap: 2px; }
.navpop .np-it { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 8px 12px; border-radius: 10px; background: none; border: 0; box-shadow: none; color: var(--ink-2); font: 500 .95rem var(--ui); text-align: left; position: relative; }
.navpop .np-it:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.navpop .np-it.on { color: var(--gold); background: rgba(226,194,114,.12); }
.navpop .np-it svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.navpop .np-it .nbadge { position: static; margin-left: auto; box-shadow: none; }
.navpop .np-who { margin: 6px 12px 2px; padding-top: 8px; border-top: 1px solid var(--line); font-size: .74rem; color: var(--muted); word-break: break-all; }
@media (min-width: 900px) { .navpop { display: none; } }

/* ===== v28: czat w menu głównym - wysuwany panel nad każdym ekranem ===== */
.chatd { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); z-index: 40; display: flex; flex-direction: column; background: rgba(15,13,18,.97); border-left: 1px solid var(--line-gold); box-shadow: -18px 0 50px rgba(0,0,0,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: chdIn .22s ease-out; }
@keyframes chdIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.chd-h { display: flex; align-items: center; gap: 8px; padding: calc(12px + env(safe-area-inset-top)) 12px 12px 18px; border-bottom: 1px solid var(--line-gold); }
.chd-h strong { font: 600 1.2rem var(--display); color: var(--ink); margin-right: auto; letter-spacing: .03em; }
.chd-push { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 10px; border-radius: 10px; background: none; border: 1px solid var(--line); box-shadow: none; color: var(--muted); font: 600 .74rem var(--ui); }
.chd-push.on { color: #b6dcbf; border-color: rgba(127,176,138,.55); background: rgba(127,176,138,.12); }
.chd-push svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chlog { list-style: none; margin: 0; padding: 14px 16px; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 11px; }
.chlog li { font-size: .92rem; line-height: 1.45; }
.ch-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
.ch-h b { font-weight: 600; }
.ch-h small { margin-left: auto; font-size: .7rem; color: var(--muted); }
.ch-v { color: var(--muted); font-size: .84rem; }
.chlog li p { margin: 2px 0 0; overflow-wrap: anywhere; }
.ch-postac b { color: var(--gold); font-family: var(--display); letter-spacing: .02em; }
.ch-postac p { color: var(--ink); }
.ch-robi b { color: #c7b3e8; font-family: var(--display); }
.ch-robi p em { color: #ddd3ee; }
.ch-mysli { padding: 6px 10px 8px; border-radius: 10px; border: 1px dashed rgba(150,170,220,.45); background: rgba(90,110,170,.08); }
.ch-mysli b { color: #a9bce8; font-family: var(--display); }
.ch-mysli p em { color: #c9d4ee; }
.ch-gracz b { color: var(--ink-2); }
.ch-gracz p { color: var(--muted); }
.ch-tag { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; }
.ch-lock { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: #a9bce8; border: 1px solid rgba(150,170,220,.45); border-radius: 6px; padding: 0 5px; }
.ch-empty { color: var(--muted); font-size: .86rem; }
.chform { padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-gold); }
.chkinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 4px; }
.chkinds button { min-height: 34px; padding: 4px 6px; font-size: .76rem; }
.chkinds button.on { border-color: var(--line-gold); background: rgba(226,194,114,.14); color: var(--gold); }
.chas { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: .8rem; }
.chas input { flex: 1; min-height: 34px; padding: 5px 9px; }
.chrow { display: flex; gap: 8px; margin-top: 8px; align-items: flex-end; }
.chrow textarea { flex: 1; min-height: 46px; max-height: 30vh; resize: vertical; padding: 8px 10px; }
.chnote { margin: 6px 2px 0; font-size: .76rem; color: #a9bce8; min-height: 0; }
.chnote:empty { display: none; }
@media (max-width: 899px) {
  .chatd { width: 100vw; border-left: 0; z-index: 50; }
  body.chat-open { overflow: hidden; }
}
.ctoast { position: fixed; z-index: 46; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); max-width: min(560px, calc(100vw - 24px)); padding: 10px 16px; border-radius: 12px; background: rgba(22,19,26,.97); border: 1px solid var(--line-gold); color: var(--ink); font: 500 .88rem/1.35 var(--ui); text-align: left; box-shadow: 0 14px 34px rgba(0,0,0,.6); transition: opacity .6s; }
.ctoast.out { opacity: 0; }
@media (min-width: 900px) { .ctoast { left: auto; right: 24px; transform: none; } }
/* v28: pasek stołu na telefonie - mniejsze przyciski, żeby zajmował mniej mapy */
@media (max-width: 600px) {
  .vt-nav { gap: 4px; }
  .vt-nav .vt-chip { min-height: 32px; padding: 3px 10px; font-size: .76rem; gap: 6px; border-radius: 10px; }
  .vt-nav div.vt-chip.vt-modes { padding: 2px; }
  .vt-nav .vt-mode { min-height: 26px; padding: 3px 7px; font-size: .74rem; }
  .vt-nav .vt-scn { font-size: .8rem; }
  .vt-nav .vt-round > span { font-size: .72rem; padding: 0 4px 0 3px; }
}
/* v28: martwe żetony (0 PW) mają czarną poświatę - widać ją zawsze, u wszystkich */
.st-t .st-glow.dead { background: radial-gradient(circle closest-side, rgba(0,0,0,0) 48%, rgba(0,0,0,.96) 53%, rgba(0,0,0,.72) 70%, rgba(0,0,0,0) 100%); }
.st-t.down .st-glow.dead { filter: none; }

/* ===== v28: Kompendium - działy zawijają się, filtry wielokrotne, sortowanie ===== */
@media (max-width: 899px) { .kp-sec button { padding: 6px 10px; min-height: 34px; font-size: .84rem; } }
.kp-fg { margin: 2px 0 8px; }
.kp-fl { display: block; margin: 0 0 4px 2px; font: 600 .7rem var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kp-fg .kp-chips { margin-bottom: 0; }
.kp-fn { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--ember); color: #1c0d07; font: 700 .7rem/1 var(--ui); vertical-align: 1px; }
.kp-clear { display: block; margin: 4px 0 10px; min-height: 30px; padding: 4px 12px; font-size: .78rem; background: none; border: 1px solid var(--line); box-shadow: none; color: var(--ink-2); border-radius: 999px; }
.kp-clear:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.kp-cbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 4px 8px 8px 12px; }
.kp-cbar .kp-count { margin: 0; }
.kp-cbar .kp-count small { color: var(--muted); font-size: .74rem; }
.kp-sort { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--muted); }
.kp-sort select { min-height: 30px; padding: 3px 26px 3px 8px; font-size: .78rem; border-radius: 9px; }

/* ===== v28: hiperłącza do Kompendium i okno podglądu ===== */
a.kl { color: inherit; text-decoration: underline; text-decoration-color: rgba(226,194,114,.55); text-decoration-thickness: 1px; text-underline-offset: 2px; cursor: help; }
a.kl:hover { color: var(--gold); text-decoration-color: var(--gold); }
em a.kl, i a.kl { font-style: italic; }
.kpeek { position: fixed; inset: 0; z-index: 70; background: rgba(6,5,8,.55); display: flex; justify-content: flex-end; animation: kpkFade .18s ease-out; }
.kpeek[hidden] { display: none; }
@keyframes kpkFade { from { opacity: 0; } to { opacity: 1; } }
.kpk-box { width: min(560px, 100vw); height: 100%; display: flex; flex-direction: column; background: rgba(16,14,19,.99); border-left: 1px solid var(--line-gold); box-shadow: -24px 0 60px rgba(0,0,0,.6); animation: chdIn .22s ease-out; }
.kpk-h { display: flex; align-items: center; gap: 8px; padding: calc(12px + env(safe-area-inset-top)) 12px 12px 16px; border-bottom: 1px solid var(--line-gold); }
.kpk-t { flex: 1; min-width: 0; font: 600 1.15rem var(--display); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpk-back { min-height: 34px; width: 34px; padding: 0; display: grid; place-items: center; background: none; border: 1px solid var(--line); box-shadow: none; color: var(--ink-2); border-radius: 10px; }
.kpk-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kpk-open { min-height: 34px; padding: 5px 11px; font-size: .76rem; background: none; border: 1px solid var(--line-gold); box-shadow: none; color: var(--gold); border-radius: 10px; white-space: nowrap; }
.kpk-b { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 20px calc(28px + env(safe-area-inset-bottom)); }
.kpk-b .kp-eh h2 { font-size: 1.35rem; }
.kpk-b .kp-prose { font-size: .95rem; }
@media (max-width: 899px) { .kpk-box { width: 100vw; border-left: 0; } .kpk-open { font-size: .72rem; padding: 4px 8px; } }
body.kpeek-open { overflow: hidden; }

/* ===== v28: awans postaci - okna krok po kroku ===== */
body.lvup-open { overflow: hidden; }
.lvup { position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; padding: 16px; background: rgba(6,5,8,.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.lvbox { width: min(640px, 100%); max-height: min(88vh, 900px); display: flex; flex-direction: column; border-radius: 20px; background: linear-gradient(180deg, rgba(28,23,18,.99), rgba(16,14,19,.99)); border: 1px solid var(--line-gold); box-shadow: 0 30px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(226,194,114,.12); animation: lvIn .3s cubic-bezier(.2,.9,.3,1.15); }
@keyframes lvIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.lvh { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 20px; border-bottom: 1px solid var(--line); }
.lvstep { flex: 1; font: 600 .74rem var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lvb { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 10px; }
.lvb p { margin: 0 0 12px; line-height: 1.5; }
.lvt { font: 600 1.55rem/1.2 var(--display); color: var(--gold); margin: 0 0 12px; letter-spacing: .02em; }
.lvt small { font: 500 .8rem var(--ui); color: var(--muted); }
.lvsub { font: 600 .72rem var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px !important; }
.lvdesc { font-size: .94rem; border-left: 2px solid var(--line-gold); padding-left: 14px; margin: 6px 0 14px; }
.lvf2 { display: flex; align-items: center; gap: 10px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.lvf2 .lvsp { flex: 1; }
.lvf2 #lvNext { min-width: 140px; }
.lvlab { display: block; margin: 10px 0 6px; font-weight: 600; font-size: .86rem; }
.lvlab small { display: block; font-weight: 400; color: var(--muted); margin: 2px 0 6px; }
.lvlab input { width: 100%; margin-top: 6px; }
#lvRoll { font: 600 1.6rem var(--display); text-align: center; max-width: 160px; display: block; }
.lvsum { color: var(--ink-2); font-size: .9rem; min-height: 1.2em; }
.lvsum b { color: var(--gold); }
.lvauto { margin: 0 0 12px; padding-left: 20px; }
.lvauto li { margin: 0 0 6px; line-height: 1.45; }
.lvauto b { color: var(--gold); }
.lvmode { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.lvmode.lvcol { flex-direction: column; align-items: flex-start; }
.lvmode button.on, .lvexp button.on { border-color: var(--line-gold); background: rgba(226,194,114,.16); color: var(--gold); }
.lvabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 10px; }
.lvab { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.lvab.on { border-color: var(--line-gold); background: rgba(226,194,114,.08); }
.lvab span { font-size: .78rem; color: var(--muted); }
.lvab b { font: 600 1.15rem var(--display); color: var(--ink); }
.lvab div { display: flex; gap: 6px; }
.lvab button { flex: 1; min-height: 32px; padding: 2px; font-size: 1rem; }
.lvq { width: 100%; margin: 0 0 8px; }
.lvfeats, .lvspells { display: flex; flex-direction: column; gap: 4px; max-height: 44vh; overflow-y: auto; margin: 0 0 10px; padding-right: 2px; }
.lvft, .lvsp { display: flex; align-items: flex-start; gap: 10px; padding: 7px 8px; border-radius: 10px; border: 1px solid transparent; }
.lvft.on, .lvsp.on { border-color: var(--line-gold); background: rgba(226,194,114,.08); }
.lvft.no { opacity: .55; }
.lvft > span, .lvsp > span { display: flex; flex-direction: column; gap: 1px; font-size: .92rem; }
.lvft small, .lvsp small { color: var(--muted); font-size: .74rem; }
.lvft .lvreq { color: #c9a86a; }
.lvft button, .lvsp button { flex: none; min-width: 74px; min-height: 30px; padding: 3px 8px; font-size: .76rem; }
.lvsp button { min-width: 36px; }
.lvpick-f { display: flex; gap: 8px; }
.lvpick-f .lvq { flex: 1; }
.lvpick-f select { min-height: 38px; max-width: 46%; }
.lvexp { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.lvsp-l { margin: 0 0 10px; padding-left: 20px; }
.lvsp-l li { margin-bottom: 4px; }
.lvsp-l small { color: var(--muted); }
.lvpend2 { font-size: .86rem; color: #f0c9a0; border: 1px dashed rgba(208,85,47,.5); border-radius: 10px; padding: 8px 10px; }
@media (max-width: 640px) { .lvup { padding: 0; } .lvbox { max-height: 100%; height: 100%; border-radius: 0; } .lvabs { grid-template-columns: repeat(2, 1fr); } .lvt { font-size: 1.3rem; } }
/* okno "Gratulacje, nowy poziom" - znika samo */
.lvcongr { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(80,58,20,.65), rgba(6,5,8,.88) 60%); cursor: pointer; animation: kpkFade .3s ease-out; transition: opacity .45s; }
.lvcongr.out { opacity: 0; }
.lvc-in { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; animation: lvPop .55s cubic-bezier(.2,.9,.3,1.25); }
@keyframes lvPop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.lvc-in small { font: 600 .9rem var(--ui); letter-spacing: .3em; text-transform: uppercase; color: var(--ink-2); }
.lvc-in strong { font: 600 2.4rem/1.1 var(--display); color: var(--gold); text-shadow: 0 0 24px rgba(226,194,114,.45); }
.lvc-n { font: 600 7rem/1 var(--display); color: #f6e3b0; text-shadow: 0 0 40px rgba(226,194,114,.55), 0 6px 30px rgba(0,0,0,.8); margin: 6px 0; }
.lvc-in em { font: italic 500 1rem var(--ui); color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .lvc-in, .lvbox { animation: none; } }
/* lista cech na karcie i przypomnienie o niedokończonym awansie */
.lvfeats .lvres { margin: 0 0 8px; }
.lvchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.lvchips span { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: .8rem; color: var(--ink-2); }
.lvchips b { color: var(--gold); }
.lvlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lvlist li { display: flex; gap: 10px; align-items: baseline; }
.lvl { flex: none; width: 30px; height: 26px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-gold); color: var(--gold); font: 600 .82rem var(--display); }
.lvf { line-height: 1.6; font-size: .92rem; }
.lvf small { color: var(--muted); font-size: .74rem; }
.lvf .dot { color: var(--muted); margin: 0 7px; }
.lvch { display: inline-block; font-size: .74rem; padding: 0 7px; border-radius: 6px; background: rgba(226,194,114,.12); color: var(--gold); }
.lvpend { margin: 12px 0 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(208,85,47,.6); background: rgba(208,85,47,.12); color: #f6d2c2; font-size: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lvpend button { margin-left: auto; }
a.kl.kls { text-decoration: none; }
a.kl.kls:hover { text-decoration: underline; }
/* v28: czat na telefonie kończy się nad klawiaturą */
@media (max-width: 899px) { .chatd { bottom: var(--kb, 0px); height: auto; } }
.lvup.lvwait .lvbox { visibility: hidden; }
/* v28: okno żetonu na telefonie - szeroki panel od dołu (cała szerokość, nad zakładkami panelu) */
@media (max-width: 899px) {
  .vt-win, .vt:has(.vt-sub:not([hidden])) .vt-win { left: 6px !important; right: 6px; bottom: 58px; width: auto; max-height: 60%; border-radius: 18px 18px 14px 14px; z-index: 16; box-shadow: 0 -10px 40px rgba(0,0,0,.6); }
  .vt-win .st-ph { padding: 8px 8px 8px 16px; }
  .vt-win .st-ph::before { content: ''; position: absolute; left: 50%; top: 5px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(255,255,255,.18); }
  .vt-winb { padding: 10px 14px 14px; }
}
.st-cl.st-cwhat { color: var(--muted); font-size: .84rem; }
.st-cl.st-cwhat a.kl { color: var(--ink-2); }
@media (max-width: 480px) { .chkinds button { white-space: nowrap; font-size: .72rem; padding: 4px 3px; } }

/* v29: NPC - generator, lista i karta */
.npcgen { text-align: left; margin: 12px 0 20px; }
.npcgen > summary { cursor: pointer; font: 600 1rem var(--ui); color: var(--gold); list-style-position: inside; }
.npcgen > summary small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.npcgen input, .npcgen select { text-align: left; }
.npcform label { margin-top: 10px; }
.npcpic { width: 72px; height: 72px; flex: none; border-radius: 50%; object-fit: cover; border: 2px solid var(--line-gold); background: #1a1714; display: inline-grid; place-items: center; overflow: hidden; }
.npcpic.none svg, .npcico { width: 62%; height: 62%; color: #9cc0e0; }
.npcprev { display: flex; gap: 16px; align-items: flex-start; margin: 14px 0 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--panel-2); }
.npcprev h3 { margin: 0 0 2px; font-family: var(--display); color: var(--gold); }
.npcl { margin: 0 0 8px; color: var(--ink-2); font-size: .92rem; }
.npcnums, .npcab { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0; font-size: .9rem; }
.npcnums b, .npcab b { color: var(--gold); font-weight: 600; margin-right: 3px; }
.npcat { margin: 6px 0; padding-left: 18px; font-size: .92rem; }
.npcat small { color: var(--muted); }
.npchead { margin: 18px 0 8px; gap: 12px; flex-wrap: wrap; }
.npchead input { flex: 1; min-width: 200px; }
.npclist { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.npclist > .npcgrp { grid-column: 1 / -1; }
.npcgrp > summary { cursor: pointer; padding: 6px 2px; color: var(--gold); }
.npcgrp > summary small { color: var(--ink-3, #9a9); }
.npcgl { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; margin: 4px 0 10px; }
.npcrow { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--panel-2); }
.npcrow.on { border-color: var(--gold-2); }
.npcrow .npcpic { width: 48px; height: 48px; }
.npcrt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.npcrt small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.npcbt { display: flex; flex-direction: column; gap: 4px; }
.npcbt button { padding: 4px 10px; }
.npccardh { margin: 22px 0 6px; gap: 10px; flex-wrap: wrap; }
.npctop { display: flex; gap: 14px; align-items: flex-start; }
.npctop .grid { flex: 1; }
.npcdesc textarea { min-height: 64px; }
@media (max-width: 640px) {
  .npcprev, .npctop { flex-direction: column; }
  .npclist { grid-template-columns: 1fr; }
  .npcgl { grid-template-columns: 1fr; }
  .npcbt { flex-direction: row; }
}

/* v29: tło sceny - rozmyta mapa w jej kolorach zamiast czerni */
.vt-bg { position: absolute; inset: -80px; z-index: 0; pointer-events: none; background: #0c0b0f center / cover no-repeat; filter: blur(34px) brightness(.5) saturate(.9); transform: scale(1.08); }
.vt .st-view { background: transparent; }
.vt .st-world { background: transparent; box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 18px 60px rgba(0,0,0,.55); }
.vt-tv .vt-bg { filter: blur(40px) brightness(.38) saturate(.85); }
/* v29: ikony potworów i NPC na żetonach */
.st-t .st-ico { width: 64%; height: 64%; color: color-mix(in srgb, var(--c) 55%, #f3ead6); pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.st-mr .st-ico { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; color: #9cc0e0; }
/* v29: mini karta w oknie żetonu */
.st-minid > summary small { color: var(--muted); font-weight: 400; }
.st-mini { font-size: .86rem; }
.st-mn { margin: 6px 0; line-height: 1.7; }
.st-mn b { color: var(--gold); font-weight: 600; }
.st-mh { margin: 8px 0 2px; font: 600 .78rem var(--ui); color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.st-abs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; margin: 6px 0; }
.st-ab { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; }
.st-ab b { color: var(--gold); font-size: .76rem; }
.st-ab small { width: 100%; color: var(--muted); font-size: .72rem; }
.st-atk { margin: 6px 0; padding-left: 16px; }
.st-atk li { margin: 3px 0; }
.st-atk small { color: var(--muted); }
.st-roll { display: inline-block; min-height: 0; padding: 1px 7px; margin: 1px 0; border-radius: 6px; border: 1px solid var(--line-gold); background: rgba(226,194,114,.08); color: var(--gold); font: 600 .8rem var(--ui); cursor: pointer; }
.st-roll:hover { background: rgba(226,194,114,.2); }
.st-mnote { font-size: .74rem; margin: 4px 0 0; }
@media (max-width: 480px) { .st-abs { grid-template-columns: repeat(2, 1fr); } }
.kp-it.kp-ico { display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; align-items: center; }
.kp-it.kp-ico small { grid-column: 2; }
.kp-mico { width: 24px; height: 24px; grid-row: span 2; color: #c99a6a; }
/* elementy sceny (v29) */
.vt-pdefs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.vt-props { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.vt-props .vt-ph { opacity: .45; }
.vt-psel { fill: rgba(240,197,106,.08); stroke: #f0c56a; stroke-width: 2; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.vt-pal { display: grid; gap: 6px; margin-top: 8px; }
.vt-palg small { display: block; font-size: .68rem; color: var(--muted); margin: 2px 0 3px; text-transform: uppercase; letter-spacing: .06em; }
.vt-palr { display: flex; flex-wrap: wrap; gap: 4px; }
.vt-pk { width: 40px; height: 40px; padding: 3px; border-radius: 8px; border: 1px solid var(--line); background: rgba(0,0,0,.28); cursor: pointer; }
.vt-pk svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.vt-pk:hover { border-color: var(--line-gold); }
.vt-pk.on { border-color: var(--gold); background: rgba(240,197,106,.14); box-shadow: inset 0 0 0 2px rgba(240,197,106,.35); }
.vt-psbox { border: 1px solid var(--line-gold); border-radius: 10px; padding: 8px 10px 10px; margin-bottom: 4px; background: rgba(0,0,0,.22); }
.vt-psh { display: flex; align-items: center; gap: 8px; }
.vt-psh b { font-weight: 600; }
.vt-pico { width: 34px; height: 34px; flex: none; }
.vt-prot { flex: 1; min-width: 120px; }
.vt-prot input { width: 100%; }
.vt-sub .vt-phint { margin-top: 6px; }
@media (max-width: 899px) { .vt-pk { width: 38px; height: 38px; } }
/* v29: na telefonie pasek MG to jeden przewijany rząd, żeby nie zabierał trzech rzędów mapy */
@media (max-width: 600px) {
  .vt-nav { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; pointer-events: auto; scrollbar-width: none; overscroll-behavior-x: contain; padding-bottom: 2px; }
  .vt-nav::-webkit-scrollbar { display: none; }
  .vt-nav > * { flex: none; }
  .vt-nav:has(.vt-scmenu) { overflow: visible; flex-wrap: wrap; }
}
/* v29: telefon - otwarty panel (Kości, Walka, Żetony, Scena) chowa okno żetonu; po zamknięciu panelu okno wraca */
@media (max-width: 899px) { .vt:has(.vt-side:not(.closed)) .vt-win { display: none; } }
.vt-w.inv, .vt-w.t3, .vt-w.t4 { stroke: #e9c46a; stroke-dasharray: calc(9px / var(--k, 1)) calc(6px / var(--k, 1)); opacity: .9; }

/* v31: zaznaczanie wielu żetonów (MG) */
.st-t.msel { box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(226,194,114,.75); }
.st-t.msel.hid { opacity: .7; }
.vt-box { position: absolute; border: calc(2px / var(--k, 1)) dashed var(--gold); background: rgba(226,194,114,.10); border-radius: calc(4px / var(--k, 1)); pointer-events: none; z-index: 40; }
.vt-tlbar { flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.vt-tlr { display: flex; align-items: center; gap: 2px; }
.vt-tlr .vt-tli { flex: 1; min-width: 0; width: auto; }
.vt-tlc { display: flex; align-items: center; justify-content: center; width: 30px; min-height: 36px; flex: none; cursor: pointer; }
.vt-tlc input { width: 18px; height: 18px; margin: 0; accent-color: var(--gold); cursor: pointer; }
.vt-gnames { margin: 0 0 10px; color: var(--ink-2); font-size: .86rem; line-height: 1.45; }
.vt-gcount { margin: 10px 0 4px; font: 600 .82rem var(--ui); color: var(--gold); letter-spacing: .02em; }
.vt-scmenu .st-eyebrow + .vt-scgrp { margin-top: 0; padding-top: 2px; border-top: 0; }
/* v32: dźwięki stołu */
.vt .vt-sndw { position: absolute; right: 400px; bottom: 64px; z-index: 9; padding: 5px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.vt .vt-side.closed ~ .vt-sndw, .vt .vt-side[hidden] ~ .vt-sndw { right: 72px; }
.vt .vt-sndw button { background: none; border-color: transparent; min-width: 36px; padding: 4px 8px; display: grid; place-items: center; }
.vt .vt-sndw button:hover { background: rgba(255,255,255,.08); }
.vt .vt-sndw svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.vt .vt-sndw .vt-sndb.off { color: var(--muted); }
@media (max-width: 899px) { .vt .vt-sndw, .vt .vt-side.closed ~ .vt-sndw { right: 8px; bottom: 214px; } }
body.vt-tv .vt-sndw { display: none; }
.vt-sndpop { position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); width: min(300px, 90vw); z-index: 36; padding: 12px 14px; border-radius: 14px; background: #100e13; border: 1px solid var(--line-gold); box-shadow: 0 18px 40px rgba(0,0,0,.6); display: grid; gap: 8px; font: 500 .86rem var(--ui); color: var(--ink-2); }
.vt-sndpop label { display: grid; gap: 6px; }
.vt-sndpop .st-chk { display: flex; }
.vt-sndpop input[type=range], .vt-sndvol input[type=range] { width: 100%; accent-color: var(--gold); }
.vt-sndpop p { margin: 0; }
.vt-unlock { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 36; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--gold); color: #1a1410; border: 0; font: 600 .95rem var(--ui); box-shadow: 0 10px 30px rgba(0,0,0,.5); cursor: pointer; }
.vt-unlock svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vt-sndtop { align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.vt-sndvol { display: grid; gap: 8px; margin: 0 0 6px; font: 500 .82rem var(--ui); color: var(--ink-2); }
.vt-sndvol label { display: grid; gap: 4px; }
.vt-sndnow { margin: 4px 0 0; font: 500 .84rem var(--ui); color: var(--ink-2); } .vt-sndnow b { color: var(--gold); }
.vt-sndh { margin: 14px 0 4px; font: 600 .78rem var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.vt-sndg { margin: 8px 0 4px; font: 500 .74rem var(--ui); color: var(--muted); }
.vt-sndgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.vt-sndi { display: flex; min-width: 0; }
.vt-snd { flex: 1; min-width: 0; min-height: 36px; padding: 6px 9px; border-radius: 9px; background: rgba(255,255,255,.04); border: 1px solid var(--line); box-shadow: none; color: var(--ink); font: 500 .8rem var(--ui); text-align: left; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.vt-snd:hover { background: rgba(255,255,255,.09); }
.vt-snd.loop { border-style: dashed; }
.vt-snd.on { border-style: solid; border-color: var(--gold); color: var(--gold); background: rgba(226,194,114,.12); }
.vt-sndx { flex: none; width: 28px; margin-left: 2px; padding: 0; border-radius: 9px; background: none; border: 1px solid var(--line); box-shadow: none; color: var(--muted); }
.vt-sndadd { display: grid; gap: 6px; }
.vt-sndadd input[type=file] { font-size: .8rem; color: var(--ink-2); }
.vt-sndlic { margin-top: 12px; font-size: .74rem; }
.vt-sndvol input[type=range], .vt-sndpop input[type=range] { margin: 0; padding: 0; height: 26px; min-height: 0; border: 0; background: none; box-shadow: none; }

/* v33: atuty na karcie postaci */
.ftlist { display: flex; flex-direction: column; gap: 10px; }
.ftslot { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: rgba(255,255,255,.02); min-width: 0; }
.ftslot.miss { border-color: rgba(224,65,47,.55); box-shadow: inset 3px 0 0 #e0412f; }
.fthead { margin: 0 0 8px; font-size: .9rem; }
.fthead small { color: var(--muted); font-weight: 400; }
.ftpick { margin-bottom: 8px; }
.ftpick > input { width: 100%; }
.ftcard { min-width: 0; }
.ftname { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 4px; }
.ftname small { color: var(--muted); font-size: .76rem; }
.ftname .ftclr { margin-left: auto; min-height: 30px; padding: 2px 10px; }
.ftshort { font-size: .86rem; color: var(--ink-2); margin: 0 0 8px; line-height: 1.45; }
.ftcs { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.sheet .ftc { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--ink-2); margin: 0 0 8px; flex: 1 1 180px; min-width: 0; }
.sheet .ftc input, .sheet .ftc select { width: 100%; }
.sheet p.ftc { flex-direction: row; gap: 4px; align-items: baseline; flex: 1 1 100%; }
.ftfx { font-size: .8rem; color: var(--gold); margin: 2px 0 0; line-height: 1.4; }
.ftluck input { width: 64px; display: inline-block; margin-left: 4px; padding: 4px 6px; min-height: 0; }
.ftprof { margin: 0 0 8px; }
.sugg.ftsug { max-height: min(60vh, 460px); overflow-y: auto; }
.ftsug button { flex-direction: column; align-items: flex-start; gap: 2px; }
.ftsug button span { font-weight: 600; }
.ftsug button i { font-style: normal; font-weight: 400; color: var(--muted); }
.ftsug button small { white-space: normal; font-size: .74rem; }
.ftsug button em { font-style: normal; font-size: .8rem; color: var(--ink-2); line-height: 1.4; white-space: normal; }
.ftsug button[disabled] { opacity: .5; cursor: not-allowed; }
.ftsug .ftwait { margin: 0; padding: 10px 12px; font-size: .85rem; color: var(--muted); }

/* v33: zwijane części karty (stan w przeglądarce, osobno dla każdego konta) */
.shsec > summary { list-style: none; cursor: pointer; display: block; border-radius: 6px; }
.shsec > summary::-webkit-details-marker { display: none; }
.shsec > summary > h2 { position: relative; padding-right: 30px; }
.shsec > summary > h2::after { content: ''; position: absolute; right: 8px; top: calc(50% - 9px); width: 8px; height: 8px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); transition: transform .2s; }
.shsec:not([open]) > summary > h2 { opacity: .8; margin-bottom: 4px; }
.shsec:not([open]) > summary > h2::after { transform: rotate(-45deg); top: calc(50% - 6px); }
.shsec > summary:hover > h2 { opacity: 1; }
.shsec > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.inshsec > h2:first-child { display: none; }
@media (prefers-reduced-motion: reduce) { .shsec > summary > h2::after { transition: none; } }
.ftsug button { box-shadow: none; border-radius: 0; min-height: 0; text-shadow: none; }
/* v34: wieloklasowość na karcie */
.mcopen { margin: 10px 0 0; }
.mcopen .fnote { margin-top: 4px; }
.mcbox { margin: 12px 0 0; padding: 12px 14px; border: 1px solid var(--line-gold); border-radius: var(--r-s); background: rgba(226,194,114,.05); }
.mcbox h3 { margin: 0 0 6px; }
.mclv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 8px 0; }
.mcl { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.mcl > span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mcl > b { font-family: var(--display); color: var(--gold); font-weight: 600; }
.mcl > small { font-size: .72rem; color: var(--muted); }
.mcl select { min-height: 36px; }
.mcsum { margin: 6px 0; font-size: .9rem; }
.mcsum b { color: var(--gold); }
.mcbad { margin: 8px 0; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(208,85,47,.55); background: rgba(208,85,47,.12); color: #f6c3b0; font-size: .88rem; }
.mcx { margin: 10px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--line); }
.mcx p { margin: 0 0 6px; font-size: .88rem; }
.mcx label { display: block; margin-top: 4px; }
.mcbox > button { margin-top: 10px; }
.mccl { display: inline-block; font-size: .72rem; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line-gold); color: var(--gold); white-space: nowrap; }
.lvchips .mccl { border-radius: 999px; padding: 3px 10px; font-size: .8rem; font-weight: 600; }
.mcnote { margin: 6px 0 4px; padding-left: 18px; font-size: .82rem; color: var(--ink-2); }
.spl { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 8px 0; }
.spl .out { font-size: 1.05rem; }
.pactbox { margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.pactbox label small { display: block; font-size: .74rem; color: var(--muted); font-weight: 400; margin-top: 2px; }
.pactbox .slots { grid-template-columns: 90px; margin-top: 6px; }
/* v34: cechy w tabeli klasy w Kompendium - klikalne jak inne odnośniki, z wygodnym polem dotyku na telefonie */
a.kp-ft { color: inherit; text-decoration: underline; text-decoration-color: rgba(226,194,114,.55); text-decoration-thickness: 1px; text-underline-offset: 2px; cursor: pointer; }
a.kp-ft:hover { color: var(--gold); text-decoration-color: var(--gold); }
@media (pointer: coarse) { a.kp-ft { display: inline-block; padding: 2px 0; } }

/* v35: legenda przełączników B i S przy umiejętnościach */
.sklegend { font-size: .84rem; color: var(--ink-2); line-height: 1.7; margin: 6px 0 4px; }
.sklegend .bbtn { display: inline-block; min-width: 26px; padding: 1px 0; font-size: .74rem; text-align: center; border-radius: 7px; border: 1px solid var(--gold); vertical-align: 1px; }

/* v35: rozwinięty opis czaru na karcie - ten sam układ co okno podglądu Kompendium */
.spdesc .spview { margin-top: 8px; }
.spdesc .kp-sub { margin: 4px 0 10px; font-size: .98rem; }
.spdesc .spen { font-style: italic; color: var(--muted); }
.spdesc .kp-dl { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 12px; }
.spdesc .kp-dl div { padding: 8px 10px; }
.spdesc .kp-prose { font-size: 1rem; line-height: 1.65; color: #e3dccc; padding: 0; }
.spdesc .kplinks { margin: 8px 0 2px; }
.irow:has(> details.spdesc[open]) > .isum { display: none; }

/* v35: okno awansu na telefonie - wysokość ekranu, treść przewija się, a przycisk "Dalej" jest zawsze widoczny
   (wcześniej okno rosło razem z treścią i przycisk wypadał poza ekran) */
.lvup { grid-template-rows: minmax(0, 1fr); }
.lvbox { min-height: 0; }
@media (max-width: 640px) { .lvbox { height: 100%; max-height: 100%; } }

/* v35: zakładki karty postaci */
.shtabs { position: sticky; top: 0; z-index: 6; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding: 6px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(18,15,20,.94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.shtabs::-webkit-scrollbar { display: none; }
.shtabs button { flex: 1 0 auto; min-height: 38px; padding: 6px 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink-2); box-shadow: none; font-size: .84rem; }
.shtabs button.on { background: rgba(226,194,114,.16); border-color: var(--line-gold); color: var(--gold); }
@media (hover: hover) { .shtabs button:not(.on):hover { background: rgba(255,255,255,.06); } }
@media (max-width: 520px) { .shtabs { gap: 2px; padding: 4px; } .shtabs button { flex: 1 1 auto; min-width: 0; padding: 6px 2px; font-size: .76rem; letter-spacing: 0; } }
@media (max-width: 370px) { .shtabs button { font-size: .7rem; } }
.sheet[data-cur="postac"] > [data-shtab]:not([data-shtab="postac"]),
.sheet[data-cur="walka"] > [data-shtab]:not([data-shtab="walka"]),
.sheet[data-cur="czary"] > [data-shtab]:not([data-shtab="czary"]),
.sheet[data-cur="ekwipunek"] > [data-shtab]:not([data-shtab="ekwipunek"]),
.sheet[data-cur="cechy"] > [data-shtab]:not([data-shtab="cechy"]),
.sheet[data-cur="notatki"] > [data-shtab]:not([data-shtab="notatki"]) { display: none; }
/* część, która sama wypełnia zakładkę, nie zwija się */
details.shsec.solo > summary { cursor: default; }
details.shsec.solo > summary > h2 { padding-right: 0; }
details.shsec.solo > summary > h2::after { display: none; }

/* v35: usuwanie klasy w części Wieloklasowość */
.mcdel { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.mcdx { font-size: .8rem; color: var(--muted); }

/* v35: podpowiedź przy wychodzeniu przyciskiem wstecz */
.navtoast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 96; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 12px;
  background: rgba(20,17,22,.96); border: 1px solid var(--line-gold); color: var(--ink); font-size: .88rem; box-shadow: 0 10px 30px rgba(0,0,0,.5); }

/* v35: pełny opis atutu rozwinięty w karcie - ten sam wygląd co opis czaru */
.ftdesc .kpentb { margin-top: 6px; }
.ftdesc .kpentv .kp-prose { font-size: 1rem; line-height: 1.65; color: #e3dccc; }
.ftdesc .kpentv .kp-eh h2 { font-size: 1.3rem; }
.ftcard:has(> details.ftdesc[open]) > .ftshort { display: none; }

/* v35: klikalne nazwy pojęć na karcie (opis: czym jest, na co wpływa, liczby postaci) */
a.hl { color: inherit; text-decoration: underline dotted rgba(226,194,114,.7); text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: help; }
a.hl:hover, a.hl:focus-visible { color: var(--gold); }
.hlp h4 { margin: 18px 0 6px; }
.hlp ul { margin: 0 0 6px; }
.hlpyou li { margin: 2px 0; }
.hlpyou b { color: var(--gold); }

/* v35: przycisk dalszej części długiej listy w Kompendium */
.kp-more { display: block; width: 100%; margin: 10px 0 4px; }

/* v35: zwijane wpisy Kroniki */
.kentry > summary { list-style: none; cursor: pointer; }
.kentry > summary::-webkit-details-marker { display: none; }
.kentry > summary h2::after { content: ' \25BE'; color: var(--gold); font-size: .8em; }
.kentry:not([open]) > summary h2::after { content: ' \25B8'; }
/* v36: ostrzeżenie przy czarze powyżej kręgu, który postać może przygotować */
.iwarn { margin: 6px 0 0; padding: 6px 10px; border-left: 3px solid rgba(208,85,47,.75); border-radius: 0 6px 6px 0; background: rgba(208,85,47,.1); color: #f0a184; font-size: .86rem; line-height: 1.45; }
.iwarn b { color: #f5b49a; }
.sugg .swarn { color: #f0a184; font-weight: 600; }
/* v37: miniatury istot w bestiariuszu i wybór miniatury gracza */
.kp-mimg { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: #000; border: 1px solid rgba(201,154,106,.35); }
.kp-art.kp-mini { width: min(100%, 300px); aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; margin: 0 auto 20px; background: #000; }
.tokpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 10px; margin: 6px 0 4px; }
.tokpick button { aspect-ratio: 1 / 1; padding: 0; min-height: 0; border-radius: 50%; border: 2px solid var(--line-gold, rgba(201,154,106,.35)); background: #000; overflow: hidden; display: grid; place-items: center; }
.tokpick button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tokpick button[aria-pressed="true"] { border-color: #e2c272; box-shadow: 0 0 0 3px rgba(226,194,114,.45); }
.tokpick .tokx { font: 600 .72rem/1.2 var(--ui); color: var(--muted); text-align: center; padding: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tokpick .tokx small { font-weight: 400; opacity: .8; }

/* ================= v39: wygląd A "Popiół" =================
   Ciemny, płaski, jeden złoty akcent. Inter w interfejsie, Cinzel tylko w nazwach (postać, miejsca, tytuły kroniki),
   Spectral w tekstach do czytania. Nowa struktura: lewy pasek (komputer) albo dolny pasek (telefon), nagłówek ekranu
   z podzakładkami i rogiem (czat, konto). */
:root {
  --bg: #0E0F11; --s1: #16181B; --s2: #1F2226; --s3: #2A2E33; --panel: #16181B; --panel-solid: #16181B; --panel-2: #1F2226;
  --ink: #EEEAE1; --ink-2: #B8B3A8; --muted: #9A958B; --ink-3: #7d786f;
  --gold: #E2C272; --gold-2: #8f7638; --gold-ink: #1B1508; --ember: #E2C272; --ember-2: #c9a95a; --hp: #E2735F; --ok: #8CC08F;
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.14); --line-gold: rgba(226,194,114,.22); --rail: 88px; --r: 14px; --r-s: 10px;
}
body.v39 { background: var(--bg); padding: 0 0 calc(24px + env(safe-area-inset-bottom)); }
body.v39::before, body.v39::after { display: none; }
body.v39 main { max-width: 760px; margin: 0 auto; padding: 8px 20px 32px; background: none; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.v39 main.wide { max-width: 1240px; margin-top: 0; }
@media (min-width: 900px) { body.v39 { padding-left: var(--rail); padding-right: 0; } body.v39 main { padding: 8px 32px 40px; } }
@media (max-width: 899px) { body.v39 { padding-bottom: calc(84px + env(safe-area-inset-bottom)); } body.v39 main { padding: 4px 16px 24px; } }

/* typografia i elementy wspólne */
:where(body.v39) h1 { font: 700 1.6rem/1.2 var(--ui); letter-spacing: 0; }
:where(body.v39) h2 { font: 600 1.02rem/1.3 var(--ui); letter-spacing: .01em; color: var(--ink); border-bottom: 1px solid var(--line); margin: 28px 0 12px; padding-bottom: 8px; }
:where(body.v39) h3 { color: var(--muted); letter-spacing: .12em; font-size: .72rem; }
:where(body.v39) a { color: var(--gold); }
:where(body.v39) .muted { color: var(--muted); }
:where(body.v39) button { background: var(--gold); color: var(--gold-ink); box-shadow: none; border-radius: 12px; font-weight: 600; }
@media (hover: hover) { :where(body.v39) button:hover { background: #EBD08F; } }
:where(body.v39) button.ghost { background: var(--s2); color: var(--ink); border: 1px solid var(--line); }
@media (hover: hover) { :where(body.v39) button.ghost:hover { background: var(--s3); } }
:where(body.v39) button.ghost.act { border-color: var(--gold); color: var(--gold); background: rgba(226,194,114,.1); }
:where(body.v39) button.link { background: none; color: var(--gold); padding: 0; border: 0; min-height: 0; font: inherit; text-decoration: underline; }
:where(body.v39) input, :where(body.v39) textarea, :where(body.v39) select { background: var(--s2); border: 1px solid var(--line); border-radius: var(--r-s); color: var(--ink); }
:where(body.v39) input:focus, :where(body.v39) textarea:focus, :where(body.v39) select:focus { border-color: var(--line-gold); }
:where(body.v39) input[type=checkbox] { accent-color: var(--gold); }
:where(body.v39) .note { background: var(--s1); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 12px; }
:where(body.v39) .box, :where(body.v39) .abil { background: var(--s1); border: 1px solid var(--line); border-radius: 12px; }
:where(body.v39) .tag { background: var(--s2); border-color: var(--line); color: var(--ink-2); }
:where(body.v39) .tag.yes { background: rgba(140,192,143,.12); border-color: rgba(140,192,143,.35); color: #b5dcb7; }
:where(body.v39) .tag.no { background: rgba(226,115,95,.12); border-color: rgba(226,115,95,.35); color: #f0b0a2; }
:where(body.v39) .entry { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); }
:where(body.v39) details > summary { cursor: pointer; }
.card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 0 0 12px; }
.card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.eyebrow { font: 600 .7rem/1.3 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.card-h .eyebrow { flex: 1; }
.sec-h { display: flex; align-items: center; gap: 8px; font: 600 .72rem/1.3 var(--ui) !important; letter-spacing: .14em !important; text-transform: uppercase; color: var(--muted) !important; margin: 22px 0 8px !important; }
.sec-h .sec-aside { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .8rem; color: var(--ink-2); }
.cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: rgba(226,194,114,.16); color: var(--gold); font: 600 .74rem/1 var(--ui); letter-spacing: 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--s2); color: var(--ink-2); font: 500 .78rem/1.3 var(--ui); white-space: nowrap; border: 1px solid var(--line); }
.chip.gold { background: rgba(226,194,114,.14); color: var(--gold); border-color: rgba(226,194,114,.25); }
.chip.ok { background: rgba(140,192,143,.13); color: #a9d6ac; border-color: rgba(140,192,143,.3); }
.chip.warn { background: rgba(226,194,114,.1); color: #e8cf8f; border-color: rgba(226,194,114,.25); }
.chip.no { background: rgba(226,115,95,.12); color: #f0ad9f; border-color: rgba(226,115,95,.3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.av { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--s2); color: var(--gold); border: 1.5px solid rgba(226,194,114,.55); font: 600 .9rem/1 var(--ui); overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.lg { width: 44px; height: 44px; font-size: 1.05rem; }
.list { display: flex; flex-direction: column; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 0 0 12px; }
.list > * + * { border-top: 1px solid var(--line); }
.lrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; text-align: left; background: none !important; color: var(--ink) !important; border: 0; border-radius: 0 !important; font: 400 .95rem/1.3 var(--ui); }
button.lrow { cursor: pointer; }
@media (hover: hover) { button.lrow:hover { background: rgba(255,255,255,.03) !important; } }
.lrow .lt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lrow .lt b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.lrow .lt small { color: var(--muted); font-size: .8rem; }
.lrow .chev { color: var(--ink-3); font-size: 1.3rem; line-height: 1; }
.li { flex: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--s2); }
.li svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.li-warn { color: var(--gold); background: rgba(226,194,114,.14); }
.li-ok { color: var(--ok); background: rgba(140,192,143,.14); }
.li-play, .li-doc, .li-book { color: var(--ink-2); }
.pre { white-space: pre-wrap; }

/* ---------- lewy pasek (komputer) i dolny pasek (telefon) ---------- */
body.v39 nav.tabs.rail { background: #0B0C0E; border-color: var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
body.v39 nav.tabs .tb { color: var(--muted); border-radius: 12px; font: 500 11px/1.2 var(--ui); position: relative; }
body.v39 nav.tabs .tb span:not(.av) { display: block; }
body.v39 nav.tabs .tb.on { color: var(--gold); background: rgba(226,194,114,.12); }
body.v39 nav.tabs .tb .av { width: 30px; height: 30px; font-size: .8rem; }
body.v39 .nbadge { position: absolute; top: 4px; right: 12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--hp); color: #1a0a06; font: 700 10px/18px var(--ui); text-align: center; font-style: normal; }
@media (min-width: 900px) {
  body.v39 nav.tabs.rail { width: var(--rail); padding: 14px 0 12px; gap: 4px; }
  body.v39 nav.tabs .tb { width: 72px; min-width: 0; min-height: 58px; }
  body.v39 nav.tabs .brand { padding: 2px 0 14px; }
  body.v39 nav.tabs .brand svg { width: 34px; height: 34px; }
}
@media (max-width: 899px) {
  body.v39 nav.tabs.rail { display: flex; justify-content: space-around; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); overflow: visible; }
  body.v39 nav.tabs .tb { flex: 1 1 0; min-width: 0; min-height: 54px; padding: 7px 2px 6px; }
  body.v39 nav.tabs .tbx, body.v39 nav.tabs .brand, body.v39 nav.tabs .sp { display: none !important; }
}

/* ---------- nagłówek ekranu ---------- */
.apphead { max-width: 1240px; margin: 0 auto; padding: 18px 32px 8px; }
.ah-row { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.ah-l { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.ah-r { display: flex; align-items: center; gap: 8px; flex: none; }
.ah-t { margin: 0 !important; font: 700 1.55rem/1.2 var(--ui) !important; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ahb { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; min-width: 44px; height: 44px; padding: 0 !important; border-radius: 50% !important; background: var(--s1) !important; color: var(--ink-2) !important; border: 1px solid var(--line) !important; }
.ahb svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ahb > span:not(.av) { display: none; }
.ahb .nbadge { top: -3px !important; right: -3px !important; }
.ahb.ahav { background: none !important; border: 0 !important; }
.ahb.ahav .av { width: 40px; height: 40px; }
.ahback { width: 40px; height: 40px; min-height: 40px; padding: 0 !important; border-radius: 50% !important; background: var(--s1) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; font-size: 1.5rem !important; line-height: 1 !important; flex: none; }
.ahpdf { width: 40px; min-width: 40px; height: 40px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; }
.ahpdf svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.apphead .saved { font-size: .78rem; color: var(--muted); }
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 0 2px; margin: 0 -2px; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; min-height: 40px !important; padding: 8px 16px !important; border-radius: 999px !important; background: var(--s1) !important; color: var(--ink-2) !important; border: 1px solid var(--line) !important; font: 600 .9rem/1.2 var(--ui) !important; }
.pill.on { background: var(--gold) !important; color: var(--gold-ink) !important; border-color: var(--gold) !important; }
@media (min-width: 900px) { .apphead .ahc { display: none !important; } }
@media (max-width: 899px) {
  .apphead { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: calc(10px + env(safe-area-inset-top)) 16px 8px; }
  .ah-t { font-size: 1.4rem !important; }
  .apphead .saved { display: none; }
}
/* Stół: nagłówek znika, róg (czat, konto) unosi się nad planszą */
#apphead.apphead.float { position: fixed; top: calc(8px + env(safe-area-inset-top)); right: 8px; left: auto; z-index: 40; padding: 0; margin: 0; max-width: none; background: none; }
.apphead.float .ah-l { display: none; }
.apphead.float .ahb { background: rgba(14,15,17,.86) !important; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
@media (min-width: 900px) { .apphead.float { display: none; } }
@media (max-width: 899px) { body.v39[data-tab=stol] .vt-nav { right: 104px !important; } }

/* menu konta */
body.v39 .navpop { position: fixed; z-index: 60; width: 260px; padding: 8px; background: var(--s1); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 18px 48px rgba(0,0,0,.55); left: auto; right: auto; bottom: auto; top: auto; }
.np-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.np-head b { display: block; font-size: .95rem; }
.np-head small { display: block; color: var(--muted); font-size: .78rem; word-break: break-all; }
body.v39 .navpop .np-it { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 10px; min-height: 44px; background: none; color: var(--ink); border: 0; border-radius: 10px; font: 500 .92rem/1.2 var(--ui); text-align: left; }
@media (hover: hover) { body.v39 .navpop .np-it:hover { background: var(--s2); } }
body.v39 .navpop .np-it svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
@media (min-width: 900px) { .np-search { display: none !important; } }

/* ---------- Sesja gracza ---------- */
.ses { max-width: 720px; }
.ses-next ul.meet { margin: 0; padding: 0; list-style: none; }
.ses-next ul.meet li { padding: 3px 0; color: var(--ink-2); }
.ses-next ul.meet li:first-child { font: 600 1.15rem/1.35 var(--ui); color: var(--ink); padding-bottom: 6px; }
.ses-wait { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
body.vtt .st-empty.st-emptyses { position: absolute; inset: 0; overflow-y: auto; display: block; text-align: left; padding: calc(64px + env(safe-area-inset-top)) 16px 24px; background: var(--bg); z-index: 3; }
body.vtt .st-empty.st-emptyses .ses { margin: 0 auto; }
@media (min-width: 900px) { body.vtt .st-empty.st-emptyses { padding: 84px 32px 32px; } }

/* ---------- Postać: widok gry ---------- */
.pvh { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pvh > div { min-width: 0; }
.pvname { margin: 0 !important; font: 600 1.3rem/1.15 var(--display) !important; letter-spacing: .04em !important; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pvh small { display: block; color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-hp { padding: 14px 16px 16px; }
.hp-row { display: flex; align-items: center; gap: 10px; }
.hp-num { display: inline-flex; align-items: baseline; gap: 6px; background: none !important; color: var(--ink) !important; padding: 0 !important; min-height: 0 !important; border: 0 !important; }
.hp-num b { font: 700 2.6rem/1 var(--ui); }
.hp-num span { font: 500 1.05rem/1 var(--ui); color: var(--muted); }
.iconbtn { width: 48px; min-width: 48px; height: 48px; padding: 0 !important; border-radius: 50% !important; background: var(--s2) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; font: 500 1.5rem/1 var(--ui) !important; }
.iconbtn.sm { width: 40px; min-width: 40px; height: 40px; font-size: 1.2rem !important; }
.bar { height: 6px; border-radius: 3px; background: var(--s3); margin-top: 12px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--hp); border-radius: 3px; }
.hp-ed { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hp-ed input { flex: 1 1 90px; width: auto; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; }
.tiles .tile { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 68px; padding: 10px 12px; background: var(--s1) !important; border: 1px solid var(--line) !important; border-radius: 12px !important; color: var(--ink) !important; text-align: left; font: inherit; }
.tile small { color: var(--muted); font-size: .76rem; line-height: 1.2; }
.tile small a { color: inherit; }
.tile b { font: 700 1.35rem/1.1 var(--ui); }
button.tile { cursor: pointer; }
button.tile b { color: var(--gold); }
.tiles .tile.dsk { display: none; }
.tiles.sm .tile { min-height: 58px; }
.tiles.sm .tile b { font-size: 1.15rem; }
.pvtabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin: 8px 0 4px; }
.pvtabs::-webkit-scrollbar { display: none; }
.pvtabs button { flex: none; background: none !important; color: var(--muted) !important; border: 0 !important; border-bottom: 2px solid transparent !important; border-radius: 0 !important; padding: 10px 12px !important; min-height: 44px; font: 600 .92rem/1.2 var(--ui) !important; }
.pvtabs button.on { color: var(--ink) !important; border-bottom-color: var(--gold) !important; }
.pv .pane { display: none; }
.pv .pane.on { display: block; }
.abgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.abx { display: flex; flex-direction: column; background: var(--s1); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ab-main { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 6px !important; background: none !important; color: var(--ink) !important; border: 0 !important; border-radius: 0 !important; min-height: 0 !important; }
.ab-main small { color: var(--muted); font-size: .74rem; font-weight: 500; }
.ab-main b { font: 700 1.6rem/1.1 var(--ui); color: var(--ink); }
.ab-main span { font-size: .78rem; color: var(--muted); font-weight: 500; }
.ab-save { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 7px 6px !important; min-height: 36px !important; background: var(--s2) !important; color: var(--ink-2) !important; border: 0 !important; border-top: 1px solid var(--line) !important; border-radius: 0 !important; font: 500 .78rem/1 var(--ui) !important; }
.ab-save b { color: var(--ink); }
.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.prof .dot, .ab-save.prof .dot { background: var(--gold); border-color: var(--gold); }
.sk2.exp .dot { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--gold); }
.sklist2 { display: flex; flex-direction: column; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 12px; }
.sk2 { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 14px !important; background: none !important; color: var(--ink) !important; border: 0 !important; border-radius: 0 !important; font: 400 .92rem/1.2 var(--ui) !important; text-align: left; }
.sk2 + .sk2 { border-top: 1px solid var(--line) !important; }
.sk2 span { flex: 1; }
.sk2 small { color: var(--muted); font-size: .72rem; letter-spacing: .06em; width: 34px; }
.sk2 b { width: 36px; text-align: right; font-weight: 600; }
.sk2.prof b { color: var(--gold); }
@media (hover: hover) { .sk2:hover, .ab-main:hover, .ab-save:hover { background: rgba(255,255,255,.04) !important; } }
.arow, .irow2 { display: flex; align-items: center; gap: 8px; padding: 12px 14px; min-height: 60px; }
.arow .at, .irow2 .at, .spx .at { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.at b { font-weight: 600; }
.at small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.rpill { flex: none; min-width: 52px; min-height: 44px !important; padding: 8px 12px !important; border-radius: 10px !important; background: var(--s2) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; font: 600 .95rem/1 var(--ui) !important; display: inline-flex; align-items: center; justify-content: center; }
.rpill.hit { background: rgba(226,194,114,.16) !important; color: var(--gold) !important; border-color: rgba(226,194,114,.3) !important; }
.rpill.off { color: var(--muted) !important; font-weight: 500 !important; font-size: .82rem !important; }
.qty { color: var(--muted); font-weight: 500; }
.res .rr { display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 56px; flex-wrap: wrap; }
.rr .rl { flex: 1; min-width: 140px; font-weight: 500; }
.rr .rl a { color: var(--ink); text-decoration: none; }
.slots2 { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.slr { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); }
/* v41: każda kropka to osobny przycisk (pełna - zużyj, pusta - odzyskaj) */
.pips { display: inline-flex; gap: 0; align-items: center; }
button.pip { display: inline-flex; align-items: center; justify-content: center; width: 30px; min-width: 30px; height: 38px; min-height: 38px !important; padding: 0 !important; margin: 0; border: 0 !important; border-radius: 8px !important; background: none !important; box-shadow: none !important; }
button.pip::before { content: ''; display: block; width: 15px; height: 15px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid var(--gold); transition: background .12s, box-shadow .12s; }
button.pip.on::before { background: var(--gold); }
button.pip:active::before { box-shadow: 0 0 0 5px rgba(226,194,114,.22); }
@media (hover: hover) { button.pip:hover::before { box-shadow: 0 0 0 4px rgba(226,194,114,.16); } }
button.pip:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.dsx { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.dsx small { color: var(--muted); font-size: .76rem; margin-left: 6px; }
.stp { display: inline-flex; align-items: center; gap: 10px; }
.stp b { min-width: 16px; text-align: center; }
.tgl { position: relative; width: 50px; min-width: 50px; height: 30px; min-height: 30px !important; padding: 0 !important; border-radius: 15px !important; background: var(--s3) !important; border: 0 !important; }
.tgl i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink-2); transition: left .15s; }
.tgl.on { background: var(--gold) !important; }
.tgl.on i { left: 23px; background: var(--gold-ink); }
.spx summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; min-height: 56px; list-style: none; }
.spx summary::-webkit-details-marker { display: none; }
.spx .chev { color: var(--ink-3); font-size: 1.3rem; transition: transform .15s; }
.spx[open] .chev { transform: rotate(90deg); }
.spx .spview { padding: 0 14px 14px; }
.pv .lvfeats { padding: 12px 14px; }
.pv .card.read p { font-family: var(--read); font-size: 1.05rem; line-height: 1.6; margin: 0; }
.rolltoast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 80; display: flex; align-items: center; gap: 14px; min-width: 240px; max-width: calc(100vw - 24px); padding: 12px 18px; background: var(--s1); border: 1px solid var(--line-gold); border-radius: 16px; box-shadow: 0 18px 44px rgba(0,0,0,.6); cursor: pointer; }
.rt-n { font: 700 2.2rem/1 var(--ui); color: var(--gold); min-width: 44px; text-align: center; }
.rt-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rt-t strong { font-weight: 600; }
.rt-t small { color: var(--muted); font-size: .8rem; }
.rt-t .rt-note { color: var(--ink-3); }
@media (min-width: 900px) { .rolltoast { bottom: 28px; left: calc(50% + var(--rail) / 2); } }
@media (min-width: 1100px) {
  .pv.desk { display: grid; grid-template-columns: minmax(270px, 1fr) minmax(340px, 1.25fr) minmax(320px, 1.25fr); gap: 20px; align-items: start; }
  .pv.desk .pv-c1 .sec-h:first-child, .pv.desk .pv-c3 .pane > .sec-h:first-child { margin-top: 0 !important; }
  .pv.desk .tiles .tile.dsk { display: flex; }
  .pv.desk .pv-c2 .tiles { grid-template-columns: repeat(3, 1fr); }
  .pv.desk .pvtabs { margin-top: 0; }
  .pv.desk .abgrid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Postać: edycja ---------- */
.edwrap .edhint { margin: 0 0 10px; }
.misslist { background: var(--s1); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; }
.misslist summary { font-weight: 600; display: flex; align-items: center; gap: 8px; min-height: 32px; }
.misschips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; }
.chipbtn { min-height: 34px !important; padding: 6px 12px !important; border-radius: 999px !important; background: var(--s2) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; font: 500 .84rem/1.2 var(--ui) !important; }
.missok { color: var(--ok); margin: 0 0 12px; }
body.v39 .shtabs { background: var(--bg); border-bottom: 1px solid var(--line); }

/* ---------- Drużyna ---------- */
.dz { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 1100px) { .dz { grid-template-columns: minmax(0, 1fr) 360px; } }
.dzr { min-height: 64px; }
.dzr.on { background: rgba(226,194,114,.08) !important; box-shadow: inset 3px 0 0 var(--gold); }
.dzr .dzc { display: none; }
.dzr .dzt { display: none; font-size: .78rem; width: 90px; text-align: right; }
@media (min-width: 700px) { .dzr .dzc, .dzr .dzt { display: flex; } }
.dzset { padding: 12px 16px; }
.dzset summary { display: flex; flex-direction: column; gap: 2px; }
.dzset summary small { color: var(--muted); font-size: .8rem; font-weight: 400; }
.dz-side { position: sticky; top: 16px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: none; }
.dz-side.open { display: block; }
.dzs-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; position: relative; padding-right: 40px; }
.dzs-h h2 { margin: 0 !important; border: 0 !important; padding: 0 !important; font: 600 1.2rem/1.2 var(--display) !important; letter-spacing: .04em !important; }
.dzs-h small { color: var(--muted); font-size: .82rem; }
.dzs-x { position: absolute; right: 0; top: 0; }
.dz-side .eyebrow { margin: 16px 0 6px; }
.dz-side p { margin: 0 0 6px; }
.dzs-b { margin: 4px 0 6px; }
.missul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: .9rem; }
.dzmore { margin-top: 14px; }
.dzmore dl { margin-top: 8px; font-size: .88rem; }
@media (max-width: 1099px) {
  .dz-side { position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-height: 82vh; overflow-y: auto; z-index: 45; border-radius: 18px 18px 0 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -18px 48px rgba(0,0,0,.6); }
}
@media (min-width: 900px) and (max-width: 1099px) { .dz-side { left: var(--rail); } }

/* ---------- Zaplecze: Sceny ---------- */
.scg { padding: 0; overflow: hidden; }
.scg > summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; }
.scg .list { border: 0; border-radius: 0; margin: 0; border-top: 1px solid var(--line); }
.scr { flex-wrap: wrap; }
.scr .lt { min-width: 160px; }

/* ---------- O świecie u MG ---------- */
.gmworld { margin-top: 28px; }
.gmworld > summary { display: flex; flex-direction: column; gap: 2px; }
.gmworld > summary small { color: var(--muted); font-weight: 400; font-size: .82rem; }

/* ---------- Księgi i inne widoki w nowym nagłówku ---------- */
body.v39 main.kpwrap { padding-top: 0; max-width: 1240px; }
body.v39 .kp-eyebrow { display: none; }
body.v39 main.wide.stwrap { padding: 0; }

/* ---------- Stół w kierunku A ---------- */
body.v39.vtt main.stwrap { background: var(--bg); }
@media (min-width: 900px) { body.v39.vtt main.stwrap { left: var(--rail); } }
@media (max-width: 899px) { body.v39.vtt main.stwrap { bottom: calc(66px + env(safe-area-inset-bottom)); } }
body.v39 .vt-chip { background: rgba(22,24,27,.92); border-color: var(--line); color: var(--ink); }
body.v39 .vt-chip.vt-build { background: rgba(22,24,27,.92); }
body.v39 .vt-chip.vt-build.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
body.v39 .vt-chip.vt-lockinfo { color: var(--gold); cursor: default; }
body.v39 .vt-tool.vt-hotb b { font: 600 .66rem/1 var(--ui); letter-spacing: .02em; }
body.v39 .vt-side { background: rgba(14,15,17,.96); border-color: var(--line); }
body.v39 .vt-plb { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: 999px; background: rgba(22,24,27,.9); color: var(--ink-2); border: 1px solid var(--line); font: 500 .78rem/1 var(--ui); }
body.v39 .vt-plb i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
body.v39 .vt-players { background: none; border: 0; padding: 0; box-shadow: none; }
body.v39 .vt-players.open { background: rgba(14,15,17,.94); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.hp-row .sp { flex: 1; }
.tile small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eyebrow a.hl, .tile a.hl { color: inherit; text-decoration: underline dotted rgba(255,255,255,.3); text-underline-offset: 3px; }
@media (max-width: 899px) {
  body.v39[data-tab=karta] .apphead .ahav { display: none !important; }
  .pv ~ * .ahpdf, body.v39[data-tab=karta] .apphead .ahpdf.pvpdf { display: none !important; }
  .pvtabs button { padding: 10px 9px !important; font-size: .88rem !important; }
}
.pvtabs { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
@media (min-width: 1100px) { .pvtabs { -webkit-mask-image: none; mask-image: none; } }
@media (min-width: 700px) {
  .dzr { display: grid !important; grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 150px 92px; }
  .dzr .chip { justify-self: start; }
}
body.v39 .vt-nav > * { flex: none; max-width: 100%; }
body.v39 .maphead { margin-top: 4px; }
body.vt-tv #apphead { display: none !important; }
.vt.vt-noscene .vt-tools, .vt.vt-noscene .st-zoom, .vt.vt-noscene .vt-nav, .vt.vt-noscene .vt-sndw, .vt.vt-noscene .vt-sub { display: none !important; }
@media (min-width: 900px) {
  body.vtt .vt .st-empty.st-emptyses { right: 420px; }
  body.vtt .vt:has(.vt-side.closed) .st-empty.st-emptyses { right: 84px; }
}
/* panel Postać na Stole (gracz) */
.vt-side .pv.hero { padding: 0 2px 12px; }
.pv.hero .hero-h { display: flex; align-items: center; gap: 8px; margin: 2px 0 12px; }
.pv.hero .hero-h .pvh { flex: 1; }
.pv.hero .hero-h .saved { font-size: .74rem; color: var(--muted); }
.pv.hero .pvname { font-size: 1.1rem !important; }
.pv.hero .tiles { grid-template-columns: repeat(3, 1fr); }
.pv.hero .tile.dsk { display: none !important; }
.pv.hero .hp-num b { font-size: 2.1rem; }
.pv.hero .sec-h { margin-top: 16px !important; }
.hero-more { margin: 10px 0 0; text-align: center; }
:where(body.v39) .entry { padding: 12px 16px; margin: 0 0 10px; }

/* ================= v40: Stół na całą szerokość ekranu =================
   v39 dziedziczył po zwykłych widokach max-width 1240px - przy szerszym ekranie po prawej zostawał pusty pas. */
body.v39.vtt main.stwrap, body.v39.vtt main.wide.stwrap { max-width: none; margin: 0; right: 0; }

/* ================= v40: kontrolki w wyglądzie strony zamiast systemowych =================
   Paski przewijania, listy rozwijane, pola wyboru, suwaki, pola liczb, wybór pliku, wyszukiwarki, znaczniki rozwijania. */
html { scrollbar-color: #4a4232 transparent; }
:where(body.v39), :where(body.v39) * { scrollbar-width: thin; scrollbar-color: #4a4232 transparent; }
:where(body.v39) ::-webkit-scrollbar { width: 10px; height: 10px; }
:where(body.v39) ::-webkit-scrollbar-track { background: transparent; }
:where(body.v39) ::-webkit-scrollbar-thumb { background: #4a4232; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
:where(body.v39) ::-webkit-scrollbar-thumb:hover { background: #7a6a43; background-clip: padding-box; border: 2px solid transparent; }
:where(body.v39) ::-webkit-scrollbar-corner { background: transparent; }

/* lista rozwijana: własna strzałka zamiast systemowej */
:where(body.v39) select:not([multiple]) {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 36px;
  background-color: var(--s2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23E2C272' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px;
}
:where(body.v39) select:not([multiple]):hover { border-color: var(--line-2); }
:where(body.v39) select:disabled { opacity: .55; cursor: default; }
:where(body.v39) select option { background: var(--s1); color: var(--ink); }
:where(body.v39) select option:checked { background: #3a3324; color: var(--gold); }

/* pole wyboru: złoty kwadrat z ptaszkiem */
:where(body.v39) input[type=checkbox] {
  -webkit-appearance: none; appearance: none; flex: none; width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0 2px 0 0;
  display: inline-grid; place-content: center; vertical-align: -4px; cursor: pointer;
  background: var(--s2); border: 1.5px solid #5d584f; border-radius: 6px; transition: background .12s, border-color .12s;
}
:where(body.v39) input[type=checkbox]::before {
  content: ''; width: 11px; height: 11px; transform: scale(0); transition: transform .12s; background: var(--gold-ink);
  clip-path: polygon(13% 52%, 0 66%, 40% 100%, 100% 22%, 86% 9%, 39% 72%);
}
:where(body.v39) input[type=checkbox]:checked { background: var(--gold); border-color: var(--gold); }
:where(body.v39) input[type=checkbox]:checked::before { transform: scale(1); }
@media (hover: hover) { :where(body.v39) input[type=checkbox]:not(:disabled):hover { border-color: var(--gold); } }
:where(body.v39) input[type=checkbox]:disabled { opacity: .45; cursor: default; }
:where(body.v39) input[type=checkbox]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* suwak (głośność na Stole): ciemna ścieżka, wypełnienie i złota gałka */
:where(body.v39) input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; --v: 50%; }
:where(body.v39) input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--gold) 0 var(--v), var(--s3) var(--v) 100%); }
:where(body.v39) input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--gold); border: 3px solid #1B1508; box-shadow: 0 0 0 1px rgba(226,194,114,.6), 0 2px 6px rgba(0,0,0,.5); }
:where(body.v39) input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--s3); }
:where(body.v39) input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--gold); }
:where(body.v39) input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); border: 3px solid #1B1508; box-shadow: 0 0 0 1px rgba(226,194,114,.6); }
:where(body.v39) input[type=range]:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }

/* pola liczb bez systemowych strzałek (wartość dalej zmieniają klawisze strzałek) */
:where(body.v39) input[type=number] { -moz-appearance: textfield; appearance: textfield; }
:where(body.v39) input[type=number]::-webkit-inner-spin-button, :where(body.v39) input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* wybór pliku */
:where(body.v39) input[type=file] { color: var(--muted); font-size: .84rem; padding: 6px; cursor: pointer; }
:where(body.v39) input[type=file]::file-selector-button { font: 600 .84rem/1.2 var(--ui); color: var(--gold); background: rgba(226,194,114,.12); border: 1px solid rgba(226,194,114,.35); border-radius: 10px; padding: 8px 14px; margin-right: 10px; cursor: pointer; }
:where(body.v39) input[type=file]::file-selector-button:hover { background: rgba(226,194,114,.2); }

/* wyszukiwarka: własny krzyżyk czyszczenia */
:where(body.v39) input[type=search]::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px; cursor: pointer; opacity: .8;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 2l10 10M12 2L2 12' stroke='%23E2C272' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* znacznik rozwijania (trójkąt przy "Filtry" i podobnych): złoty, mniejszy */
:where(body.v39) summary::marker { color: var(--gold); font-size: .8em; }
:where(body.v39) summary::-webkit-details-marker { color: var(--gold); }

/* zaznaczenie tekstu */
:where(body.v39) ::selection { background: rgba(226,194,114,.32); color: #fff; }

/* ================= v41 ================= */
/* przyklejone zakładki karty: pod przyklejonym nagłówkiem (telefon) albo przy górnej krawędzi (komputer) */
.pvtabs-w { position: sticky; top: var(--ahH, 0px); z-index: 15; background: var(--bg); }
.pvtabs-w .pvtabs { margin-top: 0; }
.pv-c3 { padding-top: 8px; }
.pv.desk .pv-c3 { padding-top: 0; }
body.v39 .shtabs, .shtabs { top: var(--ahH, 0px); z-index: 15; }
.pv-c3 { overflow-x: clip; }
@keyframes swl41 { from { opacity: .35; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes swr41 { from { opacity: .35; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes swf41 { from { opacity: .35; } to { opacity: 1; } }
.pv .pane.swl { animation: swl41 .22s ease-out; }
.pv .pane.swr { animation: swr41 .22s ease-out; }
.swf { animation: swf41 .2s ease-out; }
@media (prefers-reduced-motion: reduce) { .pv .pane.swl, .pv .pane.swr, .swf { animation: none; } }

/* ekwipunek jak w grach: udźwig, wyposażenie, miejsca */
.invload { margin-bottom: 14px; }
.invload.compact { margin: 4px 0 16px; }
.invload .load-row { display: flex; align-items: baseline; gap: 6px; }
.invload .load-row b { font: 700 1.9rem/1.1 var(--ui); color: var(--ink); }
.invload .load-row span { color: var(--muted); font-size: 1rem; }
.bar.load { height: 8px; border-radius: 4px; margin-top: 10px; }
.bar.load i { background: var(--gold); border-radius: 4px; transition: width .2s; }
.bar.load.over i { background: var(--hp); }
.load-note { margin: 10px 0 0; font-size: .82rem; color: var(--muted); line-height: 1.45; }
.load-note b { color: #e8cf8f; font-weight: 600; }
.invload.over { border-color: rgba(226,115,95,.6); background: linear-gradient(180deg, rgba(226,115,95,.12), rgba(226,115,95,.03) 60%), var(--s1); box-shadow: inset 0 0 0 1px rgba(226,115,95,.25); }
.invload.over .load-row b { color: #f0ad9f; }
.load-warn { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(226,115,95,.14); color: #f6c6bb; font-size: .9rem; line-height: 1.45; }
.load-warn svg { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: #f0ad9f; stroke-width: 1.8; stroke-linecap: round; }
.load-warn b { color: #fff0ea; }
.tiles .tile.over { border-color: rgba(226,115,95,.6) !important; background: rgba(226,115,95,.1) !important; text-align: left; }
.tiles .tile.over b { color: var(--ink); }
.tile.over em { font: 600 .72rem/1.2 var(--ui); font-style: normal; color: #f0ad9f; text-transform: uppercase; letter-spacing: .08em; }

.eqslots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 6px; }
.eqs { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--s1); border: 1px dashed rgba(236,228,211,.16); }
.eqs.on { border-style: solid; border-color: var(--line-gold); background: linear-gradient(180deg, rgba(226,194,114,.07), transparent), var(--s1); }
.eqs-i { flex: none; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--s2); color: var(--ink-3); }
.eqs.on .eqs-i { background: rgba(226,194,114,.14); color: var(--gold); }
.eqs-i svg, .ii svg, .inv-h .li svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.eqs-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eqs-t small { color: var(--muted); font-size: .72rem; letter-spacing: .04em; }
.eqs-t b { font-weight: 600; font-size: .9rem; line-height: 1.3; overflow-wrap: anywhere; }
.eqs-t b .muted { font-weight: 400; }
@media (max-width: 340px) { .eqslots { grid-template-columns: 1fr; } }

.inv-sec { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 12px; overflow: hidden; }
.inv-sec.free { background: transparent; border-style: dashed; }
.inv-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: rgba(255,255,255,.025); border-bottom: 1px solid var(--line); }
.inv-h .li { width: 34px; height: 34px; border-radius: 10px; color: var(--gold); background: rgba(226,194,114,.1); }
.inv-h .lt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.inv-h .lt b { font-weight: 600; }
.inv-h .lt small { color: var(--muted); font-size: .76rem; }
.inv-kg { flex: none; font: 600 .86rem/1.2 var(--ui); color: var(--ink-2); padding: 4px 10px; border-radius: 999px; background: var(--s2); }
.inv-h.over .inv-kg { background: rgba(226,115,95,.16); color: #f0ad9f; }
.inv-h.over .lt small { color: #f0ad9f; }
.inv-over { margin: 0; padding: 8px 14px; font-size: .84rem; color: #f6c6bb; background: rgba(226,115,95,.1); border-bottom: 1px solid var(--line); }
.inv-rows > * + * { border-top: 1px solid var(--line); }
.inv-it > summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 56px; list-style: none; cursor: pointer; }
.inv-it > summary::-webkit-details-marker { display: none; }
.inv-it > summary::marker { content: ''; }
.inv-it.coins { display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 56px; }
.inv-it .at { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inv-it .chip { flex: none; }
.ii { flex: none; width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--s2); color: var(--ink-2); }
.ii-weapon { color: #e6b98a; background: rgba(230,185,138,.1); }
.ii-armor, .ii-shield { color: #a9c4dc; background: rgba(169,196,220,.1); }
.ii-magic { color: #c9b2ef; background: rgba(201,178,239,.12); }
.ii-ammo { color: #d8c690; background: rgba(216,198,144,.1); }
.ii-coin { color: var(--gold); background: rgba(226,194,114,.14); }
.iw { flex: none; min-width: 56px; text-align: right; font: 500 .82rem/1.2 var(--ui); color: var(--ink-2); }
.iw.unk { color: #e8cf8f; }
.inv-det { padding: 0 14px 14px 60px; }
.inv-det p { margin: 6px 0 0; font-size: .84rem; }
.inv-loc { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .84rem; color: var(--muted); }
.inv-loc select { flex: 1; max-width: 260px; min-height: 40px; }
@media (max-width: 420px) { .inv-it .chip { display: none; } .inv-det { padding-left: 14px; } }

/* edycja: przedmioty pogrupowane według miejsca */
.invedit { gap: 12px; }
.inv-sec.ed { padding: 0 10px 10px; }
.inv-sec.ed .inv-h { margin: 0 -10px 10px; }
.inv-sec.ed .irow + .irow { margin-top: 10px; }
.inv-sec.new .inv-h { background: none; }
.iloc { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 8px 0 4px; }
.iloc label { flex: 1 1 120px; display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: .76rem; color: var(--muted); letter-spacing: .02em; }
.iloc select, .iloc input { width: 100%; min-width: 0; }
body.v39 .shtabs { box-shadow: 0 -8px 0 var(--bg); }
.rr .rl .rhint { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; font-weight: 400; }

/* ================= v42: kilka scen pokazanych graczom, wybór graczy dla sceny ================= */
button.vt-chip.vt-plsc { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 0; align-items: center; text-align: left; padding: 6px 14px 6px 16px; max-width: 360px; }
.vt-plsc .st-eyebrow { grid-column: 1; }
.vt-plsc strong { grid-column: 1; font: 600 1rem var(--display); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-plsc .vt-car { grid-column: 2; grid-row: 1 / 3; }
.vt-plsc.open .vt-car { transform: rotate(180deg); }
.vt-who { max-width: 260px; }
.vt-who span:not(.vt-car) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-who svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vt-who.some { border-color: var(--line-gold) !important; color: var(--gold) !important; }
.vt-who.open .vt-car { transform: rotate(180deg); }
.vt-scnm { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.vt-scnm small { color: var(--muted); font-size: .74rem; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-whomenu { min-width: 240px; }
.vt-whomenu label { display: flex; align-items: center; gap: 10px; min-height: 40px; margin: 0; padding: 6px 10px; border-radius: 9px; cursor: pointer; color: var(--ink-2); font: 500 .9rem var(--ui); }
.vt-whomenu label:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.vt-whomenu .vt-whoall { margin-bottom: 4px; border-bottom: 1px solid var(--line); border-radius: 9px 9px 0 0; color: var(--ink); }
.vt-whomenu .vt-whonote { margin: 6px 0 0; padding: 6px 10px 2px; font-size: .76rem; line-height: 1.4; white-space: normal; border-top: 1px solid var(--line); }
@media (max-width: 600px) { .vt-who { max-width: 150px; } }

/* ================= v43 ================= */
/* przesuwanie zakładek: przeglądarka przewija w pionie, ruch w poziomie obsługuje strona */
.pv .pv-c3, .sheet { touch-action: pan-y pinch-zoom; }
.pv .pv-c3 > .pane.on, .sheet > [data-shtab] { will-change: auto; }
/* zwijane wiersze edycji (przedmioty, czary) */
details.irow.irowd { padding: 0; }
.irowd > summary.irsum { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 7px 12px; list-style: none; cursor: pointer; border-radius: 12px; }
.irowd > summary.irsum::-webkit-details-marker { display: none; }
.irowd > summary.irsum::marker { content: ''; }
.irsum .ii { width: 30px; height: 30px; border-radius: 9px; }
.irsum .ii svg { width: 17px; height: 17px; }
.irn { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.irn b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irn small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irsum .chip { flex: none; font-size: .72rem; padding: 2px 8px; }
.irsum .chev { flex: none; color: var(--ink-3); font-size: 1.25rem; line-height: 1; transition: transform .15s; }
.irowd[open] > summary .chev { transform: rotate(90deg); }
.irowd[open] > summary.irsum { border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.irbody { padding: 10px; }
@media (hover: hover) { .irowd > summary.irsum:hover { background: rgba(255,255,255,.03); } }
@media (max-width: 420px) { .irsum .chip.ok { display: none; } }
.invedit .inv-sec.ed .irow + .irow { margin-top: 8px; }
.shhint { margin: 0 0 12px; }
.shhint > summary { color: var(--gold); font-size: .86rem; cursor: pointer; padding: 4px 0; }
.shhint > p { margin: 6px 0 0; }

/* widok gry: zwarte miejsca w ekwipunku */
details.inv-sec > summary { list-style: none; cursor: pointer; }
details.inv-sec > summary::-webkit-details-marker { display: none; }
details.inv-sec > summary::marker { content: ''; }
details.inv-sec:not([open]) .inv-h { border-bottom: 0; }
details.inv-sec .inv-h::after { content: '›'; flex: none; margin-left: 2px; color: var(--ink-3); font-size: 1.25rem; line-height: 1; transition: transform .15s; }
details.inv-sec[open] .inv-h::after { transform: rotate(90deg); }
.inv-sec { margin-bottom: 8px; }
.inv-h { padding: 8px 12px; gap: 10px; min-height: 48px; }
.inv-h .li { width: 30px; height: 30px; border-radius: 9px; }
.inv-h .li svg { width: 17px; height: 17px; }
.inv-h .lt { flex-direction: row; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.inv-h .lt small { font-size: .74rem; }
.inv-kg { font-size: .8rem; padding: 3px 9px; }
.inv-it > summary { min-height: 46px; padding: 6px 12px; gap: 9px; }
.inv-it.coins { min-height: 46px; padding: 6px 12px; gap: 9px; }
.inv-it .ii, .inv-it.coins .ii { width: 30px; height: 30px; border-radius: 9px; }
.inv-it .ii svg { width: 17px; height: 17px; }
.inv-it .at small { font-size: .74rem; }
.inv-det { padding: 0 12px 12px 51px; }
.load-coins { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: .86rem; color: var(--ink-2); }
.load-coins svg { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.load-coins small { margin-left: auto; color: var(--muted); font-size: .78rem; }
.invload .load-row b { font-size: 1.6rem; }
.eqslots { gap: 6px; }
.eqs { padding: 7px 10px; gap: 9px; border-radius: 11px; }
.eqs-i { width: 32px; height: 32px; border-radius: 9px; }
.eqs-i svg { width: 18px; height: 18px; }
.eqs-t b { font-size: .86rem; }
/* szybkie dodawanie */
.qafab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 25; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 0 14px !important; border-radius: 999px !important; background: var(--gold) !important; color: var(--gold-ink) !important; border: 0 !important; font: 700 .95rem var(--ui) !important; box-shadow: 0 8px 24px rgba(0,0,0,.5) !important; }
.qafab span { font-size: 1.5rem; line-height: 1; font-weight: 500; }
@media (max-width: 899px) { .qafab { bottom: calc(84px + env(safe-area-inset-bottom)); right: 14px; } }
body.qa-on .qafab, body.chat-open .qafab { display: none; }
.qa-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(5,5,7,.6); display: flex; align-items: flex-end; justify-content: center; }
.qa { width: min(560px, 100%); max-height: min(78vh, 680px); margin-bottom: var(--kb, 0px); display: flex; flex-direction: column; background: var(--s1); border: 1px solid var(--line-gold); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.6); padding: 12px 12px calc(10px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .qa-wrap { align-items: center; } .qa { border-radius: 18px; margin-bottom: 0; } }
.qa-h { display: flex; gap: 8px; align-items: center; }
.qa-h input { flex: 1; min-width: 0; min-height: 46px; font-size: 1rem; }
.qa-f { display: flex; gap: 6px; margin: 10px 0 6px; }
.qa-f button { min-height: 34px !important; padding: 4px 12px !important; border-radius: 999px !important; background: var(--s2) !important; color: var(--ink-2) !important; border: 1px solid var(--line) !important; font: 600 .82rem var(--ui) !important; box-shadow: none !important; }
.qa-f button.on { background: rgba(226,194,114,.16) !important; color: var(--gold) !important; border-color: var(--line-gold) !important; }
.qa-list { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; min-height: 120px; }
.qa-g { margin: 10px 4px 4px; font: 600 .7rem/1.3 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.qa-it { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 6px 10px !important; margin: 0 0 4px; border-radius: 12px !important; background: var(--bg) !important; border: 1px solid var(--line) !important; color: var(--ink) !important; text-align: left; box-shadow: none !important; font: inherit !important; }
.qa-it .ii { width: 32px; height: 32px; border-radius: 9px; }
.qa-it .ii svg { width: 18px; height: 18px; }
.qa-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.qa-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qa-t small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qa-p { flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(226,194,114,.14); color: var(--gold); font-size: 1.2rem; }
.qa-it.have { opacity: .6; }
.qa-it.own { border-style: dashed !important; }
@media (hover: hover) { .qa-it:hover { border-color: var(--line-gold) !important; } }
.qa-msg { margin: 8px 2px 0; min-height: 1.3em; font-size: .86rem; color: var(--ok); }
.qa-msg.flash { animation: swf41 .3s ease-out; }
/* MG na Stole: przeciążenie postaci */
.st-t .st-cond.st-over { background: #3a1712; }
.st-t .st-cond.st-over svg { fill: none; stroke: #ffb3a4; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-overw { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: rgba(226,115,95,.14); border: 1px solid rgba(226,115,95,.45); color: #f6c6bb; font-size: .84rem; line-height: 1.4; }
.st-overw svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: #f0ad9f; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.st-overw b { color: #fff0ea; }
.st-ovtag { font-style: normal; font-size: .7rem; font-weight: 600; color: #f0ad9f; background: rgba(226,115,95,.16); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
/* Stół gracza: zakładka Walka (ataki, czary, akcje) */
.vt-act { margin-top: 14px; }
.cmb .sec-h { margin: 16px 0 6px !important; }
.cmb-eco { margin: 0 0 4px; font-size: .78rem; color: var(--muted); line-height: 1.4; }
.cmb .arow { padding: 9px 12px; min-height: 52px; flex-wrap: wrap; }
.cmb .arow .at small { font-size: .76rem; }
.cmb-sk { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rpill.sk { min-height: 34px !important; padding: 4px 10px !important; font-size: .8rem !important; }
.rpill.cast, .rpill.use { background: rgba(226,194,114,.16) !important; color: var(--gold) !important; border-color: rgba(226,194,114,.35) !important; }
.cmb-lv { width: auto; min-width: 0; max-width: 130px; min-height: 38px; font-size: .8rem; padding: 4px 26px 4px 8px; }
.cmb-msg { margin: 10px 2px 0; min-height: 1.3em; font-size: .84rem; color: var(--ok); }
.cmb-msg.flash { animation: swf41 .3s ease-out; }
.cmb .slots2 { align-items: flex-end; }
/* Stół: moje rzuty */
.st-mine { margin: 14px 0 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.st-mineh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.st-mineform { display: grid; gap: 6px; margin: 0 0 10px; }
.st-minel { display: flex; flex-wrap: wrap; gap: 6px; }
.st-myr { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--s2); }
.st-myr [data-my] { display: flex; flex-direction: column; align-items: flex-start; gap: 0; border: 0 !important; border-radius: 0 !important; background: none !important; padding: 5px 10px !important; min-height: 40px; text-align: left; }
.st-myr [data-my] b { font-size: .84rem; color: var(--ink); }
.st-myr [data-my] small { font-size: .72rem; color: var(--gold); }
.st-myr .st-x { border-left: 1px solid var(--line) !important; border-radius: 0 !important; min-width: 32px; }
/* ===== v43: Sesja (Stół) na telefonie obróconym poziomo: menu po lewej, zakładki Stołu i panele po prawej, mapa na całą wysokość ===== */
@media (max-width: 899px) {
  html.ls body.v39.vtt { padding-bottom: 0; }
  html.ls body.vtt nav.tabs.rail, html.ls body.v39.vtt nav.tabs.rail { top: 0; bottom: 0; left: 0; right: auto; width: calc(62px + env(safe-area-inset-left)); flex-direction: column; justify-content: center; gap: 2px; padding: 6px 0 6px env(safe-area-inset-left); border-top: 0; border-right: 1px solid var(--line); overflow-y: auto; }
  html.ls body.vtt nav.tabs .tb, html.ls body.v39.vtt nav.tabs .tb { flex: 0 0 auto; width: 56px; min-height: 50px; padding: 5px 2px; }
  html.ls body.vtt main.stwrap, html.ls body.v39.vtt main.stwrap { left: calc(62px + env(safe-area-inset-left)); bottom: 0; }
  html.ls body.vtt .vt-side { top: 0; bottom: 0; left: auto; right: 0; flex-direction: row-reverse; max-height: none; }
  html.ls body.vtt .vt-tabs { width: 52px; flex-direction: column; justify-content: flex-start; padding: 8px 0; border-top: 0; border-left: 1px solid var(--line-gold); }
  html.ls body.vtt .vt-tab { width: 46px; flex: 0 0 auto; min-height: 46px; }
  html.ls body.vtt .vt-panes { width: min(340px, 46vw); border-top: 0; border-left: 1px solid var(--line-gold); border-radius: 0; flex: none; padding: 10px 12px 16px; }
  html.ls body.vtt .vt-nav { top: 6px; left: 6px; }
  html.ls body.v39.vtt[data-tab=stol] .vt-nav { right: 164px !important; }
  html.ls body.vtt .vt-tools { top: calc(var(--vtnav, 36px) + 10px); left: 6px; }
  html.ls body.vtt .vt .st-zoom, html.ls body.vtt .vt .vt-side.closed ~ .st-zoom { right: 60px; bottom: 6px; flex-direction: row; }
  html.ls body.vtt .vt .vt-sndw, html.ls body.vtt .vt .vt-side.closed ~ .vt-sndw { right: 60px; bottom: 58px; }
  html.ls body.vtt .vt-win, html.ls body.vtt .vt:has(.vt-sub:not([hidden])) .vt-win { top: 6px; bottom: 6px; left: auto !important; right: 58px; width: min(340px, 46vw); max-height: none; border-radius: 14px; }
  html.ls body.vtt .vt-win .st-ph::before { display: none; }
  html.ls body.vtt .vt-sub { right: 60px; max-height: 70%; }
  html.ls body.vtt #apphead.apphead.float { right: 58px; top: calc(6px + env(safe-area-inset-top)); }
  html.ls body.vtt:has(.vt-side:not(.closed)) #apphead.apphead.float { right: calc(58px + min(340px, 46vw)); }
  html.ls body.vtt .rolltoast { bottom: 10px; }
}
/* własny obraz postaci w wyborze żetonu */
.tokpick .tokup { position: relative; aspect-ratio: 1 / 1; margin: 0; border-radius: 50%; border: 2px dashed var(--line-gold); background: var(--s2); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; color: var(--gold); text-align: center; }
.tokpick .tokup span { font-size: 1.6rem; line-height: 1; }
.tokpick .tokup small { font: 600 .64rem/1.15 var(--ui); color: var(--ink-2); padding: 0 6px; }
.tokpick .tokup.on { border-style: solid; border-color: #e2c272; box-shadow: 0 0 0 3px rgba(226,194,114,.45); }
.tokpick .tokup img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tokpick .tokup.on small { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 0 5px; background: rgba(0,0,0,.6); color: #fff; }
/* czat: wpisy automatyczne z zakładki Walka */
.ch-akcja { padding: 5px 10px 6px; border-left: 3px solid var(--gold-2); background: rgba(226,194,114,.06); border-radius: 0 10px 10px 0; }
.ch-akcja b { color: var(--gold); font-family: var(--display); }
.ch-akcja p { color: var(--ink); font-size: .92rem; }

/* ================= v44 ================= */
/* szybkie dodawanie: lista dodanych i podświetlenie dodanej rzeczy w karcie */
.qa-done { margin: 4px 0 6px; padding: 4px 8px 8px; border-radius: 12px; background: rgba(140,192,143,.08); border: 1px solid rgba(140,192,143,.3); }
.qa-dn { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.qa-dn + .qa-dn { border-top: 1px solid var(--line); }
@keyframes flash44 { 0% { box-shadow: 0 0 0 0 rgba(226,194,114,.0); } 15% { box-shadow: 0 0 0 3px rgba(226,194,114,.85); background-color: rgba(226,194,114,.14); } 100% { box-shadow: 0 0 0 0 rgba(226,194,114,0); } }
.flashed { animation: flash44 2.4s ease-out; border-radius: 12px; }
/* Księgi: Słowniczek zasad */
.kp-lq { display: block; width: calc(100% - 16px); margin: 0 8px 10px; min-height: 42px; }
.kp-letter { margin: 12px 12px 4px; font: 700 .78rem/1 var(--display); letter-spacing: .12em; color: var(--gold); }
.kp-glist .kp-it[hidden], .kp-letter[hidden] { display: none; }
/* Zaplecze - Historia */
.hist .card-h .eyebrow { flex: 1; }
.hist-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.hist-acts .hist-all { background: rgba(226,115,95,.16) !important; color: #f0ad9f !important; border: 1px solid rgba(226,115,95,.45) !important; }
.hist-l { list-style: none; margin: 0; padding: 0; }
.hist-l li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.hist-t { flex: 1; min-width: 0; font-size: .88rem; overflow-wrap: anywhere; }
.hist-t em { color: var(--muted); }
.hist-l small { flex: none; color: var(--muted); font-size: .74rem; }
/* czat i kości: krzyżyk MG */
.ch-del { margin-left: auto; min-width: 26px; min-height: 26px !important; padding: 0 !important; border-radius: 50% !important; background: none !important; border: 0 !important; color: var(--muted) !important; font-size: 1rem; line-height: 1; box-shadow: none !important; opacity: .5; }
.ch-del:hover, .ch-del:focus-visible { opacity: 1; color: #f0ad9f !important; }
.chlog .ch-h small + .ch-del { margin-left: 6px; }
.st-rdel { margin-left: 8px; opacity: .5; }
.st-rdel:hover { opacity: 1; }
/* karta postaci: przyciski pokazują wyjaśnienie (rzuty są przy Stole) */
.pv-hint { margin: 0 0 10px; font-size: .78rem; color: var(--muted); line-height: 1.4; }
.pv:not(.hero) .helpb { cursor: help; }
.pv:not(.hero) .rpill.helpb { background: var(--s2) !important; color: var(--ink) !important; border-color: var(--line) !important; }
.pv:not(.hero) button.tile.helpb b { color: var(--ink); }
.pv:not(.hero) .nohelp:disabled { opacity: 1; cursor: default; }

/* ---------- v45: animacja rzuconego czaru ---------- */
.sfx { position: absolute; inset: 0; z-index: 15; pointer-events: none; overflow: hidden; }
.sfx.fixed { position: fixed; z-index: 950; }
.sfx canvas { width: 100%; height: 100%; display: block; }
.sfx-cap { position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%); text-align: center; color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.95), 0 0 2px rgba(0,0,0,.9); animation: sfxcap 2.7s ease both; max-width: 92%; }
.sfx-cap small { display: block; font: 600 .76rem/1.2 var(--ui); letter-spacing: .16em; text-transform: uppercase; opacity: .86; margin-bottom: 4px; }
.sfx-cap b { display: block; font: 600 clamp(1.25rem, 3.4vw, 2.5rem)/1.15 var(--display); letter-spacing: .04em; }
@keyframes sfxcap { 0% { opacity: 0; transform: translateX(-50%) translateY(10px); } 14% { opacity: 1; transform: translateX(-50%); } 82% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- v45: okno dialogowe, dymek, przekazywanie ---------- */
.dlg-back { position: fixed; inset: 0; z-index: 800; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4,4,7,.72); backdrop-filter: blur(3px); }
.dlg { width: min(520px, 100%); max-height: min(88vh, 860px); display: flex; flex-direction: column; background: var(--s1, #15161b); border: 1px solid var(--line-gold); border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,.6); overflow: hidden; }
.dlg-back.wide .dlg { width: min(860px, 100%); }
.dlg-back.full { padding: 0; } .dlg-back.full .dlg { width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; }
.dlg-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); flex: none; }
.dlg-h strong { flex: 1; font: 600 1.05rem/1.2 var(--display); letter-spacing: .03em; color: var(--gold); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg-b { padding: 14px 18px 18px; overflow: auto; -webkit-overflow-scrolling: touch; flex: 1; min-height: 0; }
.dlg-b > label:first-child { margin-top: 0; }
.dlg-b .row { margin-top: 14px; }
body.dlg-on { overflow: hidden; }
.apptoast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 990; max-width: min(92vw, 560px); padding: 11px 16px; border-radius: 12px; background: #1c1d24; border: 1px solid var(--line-gold); color: var(--ink); font: 500 .92rem/1.35 var(--ui); box-shadow: 0 12px 40px rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.apptoast.on { opacity: 1; transform: translate(-50%, 0); }
.inv-give { margin: 8px 0 0; }

/* ---------- v45: łup (skrzynie, ciała) ---------- */
.vt-loot { position: absolute; transform: translate(-50%, -50%); z-index: 3; padding: 0; min-height: 0; border-radius: 50%; border: 2px solid #f3d27a; background: radial-gradient(circle at 35% 30%, #5a4514, #201807); color: #ffe39a; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 0 0 0 rgba(243,210,122,.6), 0 4px 10px rgba(0,0,0,.7); animation: lootpulse 1.8s ease-out infinite; }
.vt-loot svg { width: 62%; height: 62%; fill: currentColor; }
.vt-loot.done { animation: none; border-color: rgba(200,200,210,.5); background: #1b1b20; color: #9a9aa6; box-shadow: 0 3px 8px rgba(0,0,0,.6); opacity: .8; }
.vt-loot.hid { border-style: dashed; opacity: .6; }
@keyframes lootpulse { 0% { box-shadow: 0 0 0 0 rgba(243,210,122,.65), 0 4px 10px rgba(0,0,0,.7); } 100% { box-shadow: 0 0 0 14px rgba(243,210,122,0), 0 4px 10px rgba(0,0,0,.7); } }
@media (prefers-reduced-motion: reduce) { .vt-loot { animation: none; } }
.vt-lootst { font-size: .8rem; align-self: center; }
.vt-lootwin { text-align: left; }
.vt-loothead { font: 600 .78rem var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 8px; }
.vt-lootlist { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.vt-lootlist li { padding: 10px 12px; border: 1px solid var(--line-gold); border-radius: 10px; background: rgba(226,194,114,.07); animation: lootin .35s ease both; }
.vt-lootlist li:nth-child(2) { animation-delay: .08s; } .vt-lootlist li:nth-child(3) { animation-delay: .16s; } .vt-lootlist li:nth-child(4) { animation-delay: .24s; } .vt-lootlist li:nth-child(n+5) { animation-delay: .32s; }
.vt-lootlist li small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.vt-lootlist li.coin b { color: var(--gold); }
.vt-lootlist .qty { color: var(--gold); font-weight: 600; }
@keyframes lootin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.vt-lsec { font: 600 .78rem var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: 16px 0 6px; }
.vt-lcoins { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.vt-lcoins label { margin: 0; font-size: .76rem; }
.vt-lrow { display: grid; grid-template-columns: minmax(0, 1.3fr) 74px minmax(0, 1.4fr) 40px; gap: 6px; margin-bottom: 6px; }
@media (max-width: 560px) { .vt-lcoins { grid-template-columns: repeat(3, minmax(0, 1fr)); } .vt-lrow { grid-template-columns: minmax(0, 1fr) 64px 40px; } .vt-lrow [data-lo] { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- v45: login i hasło ---------- */
.cr-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.cr-h { margin: 0 0 4px; font: 600 .95rem var(--ui); color: var(--ink); }
.note.ok { border-color: rgba(120,200,140,.5); background: rgba(120,200,140,.08); }

/* ---------- v45: Warsztat MG - Prowadzenie i Notatki ---------- */
.gmw { position: fixed; inset: 0; z-index: 700; display: flex; flex-direction: column; background: #0d0e12; color: var(--ink); }
.gmw[hidden] { display: none; }
body.gmw-on { overflow: hidden; }
.gmw-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px calc(10px) 18px; padding-top: calc(10px + env(safe-area-inset-top)); border-bottom: 1px solid var(--line-gold); background: #111217; flex: none; }
.gmw-tabs { display: flex; gap: 6px; flex: 1; min-width: 0; }
.gmw-tabs button { min-height: 38px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: 600 .9rem var(--ui); }
.gmw-tabs button.on { background: var(--gold); border-color: var(--gold); color: #1a1408; }
.gmw-st { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.gmw-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); }
.gmw-list { border-right: 1px solid var(--line); overflow: auto; padding: 12px; background: #101116; -webkit-overflow-scrolling: touch; }
.gmw-ltop { display: flex; gap: 8px; margin-bottom: 10px; position: sticky; top: -12px; padding: 12px 0 8px; margin-top: -12px; background: #101116; z-index: 1; }
.gmw-ltop input { flex: 1; min-width: 0; min-height: 38px; }
.gmw-ltop button { white-space: nowrap; }
.gmw-grp { margin: 14px 4px 6px; font: 600 .7rem var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.gmw-items { display: grid; gap: 4px; }
.gmw-it { display: block; width: 100%; text-align: left; padding: 9px 12px; min-height: 0; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink); }
.gmw-it b { display: block; font: 600 .92rem/1.3 var(--ui); }
.gmw-it small { display: block; margin-top: 2px; color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmw-it.on { border-color: var(--line-gold); background: rgba(226,194,114,.1); }
.gmw-it.done b { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.25); }
@media (hover: hover) { .gmw-it:hover { background: rgba(255,255,255,.05); } }
.gmw-empty { padding: 8px 4px; }
.gmw-doc { overflow: auto; -webkit-overflow-scrolling: touch; padding: 18px clamp(14px, 4vw, 48px) 60px; }
.gmw-doc > * { max-width: 900px; margin-left: auto; margin-right: auto; }
.gmw-none { padding-top: 12vh; text-align: center; }
.gmw-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.gmw-title { flex: 1 1 260px; font: 600 1.35rem/1.2 var(--display); letter-spacing: .02em; color: var(--gold); background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 6px 2px; min-height: 44px; }
.gmw-title:focus { outline: none; border-bottom-color: var(--gold); }
.gmw-group { flex: 0 1 200px; min-height: 38px; }
.gmw-crumb { flex: 1; min-width: 0; } .gmw-crumb small { font: 600 .7rem var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.gmw-crumb h2 { margin: 2px 0 0; font: 600 1.6rem/1.2 var(--display); color: var(--gold); letter-spacing: .02em; }
.gmw-chk { margin: 0; font-weight: 400; font-size: .88rem; color: var(--ink); }
.gmw-back { display: none; }
.gmw-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.gmw-nav button { max-width: 48%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rte { border: 1px solid var(--line); border-radius: 14px; background: #121318; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); position: sticky; top: -18px; background: #15161c; z-index: 2; border-radius: 14px 14px 0 0; }
.rte-g { display: inline-flex; align-items: center; gap: 2px; }
.rte-g small { font-size: .7rem; color: var(--muted); margin-right: 4px; }
.rte-b { min-width: 34px; min-height: 34px; padding: 2px 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); font: 500 .9rem var(--ui); }
@media (hover: hover) { .rte-b:hover { background: rgba(255,255,255,.08); } }
.rte-b.blk { border-color: var(--line); font-size: .78rem; font-weight: 600; }
.rte-b.blk.pr-read { color: #e2c272; } .rte-b.blk.pr-gm { color: #e8a08f; } .rte-b.blk.pr-check { color: #9cc6ff; } .rte-b.blk.pr-fight { color: #ff8f8f; } .rte-b.blk.pr-loot { color: #b7e39a; }
.rte-sw { width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.22); background: var(--sw); }
.rte-sw.mk { border-radius: 6px; }
.rte-doc { padding: 18px 20px 40px; min-height: 46vh; font: 400 1.02rem/1.65 var(--ui); color: #e9e6df; outline: none; overflow-wrap: anywhere; }
.rte-doc.read { padding: 4px 0 0; min-height: 0; font-size: 1.08rem; }
.rte-doc h2 { font: 600 1.35rem/1.25 var(--display); color: var(--gold); margin: 1.2em 0 .4em; letter-spacing: .02em; }
.rte-doc h3 { font: 600 1.08rem/1.3 var(--ui); color: #f1e3b8; margin: 1.1em 0 .35em; }
.rte-doc p { margin: 0 0 .7em; }
.rte-doc ul, .rte-doc ol { margin: 0 0 .8em; padding-left: 1.5em; }
.rte-doc li { margin: .15em 0; }
.rte-doc blockquote { margin: .8em 0; padding: .3em 0 .3em 1em; border-left: 3px solid var(--line-gold); color: var(--ink-2); font-style: italic; }
.rte-doc hr { border: 0; border-top: 1px solid var(--line-gold); margin: 1.2em 0; }
.rte-doc a { color: var(--gold); }
.rte-doc ul.rte-todo { list-style: none; padding-left: 0; }
.rte-doc ul.rte-todo > li { position: relative; padding-left: 30px; }
.rte-doc ul.rte-todo > li::before { content: ''; position: absolute; left: 2px; top: .28em; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-radius: 5px; cursor: pointer; }
.rte-doc ul.rte-todo > li.done { color: var(--muted); text-decoration: line-through; }
.rte-doc ul.rte-todo > li.done::before { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 3px #121318; }
.rte-doc [class^="pr-"] { position: relative; margin: 1em 0; padding: 30px 16px 8px; border-radius: 12px; border: 1px solid var(--line); }
.rte-doc [class^="pr-"]::before { position: absolute; left: 14px; top: 8px; font: 700 .66rem var(--ui); letter-spacing: .16em; text-transform: uppercase; }
.rte-doc .pr-read { background: linear-gradient(180deg, rgba(226,194,114,.13), rgba(226,194,114,.05)); border-color: rgba(226,194,114,.45); font-family: Georgia, 'Times New Roman', serif; font-size: 1.08em; font-style: italic; color: #f4ead0; }
.rte-doc .pr-read::before { content: 'Czytasz graczom'; color: #e2c272; font-style: normal; }
.rte-doc .pr-gm { background: rgba(232,112,90,.07); border-color: rgba(232,112,90,.4); }
.rte-doc .pr-gm::before { content: 'Tylko dla MG'; color: #e8a08f; }
.rte-doc .pr-check { background: rgba(127,184,255,.07); border-color: rgba(127,184,255,.4); }
.rte-doc .pr-check::before { content: 'Test'; color: #9cc6ff; }
.rte-doc .pr-fight { background: rgba(255,90,90,.07); border-color: rgba(255,110,110,.45); }
.rte-doc .pr-fight::before { content: 'Walka'; color: #ff8f8f; }
.rte-doc .pr-loot { background: rgba(140,210,110,.07); border-color: rgba(140,210,110,.4); }
.rte-doc .pr-loot::before { content: 'Łup i nagrody'; color: #b7e39a; }
.gmwb.on svg { color: var(--gold); }
@media (max-width: 760px) {
  .gmw-main { grid-template-columns: minmax(0, 1fr); }
  .gmw-list { display: none; border-right: 0; }
  .gmw.list-open .gmw-list { display: block; } .gmw.list-open .gmw-doc { display: none; }
  .gmw-back { display: inline-flex; }
  .rte-bar { top: -18px; }
  .gmw-crumb h2 { font-size: 1.3rem; }
}

/* ---------- v45: dźwięk sceny ---------- */
.vt-sndscene { margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--line-gold); border-radius: 12px; background: rgba(226,194,114,.06); }
.vt-sndscene label:first-child { margin-top: 0; }

/* v45: Prowadzenie - księgi, zwijane działy, spis w rozdziale, tabele */
.gmw-book { margin: 18px 4px 8px; padding-top: 12px; border-top: 1px solid var(--line-gold); font: 600 .98rem/1.25 var(--display); letter-spacing: .03em; color: var(--gold); }
.gmw-items > .gmw-book:first-child { margin-top: 4px; padding-top: 0; border-top: 0; }
.gmw-g { border-radius: 10px; }
.gmw-g > summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; list-style: none; border-radius: 10px; font: 600 .86rem/1.3 var(--ui); color: var(--ink-2); }
.gmw-g > summary::-webkit-details-marker { display: none; }
.gmw-g > summary::before { content: '›'; display: inline-block; width: 12px; color: var(--gold); transition: transform .15s; }
.gmw-g[open] > summary::before { transform: rotate(90deg); }
.gmw-g > summary span { flex: 1; min-width: 0; }
.gmw-g > summary small { color: var(--muted); font-weight: 400; font-size: .74rem; }
.gmw-g[open] > summary { color: var(--ink); }
@media (hover: hover) { .gmw-g > summary:hover { background: rgba(255,255,255,.05); } }
.gmw-g .gmw-it { margin-left: 14px; width: calc(100% - 14px); padding: 7px 10px; }
.gmw-g .gmw-it b { font-weight: 500; font-size: .88rem; }
.gmw-toc { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 10px; margin-bottom: 8px; scrollbar-width: thin; }
.gmw-tocb { flex: none; min-height: 32px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: 500 .8rem var(--ui); white-space: nowrap; }
@media (hover: hover) { .gmw-tocb:hover { border-color: var(--line-gold); color: var(--gold); } }
.rte-doc table { width: 100%; border-collapse: collapse; margin: .8em 0 1em; font-size: .93em; }
.rte-doc th, .rte-doc td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
.rte-doc th { background: rgba(226,194,114,.09); color: #f1e3b8; font-weight: 600; }
.rte-doc tr:nth-child(even) td { background: rgba(255,255,255,.02); }
.rte-doc code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 5px; }
.rte-doc h4 { font: 600 .98rem/1.3 var(--ui); color: var(--ink); margin: 1em 0 .3em; }
.rte-doc .pr-read p:last-child, .rte-doc [class^="pr-"] > :last-child { margin-bottom: .4em; }
@media (max-width: 760px) { .rte-doc table { display: block; overflow-x: auto; white-space: normal; } .rte-doc th, .rte-doc td { min-width: 110px; } }

/* v45: menu konta na komputerze - stara reguła chowała je od 900 px, przez co nie dało się go otworzyć (wylogowanie, login i hasło) */
@media (min-width: 900px) { .navpop:not([hidden]) { display: block; right: auto; } }

/* v45: telefon - przycisk Warsztatu przy Stole stoi pod awatarem (górny rząd zostaje dla sceny i "Widzą gracze"); nagłówek rozdziału w dwóch rzędach */
.apphead.float .ah-r { position: relative; }
.apphead.float .gmwb { position: absolute; top: 52px; right: 0; }
@media (max-width: 760px) { .gmw-crumb { order: 5; flex: 1 1 100%; } .gmw-head .gmw-chk { margin-left: auto; } }

/* ---------- v46: odgrywanie (okno żetonu do grania jednostką) ---------- */
body.v39 .vt-chip.vt-playb.on { background: rgba(226,194,114,.16); color: var(--gold); border-color: rgba(226,194,114,.6); }
.pl-box { display: grid; gap: 8px; margin: 8px 0 10px; padding: 10px; border: 1px solid rgba(226,194,114,.28); border-radius: 10px; background: rgba(226,194,114,.05); }
.pl-turn { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.pl-econ { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-chip { font: inherit; font-size: 12px; line-height: 1.2; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.05); color: inherit; cursor: pointer; }
.pl-chip.used { opacity: .6; border-style: dashed; text-decoration: line-through; }
.pl-tg { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.pl-tg > span { flex: 1 1 150px; min-width: 0; }
.pl-tg.pick { outline: 1px dashed var(--gold); outline-offset: 4px; border-radius: 6px; }
.pl-res { font-size: 13px; line-height: 1.45; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.06); border-left: 3px solid rgba(255,255,255,.3); }
.pl-res.hit, .pl-res.crit, .pl-res.done { border-left-color: #6fcf7a; }
.pl-res.crit { background: rgba(111,207,122,.12); }
.pl-res.miss { border-left-color: #e0736b; }
.pl-res.dmg { border-left-color: var(--gold); }
.pl-apply { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pl-hp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.pl-hp input { width: 84px; }
.pl-cast .pl-spl { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; max-height: 200px; overflow: auto; }
.pl-spl li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.pl-spl li > span { min-width: 0; }
.pl-spl small { opacity: .72; }
.pl-any { display: flex; gap: 6px; margin-top: 6px; }
.pl-any input { flex: 1; min-width: 0; }
.st-t.tg { box-shadow: 0 0 0 3px #e0736b, 0 0 22px rgba(224,115,107,.75); outline: 2px dashed #e0736b; outline-offset: 6px; }
.st-tokens.pick .st-t { cursor: crosshair; }
.pl-tgb { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.pl-acts .st-atk { margin: 0; }
.pl-acts .st-mh { margin: 8px 0 4px; }
.pl-acts p.muted { margin: 0; font-size: 13px; }
.pl-mv { font-size: 12px; line-height: 1.2; padding: 6px 4px; opacity: .85; align-self: center; }


/* ================= v47 ================= */
/* klimatyczne okna (zamiast systemowych komunikatów przeglądarki) */
.ask-back { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(4,4,6,.0); backdrop-filter: blur(0); transition: background .18s ease, backdrop-filter .18s ease; }
.ask-back.on { background: rgba(4,4,6,.66); backdrop-filter: blur(3px); }
.ask { position: relative; width: min(420px, 100%); max-height: min(86vh, 640px); overflow: auto; padding: 30px 22px 18px; border-radius: 18px; text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, rgba(226,194,114,.10), rgba(226,194,114,0) 60%), linear-gradient(180deg, #1c1d21, #141518);
  border: 1px solid rgba(226,194,114,.38); box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 28px 80px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.05);
  transform: translateY(10px) scale(.97); opacity: 0; transition: transform .2s cubic-bezier(.2,.9,.3,1.2), opacity .16s ease; }
.ask-back.on .ask { transform: none; opacity: 1; }
.ask-back.off .ask { transform: translateY(6px) scale(.98); opacity: 0; }
.ask::before, .ask::after { content: ''; position: absolute; left: 18px; right: 18px; height: 1px; background: linear-gradient(90deg, transparent, rgba(226,194,114,.45), transparent); }
.ask::before { top: 9px; } .ask::after { bottom: 9px; }
.ask-seal { width: 46px; height: 46px; margin: -6px auto 10px; color: var(--gold); filter: drop-shadow(0 0 10px rgba(226,194,114,.35)); }
.ask-seal svg { width: 100%; height: 100%; }
.ask.danger .ask-seal { color: #e2735f; filter: drop-shadow(0 0 10px rgba(226,115,95,.35)); }
.ask-t { margin: 0 0 8px; font: 600 1.18rem/1.25 var(--display); letter-spacing: .04em; color: var(--gold); }
.ask.danger .ask-t { color: #f0ad9f; }
.ask-b { margin: 0 auto 14px; max-width: 34ch; font: 400 1rem/1.5 var(--read); color: var(--ink); }
.ask-in { display: block; width: 100%; margin: 4px 0 14px; min-height: 48px; font-size: 1rem; text-align: left; }
.ask-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.ask-btns button { flex: 1 1 140px; min-height: 48px; border-radius: 12px; font: 600 .95rem var(--ui); }
.ask-btns .ask-danger { background: #b5452d !important; color: #fff3ee !important; border-color: transparent !important; }
.ask-opts { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; text-align: left; }
.ask-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; background: var(--s2, #1f2226) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; }
.ask-opt small { color: var(--muted); font-size: .78rem; }
.ask-opt.on { border-color: rgba(226,194,114,.6) !important; }
@media (prefers-reduced-motion: reduce) { .ask, .ask-back { transition: none; } }

/* telefon poziomo: układ z bocznym menu tylko przy prawdziwym obrocie ekranu (nie przy otwartej klawiaturze) */
html, body { overscroll-behavior: none; }
html { overflow-x: clip; }
body { overflow-x: clip; }
.vt-panes, .dlg-b, .kp-list, .kp-body, .vt-win, .vt-scmenu, .chpanel, .chlog { overscroll-behavior: contain; }

/* Kości (nowy ekran) */
.st-dice .dk-f { position: relative; display: flex; align-items: center; margin: 2px 0 10px; }
.st-dice .dk-expr { width: 100%; min-height: 60px; padding: 0 52px 0 16px; border-radius: 14px; background: var(--s2, #1f2226); border: 1px solid var(--line); font: 700 1.6rem/1 var(--ui); font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--ink); }
.st-dice .dk-expr::placeholder { font: 500 1rem var(--ui); color: var(--muted); letter-spacing: 0; }
.dk-clr { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; min-height: 0 !important; padding: 0 !important; border-radius: 50% !important; background: rgba(255,255,255,.06) !important; border: 0 !important; color: var(--ink-2) !important; font-size: 1.3rem !important; line-height: 1; }
.dk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dk-die { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; height: 64px; padding: 0 !important; border-radius: 14px !important; background: var(--s2, #1f2226) !important; color: var(--ink) !important; border: 1px solid transparent !important; font: 600 1rem var(--ui) !important; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.dk-die .die-ic { width: 22px; height: 22px; fill: currentColor; opacity: .75; }
.dk-die.on { background: rgba(226,194,114,.16) !important; color: var(--gold) !important; border-color: rgba(226,194,114,.5) !important; }
.dk-die .st-cnt { position: absolute; top: 5px; right: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--gold); color: var(--gold-ink, #1b1508); font: 700 .74rem/20px var(--ui); font-style: normal; text-align: center; }
.dk-die .st-cnt:empty { display: none; }
.dk-mod { border: 1px dashed rgba(255,255,255,.22) !important; background: none !important; }
.dk-mod small { font: 500 .7rem var(--ui); color: var(--muted); }
.dk-mod.on { border-color: rgba(226,194,114,.6) !important; color: var(--gold) !important; }
.dk-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 10px 0 8px; padding: 4px; border-radius: 14px; background: var(--s2, #1f2226); }
.dk-seg button { min-height: 42px; padding: 0 4px !important; border-radius: 10px !important; background: none !important; border: 0 !important; color: var(--ink-2) !important; font: 600 .84rem var(--ui) !important; }
.dk-seg button.on { background: var(--s3, #2a2e33) !important; color: var(--gold) !important; box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; }
.dk-go { display: block; width: 100%; min-height: 52px; border-radius: 14px !important; font: 700 1.05rem var(--ui) !important; }
.dk-hid { margin: 10px 0 0; }
.dk-hint { margin: 10px 0 2px; font-size: .78rem; }
.dk-lh { margin: 16px 0 4px; font: 600 .72rem var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.st-dice .st-mine { margin-top: 14px; }
.st-dice .st-minel { display: flex; flex-wrap: wrap; gap: 8px; }
.st-myr { display: inline-flex; align-items: stretch; border-radius: 12px; background: var(--s2, #1f2226); border: 1px solid var(--line); overflow: hidden; }
.dk-my { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 48px; padding: 6px 12px !important; background: none !important; border: 0 !important; border-radius: 0 !important; color: var(--ink) !important; text-align: left; }
.dk-my b { font: 600 .9rem var(--ui); } .dk-my small { font: 500 .78rem var(--ui); color: var(--gold); font-variant-numeric: tabular-nums; }
.dk-myed { min-width: 40px; min-height: 48px; padding: 0 !important; background: none !important; border: 0 !important; border-left: 1px solid var(--line) !important; border-radius: 0 !important; color: var(--muted) !important; font-size: 1.1rem !important; }
.dk-dlg .dlg { width: min(440px, 100%); }
.dk-dlg label small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.dk-dlg input { width: 100%; min-height: 48px; font-size: 1rem; }
.dk-mf { position: relative; }
.dk-mf input { padding-right: 52px; font: 600 1.15rem var(--ui); font-variant-numeric: tabular-nums; }
.dk-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0 4px; }
.dk-mini button { min-height: 42px; padding: 0 !important; border-radius: 10px !important; background: var(--s2, #1f2226) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; font: 600 .9rem var(--ui) !important; }
.dk-err { min-height: 1.2em; margin: 6px 0 0; color: #f0ad9f; font-size: .84rem; }
.dk-mrow { gap: 10px; } .dk-mrow button { flex: 1; min-height: 48px; }
.dk-del { color: #f0ad9f !important; }
@media (max-width: 899px) { .dk-dlg { align-items: flex-end; padding: 0; } .dk-dlg .dlg { width: 100%; border-radius: 18px 18px 0 0; max-height: 92%; } }
/* czat: wygląd całego wpisu zależy od rodzaju (mówi, robi, myśli, poza grą, wpis z Walki, narracja MG) */
.chlog { gap: 10px; }
.chlog li { position: relative; max-width: 100%; }
.chlog .ch-h { gap: 0 8px; align-items: center; }
.chlog .ch-h .ch-tm { margin-left: auto; font-size: .68rem; color: var(--muted); }
.chlog .ch-v { font: italic 500 .74rem var(--ui); letter-spacing: .02em; color: inherit; opacity: .75; }
.chlog .ch-postac { align-self: flex-start; max-width: 92%; padding: 8px 12px 9px; border-radius: 4px 16px 16px 16px; background: linear-gradient(180deg, rgba(226,194,114,.10), rgba(226,194,114,.05)); border: 1px solid rgba(226,194,114,.28); }
.chlog .ch-postac b { color: var(--gold); font: 600 .9rem var(--display); letter-spacing: .03em; }
.chlog .ch-postac p { font: 400 1.02rem/1.45 var(--read); color: var(--ink); }
.chlog .ch-robi { padding: 2px 0 2px 12px; border-left: 3px solid rgba(208,140,90,.65); }
.chlog .ch-robi b { color: #e6b48c; font: 600 .86rem var(--display); }
.chlog .ch-robi .ch-v { color: #e6b48c; }
.chlog .ch-robi p { font: italic 400 1rem/1.45 var(--read); color: #eadbcd; }
.chlog .ch-narr { align-self: stretch; padding: 8px 14px; border: 0; border-top: 1px solid var(--line-gold); border-bottom: 1px solid var(--line-gold); background: radial-gradient(80% 120% at 50% 50%, rgba(226,194,114,.06), transparent); text-align: center; }
.chlog .ch-narr .ch-h { justify-content: flex-end; }
.chlog .ch-narr p { font: italic 400 1.05rem/1.5 var(--read); color: var(--ink); }
.chlog .ch-mysli { align-self: flex-start; max-width: 92%; padding: 8px 14px 9px; border-radius: 18px; border: 1.5px dashed rgba(150,170,220,.5); background: rgba(90,110,170,.08); margin-bottom: 8px; }
.chlog .ch-mysli::after, .chlog .ch-mysli::before { content: ''; position: absolute; border-radius: 50%; border: 1.5px dashed rgba(150,170,220,.5); background: rgba(90,110,170,.08); }
.chlog .ch-mysli::before { width: 10px; height: 10px; left: 14px; bottom: -9px; }
.chlog .ch-mysli::after { width: 6px; height: 6px; left: 8px; bottom: -16px; }
.chlog .ch-mysli b, .chlog .ch-mysli .ch-v { color: #a9bce8; } .chlog .ch-mysli b { font: 600 .86rem var(--display); }
.chlog .ch-mysli p { font: italic 400 1rem/1.45 var(--read); color: #cdd7ef; }
.chlog .ch-gracz { align-self: flex-start; max-width: 92%; padding: 6px 10px 7px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.chlog .ch-gracz b { font: 600 .8rem var(--ui); color: var(--ink-2); }
.chlog .ch-gracz p { font: 400 .88rem/1.4 var(--ui); color: var(--ink-2); }
.chlog .ch-mine.ch-postac, .chlog .ch-mine.ch-gracz, .chlog .ch-mine.ch-mysli { align-self: flex-end; }
.chlog .ch-mine.ch-postac { border-radius: 16px 4px 16px 16px; }
.chlog .ch-mine.ch-mysli::before { left: auto; right: 14px; } .chlog .ch-mine.ch-mysli::after { left: auto; right: 8px; }
.chlog .ch-akcja { align-self: stretch; }
/* Stół: górny pasek w jednym rzędzie (scena · tryb pracy · rundy albo ruch graczy) */
body.v39 .vt-nav { flex-wrap: nowrap !important; align-items: center; gap: 6px; overflow-x: auto; overflow-y: visible; scrollbar-width: none; pointer-events: auto; padding: 2px 2px 4px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); }
body.v39 .vt-nav::-webkit-scrollbar { display: none; }
body.v39 .vt-nav:has(.vt-scmenu) { overflow: visible; -webkit-mask-image: none; mask-image: none; }
body.v39 .vt-nav > * { flex: none; }
body.v39 .vt-nav .vt-chip { min-height: 44px; height: 44px; border-radius: 12px; }
.vt-scb47 { display: inline-flex !important; align-items: center; gap: 8px; max-width: min(340px, 52vw); padding: 4px 10px 4px 12px !important; text-align: left; }
.vt-scb47 .vt-scn { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.vt-scb47 .vt-scn b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 .9rem var(--ui); color: var(--ink); }
.vt-scb47 .vt-scn small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 .7rem var(--ui); color: var(--muted); margin-top: 2px; }
.vt-scb47 .vt-live, .vt-scb47 .vt-dot { flex: none; }
.vt-vmode { padding: 3px !important; gap: 2px !important; }
.vt-vmode .vt-mode { min-height: 36px; padding: 0 12px; border-radius: 9px; font: 600 .82rem var(--ui); }
.vt-vmode .vt-mode.on { background: var(--gold) !important; color: var(--gold-ink, #1b1508) !important; }
.vt-round > span { padding: 0 6px 0 8px; font: 600 .8rem var(--ui); color: var(--gold); white-space: nowrap; }
.vt-scnow { padding: 4px 4px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.vt-scmenu .vt-scshow, .vt-scmenu .vt-scwho { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin: 4px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--s2, #1f2226) !important; border: 1px solid var(--line) !important; color: var(--ink) !important; font: 600 .86rem var(--ui); text-align: left; }
.vt-scmenu .vt-scshow.live { background: rgba(127,176,138,.14) !important; border-color: rgba(127,176,138,.45) !important; color: #b6dcbf !important; }
.vt-scmenu .vt-scwho span:first-of-type { flex: 1; }
.vt-scmenu .vt-scwho svg { width: 18px; height: 18px; }
.vt-scnow .vt-whomenu { position: static; min-width: 0; max-width: none; max-height: none; margin: 6px 0 0; box-shadow: none; border: 0; padding: 4px 6px; background: none; }
@media (max-width: 899px) {
  body.v39 .vt-nav .vt-chip { min-height: 40px; height: 40px; }
  .vt-scb47 { max-width: 58vw; }
  .vt-vmode .vt-mode { padding: 0 9px; font-size: .76rem; min-height: 32px; }
  body.v39 .vt-nav .vt-scmenu { position: fixed; left: 8px; right: 8px; top: calc(var(--vtnav, 44px) + 14px + env(safe-area-inset-top)); max-width: none; min-width: 0; max-height: 64vh; z-index: 70; }
}
/* gracz: nazwa sceny nie wchodzi pod przyciski czatu i konta */
button.vt-chip.vt-plsc, div.vt-chip.on { max-width: 100%; min-width: 0; }
.vt-nav div.vt-chip strong, .vt-nav .vt-plsc strong { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.v39 .vt-nav:not(:has(.vt-scb47)) { -webkit-mask-image: none; mask-image: none; }
body.v39 .vt-nav > div.vt-chip.on, body.v39 .vt-nav > .vt-scp:only-child, body.v39 .vt-nav > .vt-scp:only-child > .vt-plsc { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.vt-nav .sm { display: none; }
body.v39 .vt-nav div.vt-chip.on { height: auto !important; min-height: 44px; }
@media (max-width: 899px) {
  body.v39 .vt-nav:has(.vt-scb47) { flex-wrap: wrap !important; overflow: visible; -webkit-mask-image: none; mask-image: none; row-gap: 6px; }
  body.v39 .vt-nav .vt-scp:has(.vt-scb47) { flex: 1 1 100%; min-width: 0; }
  body.v39 .vt-nav .vt-scb47 { width: 100%; max-width: 100%; }
  .vt-nav .lg { display: none; } .vt-nav .sm { display: inline; }
  .vt-round .vt-mode .sm { font-size: 1rem; line-height: 1; }
  .vt-round .vt-mode { min-width: 36px; }
}
body.v39 .vt-nav .vt-scnow .vt-whomenu { position: static !important; inset: auto !important; width: auto; min-width: 0; max-width: none; max-height: none; margin: 6px 0 0; padding: 4px 6px; box-shadow: none; border: 0; background: none; z-index: auto; }
body.v39 .vt-nav .vt-scnow .vt-whomenu label { display: flex; align-items: center; gap: 10px; min-height: 40px; }
@media (max-width: 899px) {
  .vt-vmode .vt-mode { padding: 0 8px; }
  body.v39 .vt-nav .vt-round { padding: 2px !important; }
  .vt-round > span { padding: 0 4px 0 6px; }
}
.vt-round > span i { font-style: normal; }
/* przeciąganie żetonu palcem: żeton lekko unosi się pod palcem */
.st-t.grab { z-index: 30 !important; filter: drop-shadow(0 8px 14px rgba(0,0,0,.6)); transform: translate(-50%, -50%) scale(1.12); transition: transform .12s ease; }
/* łup: skrzynia otwiera się i wylatują przedmioty */
.lx-back { position: fixed; inset: 0; z-index: 1900; display: flex; align-items: center; justify-content: center; background: radial-gradient(60% 50% at 50% 55%, rgba(30,22,10,.55), rgba(3,3,5,.82)); animation: lxIn .2s ease both; cursor: pointer; }
.lx-back.out { animation: lxOut .25s ease both; }
.lx-stage { position: relative; width: 220px; height: 200px; }
.lx-obj { position: absolute; left: 0; right: 0; bottom: 0; width: 220px; height: auto; overflow: visible; animation: lxShake .42s ease-in-out .05s 1; }
.lx-obj .lx-lid { transform-box: fill-box; transform-origin: 50% 100%; animation: lxLid .5s cubic-bezier(.3,1.6,.5,1) .4s both; }
.lx-body .lx-lid { animation-name: lxFlap; }
.lx-glow { position: absolute; left: 50%; bottom: 72px; width: 160px; height: 160px; margin-left: -80px; border-radius: 50%; background: radial-gradient(circle, rgba(255,214,120,.85), rgba(255,180,60,.25) 45%, transparent 70%); opacity: 0; animation: lxGlow 1.2s ease .45s both; mix-blend-mode: screen; }
.lx-b .lx-glow { background: radial-gradient(circle, rgba(200,220,255,.5), transparent 65%); }
.lx-it { position: absolute; left: 50%; bottom: 84px; width: 44px; height: 44px; margin-left: -22px; opacity: 0; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); animation: lxFly .9s cubic-bezier(.2,.9,.35,1) var(--dl) both; }
.lx-it svg { width: 100%; height: 100%; }
.lx-spark { position: absolute; left: 50%; bottom: 90px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; box-shadow: 0 0 0 0 rgba(255,220,140,.9); animation: lxSpark .9s ease-out .5s both; }
@keyframes lxIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lxOut { to { opacity: 0; } }
@keyframes lxShake { 0%, 100% { transform: none; } 20% { transform: rotate(-4deg); } 45% { transform: rotate(4deg); } 70% { transform: rotate(-2deg); } }
@keyframes lxLid { from { transform: none; } to { transform: translateY(-14px) rotate(-26deg) scaleY(.82); } }
@keyframes lxFlap { from { transform: none; } to { transform: translateY(-10px) scaleY(-.6); } }
@keyframes lxGlow { 0% { opacity: 0; transform: scale(.4); } 35% { opacity: 1; transform: scale(1.1); } 100% { opacity: .35; transform: scale(1); } }
@keyframes lxFly { 0% { opacity: 0; transform: translate(0, 10px) scale(.3) rotate(0); } 15% { opacity: 1; } 100% { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--rt)); } }
@keyframes lxSpark { 0% { box-shadow: 0 0 0 0 rgba(255,220,140,.9); } 100% { box-shadow: 0 0 0 90px rgba(255,220,140,0); } }
.lx-list li { display: flex; align-items: flex-start; gap: 10px; }
.lx-list .lx-i { flex: none; width: 30px; height: 30px; }
.lx-list .lx-i svg { width: 100%; height: 100%; }
.lx-list li > span:last-child { display: flex; flex-direction: column; }
.lx-dlg .dlg { animation: lxPop .28s cubic-bezier(.2,.9,.3,1.25) both; }
@keyframes lxPop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lx-back { display: none; } }
/* Księgi: zapisane wpisy */
.kp-star { display: inline-flex; align-items: center; gap: 6px; float: right; margin: 0 0 8px 10px; min-height: 40px; padding: 0 14px !important; border-radius: 20px !important; background: var(--s2, #1f2226) !important; border: 1px solid var(--line) !important; color: var(--ink-2) !important; font: 600 .84rem var(--ui) !important; }
.kp-star span { font-size: 1.05rem; line-height: 1; color: var(--gold); }
.kp-star.on { border-color: rgba(226,194,114,.55) !important; color: var(--gold) !important; }
.kp-saved-v { padding: 14px 16px 28px; max-width: 760px; }
.kp-svl { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.kp-sv { display: flex; align-items: stretch; border-radius: 12px; background: var(--s2, #1f2226); border: 1px solid var(--line); overflow: hidden; }
.kp-svgo { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 52px; padding: 8px 14px !important; background: none !important; border: 0 !important; border-radius: 0 !important; color: var(--ink) !important; text-align: left; }
.kp-svgo small { color: var(--muted); font-size: .76rem; }
.kp-svx { width: 52px; padding: 0 !important; background: none !important; border: 0 !important; border-left: 1px solid var(--line) !important; border-radius: 0 !important; color: var(--gold) !important; font-size: 1.15rem !important; }
/* karta: "Zmień" przy każdej części i szybkie akcje przedmiotów i czarów w widoku gry */
.pv h3.sec-h { display: flex; align-items: center; gap: 8px; }
.pv h3.sec-h .sec-aside { margin-left: auto; }
.secedit { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; min-height: 32px; padding: 0 10px !important; border-radius: 16px !important; background: none !important; border: 1px solid var(--line) !important; color: var(--ink-2) !important; font: 600 .74rem var(--ui) !important; letter-spacing: 0; text-transform: none; }
.secedit svg { width: 14px; height: 14px; }
.pv h3.sec-h .sec-aside + .secedit { margin-left: 8px; }
.spbook > summary .secedit { margin-left: 6px; }
.inv-acts, .sp-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 4px; }
.inv-acts button, .sp-acts button { min-height: 38px; }
.inv-qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 1px; }
.inv-qty button { min-width: 36px; padding: 0 !important; border: 0 !important; }
.inv-qty b { min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.inv-del { color: #f0ad9f !important; margin-left: auto; }
.spbook { margin: 10px 0 0; border-radius: 14px; border: 1px solid var(--line-gold); background: linear-gradient(180deg, rgba(226,194,114,.05), transparent 120px); }
.spbook > summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.spbook > summary::-webkit-details-marker { display: none; }
.spbook > summary .at { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.spbook > summary .at b { font: 600 1.02rem var(--display); color: var(--gold); letter-spacing: .03em; }
.spbook > summary .at small { color: var(--muted); font-size: .76rem; }
.spbook > summary .chev { transition: transform .15s ease; color: var(--muted); font-size: 1.2rem; }
.spbook[open] > summary .chev { transform: rotate(90deg); }
.spb-ic { width: 28px; height: 28px; color: var(--gold); flex: none; }
.spb-ic svg { width: 100%; height: 100%; }
.spb-in { padding: 0 10px 12px; }
.spx > summary .at small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Drużyna: zaproszenia */
.dz-inv { margin: 12px 0 6px; padding: 12px; border-radius: 12px; border: 1px solid var(--line-gold); background: rgba(226,194,114,.05); }
.dz-link code, .dlg .dz-link code { display: block; padding: 10px 12px; border-radius: 10px; background: var(--s2, #1f2226); font-size: .9rem; overflow-wrap: anywhere; user-select: all; }
.dz-rev { color: #f0ad9f !important; }
/* podpowiedzi przedmiotów i czarów: bez czerwonawego cienia odziedziczonego po zwykłym przycisku */
.sugg button, .sugg button:hover, .sugg button:focus { box-shadow: none !important; text-shadow: none; }
/* bestiariusz: opis fabularny */
.kp-nar { margin: 12px 0 6px; }
.kp-nar h4 { margin: 14px 0 4px; font: 600 .74rem var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.kp-nar p { margin: 0; font: 400 1.02rem/1.55 var(--read); color: var(--ink); }
.kp-reg { font: 500 .86rem var(--ui) !important; color: var(--ink-2) !important; }
.kp-reg b { color: var(--gold); margin-right: 6px; }
.kp-reg i { color: var(--muted); }

/* ================= ARGOT: konta, kampanie, przykładowe plansze ================= */
body.argotbg { padding-top: max(18px, env(safe-area-inset-top)); }
main.argot { max-width: 880px; margin: 0 auto; }
main.argot.login { max-width: 460px; }
.ag-brand { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 18px 0 22px; text-align: center; }
.ag-brand svg { width: 56px; height: 56px; }
.ag-brand b { font-family: var(--display); font-size: 1.9rem; letter-spacing: .08em; color: var(--gold); }
.ag-brand small { color: var(--muted); font-size: .85rem; letter-spacing: .04em; }
.ag-camps { margin: 14px 0 22px; }
.ag-camps .lrow { min-height: 64px; }
.ag-actions { gap: 14px; align-items: start; }
.ag-actions .card h2, .ag-login h2, .ag-join h1 { margin-top: 0; }
.ag-actions select, .ag-actions input { width: 100%; }
.ag-seg { display: flex; gap: 6px; margin-bottom: 14px; }
.ag-seg button { flex: 1; background: transparent; border: 1px solid var(--line); color: var(--ink-2); box-shadow: none; }
.ag-seg button.on { border-color: var(--line-gold); color: var(--gold); background: rgba(226,194,114,.08); }
.ag-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; line-height: 1.4; margin: 10px 0 4px; color: var(--ink-2); }
.ag-consent input { width: auto; margin-top: 3px; }
.ag-join { max-width: 520px; margin: 0 auto; }
.ag-join h1 { font-family: var(--display); color: var(--gold); }
.ab-back .ab { width: min(980px, 100%); max-height: min(92vh, 900px); text-align: left; }
.ab .ask-t, .ab .ask-b { text-align: center; }
.ab-start { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 6px; }
.ab-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; min-height: 64px; border-radius: 12px; text-align: left;
  background: var(--panel-2) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; box-shadow: none !important; }
.ab-opt small, .ab-card small { color: var(--muted); font-size: .8rem; font-weight: 400; }
.ab-h { margin: 18px 0 6px; font-family: var(--display); color: var(--gold); font-size: 1rem; letter-spacing: .05em; }
.ab-rodz { grid-column: 1 / -1; margin: 10px 0 0; color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.ab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ab-card { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 8px; border-radius: 12px; text-align: left; cursor: pointer;
  background: var(--panel-2) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; box-shadow: none !important; }
.ab-card:hover, .ab-card:focus-visible { border-color: var(--line-gold) !important; }
.ab-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #000; }
.ab-card b { font-size: .95rem; }
.ab-meta { color: var(--gold-2); font-size: .72rem; }
@media (max-width: 560px) { .ab-start { grid-template-columns: 1fr; } .ab-grid { grid-template-columns: 1fr 1fr; } .ab-card small { display: none; } }
@media (max-width: 640px) { .ag-actions.grid { grid-template-columns: 1fr; } }
/* ARGOT: karta ogólna, Księgi systemu, edytor pakietu */
main.argot.wide { max-width: 1200px; }
.ko { max-width: 920px; margin: 0 auto; }
.ko-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ko-name input { font-family: var(--display); font-size: 1.4rem; color: var(--gold); background: transparent; border: 0; border-bottom: 1px solid var(--line-gold); padding: 4px 0; width: 100%; }
.ko-name h2 { margin: 0; font-family: var(--display); color: var(--gold); }
.ko-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 12px; margin: 8px 0 14px; }
.ko-fields label { display: flex; flex-direction: column; gap: 3px; font-size: .8rem; color: var(--muted); }
.ko-res { margin: 6px 0 14px; }
.ko-rv { display: flex; align-items: center; justify-content: center; gap: 4px; }
.ko-rv input { width: 4em; text-align: center; font-size: 1.15rem; font-weight: 600; background: transparent; border: 0; color: var(--ink); }
.ko-rv span { color: var(--muted); }
.ko-attrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ko-attr { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); }
.ko-roll { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px; border-radius: 10px; background: rgba(226,194,114,.08) !important; border: 1px solid var(--line-gold) !important; color: var(--ink) !important; box-shadow: none !important; }
.ko-roll small { color: var(--gold); font-size: .72rem; letter-spacing: .06em; }
.ko-roll b { font-size: 1.35rem; }
.ko-roll.sm { flex-direction: row; min-width: 3.4em; justify-content: center; font-weight: 600; padding: 4px 8px; }
.ko-av { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.ko-av input { width: 4.2em; text-align: center; }
.ko-skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; }
.ko-skill { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.ko-skill span { flex: 1; }
.ko-skill input { width: 4.2em; text-align: center; }
.ko-last { margin: 12px 0; }
.ko-notes { width: 100%; }
.ko-pick { margin-bottom: 12px; }
.ko-rules { max-width: 860px; margin: 0 auto; }
.ko-rules h1 { font-family: var(--display); color: var(--gold); }
.ko-ed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ko-json { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; line-height: 1.4; min-height: 420px; }
.ko-bad { color: #ef8a6b; margin: 6px 0; } .ko-ok { color: var(--ok); margin: 6px 0; }
.ko-edr { max-height: 80vh; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.sysv h1 { font-family: var(--display); color: var(--gold); }
@media (max-width: 860px) { .ko-ed { grid-template-columns: 1fr; } }

/* Argonet: asystent AI i API */
.ai-dlg { width: min(560px, 100%); text-align: left; }
.ai-dlg.ab { width: min(760px, 100%); }
.ai-dlg .ask-t, .ai-dlg .ask-b { text-align: center; }
.ai-dlg .ask-b { max-width: 52ch; font-size: .95rem; }
.ai-form { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 12px; }
.ai-form label { display: flex; flex-direction: column; gap: 4px; font: 500 .86rem/1.3 var(--ui); color: var(--ink-2); }
.ai-form input, .ai-form select, .ai-form textarea { width: 100%; font-size: 1rem; }
.ai-form textarea { min-height: 90px; resize: vertical; font: 400 .95rem/1.5 var(--read); }
.ai-form .row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.ai-form .row label { flex: 0 0 auto; }
.ai-quick { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 0 10px; }
.ai-quick .chip { cursor: pointer; min-height: 34px; padding: 4px 12px; background: var(--s2) !important; color: var(--ink-2) !important; border: 1px solid var(--line) !important; border-radius: 999px; }
.ai-quick .chip:hover, .ai-quick .chip:focus-visible { border-color: rgba(226,194,114,.55) !important; color: var(--gold) !important; }
.apiv { max-width: 860px; margin: 0 auto; }
.apiv .tok { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin: 6px 0; background: var(--s1, #17181b); }
.apiv .tok b { font-weight: 600; }
.apiv .tok small { display: block; color: var(--muted); }
.apiv pre, .apiv code.blk { display: block; white-space: pre-wrap; word-break: break-all; padding: 10px 12px; border-radius: 10px; background: #0f1012; border: 1px solid var(--line); font: 400 .84rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); }
.apiv .newtok { border-color: rgba(226,194,114,.55); }
.apiv h2 { margin-top: 26px; }
@media (max-width: 600px) { .apiv .tok { flex-direction: column; align-items: stretch; } }
.ai-form .ai-chk span { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.ai-form .ai-chk input { width: auto; }
