/* ============================================================
   Owl's Vault gaming pages — SHARED STRUCTURE
   ------------------------------------------------------------
   The duplicated-across-pages blocks (reset, header, topnav,
   game rows, progress bars, tier glyphs). Requires tokens.css.
   Load order on every gaming page (tokens and gaming share one N, v=4 since 2026-10-18):
     <link rel="stylesheet" href="assets/tokens.css?v=N">
     <link rel="stylesheet" href="assets/gaming.css?v=N">
     <style> ...page-specific rules (win by source order)... </style>
   Bump ?v= on EVERY page on every change (no build step; see BUILD_MAP.md).
   ============================================================ */
* { box-sizing:border-box; }
body { margin:0; font:15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color:var(--ink); background:var(--bg); }
a { color:var(--accent); text-decoration:none; }
a:hover { text-decoration:underline; }

/* sticky page header */
header { padding:14px 22px 12px; border-bottom:1px solid var(--line); background:var(--bg); position:sticky; top:0; z-index:10; }
h1 { margin:0; font-size:22px; font-weight:700; letter-spacing:.02em; }
.hrow { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; }
.substat { font-size:13px; color:var(--muted); }

/* universal nav — wraps on phones (the seven links need ~500px on one row; at 390px they
   overflowed the page sideways); links never break mid-label */
.topnav { display:flex; flex-wrap:wrap; gap:6px 20px; align-items:center; margin:8px 0 0; font-size:14px; }
.topnav a { color:var(--muted); text-decoration:none; padding:2px 0; white-space:nowrap; }
.topnav a:hover { color:var(--ink); }
.topnav a.active { color:var(--ink); font-weight:700; text-decoration:underline; text-underline-offset:4px; }

