/* GG Values. Built on the Valence MM design system: near-black and white like a ledger, Satoshi for
   words, JetBrains Mono for figures. Colour is kept for two things: the game's rarity colours, so an
   item's tier is the first thing you see, and the logo's yellow, used sparingly for things you can act
   on (buttons, the current page, focus). Layout density follows CMWorth and Rolimons. */

@font-face { font-family: "Satoshi"; src: url("/fonts/satoshi-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/fonts/satoshi-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/fonts/satoshi-700.woff2") format("woff2"); font-weight: 600 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-600.woff") format("woff"); font-weight: 600 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-2: #0a0a0a;
  --surface: #0b0b0b;
  --surface-2: #111111;
  --raised: #161616;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --fg: #f5f5f5;
  --muted: rgba(245, 245, 245, .66);
  --dim: rgba(245, 245, 245, .5);
  --accent: #ededed;
  --accent-hi: #ffffff;
  --gold: #fdcc01;
  --gold-hi: #ffd83a;
  --gold-soft: rgba(253, 204, 1, .1);
  --gold-line: rgba(253, 204, 1, .45);
  --accent-soft: rgba(255, 255, 255, .07);
  --accent-line: rgba(255, 255, 255, .3);
  --btn2: #121212;
  --btn2-hover: #1a1a1a;
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, .1);
  --warn: #fbbf24;
  --bad: #f87171;
  --bad-soft: rgba(248, 113, 113, .1);
  --header: rgba(5, 5, 5, .86);
  --shadow: 0 24px 60px rgba(0, 0, 0, .6);
  --display: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 1rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; }
a { color: var(--accent-hi); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.022em; margin: 0; font-weight: 700; text-wrap: balance; }
h1 { font-size: 2rem; margin-bottom: 8px; }
h2 { font-size: 1.2rem; margin-bottom: 8px; font-weight: 600; letter-spacing: -0.015em; }
h3 { font-size: 1rem; margin-bottom: 6px; font-weight: 600; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); font-size: .9rem; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }
main { padding: 28px 0 48px; min-height: 60vh; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--gold); color: #000; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.eyebrow { display: inline-block; font-size: .76rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- header ---------- */
.site { position: sticky; top: 0; z-index: 30; background: var(--header); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.nav { height: 64px; display: flex; align-items: center; gap: 22px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.14rem; letter-spacing: -0.02em; white-space: nowrap; }
.logo img { width: 32px; height: 32px; }
.logo em { font-style: normal; color: var(--gold); }
.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 500; padding: 7px 12px; border-radius: 999px; transition: color .2s var(--ease), background-color .2s var(--ease); white-space: nowrap; }
.nav-links a:hover { color: var(--fg); background: var(--btn2); }
.nav-links a.active { color: var(--gold); background: var(--gold-soft); }
.soon { font-size: .66rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 6px; margin-left: 5px; vertical-align: 1px; }
.nav-search { margin-left: auto; position: relative; width: min(320px, 34vw); }
.nav-search input { min-height: 38px; padding: 7px 12px 7px 36px; border-radius: 999px; font-size: .92rem; }
.nav-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--dim); pointer-events: none; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0; text-decoration: none; flex: none; }
.icon-btn:hover { color: var(--fg); background: var(--btn2); }
.icon-btn svg { width: 19px; height: 19px; }
.menu { display: none; position: relative; margin: 0; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] .menu-panel { display: flex; }
.menu-panel { display: none; position: absolute; right: 0; top: 46px; flex-direction: column; gap: 2px; min-width: 220px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); }
.menu-panel a { color: var(--fg); text-decoration: none; padding: 10px 12px; border-radius: var(--r-sm); }
.menu-panel a:hover { background: var(--raised); }

/* search results dropdown */
.results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 6px; max-height: min(70vh, 460px); overflow-y: auto; z-index: 40; }
.results[hidden] { display: none; }
.result { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-sm); color: var(--fg); text-decoration: none; cursor: pointer; }
.result:hover, .result.on { background: var(--raised); box-shadow: inset 2px 0 0 var(--gold); }
.result .thumb { width: 36px; height: 36px; font-size: .3rem; }
.result .r-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .93rem; }
.result .r-sub { display: block; font-size: .78rem; color: var(--dim); }
.result .num { font-size: .86rem; color: var(--muted); }
.results .none { padding: 12px; color: var(--dim); font-size: .9rem; }

