/* Tall Grass app. Layout: sticky brand bar, one 880px column per section, bottom tab bar on phones
   (top tabs on wide screens). Expos are graded-slab cards; tracked ones get the holo foil. */

@font-face { font-family: "Sofia Sans Extra Condensed"; font-weight: 800; font-display: swap; src: url("fonts/sofia-sans-extra-condensed-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Sofia Sans Extra Condensed"; font-weight: 900; font-display: swap; src: url("fonts/sofia-sans-extra-condensed-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url("fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url("fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 700; font-display: swap; src: url("fonts/instrument-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #07080F; --surface: #10121E; --surface-2: #171A2B; --ink: #F1F3FF; --muted: #9299BD;
  --line: #232842; --edge: #323A5E; --accent: #FFD23F; --on-accent: #171200; --accent-text: #FFD23F;
  --live: #3BE38F; --up: #3BE38F; --down: #FF7A8A; --danger: #FF7A8A; --focus: #8EA2FF; --on-holo: #10121E;
  --scrim: rgba(2, 3, 8, .7); --camera: #020308; --on-camera: #F4F6FF;
  --shadow: 0 1px 0 rgba(0,0,0,.4), 0 14px 34px -20px rgba(0,0,0,.9);
  --holo: linear-gradient(110deg, #ff8fc0 0%, #ffd96e 17%, #7ff0b4 34%, #7cc9ff 51%, #c59bff 68%, #ff8fc0 85%, #ffd96e 100%);
  --glow: 0 0 26px -6px rgba(255, 210, 63, .7);
  --f-display: "Sofia Sans Extra Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --nav-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.accent-fill { fill: var(--accent); }
.row-gap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-gap.end { justify-content: flex-end; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }

/* Bars and navigation */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.bar-in, main { max-width: 880px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 24px; height: 28px; flex: none; }
.brand b { font: 900 25px/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; }
.topnav { display: none; gap: 4px; }
.navbtn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--muted); font-weight: 600; padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.navbtn svg { width: 20px; height: 20px; }
.navbtn[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.bottomnav { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.bottomnav .navbtn { flex-direction: column; gap: 3px; height: var(--nav-h); border-radius: 0; font-size: 11.5px; justify-content: center; }
.bottomnav .navbtn[aria-current="page"] { background: none; }
.bottomnav .navbtn.scan-nav svg { width: 30px; height: 30px; padding: 5px; border-radius: 10px; background: var(--accent); color: var(--on-accent); }
@media (min-width: 900px) {
  .topnav { display: flex; }
  .bottomnav { display: none; }
  body { padding-bottom: 0; }
}

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--edge); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-danger { color: var(--danger); }
.btn-danger.armed { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.field-in, .search input, .filters select, .fld select { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--edge); border-radius: 10px; background: var(--surface); color: var(--ink); }
.search { position: relative; min-width: 0; }
.search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 36px; }
.search.big input { min-height: 52px; font-size: 17px; border-radius: 14px; padding-left: 40px; }
.search.big svg { left: 14px; width: 18px; height: 18px; }

/* Expos: intro, tabs, filters */
.intro { display: grid; gap: 14px; padding-block: 24px 4px; }
.intro h1 { margin: 0; font: 900 clamp(38px, 9vw, 64px)/.9 var(--f-display); text-transform: uppercase; text-wrap: balance; }
.intro p { margin: 0; max-width: 58ch; color: var(--muted); font-size: 16.5px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.stat { display: flex; align-items: baseline; gap: 8px; }
.stat b { font: 800 32px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.stat span, .label-sm { font: 500 11px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.controls { display: grid; gap: 12px; padding-block: 16px 4px; }
.controls.flush { padding: 0; }
.tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px 12px; border: 0; background: none; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; }
.tab .n { font: 500 12px/1 var(--f-mono); padding: 3px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--ink); }
.tab-post { margin-left: auto; min-height: 36px; padding: 6px 14px; margin-bottom: 6px; }
.filters { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.filters select { width: auto; max-width: 100%; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip { flex: none; min-height: 34px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
@media (max-width: 560px) { .filters { grid-template-columns: 1fr 1fr; } .filters .search { grid-column: 1 / -1; } .filters select { width: 100%; } }
.notice { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 14px; }
.notice b { color: var(--ink); }

.list { display: grid; gap: 28px; padding-block: 16px 40px; }
.group { display: grid; gap: 12px; }
.group-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.group-h h2 { margin: 0; font: 800 22px/1 var(--f-display); text-transform: uppercase; letter-spacing: .04em; }
.group-h span { font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* The slab */
.slab { position: relative; display: grid; gap: 8px; padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--edge); box-shadow: var(--shadow); cursor: pointer; }
.slab::after { content: ""; position: absolute; inset: 3px; border-radius: 11px; border: 1px solid var(--line); pointer-events: none; }
.label { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 12px 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.kind { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font: 500 11px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kind .live { color: var(--live); display: inline-flex; align-items: center; gap: 5px; }
.kind .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.slab h3 { margin: 6px 0 4px; font: 800 26px/.98 var(--f-display); text-transform: uppercase; text-wrap: balance; overflow-wrap: anywhere; }
.open-ev { all: unset; cursor: pointer; }
.slab:has(.open-ev:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.where { margin: 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.grade { display: grid; justify-items: center; align-content: center; min-width: 74px; padding-left: 14px; border-left: 1px dashed var(--edge); text-align: center; }
.g-mon { font: 800 14px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; }
.g-day { font: 900 46px/.86 var(--f-display); font-variant-numeric: tabular-nums; }
.g-day.range { font-size: 34px; }
.g-dow { margin-top: 4px; font: 500 10px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.slab-body { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 2px 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; flex: 1 1 240px; min-width: 0; color: var(--muted); font-size: 13.5px; }
.meta .rel { color: var(--ink); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); }
.track { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--edge); background: var(--surface); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.track svg { width: 15px; height: 15px; }
.track[aria-pressed="true"] { background: var(--holo); background-size: 220% 100%; border-color: transparent; color: var(--on-holo); }
.cert { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px 2px; font: 500 10.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cert svg { height: 12px; width: auto; flex: none; }
.slab.is-tracked .label, .d-label.is-tracked { border-color: transparent; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--holo) border-box; background-size: 100% 100%, 220% 100%; }
.slab.is-tracked .label::before, .d-label.is-tracked::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--holo); background-size: 220% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .slab.is-tracked:hover .label, .slab.is-tracked:hover .label::before, .track[aria-pressed="true"]:hover { animation: foil 2.4s linear infinite; }
}
@keyframes foil { from { background-position: 0 0, 0% 0; } to { background-position: 0 0, 220% 0; } }
.slab.is-past { opacity: .78; }

.empty { display: grid; gap: 14px; justify-items: start; padding: 22px; border: 1px dashed var(--edge); border-radius: 14px; background: var(--surface); }
.empty h2 { margin: 0; font: 800 30px/1 var(--f-display); text-transform: uppercase; text-wrap: balance; }
.empty p { margin: 0; color: var(--muted); max-width: 54ch; }
.skel { height: 140px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 300% 100%; }
@media (prefers-reduced-motion: no-preference) { .skel { animation: shimmer 1.4s ease-in-out infinite; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Price check */
.scan-wrap { display: grid; gap: 12px; padding-block: 14px 24px; }
.camera { position: relative; overflow: hidden; border-radius: 18px; background: var(--camera); aspect-ratio: 3 / 4; max-height: 58vh; width: 100%; margin: 0 auto; }
@media (min-width: 700px) { .camera { aspect-ratio: 4 / 3; } }
.camera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.guide { position: absolute; left: 50%; top: 46%; height: 78%; aspect-ratio: 63 / 88; transform: translate(-50%, -50%); max-width: 86%; }
.guide i { position: absolute; width: 28px; height: 28px; border: 4px solid var(--accent); }
.guide i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.guide i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; }
.guide i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; }
.guide i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }
.camera.locked .guide i { border-color: var(--live); }
.cam-status { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 6px 12px; border-radius: 999px; background: rgba(5, 7, 15, .66); color: var(--on-camera); font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-controls { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; align-items: center; justify-content: center; gap: 22px; }
.shutter { width: 64px; height: 64px; border-radius: 50%; border: 4px solid var(--on-camera); background: rgba(255,255,255,.18); cursor: pointer; }
.shutter:active { background: rgba(255,255,255,.45); }
.pill { min-width: 70px; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); background: rgba(5,7,15,.55); color: var(--on-camera); font-weight: 600; font-size: 13px; cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.camera-off { display: grid; gap: 12px; padding: 18px; border-radius: 16px; border: 1px dashed var(--edge); background: var(--surface); }
.camera-off p { margin: 0; color: var(--muted); }
.results { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.result { flex: none; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 8px; align-items: center; width: 220px; padding: 6px 10px 6px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; cursor: pointer; }
.result[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.result img, .result .noimg { width: 38px; height: 53px; border-radius: 4px; object-fit: cover; background: var(--surface-2); }
.result b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.price { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--edge); box-shadow: var(--shadow); }
.price .art { width: 132px; aspect-ratio: 63 / 88; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.price h2 { margin: 2px 0 2px; font: 900 32px/.95 var(--f-display); text-transform: uppercase; overflow-wrap: anywhere; }
.price .sub { margin: 0; color: var(--muted); font-size: 14px; }
.big-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 12px 0 4px; }
.big-price b { font: 900 52px/.9 var(--f-display); font-variant-numeric: tabular-nums; }
.big-price span { font: 500 11px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.ladder div { padding: 6px 8px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.ladder dt { font: 500 10px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ladder dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.printings { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.price-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fresh { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
@media (max-width: 520px) { .price { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; } .price .art { width: 96px; } .big-price b { font-size: 44px; } .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Deal tray */
.tray { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); z-index: 4; margin-top: 8px; border-radius: 16px 16px 0 0; background: var(--ink); color: var(--surface); box-shadow: 0 -12px 30px -20px rgba(0,0,0,.6); }
@media (min-width: 900px) { .tray { bottom: 0; } }
.tray-head { all: unset; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; width: 100%; padding: 12px 16px; cursor: pointer; }
.tray-head:focus-visible { outline: 2px solid var(--accent); }
.tray-title { font: 800 18px/1 var(--f-display); text-transform: uppercase; letter-spacing: .06em; }
.tray-sum { font-size: 14px; opacity: .85; font-variant-numeric: tabular-nums; }
.tray-offer { margin-left: auto; font-size: 14px; font-variant-numeric: tabular-nums; }
.tray-offer b { color: var(--accent); font-size: 18px; }
.tray-body { display: grid; gap: 10px; padding: 0 16px 16px; max-height: 52vh; overflow-y: auto; }
.tray .btn { background: transparent; color: var(--surface); border-color: rgba(255,255,255,.3); }
.tray .btn-accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tray .hint, .tray .muted { color: inherit; opacity: .7; }
.offer-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.offer-row input { flex: 1 1 140px; accent-color: var(--accent); }
.offer-row output { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3ch; }
.tray-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tray-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.06); }
.tray-list .nm { min-width: 0; }
.tray-list .nm b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.tray-list .nm span { font-size: 12px; opacity: .7; }
.tray-list .amt { font-variant-numeric: tabular-nums; font-weight: 700; }
.qty { display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; }
.qty button { all: unset; width: 30px; height: 30px; text-align: center; cursor: pointer; font-weight: 700; }
.qty span { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }

/* Portfolio */
.pf-head { display: grid; gap: 10px; padding-block: 22px 8px; }
.pf-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.pf-value b { font: 900 clamp(48px, 12vw, 76px)/.86 var(--f-display); font-variant-numeric: tabular-nums; }
.gain { font-weight: 700; font-variant-numeric: tabular-nums; }
.gain.up { color: var(--up); }
.gain.down { color: var(--down); }
.spark { width: 100%; height: 84px; display: block; }
.spark .area { fill: var(--accent); opacity: .18; }
.spark .line { fill: none; stroke: var(--accent-text); stroke-width: 2; }
.spark .end { fill: var(--accent-text); }
.spark .grid { stroke: var(--line); stroke-width: 1; }
.pf-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-block: 8px; }
.pf-tools select { width: auto; min-height: 40px; }
.holdings { list-style: none; margin: 0; padding: 0 0 40px; display: grid; gap: 8px; }
.holding { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%; }
.holding img, .holding .noimg { width: 44px; height: 61px; border-radius: 4px; object-fit: cover; background: var(--surface-2); }
.holding .nm { min-width: 0; }
.holding .nm b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holding .nm > span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holding .val { text-align: right; font-variant-numeric: tabular-nums; }
.holding .val b { display: block; }
.holding .val span { font-size: 12.5px; }
.holding .nm .badge, .badge { display: inline-block; font: 600 10.5px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); margin-right: 4px; vertical-align: 1px; }
.badge.slabbed { border-color: transparent; background: var(--holo); color: var(--on-holo); }

/* Account */
.acct { display: grid; gap: 18px; padding-block: 24px 40px; max-width: 520px; }
.acct h1 { margin: 0; font: 900 44px/.9 var(--f-display); text-transform: uppercase; }
.card-box { display: grid; gap: 12px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.card-box h2 { margin: 0; font: 800 22px/1 var(--f-display); text-transform: uppercase; letter-spacing: .03em; }
.card-box p { margin: 0; color: var(--muted); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Sheets */
.scrim { position: fixed; inset: 0; z-index: 20; background: var(--scrim); }
.sheet { position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; max-height: calc(100% - 40px - env(safe-area-inset-top, 0px)); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: 20px 20px 0 0; border: 1px solid var(--line); border-bottom: 0; padding-top: 18px; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
@media (min-width: 720px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(620px, calc(100% - 48px)); max-height: 88%; transform: translate(-50%, -50%); border-radius: 18px; border-bottom: 1px solid var(--line); padding: 22px 24px 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  .sheet:not([hidden]) { animation: rise .22s cubic-bezier(.2,.8,.2,1); }
  @media (min-width: 720px) { .sheet:not([hidden]) { animation: pop .18s ease-out; } }
}
@keyframes rise { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: translate(-50%, -48%); opacity: .4; } to { transform: translate(-50%, -50%); opacity: 1; } }
.sheet-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.eyebrow { font: 500 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.x { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; flex: none; }
.x svg { width: 16px; height: 16px; }

.d-label { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; padding: 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.d-label h2 { margin: 6px 0; font: 900 clamp(30px, 7vw, 40px)/.92 var(--f-display); text-transform: uppercase; text-wrap: balance; overflow-wrap: anywhere; }
.d-label .host { margin: 0; color: var(--muted); font-size: 14px; }
.d-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.facts { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 16px; margin: 16px 0; }
.facts dt { font: 500 11px/1.6 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.facts dd small { display: block; color: var(--muted); font-size: 13.5px; }
.facts dd a, .link { color: var(--accent-text); font-weight: 600; text-underline-offset: 3px; }
@media (max-width: 460px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }
.about { white-space: pre-wrap; margin: 0 0 16px; }
.copyrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copyrow code { font: 500 14px/1.4 var(--f-mono); user-select: all; overflow-wrap: anywhere; }
.owner-row { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.owner-row p { flex-basis: 100%; margin: 0 0 4px; color: var(--muted); font-size: 13.5px; }

.form { display: grid; gap: 18px; }
.form h2 { margin: 0; font: 900 34px/.95 var(--f-display); text-transform: uppercase; }
.form .sub { margin: 4px 0 0; color: var(--muted); }
fieldset { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
legend { padding: 0 0 8px; font: 600 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fld { display: grid; gap: 5px; min-width: 0; }
.fld.full { grid-column: 1 / -1; }
.fld label, .fld .lbl { font-weight: 600; font-size: 14px; }
.fld label i, .fld .lbl i { font-style: normal; font-weight: 400; color: var(--muted); }
.fld textarea { min-height: 96px; resize: vertical; }
.fld .err { margin: 0; font-size: 13px; color: var(--danger); }
.fld [aria-invalid="true"] { border-color: var(--danger); }
.tagpick { display: flex; flex-wrap: wrap; gap: 6px; }
.tagpick label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.tagpick input { accent-color: var(--accent); margin: 0; }
.tagpick label:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.form-err { margin: 0; color: var(--danger); font-size: 14px; }
@media (max-width: 520px) { fieldset { grid-template-columns: minmax(0, 1fr); } }
.import-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 240px; overflow-y: auto; font-size: 13.5px; }
.import-list li { padding: 6px 8px; border-radius: 8px; background: var(--surface-2); }
.import-list li span { color: var(--muted); }

.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--surface); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* ===== Tall Grass: dark and electric ===== */
body { background-image: radial-gradient(900px 520px at 88% -8%, rgba(124, 201, 255, .13), transparent 60%), radial-gradient(720px 440px at -5% 0%, rgba(197, 155, 255, .11), transparent 60%); background-repeat: no-repeat; background-attachment: fixed; }
body::before { background: var(--bg); }
.bar { background: rgba(7, 8, 15, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.brand b, .holo-text, .big-price b, .pf-value b { background: var(--holo); background-size: 160% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand svg { width: 22px; height: 26px; }
.bottomnav { grid-template-columns: repeat(5, 1fr); background: rgba(16, 18, 30, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.bottomnav .navbtn { font-size: 11px; padding: 8px 2px; }
.bottomnav .navbtn.scan-nav svg { width: 40px; height: 40px; padding: 8px; border-radius: 14px; margin-top: -14px; box-shadow: var(--glow); }
.navbtn[aria-current="page"] { color: var(--ink); }
.btn-accent { box-shadow: var(--glow); }
.btn-accent:hover { border-color: var(--accent); filter: brightness(1.06); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tab[aria-selected="true"]::after { background: var(--holo); }
.slab { transition: border-color .15s ease, box-shadow .15s ease; }
.slab:hover { border-color: #46507f; box-shadow: var(--shadow), 0 0 0 1px rgba(124, 201, 255, .12); }
.slab.is-featured { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--holo) border-box; }
.feat-flag { display: inline-block; padding: 2px 7px; border-radius: 5px; background: var(--holo); color: var(--on-holo); font: 600 10.5px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.g-mon { color: var(--accent); }
.price { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(140deg, rgba(124,201,255,.55), rgba(197,155,255,.25) 40%, var(--line) 70%) border-box; }
.price .art { box-shadow: 0 18px 40px -18px rgba(124, 201, 255, .55); }
.tray { background: var(--surface-2); color: var(--ink); border: 1px solid var(--edge); border-bottom: 0; overflow: hidden; }
.tray::before { content: ""; display: block; height: 3px; background: var(--holo); }
.tray .btn { color: var(--ink); border-color: var(--edge); }
.tray .btn-accent { color: var(--on-accent); border-color: var(--accent); }
.qty { border-color: var(--edge); }
.sheet { box-shadow: 0 -30px 80px -30px rgba(0, 0, 0, .9); }
.card-box, .holding, .empty { background: var(--surface); }
.minw { min-width: 0; }
.holdings.flush { padding-bottom: 0; }

/* Pack rooms */
.rooms { display: grid; gap: 18px; padding-block: 8px 48px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.room-row { grid-template-columns: 12px minmax(0, 1fr) auto; }
.room-row code, .code { font: 600 15px/1 var(--f-mono); letter-spacing: .14em; color: var(--accent); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--edge); }
.dot.on { background: var(--live); box-shadow: 0 0 10px var(--live); }
.room-head { display: grid; gap: 8px; padding-top: 10px; }
.room-head .back { justify-self: start; padding-left: 0; min-height: 32px; }
.room-head h1 { margin: 0; font: 900 clamp(36px, 9vw, 60px)/.92 var(--f-display); text-transform: uppercase; overflow-wrap: anywhere; }
.room-head .kind { margin: 0; }
.code { font-size: 24px; user-select: all; }
.room-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 14px; }
.room-total b { font: 900 clamp(54px, 15vw, 96px)/.86 var(--f-display); font-variant-numeric: tabular-nums; }
.room-total span { color: var(--muted); }
.room-total .gain.up { color: var(--up); } .room-total .gain.down { color: var(--down); }
.best { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; margin-bottom: 12px; border-radius: 14px; border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--holo) border-box; }
.best img, .best .noimg { width: 64px; aspect-ratio: 63 / 88; height: auto; border-radius: 5px; object-fit: cover; background: var(--surface-2); }
.best b { display: block; font-size: 17px; } .best span { color: var(--muted); font-size: 14px; } .best p { margin: 0 0 2px; }
.board, .road { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.board li, .road li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.road li { grid-template-columns: 30px 40px minmax(0, 1fr) auto; }
.road img, .road .noimg { width: 40px; height: 56px; border-radius: 4px; object-fit: cover; background: var(--surface-2); }
.board li.lead { border-color: rgba(255, 210, 63, .5); }
.rank { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); font: 600 13px/1 var(--f-mono); color: var(--muted); }
.rank.first { background: var(--accent); color: var(--on-accent); box-shadow: var(--glow); }
.board .nm b, .road .nm b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board .nm span, .road .nm span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amt { font-variant-numeric: tabular-nums; }
.room-controls { display: grid; gap: 12px; }
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.pull { position: relative; display: grid; gap: 2px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; min-width: 0; }
.pull img, .pull .noimg { width: 100%; aspect-ratio: 63 / 88; height: auto; border-radius: 6px; object-fit: cover; background: var(--surface-2); margin-bottom: 4px; }
.pull b, .pull span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pull span { color: var(--muted); } .pull .amt { color: var(--accent); font-weight: 700; }
.pull .rm { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(2, 3, 8, .75); color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; }
.room-foot { padding-top: 6px; }
.room-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-radius: 14px; border: 1px solid transparent; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--holo) border-box; }
.room-banner span { flex: 1 1 160px; min-width: 0; }
.room-banner .btn { min-height: 36px; padding: 6px 12px; }

/* ===== Home, motion and depth ===== */
body { overflow-x: clip; }
#view-home .hero-stage, #view-home .ticker { margin-inline: calc(50% - 50vw); }
#view-home .hero-stage { padding-inline: max(16px, calc(50vw - 424px)); }
.btn-lg { min-height: 52px; padding: 12px 24px; font-size: 16px; }
.btn { transition: transform .12s ease, filter .15s ease, border-color .15s ease; }
.btn:active, .track:active, .tile:active, .chip:active { transform: scale(.96); }
.acct-btn { margin-left: auto; padding: 8px; border-radius: 50%; border: 1px solid var(--line); }
.acct-btn svg { width: 22px; height: 22px; }
@media (min-width: 900px) { .acct-btn { display: none; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; padding-block: 20px 4px; }
.tile { all: unset; box-sizing: border-box; position: relative; overflow: hidden; cursor: pointer; display: grid; gap: 6px; align-content: start; padding: 16px 18px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); transition: transform .2s ease, border-color .2s ease; }
.tile:hover { transform: translateY(-3px); border-color: #46507f; }
.tile:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tile::after { content: ""; position: absolute; right: -28%; bottom: -62%; width: 78%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(124, 201, 255, .22), transparent 68%); pointer-events: none; }
.tile.t2::after { background: radial-gradient(circle, rgba(255, 210, 63, .18), transparent 68%); }
.tile.t3::after { background: radial-gradient(circle, rgba(197, 155, 255, .24), transparent 68%); }
.tile.live-tile { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--holo) border-box; }
.tile .big { font: 900 clamp(46px, 10vw, 68px)/.88 var(--f-display); text-transform: uppercase; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile .big small { margin-left: 8px; font: 500 12px/1 var(--f-mono); letter-spacing: .12em; color: var(--muted); }
.tile .sub { color: var(--muted); font-size: 14px; }
.group-h .btn-quiet { min-height: 30px; padding: 2px 4px; }
.art-wrap { align-self: start; border-radius: 9px; }
.price .art { display: block; }
.best { transition: transform .2s ease; }
@media (prefers-reduced-motion: no-preference) {
  .view.enter { animation: viewIn .34s cubic-bezier(.2, .8, .2, 1) both; }
  .view.enter :is(.slab, .holding, .board li, .road li, .card-box, .tile, .feed .pull, .group-h) { animation: riseIn .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(60ms + var(--i, 0) * 55ms); }
  .view.enter :is(.slab, .holding, .board li, .road li, .card-box, .tile, .feed .pull, .group-h):nth-child(2) { --i: 1; }
  .view.enter :is(.slab, .holding, .board li, .road li, .card-box, .tile, .feed .pull, .group-h):nth-child(3) { --i: 2; }
  .view.enter :is(.slab, .holding, .board li, .road li, .card-box, .tile, .feed .pull, .group-h):nth-child(4) { --i: 3; }
  .view.enter :is(.slab, .holding, .board li, .road li, .card-box, .tile, .feed .pull, .group-h):nth-child(5) { --i: 4; }
  .view.enter :is(.slab, .holding, .board li, .road li, .card-box, .tile, .feed .pull, .group-h):nth-child(6) { --i: 5; }
  .view.enter :is(.slab, .holding, .board li, .road li, .card-box, .tile, .feed .pull, .group-h):nth-child(7) { --i: 6; }
  .view.enter :is(.slab, .holding, .board li, .road li, .card-box, .tile, .feed .pull, .group-h):nth-child(8) { --i: 7; }
  .view.enter :is(.slab, .holding, .board li, .road li, .card-box, .tile, .feed .pull, .group-h):nth-child(9) { --i: 8; }
  .view.enter :is(.slab, .holding, .board li, .road li, .card-box, .tile, .feed .pull, .group-h):nth-child(10) { --i: 9; }
  .bottomnav .navbtn.scan-nav svg { animation: scanPulse 2.6s ease-out infinite; }
  .slab.is-featured { background-size: 100% 100%, 220% 100%; animation: foil 7s linear infinite; }
  .feed .pull.new { animation: pullIn .7s cubic-bezier(.2, 1.1, .3, 1) both; z-index: 1; }
  .feed .pull.new::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--holo); background-size: 220% 100%; mix-blend-mode: screen; pointer-events: none; animation: flash .9s ease-out both; }
  .camera.locked .guide { animation: lockPop .45s cubic-bezier(.2, 1.4, .3, 1); }
  .toast:not([hidden]) { animation: toastIn .3s cubic-bezier(.2, 1.2, .3, 1); }
  .navbtn[aria-current="page"] svg { animation: navPop .35s cubic-bezier(.2, 1.5, .3, 1); }
}
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes scanPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 210, 63, .55), var(--glow); } 70%, 100% { box-shadow: 0 0 0 14px rgba(255, 210, 63, 0), var(--glow); } }
@keyframes pullIn { from { opacity: 0; transform: perspective(600px) rotateY(90deg) scale(.7); } to { opacity: 1; transform: none; } }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }
@keyframes lockPop { from { transform: translate(-50%, -50%) scale(1.08); } to { transform: translate(-50%, -50%) scale(1); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px) scale(.94); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes navPop { from { transform: scale(.7); } to { transform: scale(1); } }

/* Pulls from other people arrive face down, then flip */
.pull .cover { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; align-content: center; gap: 8px; border-radius: inherit; border: 1px solid transparent; background: linear-gradient(160deg, #1b2038, #0c0e1a 62%) padding-box, var(--holo) border-box; color: rgba(255, 255, 255, .85); text-align: center; }
.pull .cover svg { width: 38%; height: auto; }
.pull .cover span { padding: 0 6px; font-size: 11.5px; color: var(--muted); white-space: normal; }
.camera canvas.cam-grass { z-index: 0; height: 30%; pointer-events: none; opacity: .92; }
.cap-pop { position: absolute; left: 50%; top: 46%; width: 34%; aspect-ratio: 63 / 88; margin-left: -17%; transform: translateY(-50%); border-radius: 10px; overflow: hidden; pointer-events: none; box-shadow: 0 0 0 2px var(--live), 0 0 60px -4px rgba(59, 227, 143, .85); background: linear-gradient(160deg, #1b2038, #0c0e1a 62%); }
.cap-pop img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .feed .pull.incoming { animation: tileFlip .5s ease-in-out both; animation-delay: calc(.95s + var(--fd, 0s)); }
  .feed .pull.incoming .cover { animation: coverOff 0s linear both; animation-delay: calc(1.2s + var(--fd, 0s)); }
  .feed .pull.incoming .cover svg { animation: coverBeat .5s ease-in-out infinite alternate; }
  .cap-pop:not([hidden]) { animation: capPop 1.05s cubic-bezier(.2, 1, .3, 1) both; }
}
@media (prefers-reduced-motion: reduce) { .pull .cover { display: none; } }
@keyframes tileFlip { 0%, 100% { transform: perspective(600px) rotateY(0); } 50% { transform: perspective(600px) rotateY(90deg); } }
@keyframes coverOff { to { visibility: hidden; } }
@keyframes coverBeat { to { transform: scale(1.14); opacity: .6; } }
@keyframes capPop { 0% { opacity: 0; transform: translateY(40%) scale(.6) rotate(-10deg); } 35% { opacity: 1; transform: translateY(-50%) scale(1.04) rotate(0); } 75% { opacity: 1; transform: translateY(-50%) scale(1); } 100% { opacity: 0; transform: translateY(-64%) scale(.96); } }

/* The feed is a strip right under the total, newest first, so a new pull is always in view */
.feed { display: flex; grid-template-columns: none; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.feed .pull { flex: 0 0 112px; scroll-snap-align: start; }
#room-feed { margin-bottom: 4px; } #room-feed > p { margin: 0 0 8px; }

/* ===== App shell and glass =====
   The page itself never scrolls or zooms: the header and tab bar float over one scrolling
   area, so nothing rubber-bands or drifts on a phone. Chrome (header, tab bar, tray, sheets,
   camera controls) is frosted glass; cards get a lighter glass fill without the blur. */
:root {
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  --bar-h: 54px; --nav-h: 64px; --nav-gap: max(10px, calc(var(--sab) - 12px)); --nav-space: calc(var(--nav-h) + var(--nav-gap) + 10px);
  --glass-fill: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03) 46%, rgba(255, 255, 255, .06)), rgba(17, 20, 36, .56);
  --glass-edge: rgba(255, 255, 255, .16);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -1px 0 rgba(255, 255, 255, .05), 0 22px 46px -22px rgba(0, 0, 0, .9);
  --glass-blur: blur(26px) saturate(190%);
  --card-fill: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)), rgba(15, 17, 29, .74);
  --card-edge: rgba(255, 255, 255, .09);
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 16px 34px -24px rgba(0, 0, 0, .95);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  :root { --glass-fill: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)), rgba(17, 20, 36, .96); }
}
html, body { height: 100%; }
html { overflow: hidden; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { position: fixed; inset: 0; overflow: hidden; overscroll-behavior: none; padding-bottom: 0; display: flex; flex-direction: column; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
body::before { display: none; }
input, textarea, .copyrow code, .code, .about, .facts dd { -webkit-user-select: text; user-select: text; }
main { flex: 1 1 auto; min-height: 0; max-width: none; margin: 0; padding: calc(var(--sat) + var(--bar-h)) 0 var(--nav-space); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
main::-webkit-scrollbar, .scan-scroll::-webkit-scrollbar, .tray-body::-webkit-scrollbar, .results::-webkit-scrollbar, .chips::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }
.view { max-width: 880px; margin: 0 auto; padding-left: max(16px, var(--sal)); padding-right: max(16px, var(--sar)); }
/* A soft fade so content dissolves behind the floating tab bar */
body::after { content: ""; position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; height: calc(var(--nav-space) + 26px); pointer-events: none; background: linear-gradient(rgba(7, 8, 15, 0), rgba(7, 8, 15, .92) 72%); }

/* Header: glass that fades out at its lower edge */
.bar { position: fixed; z-index: 8; top: 0; left: 0; right: 0; padding: var(--sat) 0 14px; border-bottom: 0;
  background: linear-gradient(180deg, rgba(7, 8, 15, .88), rgba(7, 8, 15, .5) 68%, rgba(7, 8, 15, 0));
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  -webkit-mask-image: linear-gradient(#000 calc(100% - 16px), transparent); mask-image: linear-gradient(#000 calc(100% - 16px), transparent); }
.bar-in { height: var(--bar-h); padding-block: 0; }
.acct-btn { width: 40px; height: 40px; padding: 0; justify-content: center; border: 1px solid var(--glass-edge); background: var(--glass-fill); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22); color: var(--ink); }
.topnav .navbtn[aria-current="page"] { background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }

/* Tab bar: a floating glass capsule */
.bottomnav { left: max(12px, var(--sal)); right: max(12px, var(--sar)); bottom: var(--nav-gap); height: var(--nav-h); max-width: 520px; margin-inline: auto; padding: 6px; gap: 2px; border: 1px solid var(--glass-edge); border-radius: 32px; background: var(--glass-fill); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-shadow); }
.bottomnav .navbtn { height: auto; min-width: 0; padding: 4px 2px; gap: 2px; border-radius: 26px; font-size: 10.5px; letter-spacing: .01em; transition: background .22s ease, color .22s ease; }
.bottomnav .navbtn span { white-space: nowrap; }
.bottomnav .navbtn[aria-current="page"] { background: rgba(255, 255, 255, .13); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), inset 0 0 0 1px rgba(255, 255, 255, .05); }
.bottomnav .navbtn.scan-nav svg { width: 34px; height: 34px; padding: 7px; margin-top: 0; border-radius: 12px; background: linear-gradient(180deg, #FFE584, #FFD23F 55%, #F2B91B); }
.bottomnav .navbtn.scan-nav[aria-current="page"] { background: none; box-shadow: none; }
@media (min-width: 900px) { :root { --nav-space: 28px; } body::after { display: none; } }

/* Controls */
.btn { border-color: rgba(255, 255, 255, .15); background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
.btn-accent { border-color: transparent; background: linear-gradient(180deg, #FFE584, #FFD23F 52%, #F2B91B); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), inset 0 -1px 0 rgba(120, 80, 0, .25), var(--glow); }
.btn-quiet { border-color: transparent; background: none; box-shadow: none; }
.btn-danger.armed { background: var(--danger); }
.chip { border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); }
.chip[aria-pressed="true"] { background: linear-gradient(180deg, #FFE584, #FFD23F 55%, #F2B91B); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); }
.field-in, .search input, .filters select, .fld select { border-color: rgba(255, 255, 255, .12); border-radius: 14px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.search.big input { min-height: 50px; border-radius: 18px; }
.seg { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); }
.seg button[aria-pressed="true"] { background: rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22); }
.x { border-color: var(--glass-edge); background: rgba(255, 255, 255, .08); }

/* Cards */
.slab, .card-box, .holding, .tile, .empty, .board li, .road li, .pull, .result, .notice { background: var(--card-fill); border-color: var(--card-edge); box-shadow: var(--card-shadow); }
.slab { border-radius: 20px; } .slab::after { display: none; } .label { border-radius: 14px; background: rgba(255, 255, 255, .045); border-color: rgba(255, 255, 255, .07); }
.card-box { border-radius: 22px; padding: 18px; } .tile { border-radius: 24px; } .holding, .board li, .road li { border-radius: 16px; } .empty { border-radius: 22px; border-style: solid; }
.result[aria-pressed="true"] { border-color: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), var(--card-shadow); }
.price { border-radius: 24px; box-shadow: var(--card-shadow); background: linear-gradient(180deg, rgba(27, 31, 52, .92), rgba(13, 15, 27, .92)) padding-box, linear-gradient(150deg, rgba(255, 255, 255, .34), rgba(124, 201, 255, .3) 28%, rgba(197, 155, 255, .16) 55%, rgba(255, 255, 255, .06)) border-box; }
.ladder div { border-radius: 12px; background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .07); }
.price-actions .btn { flex: 1 1 0; } .price-actions .btn-quiet { flex: 0 0 auto; padding-inline: 8px; }

/* Price check: the camera stays put and results scroll under it */
#view-scan:not([hidden]) { display: flex; flex-direction: column; gap: 10px; height: 100%; padding-top: 4px; }
.scan-wrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding-block: 0; }
.scan-wrap > * { flex: none; }
.scan-wrap > .scan-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; display: grid; gap: 10px; align-content: start; padding-bottom: 10px; }
.scan-scroll .hint { margin: -2px 2px 0; font-size: 12.5px; }
.camera { border-radius: 26px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 26px 50px -34px #000; }
.cam-status, .pill { border: 1px solid rgba(255, 255, 255, .2); background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04)), rgba(8, 10, 20, .42); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.pill { min-width: 76px; min-height: 40px; }
.pill[aria-pressed="true"] { background: linear-gradient(180deg, #FFE584, #FFD23F 55%, #F2B91B); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), var(--glow); }
.shutter { width: 62px; height: 62px; border: 3px solid rgba(255, 255, 255, .92); background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 4px rgba(8, 10, 20, .35), 0 8px 22px -8px rgba(0, 0, 0, .8); transition: transform .12s ease; }
.shutter:active { transform: scale(.92); }
.guide i { border-width: 3px; width: 30px; height: 30px; filter: drop-shadow(0 0 6px rgba(255, 210, 63, .55)); }
.camera-off { border-radius: 22px; border: 1px solid var(--card-edge); background: var(--card-fill); box-shadow: var(--card-shadow); }

/* Deal tray: a glass dock at the foot of Price check */
.tray { position: static; flex: none; margin: 0 0 2px; border: 1px solid var(--glass-edge); border-radius: 24px; background: var(--glass-fill); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-shadow); }
.tray::before { height: 2px; opacity: .9; }
.tray-head { padding: 12px 16px 13px; }
.tray-body { max-height: 40dvh; overscroll-behavior: contain; scrollbar-width: none; }
.tray-list li { border-radius: 14px; background: rgba(255, 255, 255, .07); }
.qty { border-color: rgba(255, 255, 255, .18); }

/* Sheets and toasts */
.sheet { border-color: var(--glass-edge); border-radius: 30px 30px 0 0; background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02) 160px), rgba(13, 15, 27, .8); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 -30px 80px -30px rgba(0, 0, 0, .9); scrollbar-width: none; }
.sheet::before { content: ""; display: block; width: 38px; height: 5px; margin: -8px auto 10px; border-radius: 3px; background: rgba(255, 255, 255, .28); }
.scrim { background: rgba(2, 3, 8, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@media (min-width: 720px) { .sheet { border-radius: 26px; } .sheet::before { display: none; } }
.toast { bottom: calc(var(--nav-space) + 8px); border: 1px solid var(--glass-edge); background: var(--glass-fill); color: var(--ink); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-shadow); }
.d-label { border-radius: 18px; }

/* Phone fit */
@media (max-width: 899px) {
  input, select, textarea { font-size: 16px; }   /* smaller text makes iOS zoom the page on focus */
  .camera { aspect-ratio: auto; height: clamp(208px, 39dvh, 400px); max-height: none; }
  .cam-controls { bottom: 10px; gap: 18px; }
  .intro { padding-block: 14px 2px; } .pf-head { padding-block: 12px 6px; } .acct { padding-block: 14px 24px; } .rooms { padding-block: 4px 24px; }
  .list { padding-block: 14px 20px; gap: 22px; } .holdings { padding-bottom: 16px; }
  .result { width: 190px; padding: 5px 10px 5px 5px; border-radius: 14px; }
  .result img, .result .noimg { width: 32px; height: 45px; }
}
@media (max-width: 520px) {
  /* Art, name and price on one row; the price ladder runs full width under them */
  .price { grid-template-columns: 92px minmax(0, 1fr); gap: 4px 14px; padding: 14px; align-items: start; }
  .price > .minw { display: contents; }
  .price .art-wrap { grid-row: 1 / span 4; align-self: center; } .price .art { width: 92px; }
  .price .label-sm { align-self: end; margin: 2px 0 0; } .price h2 { font-size: 30px; margin: 0; } .price .sub { font-size: 13px; }
  .big-price { margin: 4px 0 0; gap: 8px; } .big-price b { font-size: 46px; }
  .price .ladder, .price .printings, .price .price-actions, .price .fresh { grid-column: 1 / -1; }
  .price .ladder { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 10px 0 0; }
  .price .ladder div { padding: 6px 7px; } .price .ladder dt { font-size: 9px; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .price .ladder dd { font-size: 13.5px; }
  .price .printings { margin-top: 8px; } .price .price-actions { margin-top: 10px; } .price .fresh { margin: 8px 0 0; text-align: center; }
  .hero-stage h1 { font-size: clamp(54px, 15.5vw, 72px); }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass-fill: rgba(17, 20, 36, .97); --glass-blur: none; }
}
/* Camera controls sit in the corners so they never cover the card guide */
@media (max-width: 899px) {
  .guide { top: 49%; height: 72%; }
  .cam-controls { position: static; display: contents; }
  .cam-controls .pill, .cam-controls .shutter { position: absolute; z-index: 2; }
  #cam-mode { left: 12px; bottom: 12px; } #cam-stack { right: 12px; bottom: 12px; }
  .cam-controls .shutter { right: 16px; top: 50%; width: 54px; height: 54px; margin-top: -27px; }
  .cam-controls .shutter:active { transform: scale(.92); }
}
/* Printing choice leads the price card, so it's on screen the moment a card is found */
.price > .printings { grid-column: 1 / -1; flex-wrap: nowrap; align-items: center; gap: 6px; margin: 0 0 6px; overflow-x: auto; scrollbar-width: none; }
.price > .printings::-webkit-scrollbar { display: none; }
.price > .printings .label-sm { flex: none; margin-right: 4px; }
.price > .printings .chip { min-height: 36px; padding: 6px 14px; }
@media (max-width: 899px) {
  .camera { transition: height .28s cubic-bezier(.2, .8, .2, 1); }
  #view-scan.has-card .camera { height: clamp(196px, 33dvh, 340px); }
  #view-scan.has-card .scan-scroll .hint { display: none; }
  .search.big input { min-height: 46px; }
  .result { padding: 4px 10px 4px 4px; } .result img, .result .noimg { width: 28px; height: 39px; }
}
@media (max-width: 520px) {
  .price > .minw > .label-sm { display: none; }
  .price .art-wrap { grid-row: auto / span 3; }
  .price > .printings { margin: 0 0 8px; }
}
.price > .printings .label-sm { align-self: center; margin: 0 4px 0 0; }
.toast { width: max-content; text-align: center; }
@media (max-width: 899px) {
  .guide { top: 53%; height: 68%; }
  /* Toasts drop in under the header, clear of the tray and tab bar */
  .toast { top: calc(var(--sat) + var(--bar-h) + 6px); bottom: auto; }
}
/* Scan speed: the card guide fills as much of the camera as fits, because the reader only gets
   the pixels inside it. The camera keeps its full height while a result is showing. */
@media (max-width: 899px) {
  .guide { top: 50%; height: 88%; }
  .camera, #view-scan.has-card .camera { height: clamp(208px, 36dvh, 400px); }
  .cam-status { top: 8px; max-width: 60%; padding: 4px 10px; }
}
