:root {
  --bg: #0b0d14;
  --panel: #141824;
  --panel-2: #1c2131;
  --line: #262c40;
  --text: #ecedf4;
  --muted: #959cb3;
  --accent: #5ee0d0;
  --accent-2: #b48cff;
  --gold: #c8aa6e;
  --radius: 14px;
  --head: "Cinzel", Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(900px 500px at 85% -120px, rgba(180,140,255,.16), transparent 70%),
    radial-gradient(800px 500px at 0% 0%, rgba(94,224,208,.10), transparent 70%),
    repeating-linear-gradient(60deg, rgba(255,255,255,.012) 0 1px, transparent 1px 28px),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, .hero h1, .detail-head h1 { font-family: var(--head); letter-spacing: .3px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--panel-2); padding: 1px 6px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #000; padding: 8px 12px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 12px 28px; border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 20, .82); backdrop-filter: blur(10px) saturate(1.2);
  position: sticky; top: 0; z-index: 20;
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .45; }
.logo { font-family: var(--head); font-size: 1.35rem; color: var(--text); letter-spacing: .6px; }
.logo b { color: var(--accent); }
.logo-mark { color: var(--accent-2); text-shadow: 0 0 12px rgba(180,140,255,.7); }
.logo:hover { text-decoration: none; }
nav { display: flex; gap: 6px; flex-wrap: wrap; }
nav a { color: var(--muted); font-weight: 500; padding: 6px 11px; border-radius: 8px; font-size: .93rem; }
nav a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
nav a.active { color: var(--text); background: linear-gradient(180deg, rgba(94,224,208,.14), rgba(94,224,208,.04)); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-toggle { display: none; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; font-size: 1.2rem; padding: 4px 10px; cursor: pointer; }

.sample-banner {
  background: #3a2c08; color: #ffd98a; text-align: center; padding: 8px 16px; font-size: .9rem;
  border-bottom: 1px solid #5a4510;
}
.sample-banner code { background: #57420e; }

main { max-width: 1180px; margin: 0 auto; padding: 28px; min-height: 70vh; }

.hero { text-align: center; padding: 24px 0 8px; }
.hero h1 { font-size: 2.3rem; margin: 0 0 6px; }
.hero h1 span { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); margin: 0 auto; max-width: 620px; }
.stats { display: flex; gap: 28px; justify-content: center; margin: 18px 0 6px; color: var(--muted); font-size: .9rem; }
.stats b { color: var(--text); font-size: 1.2rem; display: block; }

.filters {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 10px; margin: 24px 0 12px;
}
.filters input, .filters select, .form input, .form select, .form textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font: inherit;
}
.filters input:focus, .filters select:focus, .form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.domain-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  padding: 5px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .85rem;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.chip.on { color: var(--text); border-color: var(--text); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.combo-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; cursor: pointer; transition: transform .12s, border-color .12s;
  display: flex; flex-direction: column; gap: 10px; color: var(--text);
}
.combo-card:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }
.combo-card h3 { margin: 0; font-size: 1.1rem; }
.combo-card .result { color: var(--muted); font-size: .9rem; margin: 0; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .8rem; }
.badge { padding: 2px 9px; border-radius: 6px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.badge.type { color: var(--accent-2); border-color: #4a3b72; }
.badge.energy { color: var(--accent); border-color: #245e57; }
.pieces { display: flex; flex-wrap: wrap; gap: 6px; }
.piece {
  font-size: .8rem; padding: 3px 9px; border-radius: 6px; background: var(--panel-2);
  border-left: 3px solid var(--c, #888);
}
.empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* Detail page */
.back { display: inline-block; margin-bottom: 16px; color: var(--muted); }
.detail-head h1 { margin: 0 0 8px; font-size: 2rem; }
.detail-head .result { color: var(--muted); font-size: 1.05rem; margin: 6px 0 0; }
.detail-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-top: 24px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel h2 { margin: 0 0 12px; font-size: 1.05rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }
.panel + .panel { margin-top: 20px; }
.steps { margin: 0; padding-left: 0; counter-reset: s; list-style: none; }
.steps li { counter-increment: s; position: relative; padding: 8px 0 8px 40px; border-bottom: 1px dashed var(--line); }
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 7px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--accent); color: var(--accent);
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}
.ruling { border-left: 3px solid var(--accent-2); padding-left: 14px; margin: 0; }
.ruling-src { color: var(--muted); font-size: .8rem; margin-top: 8px; }
.card-tile {
  display: flex; gap: 12px; padding: 12px; border-radius: 10px; background: var(--panel-2);
  border-left: 4px solid var(--c, #888); margin-bottom: 10px;
}
.card-tile .cost {
  flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 2px solid var(--c, #888); font-weight: 700;
}
.card-tile .name { font-weight: 600; }
.card-tile .sub { color: var(--muted); font-size: .8rem; }
.card-tile .text { font-size: .85rem; margin-top: 4px; }
.video { position: relative; padding-top: 56.25%; border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 20px; }
table.price { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.price td { padding: 6px 0; border-bottom: 1px dashed var(--line); }
table.price td:last-child { text-align: right; }
table.price tr.total td { font-weight: 700; border-bottom: none; color: var(--accent); }
.swap { font-size: .85rem; color: var(--muted); margin-top: 10px; }
.swap b { color: var(--text); }
.related { margin-top: 28px; }

/* Finder */
.finder-layout { display: grid; grid-template-columns: 340px 1fr; gap: 20px; margin-top: 20px; }
.card-check { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.card-check:hover { background: var(--panel-2); }
.card-check input { accent-color: var(--accent); }
.card-check .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.card-list { max-height: 520px; overflow: auto; }
.missing { color: #ff8b8b; font-size: .8rem; }
.complete { color: var(--accent); font-size: .8rem; font-weight: 600; }

/* Form */
.form { display: grid; gap: 14px; max-width: 760px; }
.form label { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.form .row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form textarea { min-height: 90px; resize: vertical; }
.btn {
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #0d0f17; border: none;
  padding: 11px 18px; border-radius: 8px; font-weight: 700; cursor: pointer; font: inherit; font-weight: 700;
}
.btn.ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
pre.output { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; overflow: auto; font-size: .8rem; max-height: 360px; }

.prose { max-width: 760px; }
.prose h1 { margin-top: 0; }
.prose li { margin-bottom: 6px; }

.footer { color: var(--muted); font-size: .88rem; padding: 36px 28px 24px; border-top: 1px solid var(--line); margin-top: 56px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.35)); }
.footer-cols { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.footer-cols h4 { color: var(--text); margin: 4px 0 10px; font-size: .8rem; text-transform: uppercase; letter-spacing: 1.2px; }
.footer-cols a:not(.btn):not(.logo) { display: block; color: var(--muted); padding: 3px 0; }
.footer-cols a:not(.btn):not(.logo):hover { color: var(--text); }
.footer-cols p { max-width: 340px; }
.footer .legal { max-width: 1180px; margin: 28px auto 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .76rem; text-align: center; }

/* Real-data additions */
.badge.banned { color: #ff8b8b; border-color: #6b2a2a; background: #2a1416; }
.badge.st-community { color: #7cc4ff; border-color: #24496b; }
.badge.st-analysis { color: #ffcf7a; border-color: #5e4a1e; }
.badge.st-tested { color: var(--accent); border-color: #245e57; }
.legend-line { font-size: .8rem; color: var(--muted); }
.legend-line b { color: var(--text); font-weight: 600; }
.piece.is-banned { text-decoration: line-through; opacity: .75; }
.toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; margin-left: auto; cursor: pointer; }
.alert { background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--accent-2); padding: 12px 16px; border-radius: 8px; margin-top: 16px; }
.banned-alert { border-left-color: #e5484d; background: #241417; }
.sym { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 50%; font-size: .72rem; font-weight: 700; vertical-align: -3px; margin: 0 1px; }
.sym.energy { background: #d9dbe6; color: #0d0f17; }
.sym.might { color: #ffb86b; }
.sym.exhaust { color: #9fd3ff; }
.sym.rune { color: var(--c); font-size: .9rem; }
.kw { color: var(--accent-2); font-weight: 600; }
a.card-tile { color: var(--text); }
a.card-tile:hover { text-decoration: none; background: #252b3e; }
.card-tile img { width: 64px; height: 89px; object-fit: cover; border-radius: 6px; flex: none; }
.card-tile .noimg { width: 64px; height: 89px; border-radius: 6px; background: var(--bg); border: 2px solid var(--c); display: grid; place-items: center; font-weight: 700; flex: none; }
.count { color: var(--muted); font-size: .85rem; margin: -4px 0 12px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.db-card { position: relative; display: block; border-radius: 10px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: transform .12s; aspect-ratio: 744 / 1039; }
.db-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.db-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.db-card img.landscape { object-fit: contain; background: #0b0d14; }
.card-tile img[src] { background: var(--bg); }
.noimg.big { height: 100%; display: grid; place-items: center; padding: 10px; text-align: center; color: var(--text); }
.combo-count, .ban-flag { position: absolute; left: 6px; bottom: 6px; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(13,15,23,.85); color: var(--accent); }
.ban-flag { left: auto; right: 6px; top: 6px; bottom: auto; color: #ff8b8b; }
.card-detail { display: grid; grid-template-columns: 340px 1fr; gap: 28px; }
.card-detail h1 { margin-top: 0; }
.card-img { width: 100%; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.card-text { font-size: 1.05rem; margin-top: 0; }
.muted { color: var(--muted); }
.side-search { width: 100%; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); margin-bottom: 10px; font: inherit; }
.picker { display: flex; gap: 8px; }
.picker input { flex: 1; }
.rm { color: var(--muted); margin-left: 4px; }

/* ---------- League of Legends art ---------- */
.hero.has-art { position: relative; overflow: hidden; border-radius: 18px; padding: 56px 20px 30px; margin-bottom: 18px; border: 1px solid var(--line); isolation: isolate; }
.hero-art { position: absolute; inset: 0; display: flex; z-index: -2; }
.hero-slice { flex: 1; background-size: cover; background-position: center 20%; opacity: 0; animation: slice-in .8s ease forwards; transform: skewX(-8deg) scale(1.15); filter: saturate(1.1); }
.hero-slice + .hero-slice { border-left: 2px solid rgba(13,15,23,.9); }
@keyframes slice-in { to { opacity: .85; } }
.hero.has-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(13,15,23,.72) 0%, rgba(13,15,23,.45) 70%), linear-gradient(180deg, transparent 55%, rgba(13,15,23,.9)); }
.hero.has-art h1 { font-size: 2.7rem; text-shadow: 0 4px 24px rgba(0,0,0,.6); }
.hero.has-art p { color: #c6cbe0; }

.combo-card { padding-top: 0; overflow: hidden; }
.combo-art { position: relative; height: 112px; margin: 0 -18px 4px; background: var(--art) center 22% / cover no-repeat, var(--panel-2); }
.combo-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, var(--panel)); }
.combo-card:hover .combo-art { filter: brightness(1.12); }
.save-btn { position: absolute; z-index: 1; top: 10px; right: 10px; font: inherit; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; cursor: pointer; background: rgba(13,15,23,.78); color: var(--text); border: 1px solid var(--line); backdrop-filter: blur(4px); }
.save-btn.on { color: #ffd76a; border-color: #6b5a24; }
.art-head .save-btn, .saved-row .save-btn { position: static; }

.art-head { position: relative; padding: 70px 26px 24px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); isolation: isolate; }
.art-head::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--art) center 20% / cover no-repeat, var(--panel); }
.art-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(13,15,23,.95) 0%, rgba(13,15,23,.7) 55%, rgba(13,15,23,.35)), linear-gradient(0deg, rgba(13,15,23,.6), transparent 60%); }
.art-actions { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; align-items: center; }
.btn.small { padding: 5px 11px; font-size: .8rem; border-radius: 7px; }
.btn.danger { color: #ff8b8b; }
.card-backdrop { position: fixed; inset: 0; z-index: -1; background-size: cover; background-position: center 20%; opacity: .14; filter: blur(2px); mask-image: linear-gradient(180deg, #000 0%, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); pointer-events: none; }

/* ---------- My decks ---------- */
.decks-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 10px; }
.row-head { display: flex; justify-content: space-between; align-items: center; }
.deck-list, .saved-list { display: flex; flex-direction: column; gap: 10px; }
.deck-row { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); color: var(--text); isolation: isolate; }
.deck-row::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--art) center 20% / cover no-repeat, var(--panel); }
.deck-row::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(13,15,23,.95) 30%, rgba(13,15,23,.5)); }
.deck-row:hover { border-color: var(--accent); text-decoration: none; }
.score-pill { font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(13,15,23,.8); color: var(--accent); border: 1px solid #245e57; white-space: nowrap; }
.saved-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.saved-row span { display: flex; gap: 6px; align-items: center; }
.deck-name { font: inherit; font-size: 1.9rem; font-weight: 700; background: transparent; border: 1px solid transparent; color: var(--text); border-radius: 8px; padding: 2px 6px; margin-left: -7px; width: min(100%, 640px); }
.deck-name:hover, .deck-name:focus { border-color: var(--line); background: rgba(13,15,23,.5); outline: none; }
.filters.tight { margin: 0 0 12px; grid-template-columns: 2fr 1fr auto; }
.add-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 520px; overflow: auto; padding-right: 4px; }
.add-card { position: relative; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px; cursor: pointer; color: var(--text); font: inherit; font-size: .7rem; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.add-card:hover { border-color: var(--accent); }
.add-card img { width: 100%; aspect-ratio: 744 / 1039; object-fit: cover; border-radius: 5px; }
.add-card img.landscape { object-fit: contain; background: var(--bg); }
.add-card .noimg.big { aspect-ratio: 744 / 1039; }
.add-card i { position: absolute; top: 8px; right: 8px; font-style: normal; font-weight: 700; background: rgba(13,15,23,.85); color: var(--accent); padding: 1px 6px; border-radius: 6px; }
.grp { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 14px 0 6px; }
.grp:first-child { margin-top: 0; }
.deck-line { display: grid; grid-template-columns: auto 26px 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; border-left: 3px solid var(--c); background: var(--panel-2); border-radius: 6px; margin-bottom: 5px; font-size: .9rem; }
.deck-line.is-banned a { text-decoration: line-through; color: #ff8b8b; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; line-height: 1; }
.qty b { min-width: 10px; text-align: center; }
.cost-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; border: 2px solid var(--c); background: var(--bg); }
.partners { font-size: .75rem; color: var(--accent); cursor: help; white-space: nowrap; }
.score-ring { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.score-ring b { flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem;
  background: radial-gradient(closest-side, var(--panel) 78%, transparent 80% 100%), conic-gradient(var(--accent) calc(var(--p) * 1%), var(--panel-2) 0); }
.score-ring span { color: var(--muted); font-size: .85rem; }
.theme { padding: 9px 0; border-top: 1px dashed var(--line); }
.small { font-size: .78rem; }
.checks { list-style: none; padding: 0; margin: 0 0 8px; }
.checks li { padding: 5px 0; font-size: .88rem; }
.checks li.ok { color: var(--accent); }
.checks li.warn { color: #ffcf7a; }
.curve { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; height: 120px; align-items: end; }
.curve div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; font-size: .72rem; }
.curve span { width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.curve i { color: var(--muted); font-style: normal; }

/* ---------- Home: hero, sections ---------- */
.eyebrow { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.hero.has-art { padding: 70px 24px 34px; border-color: rgba(200,170,110,.35); box-shadow: 0 20px 60px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.03); }
.hero.has-art h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.1; margin-bottom: 12px; }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 22px 0 8px; }
.hero-cta .btn { padding: 12px 22px; }
.yt-dot { color: #ff4e45; margin-right: 4px; }
.stats { gap: 34px; margin-top: 22px; }
.stats b { font-family: var(--head); font-size: 1.55rem; color: var(--text); }
.btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; transition: transform .12s, filter .12s; box-shadow: 0 6px 20px rgba(94,224,208,.18); }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn.ghost { box-shadow: none; }
.home-section { margin-top: 44px; scroll-margin-top: 80px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2, .related h2 { margin: 0; font-size: 1.45rem; }
.section-head h2::after, .related h2::after { content: ""; display: block; width: 46px; height: 2px; margin-top: 8px; background: linear-gradient(90deg, var(--gold), transparent); }
.section-head a { font-weight: 600; font-size: .9rem; }

.legend-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.legend-pick { flex: none; position: relative; min-width: 96px; height: 54px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; overflow: hidden; color: var(--text); font: inherit; font-size: .8rem; font-weight: 700; background: var(--art, none) center 22% / cover no-repeat, var(--panel); padding: 0 12px; isolation: isolate; transition: transform .12s, border-color .12s; }
.legend-pick::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(11,13,20,.92), rgba(11,13,20,.35)); }
.legend-pick span { position: relative; text-shadow: 0 1px 6px #000; }
.legend-pick:hover { transform: translateY(-2px); border-color: var(--muted); }
.legend-pick.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 6px 18px rgba(94,224,208,.25); }

/* ---------- Combo cards polish ---------- */
.combo-card { position: relative; background: linear-gradient(180deg, var(--panel), #11141e); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.combo-card:hover { box-shadow: 0 16px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(94,224,208,.4); }
.has-video { position: absolute; top: 10px; left: 10px; z-index: 1; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255,78,69,.9); color: #fff; }
.badge.st-video { color: #ff8f88; border-color: #6b2a2a; background: #241215; }

/* ---------- Videos ---------- */
.video-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.video-card { display: flex; flex-direction: column; gap: 6px; color: var(--text); text-decoration: none !important; }
.video-card .thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; background: var(--panel-2) center / cover no-repeat; border: 1px solid var(--line); overflow: hidden; transition: transform .15s, border-color .15s; }
.video-card:hover .thumb { transform: translateY(-2px); border-color: var(--accent); }
.video-card .play { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,0,0,.85); color: #fff; font-size: 1rem; opacity: .9; box-shadow: 0 4px 16px rgba(0,0,0,.5); }
.video-card .vtype { position: absolute; left: 8px; bottom: 8px; font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(11,13,20,.85); color: var(--gold); text-transform: uppercase; letter-spacing: .6px; }
.video-card .vtitle { font-weight: 600; font-size: .9rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lite-yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; cursor: pointer; background: #000 center / cover no-repeat; }
.lite-yt .play { position: absolute; inset: 0; margin: auto; width: 68px; height: 48px; border-radius: 12px; background: rgba(255,0,0,.9); color: #fff; display: grid; place-items: center; font-size: 1.3rem; transition: transform .12s; }
.lite-yt:hover .play { transform: scale(1.08); }
.video.is-short { padding-top: 0; aspect-ratio: 9 / 16; max-width: 340px; margin: 0 auto; }
.filters.tight-3 { grid-template-columns: 1fr 1fr auto; }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.news-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none !important; transition: transform .12s, border-color .12s; }
.news-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.news-art { height: 120px; background: var(--art) center 22% / cover no-repeat, var(--panel-2); position: relative; }
.news-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, var(--panel)); }
.news-body { padding: 4px 18px 18px; }
.news-body time { font-size: .75rem; color: var(--gold); font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.news-body h3 { margin: 4px 0 6px; font-size: 1.05rem; line-height: 1.3; }
.news-body p { margin: 0; color: var(--muted); font-size: .9rem; }
.article { max-width: 820px; }
.article-body { margin-top: 22px; font-size: 1.05rem; }
.article-body p { margin: 0 0 16px; }
.article-body .source { color: var(--muted); font-size: .92rem; border-top: 1px solid var(--line); padding-top: 14px; }
.related { margin-top: 36px; }
.related h2 { margin-bottom: 16px; }

/* ---------- Card hover preview ---------- */
.card-preview { position: fixed; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .12s; filter: drop-shadow(0 16px 30px rgba(0,0,0,.6)); }
.card-preview.on { opacity: 1; }
.card-preview img { width: 100%; border-radius: 12px; display: block; }
[data-card] { cursor: help; }

/* ---------- Accounts ---------- */
.auth-slot { display: flex; align-items: center; gap: 8px; min-height: 34px; }
.auth-wait { width: 30px; height: 30px; border-radius: 50%; background: var(--panel-2); }
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: .88rem; }
.user-chip:hover { border-color: var(--accent); text-decoration: none; }
.user-chip img, .avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.avatar { display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0b0d14; font-weight: 800; }
.avatar.big, .acct-head img { width: 64px; height: 64px; font-size: 1.6rem; border-radius: 50%; }
.auth-card { max-width: 440px; margin: 24px auto; background: linear-gradient(180deg, var(--panel), #11141e); border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.auth-card.wide { max-width: 680px; }
.auth-card h1 { margin: 0 0 6px; font-size: 1.7rem; }
.auth-card .form { display: flex; flex-direction: column; gap: 12px; max-width: none; }
.auth-card .form label { display: flex; flex-direction: column; gap: 5px; font-size: .9rem; font-weight: 500; }
.auth-card .form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.auth-card .form label.check input { width: auto; }
.google-btn { width: 100%; justify-content: center; background: #fff; color: #1f1f1f; box-shadow: none; margin-top: 14px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 18px 0 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: .88rem; text-align: left; }
.linkish:hover { text-decoration: underline; }
.auth-err { color: #ff8b8b; font-size: .9rem; margin-top: 10px; min-height: 1px; }
.auth-ok { color: var(--accent); font-size: .9rem; margin-top: 10px; }
.auth-foot { text-align: center; color: var(--muted); margin: 16px 0 0; font-size: .9rem; }
.acct-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.acct-head p { margin: 0; }
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 14px; }
.acct-stats a { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; color: var(--muted); font-size: .82rem; text-align: center; }
.acct-stats a:hover { border-color: var(--accent); text-decoration: none; }
.acct-stats b { display: block; font-family: var(--head); font-size: 1.6rem; color: var(--text); }
.acct-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.danger-zone { border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); font-size: .9rem; }
.danger-zone summary { cursor: pointer; color: #ff8b8b; }
.sync-note { background: rgba(200,170,110,.08); border: 1px solid rgba(200,170,110,.3); border-radius: 10px; padding: 10px 14px; font-size: .92rem; }
.sync-note.ok { background: rgba(94,224,208,.07); border-color: rgba(94,224,208,.3); }
.row-btns { display: flex; gap: 8px; }

/* ---------- Dialog (import / export) ---------- */
.rc-dialog { width: min(620px, 94vw); background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.rc-dialog::backdrop { background: rgba(5,6,10,.7); backdrop-filter: blur(3px); }
.rc-dialog h2 { margin: 0 0 12px; font-size: 1.3rem; }
.dlg-x { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.dlg-label { display: flex; flex-direction: column; gap: 5px; font-size: .88rem; margin-bottom: 10px; }
.dlg-label select, .dlg-text { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; }
.dlg-text { min-height: 220px; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; resize: vertical; }
.dlg-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: .88rem; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Pre-rendered (SEO) lists, shown until the app loads ---------- */
.seo-list { padding-left: 18px; }
.seo-list li { margin: 6px 0; }
.seo-cols { columns: 4 200px; padding-left: 18px; }

@media (max-width: 820px) {
  .topbar { padding: 10px 16px; }
  .nav-toggle { display: block; }
  .topbar nav { display: none; width: 100%; flex-direction: column; order: 3; }
  .auth-slot { margin-left: auto; }
  .acct-stats { grid-template-columns: 1fr; }
  body.nav-open .topbar nav { display: flex; }
  .footer-cols { grid-template-columns: 1fr; }
  .filters.tight-3 { grid-template-columns: 1fr 1fr; }
  .stats { gap: 18px; flex-wrap: wrap; }
  .decks-layout { grid-template-columns: 1fr; }
  .art-actions { position: static; margin-bottom: 10px; flex-wrap: wrap; }
  .art-head { padding-top: 20px; }
  .hero.has-art h1 { font-size: 2rem; }
  .card-detail { grid-template-columns: 1fr; }
  .card-detail .card-img { max-width: 320px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters input { grid-column: 1 / -1; }
  .detail-layout, .finder-layout { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  main { padding: 18px; }
}

@media (max-width: 1000px) {
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .nav-toggle { display: block; order: 2; }
  .auth-slot { margin-left: auto; order: 1; }
  .logo { order: 0; }
  .topbar nav { display: none; width: 100%; flex-direction: column; order: 3; }
  body.nav-open .topbar nav { display: flex; }
}