/* ---------- buttons and inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; background: var(--gold); color: #0a0a0a;
  padding: 9px 16px; border-radius: 10px; font: inherit; font-weight: 600; font-size: .94rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease); }
a.btn { color: #0a0a0a; }
.btn:hover { background: var(--gold-hi); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.secondary { background: var(--btn2); color: var(--fg); border-color: var(--line-2); }
a.btn.secondary { color: var(--fg); }
.btn.secondary:hover { background: var(--btn2-hover); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--fg); background: var(--btn2); }
.btn.small { padding: 6px 12px; font-size: .86rem; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
input, select { width: 100%; background: var(--bg-2); color: var(--fg); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: .95rem;
  min-height: 40px; transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
select { cursor: pointer; appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
input::placeholder { color: var(--dim); }
input:hover, select:hover { border-color: var(--accent-line); }
input:focus, select:focus { border-color: var(--gold-line); outline: none; box-shadow: 0 0 0 4px var(--gold-soft); }
input:disabled { opacity: .5; cursor: not-allowed; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; gap: 2px; background: var(--bg-2); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .88rem; font-weight: 500; padding: 6px 12px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; cursor: pointer; white-space: nowrap; }
.check input { width: 16px; height: 16px; min-height: 0; accent-color: var(--gold); }

/* ---------- panels ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin: 0 0 16px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { margin: 0; color: var(--muted); max-width: 680px; }
.crumbs { font-size: .86rem; margin-bottom: 10px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .76rem; border: 1px solid var(--line-2); color: var(--muted); font-weight: 600; white-space: nowrap; }
.badge.bad { color: var(--bad); border-color: rgba(248, 113, 113, .35); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.tier { color: color-mix(in srgb, var(--tier, #aaa) 78%, #fff); }
.tier-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tier, #aaa); box-shadow: 0 0 10px var(--tier, #aaa); flex: none; }
.banner { border: 1px solid var(--line-2); background: var(--accent-soft); color: var(--muted); border-radius: var(--r); padding: 11px 14px; margin: 0 0 18px; font-size: .92rem; }
.banner strong { color: var(--fg); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.section { margin-top: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.section-head a { color: var(--muted); font-size: .9rem; text-decoration: none; }
.section-head a:hover { color: var(--gold); }

/* stat tiles, CMWorth style: small label, big mono figure */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 20px; }
.stat { background: var(--surface); padding: 14px 18px; min-width: 0; }
.stat .k { font-size: .8rem; color: var(--dim); margin-bottom: 2px; }
.stat .v { font-family: var(--mono); font-size: 1.45rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.25; overflow-wrap: anywhere; }
.stat .s { font-size: .78rem; color: var(--dim); }

