:root { --navy:#1d2b53; --navy2:#111a33; --ink:#0b1022; --cream:#fff1d6; --red:#e4343e; --cyan:#29d3e8; --gold:#ffcc33; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); color: var(--cream); }
body { font: 15px/1.4 "Courier New", Courier, ui-monospace, monospace; -webkit-text-size-adjust: 100%; }
body::after { content: ""; pointer-events: none; position: fixed; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.12) 0 1px, transparent 1px 3px); z-index: 50; }
.crt-frame { min-height: 100vh; min-height: 100dvh; background: radial-gradient(ellipse at center, #22335f 0%, var(--navy) 55%, var(--navy2) 100%); }
#app { max-width: 960px; margin: 0 auto; padding: 10px max(12px, env(safe-area-inset-right)) 40px max(12px, env(safe-area-inset-left)); }
canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
h2 { color: var(--gold); margin: 14px 0 8px; font-size: 22px; text-shadow: 2px 2px 0 var(--ink); }
h3 { color: var(--cyan); margin: 16px 0 6px; }
button { font: inherit; font-weight: bold; cursor: pointer; background: var(--cream); color: var(--ink); border: 0; border-bottom: 3px solid #b9a77f; padding: 8px 12px; margin: 3px; border-radius: 2px; touch-action: manipulation; }
@media (hover: hover) { button:hover:not(:disabled) { filter: brightness(1.1); } }
button:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 1px; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.big { background: var(--red); color: var(--cream); border-bottom-color: #8e1c23; font-size: 18px; padding: 12px 18px; }
.center { text-align: center; justify-content: center; }
.title { text-align: center; }
#logo { width: 100%; max-width: 640px; height: auto; margin-top: 18px; }
.tagline { color: var(--cyan); font-weight: bold; font-size: 17px; }
.daily { margin: 12px auto; padding: 8px; border: 2px dashed var(--cyan); max-width: 460px; }
.daily small { color: #b8c3e0; }
.howto { text-align: left; max-width: 560px; margin: 10px auto; background: rgba(0,0,0,.25); padding: 10px 14px; border-left: 4px solid var(--red); }
.howto ul { margin: 6px 0 0 0; padding-left: 18px; }
.title button.big { display: block; margin: 6px auto; min-width: 240px; }
.title-ad { display: inline-block; background: var(--gold); color: var(--ink); font-weight: bold; padding: 4px 10px; margin: 8px 0 12px; transform: rotate(-1.5deg); }
.adtoggle { font-size: 13px; color: #c9d3f0; cursor: pointer; user-select: none; }
.adtoggle.center { display: block; margin-top: 8px; }
.scores { margin-top: 6px; color: var(--gold); }
.foot { margin-top: 18px; font-size: 12px; color: #8fa0c8; text-align: center; }
.hud { display: flex; justify-content: space-between; align-items: center; background: var(--ink); padding: 8px 10px; border-bottom: 3px solid var(--red); position: sticky; top: 0; z-index: 10; flex-wrap: wrap; gap: 6px; }
.hud-l span { margin-right: 14px; font-weight: bold; font-size: 18px; }
.clock { color: var(--cyan); } .cash { color: var(--gold); } .bagc { color: var(--cream); font-size: 15px !important; }
.sunbar { position: relative; height: 20px; background: #2b3d6e; margin: 4px 0; }
.sunbar div { height: 100%; background: linear-gradient(90deg, #ffcc33, #ff7b39 70%, #e4343e); }
.sunbar span { position: absolute; left: 8px; top: 1px; font-size: 12px; font-weight: bold; color: var(--ink); text-shadow: 0 0 2px #fff; }
.ticker { overflow: hidden; white-space: nowrap; background: var(--gold); color: var(--ink); font-weight: bold; font-size: 12px; padding: 3px 0; }
.ticker.lvl2 { font-size: 14px; } .ticker.lvl3 { font-size: 16px; background: var(--red); color: var(--cream); } .ticker.lvl4 { font-size: 18px; background: var(--red); color: var(--cream); padding: 6px 0; }
.tick-in { display: inline-block; padding-left: 8px; animation: tick 28s linear infinite; }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tick-in { animation: none; padding-left: 8px; } }
.toast { background: var(--cyan); color: var(--ink); font-weight: bold; padding: 8px 10px; margin: 8px 0; }
.shelfnote { color: #c9d3f0; margin-bottom: 8px; }
.stops { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.stopcard { background: var(--navy2); border: 2px solid #3a4d82; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.stopcard.gift { border: 3px solid var(--gold); background: repeating-linear-gradient(45deg, #2a1d3e 0 10px, #241833 10px 20px); }
.stopcard.done, .stopcard.late { opacity: .45; }
.st-h { font-weight: bold; font-size: 16px; color: var(--cream); }
.st-b { color: #c9d3f0; font-size: 13px; }
.st-m { color: var(--cyan); font-size: 13px; }
.st-done { color: #8fa0c8; font-style: italic; }
.rumor { color: var(--ink); background: #ff9e57; font-size: 12px; padding: 2px 6px; font-weight: bold; }
.stopcard button { align-self: flex-start; margin-top: auto; }
.giftbtn { background: var(--gold) !important; animation: pulse 1s steps(2) infinite; }
@keyframes pulse { 50% { background: #fff !important; } }
button.home { margin-top: 16px; width: 100%; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.item { display: flex; gap: 10px; background: var(--navy2); border: 2px solid #3a4d82; padding: 8px; }
.item.sold { border-color: var(--cyan); } .item.pulled, .item.gone { opacity: .5; }
.artbox { flex: 0 0 96px; }
.artbox canvas { width: 96px; height: 120px; display: block; }
.info { flex: 1; min-width: 0; }
.it-t { font-weight: bold; color: var(--cream); font-size: 15px; }
.it-p { font-size: 12px; color: #b8c3e0; margin: 2px 0; }
.it-a { margin: 3px 0; color: var(--gold); }
.who { color: #b8c3e0; font-size: 12px; }
.pill { display: inline-block; padding: 0 5px; background: #3a4d82; color: var(--cream); font-weight: bold; }
.pill.sealed { background: var(--cyan); color: var(--ink); } .pill.cib { background: var(--gold); color: var(--ink); }
.note { font-size: 12px; color: #d6dcf0; border-left: 3px solid var(--cyan); padding-left: 6px; margin: 3px 0; }
.note.warn { border-color: var(--red); color: #ff9aa0; font-weight: bold; }
.bubble { background: var(--cream); color: var(--ink); padding: 5px 8px; margin: 6px 0; font-size: 13px; position: relative; border-radius: 2px; }
.bubble.big { font-size: 15px; }
.btns { display: flex; flex-wrap: wrap; margin: 2px -3px; }
.btns button { flex: 1 1 auto; padding: 7px 6px; font-size: 13px; }
.btns.small button { background: #3a4d82; color: var(--cream); border-bottom-color: #253461; font-size: 12px; }
.offer.lowball { background: #ffb3b7; } .offer.fair { background: var(--cream); } .offer.full { background: var(--gold); }
.stamp { display: inline-block; margin-top: 6px; border: 3px solid var(--cyan); color: var(--cyan); padding: 2px 8px; font-weight: bold; transform: rotate(-3deg); }
.stamp.bad { border-color: var(--red); color: var(--red); }
.rival { background: #ff9e57; color: var(--ink); font-weight: bold; padding: 8px 10px; margin: 6px 0; }
.poster { background: var(--gold); color: var(--ink); font-weight: bold; padding: 10px; margin: 8px 0; border: 4px double var(--red); text-align: center; transform: rotate(.6deg); }
.stop-actions { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; }
.giftnote { color: var(--gold); margin: 6px 0; }
.item.gift { border-color: var(--gold); }
.crt-overlay { position: fixed; inset: 0; background: rgba(5,8,20,.92); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 10px; }
.tv { background: #3b3530; padding: 22px 22px 14px; border-radius: 26px; box-shadow: inset 0 0 0 6px #2a2622, 0 10px 40px #000; text-align: center; width: min(680px, 96vw, calc((100vh - 130px) * 1.78 + 44px)); width: min(680px, 96vw, calc((100dvh - 130px) * 1.78 + 44px)); }
.screen-crt { position: relative; border-radius: 18px; overflow: hidden; background: #000; box-shadow: inset 0 0 40px rgba(0,0,0,.8); }
.screen-crt canvas { width: 100%; display: block; filter: saturate(1.15) contrast(1.05); }
.scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.25) 0 2px, transparent 2px 4px), radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%); pointer-events: none; }
.tv-lab { color: #d8cfc4; font-size: 12px; letter-spacing: 2px; margin: 10px 0 4px; }
.skip { background: var(--cream); }
.results { text-align: center; }
.runtitle { font-size: 26px; color: var(--gold); font-weight: bold; text-shadow: 2px 2px 0 var(--ink); }
.also { color: var(--cyan); font-size: 13px; }
.bigscore { font-size: 46px; font-weight: bold; color: var(--cream); }
.bigscore small { font-size: 16px; }
.stats { color: #c9d3f0; }
#card { width: 100%; max-width: 900px; height: auto; margin: 12px auto; display: block; border: 3px solid var(--cream); }
.appraisal { text-align: left; max-width: 700px; margin: 14px auto; background: rgba(0,0,0,.25); padding: 8px 12px; }
.al { padding: 5px 0; border-bottom: 1px dashed #3a4d82; display: flex; flex-wrap: wrap; justify-content: space-between; }
.al-t { font-weight: bold; } .al-p { color: var(--cyan); font-weight: bold; } .al-p.neg { color: var(--red); }
.al-n { width: 100%; font-size: 12px; color: #c9d3f0; }
.al.bonus .al-t { color: var(--gold); }
.shirt { margin: 22px auto 8px; max-width: 520px; padding: 12px; border: 2px solid var(--cream); }
.shirt-k { font-size: 12px; color: #c9d3f0; margin-bottom: 4px; }
.shirt a { color: var(--gold); font-weight: bold; font-size: 18px; }
@media (max-width: 520px) {
  body { font-size: 14px; }
  .items { grid-template-columns: 1fr; }
  .artbox { flex-basis: 64px; } .artbox canvas { width: 64px; height: 80px; }
  .hud-l span { font-size: 15px; margin-right: 8px; }
  h2 { font-size: 19px; }
  .runtitle { font-size: 20px; } .bigscore { font-size: 36px; }
}

/* ---------- character creator ---------- */
.creator { text-align: center; }
.cr-wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; align-items: flex-start; margin: 10px 0 14px; }
.cr-prev { display: flex; flex-direction: column; align-items: center; }
#crcv { width: 240px; height: 200px; border: 3px solid var(--cream); background: var(--navy2); }
.cr-opts { text-align: left; flex: 1 1 300px; max-width: 440px; background: rgba(0,0,0,.25); padding: 6px 12px; border-left: 4px solid var(--red); }
.cr-row { display: flex; align-items: center; gap: 4px; margin: 7px 0; flex-wrap: wrap; }
.cr-row > b { width: 98px; color: var(--cyan); }
.cr-val { flex: 1; text-align: center; font-weight: bold; min-width: 130px; }
.cr-row button.arrow { padding: 6px 12px; margin: 0; }
.cr-sw { display: flex; flex-wrap: wrap; flex: 1; }
.sw { width: 30px; height: 30px; padding: 0; margin: 2px; border: 3px solid var(--ink); border-radius: 2px; }
.sw.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--ink); transform: translateY(-2px); }
.title button[data-act="look"] { margin-top: 2px; }

/* ---------- walkable swap meet ---------- */
.walk h2 { margin-bottom: 4px; }
.walkwrap { margin: 0 auto; }
.cvbox { position: relative; margin: 0 auto; max-width: max(240px, calc((100vh - 210px) * var(--ratio, 1.54))); max-width: max(240px, calc((100dvh - 210px) * var(--ratio, 1.54))); }
#walkcv { display: block; width: 100%; height: auto; background: #000; border: 3px solid var(--ink); outline: none; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
#walkcv:focus-visible { border-color: var(--cyan); }
.wtoast { position: absolute; left: 8px; right: 8px; top: 8px; background: var(--cyan); color: var(--ink); font-weight: bold; font-size: 13px; padding: 6px 8px; pointer-events: none; box-shadow: 3px 3px 0 var(--ink); }
.wpanel { position: absolute; inset: 0; background: #0b1022; border: 3px solid var(--gold); overflow: auto; padding: 0 10px 12px; z-index: 5; outline: none; }
.wpanel.small { top: auto; bottom: 0; max-height: 100%; }
.wp-top { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; background: var(--ink); margin: 0 -10px 6px; padding: 6px 10px; border-bottom: 2px solid var(--red); }
.wp-title { color: var(--gold); font-weight: bold; font-size: 16px; flex: 1 1 auto; }
.wp-stat { color: var(--cyan); font-size: 13px; font-weight: bold; }
.wp-x { margin: 0; padding: 6px 10px; }
.wpanel .items { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.walk-help { font-size: 12px; color: #9fb0d8; text-align: center; margin-top: 6px; }
.tpad { display: none; justify-content: space-between; align-items: center; padding: 12px 8px 4px; user-select: none; -webkit-user-select: none; touch-action: none; }
.walkwrap.touch .tpad { display: flex; }
.dpad { width: 138px; height: 138px; position: relative; touch-action: none; -webkit-user-select: none; user-select: none; }
.dpad i { position: absolute; width: 33.34%; height: 33.34%; background: #2b3d6e; border: 3px solid var(--ink); }
.dpad .u { left: 33.33%; top: 0; } .dpad .d { left: 33.33%; bottom: 0; } .dpad .l { left: 0; top: 33.33%; } .dpad .r { right: 0; top: 33.33%; }
.dpad .c { left: 33.33%; top: 33.33%; background: #22335f; }
.dpad i.on { background: var(--cyan); }
.abtn { width: 80px; height: 80px; border-radius: 50%; background: var(--red) !important; color: var(--cream); font-size: 26px; border-bottom: 5px solid #8e1c23; margin: 0 8px 0 0; }
@media (max-width: 640px), (max-height: 500px) {
  .wpanel, .wpanel.small { position: fixed; inset: 0; top: 0; bottom: 0; max-height: none; z-index: 60; border-width: 0; padding-bottom: 24px; }
}

/* ---------- start screen: CRT on a VCR ---------- */
.tvwrap { max-width: 760px; margin: 6px auto 0; background: #070a14; border: 3px solid var(--ink); box-shadow: 0 10px 40px rgba(0,0,0,.6); }
#tvcv, #infocv { display: block; width: 100%; height: auto; cursor: pointer; touch-action: manipulation; }
.tv-hint { color: #9fb0d8; font-size: 13px; margin: 8px 0 4px; letter-spacing: 1px; }
.cart { position: relative; max-width: 420px; margin: 14px auto 12px; background: linear-gradient(#9a9ea8, #6f737c); border: 3px solid var(--ink); border-radius: 12px 12px 4px 4px; padding: 26px 20px 12px; box-shadow: 0 7px 0 #4d5059, 0 16px 30px rgba(0,0,0,.5); animation: cartIn .3s steps(4); text-align: left; }
.cart[hidden] { display: none; }
.cart::before { content: ""; position: absolute; left: 18px; right: 18px; top: 8px; height: 10px; background: repeating-linear-gradient(90deg, #5d6169 0 4px, transparent 4px 9px); }
@keyframes cartIn { from { transform: translateY(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.cart-label { background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-top: 14px solid var(--red); padding: 8px 10px 10px; }
.cart-brand { font-weight: bold; font-size: 22px; color: var(--navy); letter-spacing: 3px; }
.cart-sub { font-size: 12px; color: var(--red); font-weight: bold; margin-bottom: 6px; border-bottom: 3px solid var(--cyan); padding-bottom: 4px; letter-spacing: 1px; }
.cart .cart-item { display: block; width: 100%; margin: 3px 0; padding: 9px 8px 9px 30px; text-align: left; position: relative; background: transparent; color: var(--navy); border: 0; font-size: 18px; letter-spacing: 1px; }
.cart .cart-item:hover:not(:disabled), .cart .cart-item:focus { background: var(--navy); color: var(--cream); outline: none; }
.cart .cart-item:hover:not(:disabled)::before, .cart .cart-item:focus::before { content: "\25B6"; position: absolute; left: 9px; color: var(--gold); }
.cart .cart-item:disabled { color: #a49d8e; opacity: 1; text-decoration: line-through; text-decoration-thickness: 2px; }
.cart-item small { display: inline-block; font-size: 11px; text-decoration: none; background: var(--red); color: var(--cream); padding: 1px 6px; margin-left: 6px; transform: rotate(-3deg); vertical-align: middle; letter-spacing: 0; }
.cart-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px; margin-top: 8px; font-size: 11px; color: #22252e; }
.cart-foot .adtoggle { color: var(--ink); font-weight: bold; }
.cart-fine { font-weight: bold; letter-spacing: 1px; }
.dl-wx, .dl-lot { margin: 4px 0; font-size: 14px; }
.dl-lot b { color: var(--gold); }
details.howto summary { cursor: pointer; }

/* ---------- Saturday morning + loading ---------- */
.morning { text-align: center; }
#mcv { display: block; width: 100%; max-width: 760px; height: auto; margin: 10px auto 6px; border: 3px solid var(--ink); background: #000; cursor: pointer; }
.loading-ov { position: fixed; inset: 0; background: rgba(5,8,20,.94); display: flex; align-items: center; justify-content: center; z-index: 120; padding: 16px; cursor: pointer; }
.ld-box { width: min(440px, 94vw); text-align: center; }
.ld-box canvas { width: 320px; max-width: 100%; height: auto; display: block; margin: 0 auto 10px; }
.ld-t { color: var(--gold); font-weight: bold; letter-spacing: 3px; min-height: 1.4em; text-align: left; padding-left: calc(50% - 44px); }
.ld-tip { color: var(--cream); font-weight: bold; font-size: 17px; margin-top: 8px; }
.ld-skip { color: #6f7fa8; font-size: 11px; margin-top: 12px; }
.tipoff { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; color: var(--cream); font-size: 14px; font-weight: normal; cursor: pointer; }
.tipoff input { width: 22px; height: 22px; margin: 0; cursor: pointer; }
.ld-box .tipoff { margin-top: 10px; }
.tip-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.tip-row .tipoff { padding-left: 0; }
.tip-row .tip-x { margin: 0; }

/* ---------- weather, featured lot, memory ---------- */
.wx { color: #ffcc33; font-size: 15px !important; }
.wx-hot { color: #ff9e57; } .wx-rain { color: var(--cyan); }
.wxnote { padding: 6px 10px; margin: 6px 0; font-weight: bold; border-left: 4px solid currentColor; background: rgba(0,0,0,.25); }
.featured { background: var(--gold); color: var(--ink); font-size: 12px; font-weight: bold; padding: 2px 6px; }
.mem { background: #c3c8ff; color: var(--ink); font-size: 12px; font-weight: bold; padding: 2px 6px; }
.reveal { max-width: 700px; margin: 12px auto; padding: 10px 12px; border: 2px dashed var(--gold); text-align: left; }
.rv-h { color: var(--gold); font-weight: bold; }
.rv-s { color: var(--cream); margin: 2px 0; }
.rv-l { color: #c9d3f0; font-size: 13px; }

/* ---------- home shelf ---------- */
.hs-day { margin: 14px 0; }
.hs-lab { color: var(--cyan); font-weight: bold; font-size: 13px; margin-bottom: 4px; }
.hs-row { display: flex; flex-wrap: wrap; gap: 0 8px; padding: 0 10px; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.2) 0 86px, #8a5e36 86px 92px, #5a3b22 92px 98px); }
.hs-it { position: relative; width: 64px; height: 98px; padding-top: 4px; }
.hs-it canvas { width: 64px; height: 80px; display: block; }
.hs-tag { position: absolute; left: 0; right: 0; top: 58px; text-align: center; font-size: 10px; background: var(--red); color: var(--cream); }
.hs-tag.t-grail { background: var(--gold); color: var(--ink); }

/* ---------- demo ---------- */
.demonote { background: rgba(255,204,51,.12); border-left: 4px solid var(--gold); color: var(--gold); font-weight: bold; padding: 6px 10px; margin: 6px 0; }
.stopcard.locked { opacity: 1; position: relative; background: #151a28; border-color: #2a3046; }
.stopcard.locked > :not(.sticker) { filter: grayscale(1); opacity: .5; }
.stopcard.locked .sticker { align-self: flex-start; margin-top: auto; background: var(--red); color: var(--cream); font-weight: bold; font-size: 12px; padding: 3px 8px; transform: rotate(-3deg); box-shadow: 2px 2px 0 var(--ink); }
.cr-val.locked { color: #a49d8e; }
.cr-val small { display: inline-block; font-size: 11px; background: var(--red); color: var(--cream); padding: 1px 6px; margin-left: 4px; transform: rotate(-3deg); }
.cr-lock { margin: 8px 0 4px; padding: 6px 8px; background: rgba(228,52,62,.15); border-left: 4px solid var(--red); font-size: 13px; }
.infomercial { text-align: center; }
.info-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 14px auto 8px; max-width: 760px; }
.ibtn { display: inline-block; font: inherit; font-weight: bold; font-size: 17px; padding: 12px 18px; margin: 0; border: 0; border-bottom: 4px solid #b9a77f; border-radius: 2px; background: var(--cream); color: var(--ink); text-decoration: none; cursor: pointer; }
.ibtn.buy { background: var(--red); color: var(--cream); border-bottom-color: #8e1c23; font-size: 19px; }
.ibtn:hover { filter: brightness(1.08); }
.ibtn.merch { background: var(--gold); color: var(--ink); border-bottom-color: #9a7a1c; }
.merch-line { flex-basis: 100%; max-width: 560px; margin: -2px auto 0; text-align: center; color: var(--gold); font-size: 13px; order: 99; }
@media (orientation: portrait) and (max-width: 480px) {
  .infomercial .info-btns { gap: 6px; margin: 8px auto 6px; }
  .infomercial .merch-line { order: 0; font-size: 12px; margin: -2px auto 0; }
}
.carry { max-width: 560px; margin: 10px auto; padding: 8px 12px; border: 2px dashed var(--cyan); color: var(--cream); font-size: 14px; }

/* ---------- phones, embeds and standalone ---------- */
.fsbtn { font-size: 12px; padding: 4px 8px; margin: 0 8px 0 0; background: #3a4d82; color: var(--cream); border-bottom-color: #253461; }
.cart-foot .fsbtn { margin: 0; }
.savewarn { max-width: 560px; margin: 10px auto; padding: 8px 12px; border-left: 4px solid var(--red); background: rgba(228,52,62,.12); font-size: 14px; text-align: left; }
button.hs-it { background: none; border: 0; margin: 0; padding: 4px 0 0; cursor: pointer; border-radius: 0; }
button.hs-it:hover:not(:disabled), button.hs-it:focus { background: rgba(255,255,255,.06); outline: none; }
button.hs-it:active:not(:disabled) { transform: none; }
.hs-cap { position: sticky; bottom: 0; background: var(--ink); color: var(--gold); font-weight: bold; padding: 8px 10px; margin: 8px 0; border-top: 2px solid var(--red); }
@media (hover: none) { .cart .cart-item:hover:not(:focus) { background: transparent; color: var(--navy); } .cart .cart-item:hover:not(:focus)::before { content: none; } }
/* phone held sideways: d-pad and A button sit on either side of the swap meet */
@media (orientation: landscape) and (max-height: 500px) {
  #app { padding-top: 4px; padding-bottom: 16px; }
  .hud { padding: 3px 8px; } .hud-l span { font-size: 14px; margin-right: 8px; }
  .sunbar { height: 14px; margin: 2px 0; } .sunbar span { font-size: 10px; top: 0; }
  .ticker { font-size: 11px !important; padding: 1px 0 !important; }
  .walk h2, .walk-help { display: none; }
  .walkwrap.touch { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 6px; }
  .walkwrap.touch .tpad { display: contents; }
  .walkwrap.touch .dpad { grid-column: 1; grid-row: 1; width: 126px; height: 126px; }
  .walkwrap.touch .cvbox { grid-column: 2; grid-row: 1; width: 100%; max-width: calc((100vh - 74px) * var(--ratio, 1.54)); max-width: calc((100dvh - 74px) * var(--ratio, 1.54)); }
  .walkwrap.touch .abtn { grid-column: 3; grid-row: 1; width: 72px; height: 72px; margin: 0; }
  .tvwrap, #mcv { max-width: calc((100vh - 24px) * 1.6); max-width: calc((100dvh - 24px) * 1.6); }
  .cr-wrap { flex-wrap: nowrap; } #crcv { width: 192px; height: 160px; }
}

.scores a, .foot a { color: var(--gold); font-weight: bold; }

/* ---------- round 2: end screen, links, sound button ---------- */
.info-grid { display: block; }
.info-side { max-width: 760px; margin: 0 auto; }
.ibadge { display: inline-block; padding: 12px 16px; font-weight: bold; font-size: 17px; color: var(--gold); border: 3px dashed var(--gold); }
.info-btns .ibtn, .info-btns .ibadge { min-height: 48px; }
a.cart-item { display: block; text-decoration: none; }
.cart .cart-item.small { font-size: 14px; color: var(--red); }
.tlink { display: inline-block; padding: 4px 2px; }
.sndbtn[aria-pressed="true"] { background: #5a2a2e; }
/* phone held sideways: the end screen puts the TV and the buttons side by side, no scrolling */
@media (orientation: landscape) and (max-height: 500px) {
  .infomercial .info-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 12px; align-items: center; }
  .infomercial .tvwrap { margin: 0; max-width: none; width: 100%; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); aspect-ratio: 8 / 5; }
  .infomercial #infocv { width: auto; height: 100%; max-width: 100%; margin: 0 auto; }
  .infomercial .info-btns { flex-direction: column; flex-wrap: nowrap; gap: 6px; margin: 0; }
  .infomercial .ibtn, .infomercial .ibadge { font-size: 14px; padding: 8px 10px; min-height: 44px; }
  .infomercial .carry { font-size: 11px; padding: 5px 8px; margin: 6px 0 0; }
  .infomercial .merch-line { display: none; }
  .infomercial .foot { display: none; }
}
/* 5: comfortable tap targets on touch screens (about 44px) */
@media (pointer: coarse) {
  .sw { width: 44px; height: 44px; }
  .cr-row button.arrow { min-width: 48px; min-height: 44px; }
  .btns button, .btns.small button, button.offer { min-height: 44px; }
  .fsbtn { min-height: 44px; padding: 6px 12px; font-size: 13px; }
  .adtoggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px; }
  .adtoggle input { width: 22px; height: 22px; }
  .adtoggle.center { display: flex; justify-content: center; }
  details.howto summary { min-height: 44px; display: flex; align-items: center; gap: 6px; }
  .scores a, .tlink { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; }
  .cart .cart-item { min-height: 48px; }
  .wp-x, .skip, .ibtn { min-height: 44px; }
  button.hs-it { min-width: 64px; }
}

/* ---------- product placement (totally unsponsored) ---------- */
.spons { display: block; margin-top: 4px; color: var(--cream); background: var(--red); padding: 2px 8px; font-weight: bold; letter-spacing: .5px; box-shadow: 2px 2px 0 var(--ink); }
.react { display: block; margin-top: 4px; color: var(--cyan); font-style: italic; font-weight: normal; }
.dl-wx .spons { display: inline-block; margin: 6px 0 0; }
.glam { display: flex; align-items: center; gap: 10px; margin: 6px 0; padding: 6px 10px; background: radial-gradient(ellipse at 30px 50%, rgba(255,241,214,.18), transparent 70%), rgba(0,0,0,.25); border-left: 4px solid var(--gold); }
.glamcan { width: 44px; height: 60px; flex: 0 0 44px; animation: glamTurn 2.4s ease-in-out infinite; }
.glam-t { font-size: 13px; font-style: italic; color: #d6dcf0; }
@keyframes glamTurn { 0%, 100% { filter: brightness(1); transform: rotate(-4deg); } 50% { filter: brightness(1.35) drop-shadow(0 0 6px rgba(255,241,214,.8)); transform: rotate(3deg); } }
.unsp { position: fixed; inset: 0; z-index: 140; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(5,3,12,.86); cursor: pointer; animation: unspIn .18s ease-out; }
.unsp.out { opacity: 0; transition: opacity .18s; }
.unsp-in { text-align: center; width: min(360px, 92vw); }
.unsp-in canvas { display: block; width: 100%; height: auto; max-height: 60vh; max-height: 60dvh; object-fit: contain; image-rendering: pixelated; border: 3px solid var(--gold); box-shadow: 0 0 30px rgba(255,204,51,.35); }
.unsp-h { color: var(--gold); font-weight: bold; letter-spacing: 3px; font-size: 15px; margin-bottom: 8px; text-shadow: 0 0 8px rgba(255,204,51,.6); }
.unsp-s { color: var(--cream); font-weight: bold; margin-top: 8px; }
.unsp-k { color: #8f9bc0; font-size: 11px; margin-top: 4px; }
@keyframes unspIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@media (orientation: landscape) and (max-height: 500px) {
  .unsp-in { width: min(320px, 60vw); }
  .unsp-in canvas { max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); }
  .unsp-h { font-size: 13px; margin-bottom: 4px; } .unsp-s { margin-top: 4px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .glamcan, .unsp { animation: none; } }

/* ---------- round 4: what is it? tags and one-line descriptions ---------- */
.it-d { font-size: 12px; color: #d6dcf0; margin: 3px 0 4px; line-height: 1.45; }
.tag { display: inline-block; padding: 1px 6px; margin-right: 4px; font-size: 11px; font-weight: bold; letter-spacing: .5px; text-transform: uppercase; border: 2px solid var(--ink); background: #3a4d82; color: var(--cream); vertical-align: 1px; white-space: nowrap; }
.tag.t-rare { background: var(--gold); color: var(--ink); }
.tag.t-gem { background: var(--cyan); color: var(--ink); }
.tag.t-cult { background: #7e57c2; color: #fff; }
.tag.t-uncommon { background: #29adff; color: var(--ink); }
.tag.t-common { background: #8a90a0; color: var(--ink); }
.tag.t-shovel { background: #8a5e36; color: var(--cream); }
.tag.t-sports { background: #2d6a2d; color: var(--cream); }
.tag.t-merch { background: #ff77a8; color: var(--ink); }
.tag.t-lot { background: #d8b07a; color: var(--ink); }
.tag.t-grail { background: var(--gold); color: var(--red); box-shadow: 0 0 8px rgba(255,204,51,.7); }
.tag.t-repro { background: var(--red); color: #fff; }
.al.has-art { flex-wrap: nowrap; gap: 10px; align-items: flex-start; }
.al-art { flex: 0 0 48px; }
.al-art canvas { width: 48px; height: 60px; display: block; }
.al-body { flex: 1 1 auto; min-width: 0; }
.al-row { display: flex; justify-content: space-between; gap: 8px; }
.al-tag { margin: 2px 0; }
@media (max-width: 520px) {
  .artbox { flex-basis: 84px; } .artbox canvas { width: 84px; height: 105px; }
}

/* ---------- round 4: tap to start (the tap that turns the sound on) ---------- */
.gate { min-height: calc(100vh - 80px); min-height: calc(100dvh - 80px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.gate-btn { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(560px, 100%); min-height: 60vh; justify-content: center; margin: 0; padding: 20px 12px; background: #070a14; border: 3px solid var(--ink); border-bottom: 3px solid var(--ink); box-shadow: 0 10px 40px rgba(0,0,0,.6), inset 0 0 60px rgba(41,211,232,.08); color: var(--cream); cursor: pointer; touch-action: manipulation; }
.gate-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.gate-btn canvas { width: 100%; max-width: 480px; height: auto; }
.gate-t { font-size: 22px; font-weight: bold; color: var(--gold); letter-spacing: 3px; text-transform: uppercase; animation: gateBlink 1.1s steps(2, start) infinite; }
.gate-s { font-size: 13px; color: #9fb0d8; }
@keyframes gateBlink { 50% { opacity: .25; } }
@media (orientation: landscape) and (max-height: 500px) { .gate-btn { min-height: 0; gap: 8px; padding: 14px 12px; } .gate-btn canvas { max-width: 360px; } .gate-t { font-size: 18px; } }
@media (prefers-reduced-motion: reduce) { .gate-t { animation: none; } }

/* ---------- round 4: notches and hole-punch cameras ----------
   index.html uses viewport-fit=cover, so the page runs edge to edge. These insets keep the HUD, the buttons,
   the d-pad and every bit of text out from under a notch, a hole-punch camera or the home bar, in both orientations. */
:root {
  --sat: env(safe-area-inset-top, 0px); --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px);
  --pl: max(12px, var(--sal)); --pr: max(12px, var(--sar));
}
#app { padding: max(10px, var(--sat)) var(--pr) max(40px, calc(var(--sab) + 24px)) var(--pl); }
/* the strip behind the status bar and camera stays solid when the page scrolls under it */
body::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: var(--sat); background: var(--ink); z-index: 55; pointer-events: none; }
.hud { top: var(--sat); }
.hs-cap { padding-bottom: max(8px, var(--sab)); }
.crt-overlay, .loading-ov, .unsp { padding: max(10px, var(--sat)) max(10px, var(--sar)) max(10px, var(--sab)) max(10px, var(--sal)); }
@media (max-width: 640px), (max-height: 500px) {
  .wpanel, .wpanel.small { --wl: max(10px, var(--sal)); --wr: max(10px, var(--sar)); padding: 0 var(--wr) max(24px, calc(var(--sab) + 12px)) var(--wl); }
  .wpanel .wp-top { margin: 0 calc(-1 * var(--wr)) 6px calc(-1 * var(--wl)); padding: max(6px, var(--sat)) var(--wr) 6px var(--wl); }
}
@media (orientation: landscape) and (max-height: 500px) {
  #app { padding-top: max(4px, var(--sat)); padding-bottom: max(16px, var(--sab)); }
}

/* ---------- round 4: every tap target at least 44px on a touch screen ---------- */
@media (pointer: coarse) {
  button { min-height: 44px; }
  .stopcard button, .stop-actions button { min-height: 48px; }
  .shirt a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; }
}

/* ---------- round 5: one-time tips and How to play ---------- */
.sa-probe { position: fixed; visibility: hidden; pointer-events: none; left: 0; top: 0; width: 0; height: 0; padding: var(--sat) var(--sar) var(--sab) var(--sal); }
.tipbox { position: fixed; z-index: 130; width: min(330px, calc(100vw - 24px)); box-sizing: border-box; background: var(--ink); color: var(--cream); border: 3px solid var(--gold); box-shadow: 4px 4px 0 #000, 0 0 24px rgba(255,204,51,.25); padding: 8px 10px 10px; animation: tipIn .16s ease-out; cursor: pointer; }
.tip-k { position: absolute; top: -12px; left: 10px; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: bold; letter-spacing: 2px; padding: 1px 6px; border: 2px solid var(--ink); }
.tip-h { color: var(--gold); font-weight: bold; font-size: 15px; margin: 4px 0 3px; }
.tip-b { font-size: 13px; line-height: 1.45; color: #d6dcf0; }
.tip-x { display: block; margin: 8px 0 0 auto; min-height: 44px; min-width: 96px; padding: 8px 14px; font-size: 14px; background: var(--gold); color: var(--ink); border-bottom-color: #b8901f; }
@keyframes tipIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tipbox { animation: none; } }
@media (orientation: landscape) and (max-height: 500px) { .tipbox { width: min(420px, calc(100vw - 24px)); padding: 6px 10px 8px; } .tip-h { font-size: 14px; margin: 2px 0; } .tip-b { font-size: 12px; line-height: 1.35; } .tip-x { margin-top: 4px; } }
.howto-scr { max-width: 620px; margin: 0 auto; text-align: left; }
.howto-scr h2 { text-align: center; }
.todo { background: #ffe98a; color: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 rgba(0,0,0,.45); padding: 10px 14px 10px; margin: 8px auto 14px; max-width: 420px; transform: rotate(-1deg); background-image: repeating-linear-gradient(transparent 0 25px, #e8cf63 25px 26px); }
.todo-h { color: var(--red); font-weight: bold; letter-spacing: 2px; text-transform: uppercase; font-size: 16px; text-align: center; margin-bottom: 4px; }
.todo ul { list-style: none; margin: 0; padding: 0; }
.todo li { font-weight: bold; font-size: 15px; line-height: 26px; padding-left: 26px; position: relative; }
.todo li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 12px; border: 2px solid var(--ink); background: #fff7cc; }
.todo li.dex { color: var(--red); }
.howto-tips { margin: 0 0 12px; padding-left: 20px; }
.howto-tips li { margin: 6px 0; font-size: 14px; color: #d6dcf0; }
.howto-tips b { color: var(--gold); }
/* phone held sideways: the list and the tips side by side, so it fits without scrolling */
@media (orientation: landscape) and (max-height: 500px) {
  .howto-scr { max-width: none; }
  .howto-scr h2 { margin: 0 0 4px; font-size: 18px; }
  .howto-grid { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 14px; align-items: start; }
  .howto-grid .todo { margin: 4px 0 0; }
  .todo-h { font-size: 14px; } .todo li { font-size: 13px; line-height: 22px; } .todo { background-image: repeating-linear-gradient(transparent 0 21px, #e8cf63 21px 22px); padding: 6px 10px; }
  .todo li::before { top: 4px; }
  .howto-tips { margin: 0; } .howto-tips li { font-size: 12px; margin: 3px 0; line-height: 1.35; }
  .howto-scr .btns { margin: 6px 0 0; }
}