/* controls */
.toggles { display:flex; gap:14px; flex-wrap:wrap; align-items:flex-end; }
.toggles .field { display:flex; flex-direction:column; gap:3px; }
.toggles label { font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
select, input[type=search] { font:14px/1.2 inherit; padding:6px 8px; border:1px solid var(--line); border-radius:6px; background:var(--panel); color:var(--ink); }
select:focus, input:focus { outline:1px solid var(--accent); }
.searchrow { margin-top:10px; }
#search::placeholder { color:var(--muted); }
#status { font-size:12px; color:var(--muted); margin-top:8px; }

main { max-width:1700px; margin:0 auto; padding:14px 22px 70px; }

/* game rows */
.game { display:flex; align-items:center; gap:14px; padding:12px 6px; border-bottom:1px solid var(--line); }
.game:hover { background:var(--panel-2); }
.info { flex:1 1 auto; min-width:0; }
.gtitle { font-size:16px; font-weight:600; margin:0 0 2px; }
.gtitle a { color:var(--ink); text-decoration:none; }
.gtitle a:hover { text-decoration:underline; }
.meta { font-size:12px; color:var(--muted); display:flex; flex-wrap:wrap; gap:6px 12px; align-items:center; }
.pill { display:inline-block; padding:1px 8px; border-radius:10px; font-size:11px; font-weight:700; letter-spacing:.02em; }

/* progress bar (fill color = --accent by default; platform pages may
   override .barfill background with their brand token) */
.progwrap { flex:0 0 auto; width:150px; }
.bar { position:relative; height:18px; background:var(--line); border-radius:9px; overflow:hidden; }
.barfill { position:absolute; inset:0 auto 0 0; background:var(--accent); border-radius:9px; }
.barfill.full { background:var(--plat); }
.barpct { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#fff; text-shadow:0 0 3px #000, 0 0 3px #000, 0 1px 2px #000; }

/* trophy tier glyphs: diamond dot + colored fraction (color is never the
   only channel — the dot shape + sr-only label carry the meaning) */
.tiers { display:flex; gap:12px; align-items:center; flex:0 0 auto; }
.tier { display:inline-flex; align-items:center; gap:3px; font-size:13px; font-variant-numeric:tabular-nums; }
.tier .dot { width:9px; height:9px; transform:rotate(45deg); border-radius:2px; display:inline-block; }
.tier .dot.bronze { background:var(--bronze); }
.tier .dot.silver { background:var(--silver); }
.tier .dot.gold { background:var(--gold); }
.tier .frac.bronze { color:var(--bronze); }
.tier .frac.silver { color:var(--silver); }
.tier .frac.gold { color:var(--gold); }
.tier .lab, .plat .lab { position:absolute; left:-9999px; }  /* screen-reader-only; the glyph + title carry it visually */
/* fixed tier-column width so bar | tiers | platinum align across rows
   regardless of digit count (1/1 vs 100/102) */
.rhs .tier { width:84px; }
.plat { flex:0 0 auto; width:34px; text-align:center; }
.platglyph { width:22px; height:22px; transform:rotate(45deg); border-radius:3px; display:inline-block; }
.platglyph.on { background:var(--plat); box-shadow:0 0 0 1px rgba(255,255,255,.15) inset; }
.platglyph.off { background:#3a4454; }

.muted { color:var(--muted); }
.empty { padding:40px 0; text-align:center; color:var(--muted); }

/* ============================================================
   Per-game DETAIL pages (game-*.html). Brand color defaults to
   --accent; platform pages override .pbar > span, .guide
   border-left / .reason border-left, and .seg [aria-pressed]
   with their brand token. Pages set main{max-width:1100px}.
   ============================================================ */
.backnav { font-size:13px; margin:6px 0 12px; display:flex; gap:16px; flex-wrap:wrap; }
.ghead { display:flex; gap:16px; align-items:flex-start; border:1px solid var(--line); border-radius:10px; padding:14px; background:var(--panel); }
.ghead img.cap { border-radius:8px; object-fit:cover; flex:0 0 auto; background:var(--well); }
.ghead .capph { border-radius:8px; background:var(--well); border:1px solid var(--line); flex:0 0 auto; }
.ghead .meta { flex:1 1 auto; min-width:0; }
.ghead h1 { font-size:22px; margin:0 0 6px; line-height:1.2; }
.pbar { position:relative; height:18px; background:var(--line); border-radius:9px; overflow:hidden; margin-top:8px; max-width:420px; }
.pbar > span { position:absolute; left:0; top:0; bottom:0; background:var(--accent); }
.pbar > b { position:absolute; inset:0; text-align:center; font-size:12px; font-weight:700; line-height:18px; color:#fff; text-shadow:0 0 3px #000, 0 0 3px #000, 0 1px 2px #000; }
.guide { background:var(--panel-2); border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:10px; padding:14px; margin:16px 0; }
.guide h2 { font-size:16px; margin:0 0 8px; }
.guide .gline { margin:4px 0; }
.guide .reason { margin-top:8px; font-size:13.5px; color:#b7c1d1; border-left:3px solid var(--accent); padding-left:10px; }
.warnservers { color:var(--warn); font-weight:700; margin-top:6px; }
.badge { display:inline-block; padding:1px 8px; border-radius:10px; font-size:11px; font-weight:700; }
.badge.unob { background:#7a2f2f; color:#fff; } /* always paired with worded label */
.toolbar { border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin:16px 0; display:flex; gap:18px; flex-wrap:wrap; align-items:flex-start; background:var(--panel); }
.tgroup { display:flex; flex-direction:column; gap:4px; }
.tgroup .tlabel { font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); font-weight:700; }
.seg { display:inline-flex; border:1px solid var(--line); border-radius:7px; overflow:hidden; }
.seg button { border:0; background:var(--panel); padding:5px 12px; font:inherit; font-size:13px; cursor:pointer; color:var(--muted); border-right:1px solid var(--line); }
.seg button:last-child { border-right:0; }
.seg button[aria-pressed="true"] { background:var(--accent); color:var(--bg); font-weight:700; }
.panel { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:16px; margin:16px 0; }
.ach-missing { font-size:15px; font-weight:600; color:var(--ink); }
.ach-sub { margin-top:8px; font-size:13px; color:var(--muted); }
.ach-count { font-size:13px; color:var(--muted); margin:4px 2px 10px; }
.ach-row { display:flex; gap:12px; align-items:flex-start; padding:10px 8px; border-bottom:1px solid var(--line); }
.ach-row:last-child { border-bottom:0; }
.ach-row img { width:48px; height:48px; border-radius:6px; flex:0 0 auto; background:var(--well); }
.ach-row.locked img { filter:grayscale(1) opacity(.55); }
.ach-body { flex:1 1 auto; min-width:0; }
.ach-name { font-weight:600; }
.ach-row.locked .ach-name { color:var(--muted); }
.ach-desc { font-size:13px; color:var(--muted); margin-top:2px; }
.ach-side { flex:0 0 auto; text-align:right; font-size:12px; white-space:nowrap; }
/* status chips: colorblind-safe — text label + icon, never color alone */
.ach-chip { display:inline-block; font-size:11px; font-weight:700; border-radius:10px; padding:1px 8px; }
.ach-chip.earned { background:#1f3a2a; color:#7fd6a0; }
.ach-chip.locked { background:var(--line); color:var(--silver); }
.ach-rarity { display:inline-block; font-size:11px; font-weight:700; border-radius:10px; padding:1px 8px; background:#3a2f1a; color:var(--gold); }
.ach-rarity.ultra { background:#4a1f1f; color:#ff9b7a; }
.ach-hidden-tag { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; margin-left:6px; }
/* NOTE: #status is a LIST-page rule above; detail pages set their own
   #status padding in page CSS. */
.hidden { display:none !important; }