/* ---------- item visuals ---------- */
.thumb { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: var(--r-sm); flex: none;
  background: radial-gradient(70% 70% at 50% 45%, color-mix(in srgb, var(--tier, #888) 22%, transparent), transparent 72%), var(--bg-2); }
.thumb img { width: 86%; height: 86%; object-fit: contain; }
.title-text { font-family: var(--display); font-weight: 800; text-align: center; line-height: 1.05; letter-spacing: -0.01em; padding: 0 6%; overflow-wrap: anywhere;
  color: var(--title, #fff); text-shadow: 0 2px 0 rgba(0, 0, 0, .55), 0 0 18px color-mix(in srgb, var(--title, #fff) 35%, transparent); font-size: 1em; }
.title-text.outlined { -webkit-text-stroke: 1px var(--outline, #fff); paint-order: stroke fill; }

/* item grid cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.item { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; color: var(--fg);
  text-decoration: none; transition: border-color .18s var(--ease), transform .18s var(--ease), background-color .18s var(--ease); min-width: 0; }
.item::before { content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 2px; border-radius: 2px; background: var(--tier, #888); opacity: .85; }
.item:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-2px); }
.item .thumb { aspect-ratio: 1; width: 100%; font-size: 1.15rem; }
.item .name { font-weight: 600; font-size: .95rem; margin: 10px 2px 2px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .meta { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--dim); margin: 0 2px 8px; white-space: nowrap; overflow: hidden; }
.item .kv { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--dim); padding: 3px 2px; }
.item .kv .num { color: var(--fg); font-size: .82rem; }
.item .kv .num.unpriced { color: var(--dim); }
.item .kv.serial .num { color: var(--gold); }
.item .flag { position: absolute; top: 16px; right: 16px; z-index: 1; }

/* table view, Rolimons style */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); font-weight: 600; background: var(--surface-2); position: sticky; top: 0; }
th button { all: unset; cursor: pointer; }
th button:hover { color: var(--fg); }
th[aria-sort] button { color: var(--fg); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td.r, th.r { text-align: right; }
.cell-item { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 500; }
.cell-item .thumb { width: 34px; height: 34px; font-size: .3rem; }
.cell-item:hover { text-decoration: underline; }
.up { color: var(--ok); }
.down { color: var(--bad); }
.bar { height: 4px; border-radius: 4px; background: var(--raised); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }

/* ---------- toolbar (values page) ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1 1 220px; min-width: 0; position: relative; }
.toolbar .grow svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--dim); pointer-events: none; }
.toolbar .grow input { padding-left: 36px; }
.toolbar select { width: auto; min-width: 140px; }
.count { color: var(--dim); font-size: .88rem; margin: 0 0 12px; }

/* ---------- home ---------- */
.hero { padding: 8px 0 4px; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); max-width: 760px; }
.hero p { color: var(--muted); font-size: 1.06rem; max-width: 640px; }
.hero-search { position: relative; max-width: 620px; margin: 22px 0 26px; }
.hero-search input { min-height: 52px; font-size: 1.04rem; padding-left: 46px; border-radius: 14px; }
.hero-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--dim); pointer-events: none; }

/* case cards */
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.case { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; color: var(--fg); text-decoration: none;
  transition: border-color .18s var(--ease), background-color .18s var(--ease); }
.case:hover { border-color: var(--gold-line); background: var(--surface-2); }
.case-top { display: flex; align-items: center; gap: 14px; }
.case-top img { width: 64px; height: 64px; object-fit: contain; }
.case-top .ph { width: 64px; height: 64px; border-radius: var(--r); display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); color: var(--dim); font-weight: 700; }
.case h3 { margin: 0; }
.odds { display: flex; height: 8px; border-radius: 6px; overflow: hidden; background: var(--raised); }
.odds i { display: block; height: 100%; min-width: 2px; background: var(--tier); }
.case .kv { display: flex; justify-content: space-between; font-size: .86rem; color: var(--dim); }
.case .kv .num { color: var(--fg); }

/* ---------- item page ---------- */
.item-page { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 28px; align-items: start; }
.item-page .hero-thumb { aspect-ratio: 1; width: 100%; border-radius: var(--r-lg); border: 1px solid var(--line); font-size: 2.3rem; }
.item-page h1 { margin: 4px 0 10px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0; font-size: .94rem; }
.facts dt { color: var(--dim); }
.facts dd { margin: 0; min-width: 0; }
.chart { width: 100%; height: auto; }
.chart text { font-family: var(--mono); font-size: 11px; fill: var(--dim); }
.note { border-left: 2px solid var(--line-2); padding: 2px 0 2px 12px; color: var(--muted); margin: 12px 0 0; }
.source-tag { font-size: .76rem; color: var(--dim); }
.two { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }

/* ---------- calculator ---------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.side h2 { display: flex; justify-content: space-between; align-items: baseline; }
.side .add { position: relative; margin: 10px 0 12px; }
.picked { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; min-height: 60px; }
.picked li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); }
.picked .thumb { width: 38px; height: 38px; font-size: .32rem; }
.picked .p-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.picked .p-name a { color: var(--fg); text-decoration: none; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.qty button { all: unset; cursor: pointer; width: 26px; text-align: center; color: var(--muted); }
.qty button:hover { background: var(--raised); color: var(--fg); }
.qty span { min-width: 22px; text-align: center; font-family: var(--mono); font-size: .86rem; }
.picked .empty-note { color: var(--dim); font-size: .9rem; padding: 18px 8px; border: 1px dashed var(--line-2); border-radius: var(--r); text-align: center; background: none; display: block; }
.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.total .num { font-size: 1.3rem; font-weight: 600; }
.verdict { text-align: center; padding: 18px; }
.verdict .big { font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.02em; }

/* ---------- ads ---------- */
/* Every ad slot reserves its height up front, so the page doesn't jump when an ad loads. */
.ad { display: flex; justify-content: center; align-items: center; margin: 18px auto; overflow: hidden; }
.ad-banner { min-height: 90px; max-width: 970px; margin-bottom: 0; }
.ad-inline { min-height: 100px; grid-column: 1 / -1; }
.ad-side { min-height: 600px; width: 300px; position: sticky; top: 84px; margin: 0; }
.ad ins { display: block; width: 100%; }
/* When AdSense has no ad for a slot (or the site isn't approved yet), fold the space away. */
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }
.ad:not(.preview):not(:has(ins[data-ad-status="filled"])) { min-height: 0; }
.ad.preview { border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--dim); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(255,255,255,.015) 10px 20px); }
.with-side { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .with-side { grid-template-columns: minmax(0, 1fr); } .ad-side { display: none; } }

