/* Sale Radar. Shelf-label look: paper ground, condensed numerals, mono timestamps. Phone first. */
:root {
  --bg: #ECEFEA; --surface: #F8F9F6; --ink: #12181B; --ink2: #4A5559; --rule: #CBD2CD;
  --accent: #0F6E6A; --accent-ink: #FFFFFF; --tag: #F2B632; --tag-ink: #1A1405;
  --ok: #1E7B46; --warn: #9A5A06; --bad: #A33A2B; --bar-bg: #DDE3DE; --shadow: rgba(18,24,27,.25);
  --font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1519; --surface: #172026; --ink: #E7EEEA; --ink2: #9AA9A8; --rule: #2A373D;
    --accent: #4FC3BA; --accent-ink: #06201E; --tag: #E8B13A; --tag-ink: #1A1405;
    --ok: #5CCB8A; --warn: #E3A24B; --bad: #E88572; --bar-bg: #24323A; --shadow: rgba(0,0,0,.6); color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.45; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }

/* shell */
.wrap { max-width: 600px; margin: 0 auto; min-height: 100vh;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(86px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.head { position: sticky; top: 0; z-index: 8; background: var(--bg); padding: calc(10px + env(safe-area-inset-top, 0px)) 0 10px; border-bottom: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: .06em; line-height: 1; }
.tools { display: flex; gap: 6px; align-items: center; }
.ibtn { min-width: 44px; height: 44px; background: transparent; border: 1px solid var(--rule); border-radius: 6px; cursor: pointer; font-family: var(--font-data); font-size: 12px; display: grid; place-items: center; padding: 0 8px; }
.ibtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ibtn.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.view { display: flex; flex-direction: column; gap: 14px; }
.label { font-family: var(--font-data); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); }
.note { font-size: 13.5px; color: var(--ink2); }
.err { border-left: 4px solid var(--bad); background: var(--surface); padding: 10px 12px; font-size: 14px; }
.empty { border: 1px dashed var(--rule); border-radius: 6px; padding: 20px 16px; color: var(--ink2); }
.empty b { color: var(--ink); display: block; font-family: var(--font-display); font-size: 22px; text-transform: uppercase; margin-bottom: 4px; letter-spacing: .02em; }
.skel { height: 78px; border-radius: 6px; background: linear-gradient(90deg, var(--bar-bg), var(--surface), var(--bar-bg)); background-size: 200% 100%; animation: sh 1.2s linear infinite; }
@keyframes sh { to { background-position: -200% 0; } }

/* controls */
.field { width: 100%; background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; padding: 11px 12px; min-height: 46px; }
.row-in { display: flex; gap: 8px; }
.row-in .field { flex: 1; min-width: 0; }
.btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px; padding: 10px 16px; font-weight: 600; cursor: pointer; min-height: 46px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.btn.sm { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: default; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; background: transparent; border: 1px solid var(--rule); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; min-height: 36px; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip b { font-family: var(--font-data); font-weight: 500; margin-left: 4px; opacity: .85; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--ink); border-radius: 6px; overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 10px 6px; font-weight: 600; cursor: pointer; min-height: 44px; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* game rows */
.list { border-top: 1px solid var(--ink); }
.game { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); align-items: center; cursor: pointer; }
.game:active { background: var(--surface); }
.thumb { width: 92px; height: 43px; background: var(--bar-bg); border-radius: 3px; object-fit: cover; display: block; }
.game h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.05; text-transform: uppercase; overflow-wrap: anywhere; }
.meta { font-size: 12.5px; color: var(--ink2); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.price { text-align: right; min-width: 74px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pct { background: var(--tag); color: var(--tag-ink); font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: .04em; padding: 0 6px; border-radius: 3px; line-height: 1.25; }
.now { font-family: var(--font-data); font-size: 14px; font-weight: 500; }
.was { font-family: var(--font-data); font-size: 11px; color: var(--ink2); text-decoration: line-through; }
.tag { font-family: var(--font-data); font-size: 10.5px; padding: 1px 6px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink2); white-space: nowrap; }
.tag.ok { border-color: var(--ok); color: var(--ok); }
.tag.new { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.tag.warn { border-color: var(--warn); color: var(--warn); }
.mini { height: 4px; background: var(--bar-bg); border-radius: 2px; overflow: hidden; width: 54px; }
.mini i { display: block; height: 100%; background: var(--accent); }
.more { align-self: center; }

/* wishlist header */
.me { display: flex; align-items: center; gap: 12px; }
.me img { width: 44px; height: 44px; border-radius: 4px; background: var(--bar-bg); }
.me h2 { font-family: var(--font-display); font-weight: 700; font-size: 24px; text-transform: uppercase; line-height: 1; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card h2 { font-family: var(--font-display); font-weight: 800; font-size: 26px; text-transform: uppercase; line-height: 1; }
ol.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.prog { font-family: var(--font-data); font-size: 12px; color: var(--ink2); }

/* calendar */
.hero { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.hero h2 { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: .95; text-transform: uppercase; }
.count { font-family: var(--font-display); font-weight: 700; font-size: 54px; line-height: 1; font-variant-numeric: tabular-nums; }
.count small { font-size: 22px; margin: 0 8px 0 2px; color: var(--ink2); }
.sticker { background: var(--tag); color: var(--tag-ink); font-family: var(--font-display); font-weight: 800; letter-spacing: .08em; font-size: 14px; padding: 2px 8px; border-radius: 3px; text-transform: uppercase; align-self: flex-start; }
.board { border-top: 1px solid var(--ink); }
.ev { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.ev.past { opacity: .5; }
.ev .when { font-family: var(--font-data); font-size: 12px; line-height: 1.35; }
.ev .when b { font-weight: 500; font-size: 14px; display: block; }
.ev h3 { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.05; text-transform: uppercase; }
.linkbtn { background: none; border: 0; padding: 6px 0 0; color: var(--accent); font-weight: 600; cursor: pointer; font-size: 13px; min-height: 32px; }

/* detail sheet */
.scrim { position: fixed; inset: 0; background: var(--shadow); z-index: 20; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 92vh; overflow-y: auto; background: var(--bg); border-top: 2px solid var(--ink);
  padding: 14px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 14px; }
.sheet > * { width: 100%; max-width: 600px; margin-left: auto; margin-right: auto; }
.sheet .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sheet h2 { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1; text-transform: uppercase; overflow-wrap: anywhere; }
.hdr { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; border-radius: 4px; background: var(--bar-bg); }
.big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.big .now { font-size: 26px; }
.fc { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 6px 12px; align-items: center; border-top: 1px solid var(--rule); padding-top: 10px; }
.fc h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; text-transform: uppercase; }
.fc .p { font-family: var(--font-display); font-weight: 800; font-size: 34px; text-align: right; line-height: 1; }
.fc .p small { font-size: 16px; }
.bar { grid-column: 1 / -1; height: 6px; background: var(--bar-bg); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.verdict { font-weight: 600; padding: 10px 12px; border-left: 4px solid var(--accent); background: var(--surface); font-size: 14px; }
.verdict.buy { border-color: var(--ok); } .verdict.wait { border-color: var(--warn); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.kv span:nth-child(odd) { color: var(--ink2); } .kv span:nth-child(even) { font-family: var(--font-data); text-align: right; }

/* bottom nav */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; background: var(--surface); border-top: 2px solid var(--ink); display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  padding: 6px max(10px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); }
.tabs button { background: none; border: 0; padding: 6px 2px; cursor: pointer; color: var(--ink2); min-height: 52px; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: relative; }
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs span { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; line-height: 1; }
.tabs button[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); }
.tabs i { position: absolute; top: 4px; right: calc(50% - 22px); background: var(--tag); color: var(--tag-ink); font-style: normal; font-family: var(--font-data); font-size: 10px; padding: 0 5px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .skel, .ibtn.spin svg { animation: none; } }
