[hidden] { display: none !important; }
:root {
  --bg: #0f1216;
  --surface: #161a20;
  --surface-2: #1d222a;
  --line: #2a313b;
  --text: #e7e9ec;
  --muted: #98a2ad;
  --accent: #e2b04a;
  --accent-ink: #1a1408;
  --link: #9ccaff;
  --c1: #8f99a4; --c2: #22b35e; --c3: #2b8cf0; --c4: #b84fd6; --c5: #f0b03a;
  --s1: #a8735b; --s3: #9fb3c1; --s5: #e5b84a; --s6: #c5a8ff; --s4: #c5a8ff;
  --tS: #ff6b5e; --tA: #f6a347; --tB: #e9d35a; --tC: #7fcf7a; --tX: #8f99a4;
  --radius: 10px;
  --hex: 64px;
  --display: "Barlow SC", "Arial Narrow", system-ui, sans-serif;
  --tabbar: 0px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@font-face { font-family: "Barlow SC"; font-weight: 600; font-display: optional; src: url(/fonts/barlow-600-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Barlow SC"; font-weight: 600; font-display: optional; src: url(/fonts/barlow-600-ext.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow SC"; font-weight: 700; font-display: optional; src: url(/fonts/barlow-700-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Barlow SC"; font-weight: 700; font-display: optional; src: url(/fonts/barlow-700-ext.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-family: var(--display); font-weight: 700; letter-spacing: .005em; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -.01em; }
h2 { font-size: 1.3rem; margin-top: 1.6em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
table { border-collapse: collapse; }
button { font: inherit; color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 6px 10px; z-index: 10; }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; color: #c9cfd6; max-width: 70ch; }
.note { color: var(--muted); font-size: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.empty { color: var(--muted); }

/* nagłówek */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.brand { font-weight: 800; color: var(--text); letter-spacing: .01em; font-size: 1.1rem; }
.brand::before { content: ""; display: inline-block; width: 12px; height: 14px; margin-right: 8px; background: var(--accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); vertical-align: -1px; }
.setlabel { color: var(--muted); font-size: .85rem; }
.langs { margin-left: auto; display: flex; gap: 8px; }
.langs a { font-size: .8rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }
.nav { border-top: 1px solid var(--line); }
.nav-in { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--muted); padding: 10px 12px; white-space: nowrap; font-size: .95rem; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }

main { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 20px 0 32px; }
.legal { font-size: .78rem; max-width: 90ch; }

/* przyciski i chipy */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 9px 16px; border-radius: 8px; border: 0; cursor: pointer; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.alt { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips .arrow, .chips .plus { color: var(--muted); }

.tr, .it, .aug { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 4px; color: var(--text); font-size: .9rem; }
.tr img { width: 20px; height: 20px; }
.it { border-radius: 8px; padding: 3px 10px 3px 3px; }
.it img, .aug img { border-radius: 6px; }
.tr:hover, .it:hover, .aug:hover { border-color: var(--muted); text-decoration: none; }

/* jednostki */
.grid-ch { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px 8px; }
.grid-ch.big { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.ch { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text); text-align: center; min-width: 0; }
.ch:hover { text-decoration: none; }
.ch-img { position: relative; border-radius: 8px; border: 2px solid var(--cc, var(--c1)); overflow: hidden; }
.ch-img img { width: 56px; height: 56px; }
.big .ch-img img { width: 72px; height: 72px; }
.ch.sm .ch-img img { width: 44px; height: 44px; }
.ch-name { font-size: .78rem; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-items { display: flex; gap: 1px; margin-top: -2px; }
.ch-items img { width: 16px; height: 16px; border-radius: 3px; }
.stars { position: absolute; left: 0; right: 0; top: 0; font-size: 10px; line-height: 1; color: var(--accent); text-shadow: 0 1px 2px #000; text-align: center; }
.c1 { --cc: var(--c1); } .c2 { --cc: var(--c2); } .c3 { --cc: var(--c3); } .c4 { --cc: var(--c4); } .c5 { --cc: var(--c5); }
.carry .ch-img, .cc-carry .ch-img { box-shadow: 0 0 12px 1px #e2b04a8c, 0 0 4px #e2b04a59; }
.hex.carry::before { background: var(--accent); }
.cost-row { margin-bottom: 14px; }
.cost-h { font-size: .9rem; color: var(--cc); text-transform: uppercase; letter-spacing: .06em; }

/* nagłówek encji */
.ent-head { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.ent-img { border-radius: 12px; border: 3px solid var(--cc, var(--line)); width: 96px; height: 96px; flex: none; }
.trait-img { width: 64px; height: 64px; padding: 8px; background: var(--surface-2); }
.ent-head h1 { margin-bottom: 2px; }
.desc { max-width: 75ch; }
.desc .ico { display: inline-block; width: .9em; height: .9em; border-radius: 2px; vertical-align: -1px; background: var(--muted); }
.ico-ap { background: #7ab8ff !important; } .ico-ad { background: #ff8a5c !important; } .ico-hp { background: #59d36b !important; }
.ico-as { background: #ffd35c !important; } .ico-ar { background: #e8b06a !important; } .ico-mr { background: #c08cff !important; }
.ico-mana { background: #5cc8ff !important; } .ico-gold { background: var(--accent) !important; border-radius: 50% !important; }
.t-magic { color: #8cc2ff; } .t-phys { color: #ff9f7a; } .t-true { color: #fff; }
.t-kw { color: var(--accent); font-weight: 600; }
.t-rules { color: var(--muted); font-size: .92em; }
.t-upg { color: #9fe0a8; } .t-radiant { color: #ffd77a; }
.t-row { display: inline-block; padding-left: 4px; }
.stats { min-width: 260px; }
.stats th, .stats td { text-align: left; padding: 5px 16px 5px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.stats th { color: var(--muted); }
.forms { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 12px; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }

/* cechy */
.bps { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.bp { min-width: 24px; text-align: center; font-size: .8rem; font-weight: 700; border-radius: 5px; padding: 1px 6px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.bp.s1 { border-color: var(--s1); } .bp.s3 { border-color: var(--s3); } .bp.s4, .bp.s6 { border-color: var(--s6); } .bp.s5 { border-color: var(--s5); }
.trait-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.trait-card { display: grid; grid-template-columns: 32px 1fr auto; gap: 4px 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; color: var(--text); }
.trait-card:hover { text-decoration: none; border-color: var(--muted); }
.tc-name { font-weight: 700; }
.tc-units { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.tc-units img { width: 28px; height: 28px; border-radius: 5px; border: 2px solid var(--cc); }
.traits-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tb { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 3px; border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: .82rem; --tc: #3a424d; }
.tb img { width: 22px; height: 24px; padding: 3px 3px; background: var(--tc); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); object-fit: contain; }
.tb.s1 { --tc: #8a5a45; } .tb.s3 { --tc: #7d8f9c; } .tb.s5 { --tc: #c99a2e; } .tb.s4, .tb.s6 { --tc: linear-gradient(135deg, #9fd8ff, #c5a8ff 50%, #ffb3e6); }
.tb.off { opacity: .55; }
.tb:hover { text-decoration: none; }

/* przedmioty */
.matrix-wrap { overflow-x: auto; margin: 0 -16px 8px; padding: 0 16px; }
.matrix { margin: 0 auto; }
.matrix th, .matrix td { padding: 3px; text-align: center; }
.matrix th img { width: 32px; height: 32px; border-radius: 6px; margin: auto; }
.matrix td img { width: 40px; height: 40px; border-radius: 6px; margin: auto; }
.matrix td a { display: block; border-radius: 8px; padding: 2px; }
.matrix td a:hover { background: var(--surface-2); }
.matrix tr:hover th, .matrix td:hover { background: var(--surface); }
.item-list { display: grid; gap: 8px; }
.item-row { display: grid; grid-template-columns: 40px 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; scroll-margin-top: 110px; }
.item-row:target { border-color: var(--accent); }
.item-row > img, .item-row > a img { width: 40px; height: 40px; border-radius: 7px; }
.item-row h3 { margin: 0 0 4px; }
.item-row h3 a { color: var(--text); }
.item-row .desc { margin: 0; font-size: .93rem; }
.item-row .desc + .desc { margin-top: 6px; }
.recipe { display: flex; align-items: center; gap: 4px; margin: 0 0 4px; color: var(--muted); }
.recipe img { width: 20px; height: 20px; border-radius: 4px; }
.item-list > .item-row:not(:has(> img, > a)) { grid-template-columns: 1fr; }

/* filtry */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.filters input, .b-search { flex: 1 1 220px; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 12px; font: inherit; }
.seg, .tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button, .tabs button { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.seg button[aria-pressed="true"], .tabs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }

/* kompozycje */
.tier { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; font-weight: 900; color: #111; background: var(--tX); flex: none; }
.tier.tS { background: var(--tS); } .tier.tA { background: var(--tA); } .tier.tB { background: var(--tB); } .tier.tC { background: var(--tC); }

/* plansza heksów */
.board { --w: var(--hex); --h: calc(var(--hex) * 1.1547); display: inline-flex; flex-direction: column; padding: 10px 10px calc(var(--h) * .25 + 10px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-width: 100%; }
.hex-row { display: flex; gap: 4px; margin-bottom: calc(var(--h) * -.25 + 4px); }
.hex-row.odd { margin-left: calc(var(--w) / 2 + 2px); }
.hex { position: relative; width: var(--w); height: var(--h); flex: none; }
.hex::before { content: ""; position: absolute; inset: 0; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--cc, var(--surface-2)); }
.hex > a, .hex > .b-unit { position: absolute; inset: 3px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: block; }
.hex img { width: 100%; height: 100%; object-fit: cover; }
.hex .stars { top: -3px; z-index: 1; }
.hex-items { position: absolute; bottom: -2px; z-index: 1; left: 0; right: 0; display: flex; justify-content: center; gap: 1px; }
.hex-items img { width: 15px; height: 15px; border-radius: 3px; border: 1px solid #000; }
@media (max-width: 560px) { :root { --hex: 40px; } .hex-items img { width: 11px; height: 11px; } }

/* kreator */
.builder { display: grid; gap: 20px; grid-template-columns: min-content minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .builder { grid-template-columns: minmax(0, 1fr); } .b-main { width: auto; } }
.b-board .hex { cursor: pointer; }
.b-board .hex.drop { outline: 2px solid var(--accent); }
.b-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.b-count { color: var(--muted); margin-right: auto; }
.b-main { min-width: 0; }
.b-side { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 10px; }
.b-pool .ch { cursor: pointer; background: none; border: 0; padding: 0; }
.b-items { display: grid; gap: 10px; }
.b-items h3 { margin: 6px 0 0; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.b-items .row { display: flex; flex-wrap: wrap; gap: 4px; }
.b-items button { background: none; border: 2px solid transparent; border-radius: 7px; padding: 1px; cursor: pointer; }
.b-items button img { width: 34px; height: 34px; border-radius: 5px; }
.b-items button[aria-pressed="true"] { border-color: var(--accent); }
.b-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 700; }

ul { padding-left: 1.2em; }
li { margin-bottom: .4em; }
section { scroll-margin-top: 110px; }
.noimg { display: inline-block; flex: none; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }

/* obrazki nigdy się nie rozciągają: przy zgnieceniu kontenera przycinamy, a nie deformujemy */
img { object-fit: cover; }
.ch-img, .ch-img img, .it img, .aug img, .tr img, .tb img, .item-row img { flex: none; }
.matrix img { max-width: none; }
@media (max-width: 560px) {
  .matrix th, .matrix td { padding: 1px; }
  .matrix th img { width: 24px; height: 24px; }
  .matrix td img { width: 28px; height: 28px; }
}

/* wyszukiwarka w nagłówku */
.s-btn { background: none; border: 1px solid var(--line); border-radius: 8px; width: 34px; height: 30px; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.s-btn:hover { color: var(--text); border-color: var(--muted); }
.s-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px #0008; }
.s-panel .wrap { padding-top: 12px; padding-bottom: 12px; }
.s-input { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 1rem; }
.s-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.s-res { max-height: min(70vh, 560px); overflow-y: auto; margin-top: 8px; }
.s-res h4 { margin: 10px 0 4px; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.s-res a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; color: var(--text); }
.s-res a:hover, .s-res a.on { background: var(--surface-2); text-decoration: none; }
.s-res img, .s-res .noimg { width: 32px; height: 32px; border-radius: 6px; flex: none; }
.s-res small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.s-res .tier { width: 32px; height: 32px; }
.s-empty { color: var(--muted); padding: 8px; }

/* kreator: przeciąganie i okno */
.b-board .hex:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.b-board .hex:not([class*=" c"]):hover::before { background: #2a313b; }
.b-board .hex.drop::before { background: var(--accent) !important; }
.b-board .hex.lifted { opacity: .35; }
.b-board .hex img, .b-pool img, .b-items img { -webkit-user-drag: none; user-select: none; }
.b-pool .ch { cursor: grab; }
body.b-dragging, body.b-dragging * { cursor: grabbing !important; user-select: none; }
.b-ghost { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; margin: -28px 0 0 -28px; filter: drop-shadow(0 6px 12px #000a); }
.b-ghost img { border-radius: 10px; border: 2px solid var(--accent); }
.b-dlg { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 16px; width: min(560px, calc(100vw - 32px)); max-height: min(80vh, 720px); overflow-y: auto; }
.b-dlg::backdrop { background: #000a; }
.b-dlg h3 { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 6px; }
.d-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.d-head h2 { margin: 0; font-size: 1.15rem; }
.d-x { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; width: 34px; height: 34px; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.d-search { width: 100%; margin-bottom: 8px; }
.d-cost { margin-bottom: 10px; }
.d-pool { max-height: none; }
.d-pool .ch { background: none; border: 0; padding: 0; cursor: pointer; }
.d-unit { display: flex; gap: 12px; align-items: center; }
.d-unit .ch-img img { width: 56px; height: 56px; }
.d-unit small { display: block; color: var(--muted); }
.d-slots { display: flex; gap: 8px; }
.d-slot { width: 48px; height: 48px; border-radius: 8px; border: 1px dashed var(--line); background: var(--bg); position: relative; display: grid; place-items: center; padding: 0; }
.d-slot.full { border: 1px solid var(--line); cursor: pointer; }
.d-slot img { border-radius: 6px; }
.d-rm { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; background: #c0392b; color: #fff; font-size: 14px; line-height: 20px; text-align: center; }
.d-items { max-height: 40vh; overflow-y: auto; }
.d-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.d-del { background: #c0392b; color: #fff; }
@media (max-width: 900px) {
  /* na telefonie wszystko przez okno: boczna lista znika, okno wysuwa się od dołu */
  .b-side { display: none; }
  .b-dlg { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 16px 16px 0 0; max-height: 85vh; border-bottom: 0; }
  .b-board .hex:not([class*=" c"])::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; color: #4a5361; font-size: 1.2rem; }
}
@media (max-width: 560px) { .d-pool { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.brand { white-space: nowrap; }
@media (max-width: 560px) { .setlabel { display: none; } }
.prio { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; counter-reset: prio; }
.prio li { margin: 0; display: flex; align-items: center; gap: 6px; counter-increment: prio; }
.prio li::before { content: counter(prio); color: var(--muted); font-weight: 700; font-size: .85rem; min-width: 1ch; }


/* ===== typografia i drobne elementy ===== */
.brand, .tier, .pill, .tab span, .stg, .lvl, .tb b, .node, .kicker, .btn, .seg button, .tabs button { font-family: var(--display); }
.brand { font-size: 1.2rem; letter-spacing: .02em; }
.btn { font-weight: 700; font-size: 1.02rem; letter-spacing: .01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kicker { color: var(--accent); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; margin: 0 0 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #ffffff12; border: 1px solid #ffffff1f; font-size: .92rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.pill.strong { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 7px; height: 7px; border-radius: 50%; background: #ffffff33; }
.pips i.on { background: var(--accent); }
.stg { display: inline-block; padding: 0 6px; border-radius: 5px; background: #e2b04a26; color: var(--accent); font-weight: 700; font-size: .95em; line-height: 1.45; white-space: nowrap; }
.lvl { color: #fff; font-weight: 700; white-space: nowrap; }
.ref { display: inline; color: var(--text); font-weight: 600; text-decoration: none; border-bottom: 1px dotted #ffffff40; white-space: nowrap; }
.ref img { display: inline-block; width: 20px; height: 20px; border-radius: 4px; vertical-align: -4px; margin-right: 4px; }
.ref.rc img { box-shadow: 0 0 0 1.5px var(--cc); }
.ref.rt img { background: #ffffff14; padding: 2px; }
.ref:hover { color: var(--accent); text-decoration: none; }
.tier.big { width: 52px; height: 52px; font-size: 1.7rem; border-radius: 12px; box-shadow: 0 4px 14px #0007; }
.tier { font-family: var(--display); font-size: 1.1rem; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 1.6em; }
.sec-head h2 { margin: 0 0 .5em; }
.sec-head a { font-size: .95rem; white-space: nowrap; }

/* ===== hero ze splash artem (strona główna i build) ===== */
.comp-hero, .home-hero { position: relative; margin: -24px -16px 0; padding: 22px 16px 20px; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #161b22, var(--bg)); }
.hero-art { position: absolute; inset: 0 0 0 auto; width: min(78%, 620px); z-index: -1; background: var(--art) center 20% / cover no-repeat; opacity: .55;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 55%), linear-gradient(0deg, transparent 0, #000 45%); mask-image: linear-gradient(90deg, transparent 0, #000 55%), linear-gradient(0deg, transparent 0, #000 45%);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.hero-in { position: relative; max-width: 720px; }
.crumbs { margin: 0 0 10px; font-size: .9rem; color: var(--muted); display: flex; gap: 6px; }
.hero-title { display: flex; gap: 14px; align-items: center; }
.hero-title h1 { margin: 0; font-size: clamp(1.7rem, 6.4vw, 2.6rem); text-shadow: 0 2px 12px #000c; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.hero-sum { margin: 12px 0 0; font-size: 1.05rem; color: #dfe3e8; text-shadow: 0 1px 8px #000; max-width: 60ch; }
.hero-carries { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 16px; }
.hc { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hc .ch-img { border-width: 3px; border-radius: 12px; box-shadow: 0 6px 18px #000a; }
.hc .ch-img img { width: 64px; height: 64px; }
.hc-items { display: flex; gap: 2px; }
.hc-items img { width: 22px; height: 22px; border-radius: 4px; border: 1px solid #000; }
.hero-btn { margin-left: auto; align-self: center; }
.home-hero { padding-top: 28px; padding-bottom: 26px; }
.home-hero h1 { font-size: clamp(1.8rem, 7vw, 2.8rem); max-width: 16ch; text-shadow: 0 2px 12px #000c; }
.home-hero .lead { text-shadow: 0 1px 8px #000; max-width: 52ch; }
@media (min-width: 720px) { .comp-hero, .home-hero { margin: -24px 0 0; border-radius: 0 0 18px 18px; padding: 30px 28px 26px; border: 1px solid var(--line); border-top: 0; } }

/* ===== kafle narzędzi ===== */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0 6px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text); min-height: 100%; }
.tile svg { color: var(--accent); width: 26px; height: 26px; }
.tile b { font-family: var(--display); font-size: 1.05rem; line-height: 1.15; }
.tile span { color: var(--muted); font-size: .82rem; line-height: 1.3; }
.tile:hover { border-color: var(--accent); text-decoration: none; }
@media (max-width: 480px) { .tile span { display: none; } .tile { align-items: center; text-align: center; padding: 12px 6px; } }

/* ===== karta kompozycji ===== */
.tier-group h2 { display: flex; align-items: center; gap: 10px; }
.comp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; transition: border-color .15s, transform .15s; }
.comp-card:hover { border-color: #3a4350; }
.comp-card:active { transform: scale(.995); }
.cc-link { display: block; padding: 12px; color: var(--text); }
.cc-link:hover { text-decoration: none; }
.cc-link:hover h3 { color: var(--accent); }
.cc-top { display: flex; gap: 10px; align-items: center; }
.cc-title { min-width: 0; }
.cc-title h3 { margin: 0 0 4px; font-size: 1.2rem; transition: color .15s; }
.cc-meta { display: flex; align-items: center; gap: 8px; }
.cc-meta .pill { font-size: .82rem; padding: 1px 8px; }
.cc-board { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 8px; }
.cc-carries { display: flex; gap: 8px; flex: none; }
.cc-carry { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cc-carry .ch-img { border-width: 2px; border-radius: 10px; }
.cc-carry .ch-img img { width: 56px; height: 56px; }
.cc-items { display: flex; gap: 1px; }
.cc-items img { width: 18px; height: 18px; border-radius: 3px; }
.cc-rest { display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; padding-top: 2px; }
.cc-u img { width: 34px; height: 34px; border-radius: 7px; border: 2px solid var(--cc); }
.cc-sum { color: #c3c9d0; font-size: .93rem; margin: 0 0 8px; max-width: 90ch; }
.cc-traits { display: flex; flex-wrap: wrap; gap: 4px; }
.cc-traits .tb { font-size: .8rem; }

/* ===== strona buildu ===== */
.toc { position: sticky; top: var(--sticky-top, 98px); z-index: 4; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px 16px; margin: 0 -16px 4px; background: #0f1216ee; backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.toc a { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: .9rem; white-space: nowrap; }
.toc a:hover, .toc a:focus-visible { border-color: var(--accent); text-decoration: none; }
.comp-grid { display: grid; gap: 0 24px; }
@media (min-width: 1000px) { .comp-grid { grid-template-columns: auto minmax(0, 1fr); align-items: start; } .toc { margin: 0 0 4px; border-radius: 0 0 12px 12px; } }
.board { width: 100%; max-width: calc(var(--hex) * 7.5 + 46px); }
@media (max-width: 560px) { :root { --hex: calc((100vw - 32px - 22px - 24px) / 7.5); } .hex-items img { width: 12px; height: 12px; } }
.carry-card { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.cc-port { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text); text-align: center; font-size: .85rem; line-height: 1.15; }
.cc-port .ch-img { border-width: 3px; border-radius: 12px; }
.cc-port .ch-img img { width: 64px; height: 64px; }
.cc-port:hover { text-decoration: none; color: var(--accent); }
.bis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bis a { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: var(--text); font-size: .78rem; line-height: 1.2; }
.bis img { width: 44px; height: 44px; border-radius: 8px; border: 1px solid #000; box-shadow: 0 2px 6px #0006; }
.bis a:hover { color: var(--accent); text-decoration: none; }
.prio { gap: 10px; }
.prio img { width: 36px; height: 36px; border-radius: 7px; }
.traits-row .tb.uq { padding: 2px 4px; }
.prose p { max-width: 70ch; font-size: 1.02rem; line-height: 1.7; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: linear-gradient(var(--accent), #e2b04a33); }
.timeline li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; margin: 0 0 14px; }
.timeline .node { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 1.1rem; position: relative; }
.timeline h3 { margin: 6px 0 4px; font-size: 1.05rem; }
.timeline p { margin: 0; line-height: 1.65; max-width: 68ch; }
.aug-list { display: flex; flex-wrap: wrap; gap: 8px; }
.aug { border-radius: 10px; padding: 4px 12px 4px 4px; }
.aug img { width: 32px; height: 32px; border-radius: 7px; }
.aug.at1 img { box-shadow: 0 0 0 2px #b9c3cc; } .aug.at2 img { box-shadow: 0 0 0 2px #e5b84a; } .aug.at3 img { box-shadow: 0 0 0 2px #c5a8ff; }
.tips { list-style: none; padding: 0; display: grid; gap: 8px; }
.tips li { margin: 0; padding: 12px 14px 12px 40px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; line-height: 1.6; }
.tips li::before { content: ""; position: absolute; left: 14px; top: 17px; width: 12px; height: 14px; background: var(--accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.comp-foot { margin-top: 28px; font-size: .88rem; }
.comp section { scroll-margin-top: 150px; }

/* ===== filtry: jeden przewijany rząd ===== */
.seg.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg.scroll button { flex: none; }
.filters { flex-direction: column; gap: 8px; }
@media (max-width: 600px) { .hide-m { display: none; } }

/* ===== dolny pasek (telefon) ===== */
.tabbar { display: none; }
@media (max-width: 760px) {
  :root { --tabbar: calc(62px + env(safe-area-inset-bottom)); --sticky-top: 52px; }
  .nav { display: none; }
  body { padding-bottom: var(--tabbar); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: var(--tabbar); padding-bottom: env(safe-area-inset-bottom);
    background: #12161bf2; backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .72rem; text-decoration: none; position: relative; }
  .tab > summary { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 100%; list-style: none; cursor: pointer; }
  .tab > summary::-webkit-details-marker { display: none; }
  .tab[aria-current], .tab > summary[aria-current], .more[open] > summary { color: var(--accent); }
  .tab[aria-current]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .tab:hover { text-decoration: none; color: var(--text); }
  .more-panel { position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabbar) + 8px); display: grid; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 -8px 30px #000b; }
  .more-panel a { padding: 12px 14px; border-radius: 10px; color: var(--text); font-size: 1rem; }
  .more-panel a[aria-current] { color: var(--accent); }
  .more-panel a:hover { background: var(--surface-2); text-decoration: none; }
  .more-lang { padding: 10px 14px 4px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); margin-top: 4px; }
  .more-lang a, .more-lang b { display: inline-block; padding: 8px 12px; margin: -4px 0; border-radius: 8px; }
  .more-lang a { background: var(--surface-2); }
  .b-toast { bottom: calc(var(--tabbar) + 16px); }
  .hero-btn { margin-left: 0; width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
html { scroll-behavior: smooth; }
.filters input { flex: none; width: 100%; }
.aug .noimg, .item-row .noimg { background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 20 7.5v9L12 21l-8-4.5v-9z' fill='none' stroke='%23e2b04a' stroke-width='1.6'/%3E%3C/svg%3E") center / 60% no-repeat; }
.ch-hero .hero-title .ch-img { border-width: 3px; border-radius: 14px; box-shadow: 0 6px 18px #000a; }
.ch-hero .hero-title .ch-img img { width: 72px; height: 72px; }
.pill.cost { border-color: var(--cc); color: var(--cc); background: #00000055; }
.ch-hero + .ability { margin-top: 18px; }
.intro { margin-top: 14px; } .trait-info { margin-bottom: 14px; } .trait-info h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--text); border-color: var(--muted); }
.lang-menu > div { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: grid; min-width: 150px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 24px #000a; }
.lang-menu a, .lang-menu b { padding: 10px 12px; border-radius: 8px; color: var(--text); font-size: .95rem; }
.lang-menu b { color: var(--accent); }
.lang-menu a:hover { background: var(--line); color: var(--accent); text-decoration: none; }
.langs { align-items: center; }

/* baner zgody (tylko UE/EOG, gdy włączony GA bez CMP Google) */
.ccb { position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabbar) + 8px); z-index: 25; max-width: 720px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 -8px 30px #000b; }
.ccb p { margin: 0; flex: 1 1 260px; font-size: .92rem; }
.ccb-b { display: flex; gap: 8px; margin-left: auto; }