/* ---------- prose pages ---------- */
.prose { max-width: 760px; }
.prose h2 { margin: 28px 0 8px; }
.prose p, .prose li { color: var(--muted); }
.prose li { margin-bottom: 6px; }

/* ---------- footer ---------- */
.foot-band { border-top: 1px solid var(--line); margin-top: 40px; padding: 30px 0 36px; color: var(--dim); font-size: .88rem; }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--gold); }
.disclaimer { margin-top: 14px; max-width: 760px; }

/* ---------- accounts ---------- */
.account { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.me { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; font-weight: 600; font-size: .9rem; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--line-2); max-width: 170px; }
.me:hover { border-color: var(--gold-line); }
.me img, .me .avatar { border-radius: 50%; flex: none; }
.me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { border-radius: 50%; background: var(--raised); object-fit: cover; flex: none; }
.avatar.ph { display: inline-grid; place-items: center; color: var(--muted); font-weight: 700; }
.user { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; font-weight: 600; min-width: 0; }
.user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user:hover span { text-decoration: underline; }
.badge.gold { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }
.badge.qty { position: absolute; top: 16px; left: 16px; z-index: 1; background: var(--bg); color: var(--fg); }
.small { font-size: .82rem; }
.lbl { display: block; font-size: .84rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid label { display: block; min-width: 0; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid .dim.small { display: block; margin-top: 6px; }
input[type="file"] { padding: 7px; cursor: pointer; }
.form-msg { min-height: 1.2em; margin: 10px 0 0; color: var(--bad); font-size: .9rem; }
.form-msg.ok { color: var(--ok); }
.gate { text-align: center; padding: 30px; }
.add-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--dim); pointer-events: none; }
.add input { padding-left: 36px; }
.steps { padding-left: 20px; margin: 14px 0 18px; }
.steps li { margin-bottom: 12px; color: var(--muted); }
.phrase { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.phrase code { font-family: var(--mono); font-size: 1rem; color: var(--gold); background: var(--gold-soft); border: 1px solid var(--gold-line); padding: 8px 12px; border-radius: 8px; user-select: all; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { all: unset; cursor: pointer; padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--gold); }
.count-pill:not(:empty) { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: #000; font-size: .74rem; text-align: center; margin-left: 4px; }
.panel-tools { display: flex; justify-content: flex-end; margin-bottom: 10px; }

/* profile */
.profile-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile-head .avatar { width: 96px; height: 96px; }
.profile-head h1 { margin: 4px 0 2px; }
.ph-main { flex: 1; min-width: 220px; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.player-card { display: flex; gap: 12px; align-items: center; margin: 0; color: var(--fg); text-decoration: none; padding: 14px; }
.player-card:hover { border-color: var(--line-2); }

/* badges */
.ph-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.name-badges { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 1rem; }
.b-icon { position: relative; display: inline-flex; border-radius: 6px; transition: transform .15s; }
.b-icon img { width: 26px; height: 26px; display: block; }
.b-icon:hover, .b-icon:focus-visible { transform: translateY(-2px); }
.b-icon:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.b-tip { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px); width: max-content; max-width: 220px; padding: 8px 10px; border-radius: 8px; background: #1c1c1c; border: 1px solid var(--line-2); box-shadow: 0 8px 24px rgba(0,0,0,.5); color: var(--muted); font-size: .78rem; font-weight: 400; line-height: 1.35; text-align: left; opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; z-index: 20; }
.b-tip b { display: block; color: var(--fg); font-size: .85rem; margin-bottom: 2px; }
.b-icon:hover .b-tip, .b-icon:focus-visible .b-tip { opacity: 1; transform: translate(-50%, 0); }
.b-more { height: 26px; min-width: 30px; padding: 0 8px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font: 600 .75rem/1 inherit; cursor: pointer; }
.b-more:hover { color: var(--fg); border-color: var(--gold-line); }
.badge-page { max-width: 820px; }
.b-label { margin: 28px 0 10px; font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
section:first-child > .b-label, [data-panel] > .b-label:first-child { margin-top: 4px; }
.b-intro { margin: -4px 0 12px; color: var(--muted); font-size: .9rem; }
.badge-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.badge-row { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); scroll-margin-top: 90px; transition: border-color .15s; }
.badge-row:hover { border-color: var(--line-2); }
.badge-row:target { border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--gold-soft); }
.b-art { position: relative; flex: none; width: 52px; height: 52px; }
.b-art img { width: 52px; height: 52px; display: block; filter: drop-shadow(0 3px 6px rgba(0,0,0,.45)); }
.b-art-lock { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #1c1c1c; border: 1px solid var(--line-2); color: var(--muted); }
.b-art-lock .b-lock { width: 11px; height: 11px; }
.badge-row.locked .b-art img, .badge-row.soon .b-art img { filter: grayscale(1) brightness(.6); }
.badge-row.locked .b-name, .badge-row.soon .b-name { color: var(--muted); }
.b-text { flex: 1; min-width: 0; }
.b-name { font-weight: 700; font-size: 1rem; }
.b-desc { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.b-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; text-align: right; }
.b-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: .74rem; font-weight: 600; white-space: nowrap; }
.b-tag .b-lock { width: 11px; height: 11px; }
.b-count { color: var(--muted); font-size: .8rem; white-space: nowrap; }
@media (max-width: 560px) {
  .badge-row { align-items: flex-start; flex-wrap: wrap; padding: 14px; gap: 12px; }
  .b-text { flex-basis: calc(100% - 64px); }
  .b-side { flex-direction: row; flex-wrap: wrap; align-items: center; margin-left: 64px; }
}
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface); border: 1px solid var(--gold-line); border-radius: 999px; box-shadow: 0 8px 30px rgba(0,0,0,.4); font-size: .9rem; }

/* card header/footer (trade ads) */
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-time { margin-left: auto; font-size: .84rem; }
.card-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .86rem; align-items: center; }
.side-h { display: flex; justify-content: space-between; font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); font-weight: 600; margin-bottom: 6px; }
.side-h .num { color: var(--fg); text-transform: none; letter-spacing: 0; background: var(--raised); padding: 0 6px; border-radius: 6px; }
.ad-sides > div { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; background: var(--bg-2); min-width: 0; }
pre.code { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; max-height: 420px; overflow: auto; font-family: var(--mono); font-size: .8rem; line-height: 1.5; color: var(--muted); white-space: pre; }
.key-out { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.key-out code { font-family: var(--mono); color: var(--gold); background: var(--gold-soft); border: 1px solid var(--gold-line); padding: 8px 12px; border-radius: 8px; user-select: all; word-break: break-all; }

/* trade ads */
.ads { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.ad-card { margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ad-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; }
.ad-arrow { align-self: center; color: var(--dim); font-size: 1.2rem; }
.ad-items { display: flex; flex-wrap: wrap; gap: 6px; }
.ad-items a { position: relative; display: block; }
.ad-items .thumb { width: 52px; height: 52px; font-size: .36rem; }
.ad-items .q { position: absolute; right: 2px; bottom: 2px; font-size: .7rem; font-weight: 700; background: var(--bg); border-radius: 4px; padding: 0 3px; }
.ad-sides .badges { margin-top: 8px; }

/* case simulator */
.sim-controls { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.sim-controls .seg button { display: inline-flex; align-items: center; gap: 6px; }
.sim-controls .seg img { width: 22px; height: 22px; object-fit: contain; }
.sim-reel { min-height: 150px; display: grid; place-items: center; }
.sim-hit { display: flex; align-items: center; gap: 18px; }
.sim-hit .thumb { width: 110px; height: 110px; font-size: .9rem; border-radius: var(--r); box-shadow: 0 0 40px color-mix(in srgb, var(--tier) 35%, transparent); }
.sim-name { font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; }
.sim-hit.pop { animation: pop .45s var(--ease); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* admin */
.staff-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.staff-list li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.staff-list li .btn { margin-left: auto; }
tr.reverted td { opacity: .5; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .nav-links { display: none; }
  .menu { display: block; }
}
@media (max-width: 960px) {
  .form-grid { grid-template-columns: 1fr; }
  .ads { grid-template-columns: 1fr; }
  .nav { gap: 12px; }
  .nav-search { width: auto; flex: 1; }
  .item-page { grid-template-columns: 1fr; }
  .item-page .hero-thumb { max-width: 340px; }
  .calc { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .logo span { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .item .name { font-size: .9rem; }
  h1 { font-size: 1.6rem; }
  .toolbar { gap: 8px; margin-bottom: 10px; }
  .toolbar select { flex: 1 1 30%; min-width: 0; font-size: .88rem; padding-left: 10px; }
  .toolbar .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .page-head p { font-size: .94rem; }
  .stat .v { font-size: 1.2rem; }
  .me span { display: none; }
  .me { padding: 3px; }
  .account .btn.ghost { display: none; }
  .ad-sides { grid-template-columns: 1fr; }
  .ad-arrow { display: none; }
  .sim-hit .thumb { width: 80px; height: 80px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* tier list maker */
.tl-help .form-msg:empty { display: none; }
.tl-help p { margin: 0 0 12px; color: var(--muted); font-size: .92rem; }
.tl-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tl-title { flex: 1; min-width: 180px; }
.tl-board { display: grid; gap: 6px; margin: 14px 0; }
.tl-row { display: flex; min-height: 76px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.tl-label { flex: none; width: 84px; display: grid; place-items: center; background: var(--row); color: #111; font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1; border: 0; cursor: pointer; position: relative; padding: 4px; }
.tl-label span { outline: none; max-width: 100%; overflow-wrap: anywhere; }
.tl-label[aria-pressed="true"]::after { content: ""; position: absolute; inset: 3px; border: 2px solid #111; border-radius: 8px; opacity: .6; }
.tl-items, .tl-pool-items { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; align-content: flex-start; min-height: 64px; transition: background .15s; }
.tl-items.over, .tl-pool-items.over { background: var(--gold-soft); }
.tl-item { all: unset; box-sizing: border-box; width: 64px; height: 64px; border-radius: 8px; cursor: grab; display: block; transition: transform .12s; }
.tl-item:hover, .tl-item:focus-visible { transform: translateY(-2px); }
.tl-item:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.tl-item .thumb { width: 64px; height: 64px; aspect-ratio: auto; font-size: 9px; border-radius: 8px; }
.tl-pool .toolbar { margin-bottom: 10px; }
.tl-pool-items { max-height: 420px; overflow-y: auto; padding: 0; }
.b-link { font-weight: 600; white-space: nowrap; }
@media (max-width: 560px) { .tl-label { width: 56px; font-size: 1.2rem; } .tl-item, .tl-item .thumb { width: 54px; height: 54px; } }

/* trade ad maker */
.tag-word:not([fill]) { fill: #fff; }
.tag-word { font-family: var(--display); font-weight: 900; stroke: #111; stroke-width: 5px; paint-order: stroke fill; stroke-linejoin: round; letter-spacing: .02em; }
.ta-top { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px 18px; align-items: center; }
.ta-side-h { text-align: center; margin-bottom: 10px; font-weight: 700; }
.ta-value { display: flex; justify-content: center; align-items: baseline; gap: 8px; margin-top: 12px; color: var(--muted); font-size: .9rem; }
.ta-value .num { color: var(--gold); font-size: 1.25rem; font-weight: 700; }
.ta-mid { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ta-foot { grid-column: 1 / -1; display: grid; gap: 6px; }
.ta-foot .form-msg:empty { display: none; }
.ta-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ta-slot { all: unset; box-sizing: border-box; position: relative; aspect-ratio: 1; border: 2px dashed var(--line-2); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: default; overflow: hidden; }
.ta-slot.filled { border-style: solid; border-color: var(--line-2); background: var(--bg-2); cursor: pointer; }
.ta-slot.filled:hover, .ta-slot.filled:focus-visible { border-color: #e5484d; }
.ta-slot .thumb { width: 100%; flex: 1; min-height: 0; background: none; font-size: 9px; }
.ta-slot-name { font-size: .68rem; color: var(--muted); padding: 0 4px 4px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ta-slot-tag { display: grid; place-items: center; width: 100%; height: 100%; padding: 6px; }
.ta-slot-tag svg { width: 100%; height: auto; }
.ta-x { position: absolute; top: 3px; right: 5px; font-size: .9rem; color: var(--muted); opacity: 0; transition: opacity .12s; }
.ta-slot.filled:hover .ta-x, .ta-slot.filled:focus-visible .ta-x { opacity: 1; color: #e5484d; }
.ta-swap { font-size: 1.6rem; color: var(--muted); }
.ta-pick { margin-top: 14px; }
.ta-tabs { margin-top: 0; }
.ta-tabs button { flex: 1; text-align: center; }
.ta-tags { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.ta-tag { all: unset; box-sizing: border-box; cursor: pointer; border-radius: 12px; padding: 4px; border: 2px solid transparent; transition: transform .12s, border-color .12s; }
.ta-tag svg { width: 100%; height: auto; display: block; }
.ta-tag:hover { transform: translateY(-2px); }
.ta-tag:focus-visible { outline: 2px solid var(--gold); }
.ta-tag[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-soft); }
.ta-search { position: relative; margin-bottom: 12px; }
.ta-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.ta-search input { padding-left: 36px; }
.ta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.ta-grid > p { grid-column: 1 / -1; }
.ta-card { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; transition: border-color .12s, transform .12s; }
.ta-card:hover, .ta-card:focus-visible { border-color: var(--gold-line); transform: translateY(-1px); }
.ta-card.used { opacity: .4; cursor: not-allowed; }
.ta-name { font-size: .78rem; font-weight: 700; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--bg-2); }
.ta-card .thumb { width: 100%; aspect-ratio: 1.3; border-radius: 0; font-size: 11px; }
.ta-kv { display: flex; justify-content: space-between; padding: 3px 8px; font-size: .74rem; color: var(--muted); }
.ta-kv:last-child { padding-bottom: 7px; }
.ta-kv .num { color: var(--fg); }
.ta-pages { display: flex; gap: 6px; justify-content: center; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.ta-pages button { min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); font: inherit; cursor: pointer; }
.ta-pages button[aria-current="true"] { background: var(--gold); color: #111; border-color: var(--gold); font-weight: 700; }
.ta-pages button:disabled { opacity: .35; cursor: default; }
.ad-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ad-tag { display: inline-block; width: 64px; }
.ad-tag svg { width: 100%; height: auto; display: block; }
@media (max-width: 700px) {
  .ta-top { grid-template-columns: 1fr; }
  .ta-mid { order: 3; flex-direction: row; justify-content: center; }
  .ta-mid .ta-swap { display: none; }
  .ta-side[data-slots="want"] { order: 2; }
  .ta-foot { order: 4; }
  .ta-mid .btn { width: 100%; }
  .ta-tags { grid-template-columns: repeat(2, 1fr); }
}
.ta-cooldown { margin: 0; text-align: center; color: var(--gold); font-weight: 600; font-size: .9rem; }
