/* Seller's Nightmare — workbench game. JetShipper tokens: red, ink, neutral backgrounds. */
:root {
  --red: #E6211E; --darkred: #B81C19; --ink: #0F172A; --slate: #4A5364; --muted: #6B7483;
  --mist: #F6F7F9; --line: #E7EAEF; --sand: #F3EEE7; --bench: #EAE2D6; --bench-2: #E3D9CB;
  --green: #216750; --amber: #A8660F; --gold: #8C6A2C; --paper: #FFFFFF;
  --radius: 12px; --shadow: 0 1px 0 rgba(15,23,42,.05), 0 8px 20px -14px rgba(15,23,42,.45);
  --hud-h: 76px; --tray-h: 0px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--mist); color: var(--ink); font: 14px/1.5 Archivo, Arial, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3 { font-family: 'Hanken Grotesk', Archivo, sans-serif; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 3px solid var(--darkred); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { top: 12px; }
.eyebrow { font-size: 10.5px; letter-spacing: .16em; font-weight: 600; color: var(--darkred); display: flex; align-items: center; gap: 8px; text-transform: uppercase; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); display: inline-block; flex: none; }
.dot.live { box-shadow: 0 0 0 0 rgba(230,33,30,.5); animation: live 2.4s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(230,33,30,0); } 100% { box-shadow: 0 0 0 0 rgba(230,33,30,0); } }
.fine { font-size: 11.5px; color: var(--slate); line-height: 1.6; }
.error { color: var(--darkred); font-size: 13px; margin-top: 10px; }
.error:empty { display: none; }
.muted { color: var(--slate); }

/* Buttons */
.primary { background: var(--red); color: #fff; border: 1px solid var(--red); border-radius: 8px; padding: 13px 18px; font-weight: 600; font-size: 13.5px; transition: background .15s, transform .12s; }
.primary:hover:not(:disabled) { background: var(--darkred); border-color: var(--darkred); }
.primary:active:not(:disabled), .secondary:active:not(:disabled) { transform: translateY(1px); }
.secondary { background: #fff; border: 1px solid var(--ink); border-radius: 8px; padding: 12px 18px; font-weight: 600; }
.secondary:hover { background: var(--ink); color: #fff; }
.text-btn { background: none; border: 0; padding: 10px 0; font-weight: 500; }
.text-btn:hover { color: var(--darkred); }
.text-btn.light { color: #fff; }
.text-btn.light:hover { color: #FFD9D6; }

/* Header / footer */
.site-header { width: 100%; max-width: 1480px; margin: 0 auto; padding: 16px 32px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.site-header img { height: 26px; width: auto; display: block; }
.header-right { display: flex; align-items: center; gap: 28px; }
.edition { font-size: 10.5px; letter-spacing: .16em; font-weight: 600; }
.edition i { color: var(--red); font-style: normal; margin: 0 8px; }
main { width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 32px; flex: 1; }
.site-footer { max-width: 1480px; width: 100%; margin: 0 auto; padding: 22px 32px 28px; display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--slate); letter-spacing: .04em; }
body[data-screen="game"] .site-footer { display: none; }

/* ================= Welcome ================= */
.welcome { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; padding: 36px 0 20px; align-items: start; }
.welcome h1 { font-size: clamp(44px, 5.2vw, 76px); line-height: 1; letter-spacing: -.045em; font-weight: 600; margin: 18px 0 22px; }
.welcome h1 em { font-style: normal; color: var(--red); }
.intro { font-size: 17px; line-height: 1.65; color: var(--slate); max-width: 34em; }
.intro strong { color: var(--ink); }
.rules-inline { list-style: none; padding: 0; margin: 26px 0; display: flex; gap: 28px; font-size: 12px; color: var(--slate); }
.rules-inline b { display: block; font: 500 22px 'IBM Plex Mono', monospace; color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; font-weight: 500; }
input { width: 100%; min-width: 0; background: #fff; border: 1px solid #C9CFD8; border-radius: 8px; padding: 13px; }
input::placeholder { color: #7A8391; }
.funding { display: flex; align-items: center; gap: 13px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 16px 0 12px; }
.coin { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #FBE8C8; color: var(--gold); font: 600 15px 'IBM Plex Mono', monospace; border: 2px solid #E9CF8E; flex: none; }
.funding strong { font-size: 13px; display: block; }
.funding small { font-size: 11.5px; color: var(--slate); }
.funding-amount { margin-left: auto; font-size: 17px; color: var(--green); }
.start-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; font-size: 14.5px; }
#welcome-fine { margin-top: 14px; }
.welcome-art { margin: 0; position: relative; border-radius: 14px; overflow: hidden; background: var(--ink); aspect-ratio: 16 / 10.5; box-shadow: var(--shadow); }
.welcome-art .desk { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; display: block; }
.art-top { position: absolute; inset: 0 0 auto; display: flex; justify-content: space-between; padding: 16px 18px; color: #fff; font-size: 10.5px; letter-spacing: .14em; font-weight: 600; z-index: 1; text-transform: uppercase; background: linear-gradient(rgba(15,23,42,.55), transparent); }
.art-quote { position: absolute; inset: auto 0 0; padding: 60px 22px 18px; color: #fff; background: linear-gradient(transparent, rgba(15,23,42,.85)); display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.art-quote p { font-size: 17px; line-height: 1.4; font-family: 'Hanken Grotesk', sans-serif; }
.signature { font-family: 'Hanken Grotesk', sans-serif; font-style: italic; font-size: 20px; color: #FFD9D6; }
.ticket { position: absolute; left: 18px; top: 56px; background: #fff; border-radius: 10px; padding: 10px 14px; display: flex; gap: 10px; align-items: center; box-shadow: 0 16px 30px -18px rgba(0,0,0,.6); animation: bob 5s ease-in-out infinite; }
.ticket small { display: block; font-size: 9.5px; letter-spacing: .14em; color: var(--darkred); font-weight: 600; }
.ticket strong { font-size: 13px; }
.ticket-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-.6deg); } }
.shelf { grid-column: 1 / -1; display: grid; grid-template-columns: 260px 1fr; gap: 24px 40px; align-items: center; border-top: 1px solid var(--line); padding-top: 26px; }
.shelf h2 { font-size: 22px; }
.shelf p { color: var(--slate); margin-top: 6px; }
.shelf .fine { grid-column: 2; }
.product-shelf { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.product-tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; text-align: center; transition: transform .2s, box-shadow .2s; }
button.product-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-tile .art { width: 100%; max-width: 110px; height: auto; }
.product-tile small { display: block; font-size: 11.5px; color: var(--slate); font-weight: 400; margin-top: 3px; }

/* ================= Game: HUD ================= */
.game { padding-bottom: 12px; }
.hud { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: minmax(150px, 1.3fr) auto repeat(5, auto) 1fr; align-items: center; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; box-shadow: var(--shadow); margin: 4px 0 14px; }
.hud > div { padding: 2px 16px; border-left: 1px solid var(--line); min-width: 0; }
.hud > div:first-child { border-left: 0; }
.hud-store h1 { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.hud-store .eyebrow { font-size: 9.5px; }
.hud span:first-child:not(.dot) { font-size: 10.5px; color: var(--slate); display: block; white-space: nowrap; }
.hud strong { font-size: 18px; font-weight: 500; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.hud-clock strong { font-size: 26px; line-height: 1.1; }
.hud-clock.urgent strong { color: var(--red); }
.clock-bar { display: block; height: 3px; background: var(--line); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.clock-bar span, .health-bar span { display: block; height: 100%; background: var(--ink); transform-origin: left; }
.hud-clock.urgent .clock-bar span { background: var(--red); }
.revenue strong { color: var(--green); }
.hud strong.up { color: var(--green); }
.health-bar { display: inline-block; width: 64px; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.health-bar span { background: var(--green); transition: transform .5s; }
.health-bar[data-level="warn"] span { background: var(--amber); }
.health-bar[data-level="low"] span { background: var(--red); }
.strikes { gap: 6px !important; height: 26px; }
.strikes i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #C3C9D2; display: inline-block; transition: background .2s, border-color .2s; }
.strikes i.on { background: var(--red); border-color: var(--red); }
.effects { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; border-left: 0 !important; }
.effect { display: inline-flex; gap: 6px; align-items: center; font-size: 11.5px; padding: 5px 10px; border-radius: 999px; background: var(--sand); white-space: nowrap; }
.effect.courier_promo { background: #E4F1EB; color: var(--green); }
.effect.engraver_slow { background: #FBEEDC; color: var(--amber); }
.effect b { font-size: 11px; }

/* ================= Game: bench ================= */
.tabs { display: none; }
.play { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 14px; height: clamp(560px, calc(100vh - 150px), 900px); }
.bench { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 10px; border-radius: 16px; min-height: 0;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0) 0 38px, rgba(255,255,255,.14) 38px 40px), linear-gradient(180deg, var(--bench), var(--bench-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -3px 0 rgba(15,23,42,.06); }
.station { background: rgba(255,255,255,.55); border: 1px solid rgba(15,23,42,.07); border-radius: 12px; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.station > header, .inbox > header { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px; }
.station h2, .inbox h2 { font-size: 14.5px; letter-spacing: -.01em; }
.station header p { font-size: 11px; color: var(--slate); line-height: 1.3; }
.st-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.st-icon svg { width: 18px; height: 18px; }
.station[data-station="incoming"] .st-icon { background: var(--red); }
.st-count { margin-left: auto; font: 500 12px 'IBM Plex Mono', monospace; background: #fff; border: 1px solid var(--line); border-radius: 999px; min-width: 26px; text-align: center; padding: 2px 7px; }
.tray { flex: 1; overflow-y: auto; padding: 2px 8px 10px; display: flex; flex-direction: column; gap: 9px; min-height: 0; scrollbar-width: thin; }
.tray .empty { border: 1.5px dashed rgba(15,23,42,.14); border-radius: 10px; padding: 18px 12px; text-align: center; color: var(--slate); font-size: 12px; }
.tray.has-cards .empty { display: none; }
.bench.dragging .lane { border-color: var(--ink); background: #fff; }

/* Order card */
.card { background: var(--paper); border-radius: 11px; box-shadow: var(--shadow); padding: 10px 10px 9px; position: relative; border: 1px solid rgba(15,23,42,.06); flex: none; --level: var(--green); }
.card::before { content: ''; position: absolute; left: 12px; right: 12px; top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: var(--level); opacity: .85; }
.card[data-level="warn"] { --level: var(--amber); }
.card[data-level="hot"] { --level: var(--red); background: #FFF8F7; border-color: rgba(230,33,30,.25); }
.card[data-level="late"] { --level: #9AA3AF; }
.card.is-vip { border-color: #E9CF8E; }
.card-top { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--slate); min-height: 40px; }
.card-top .num { color: var(--ink); font-weight: 500; }
.card-top .buyer { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer { margin-left: auto; position: relative; width: 40px; height: 40px; flex: none; color: var(--level, var(--green)); }
.msg .timer { width: 34px; height: 34px; }
.ring { display: block; width: 100%; height: 100%; }
.ring-track { fill: #fff; stroke: var(--line); stroke-width: 4; }
.ring-bar { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 100 100; transition: stroke .3s; }
.ring-num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 500; color: var(--ink); }
.pulse .timer { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.09); } }
.card-main { display: flex; gap: 10px; align-items: center; margin-top: 2px; }
.item { width: 76px; height: 70px; flex: none; position: relative; background: radial-gradient(circle at 50% 45%, #fff, #F4F0EA 70%); border-radius: 9px; display: grid; place-items: center; overflow: hidden; }
.item .art { width: 74px; height: 68px; }
.item .parcel { width: 70px; }
.info { min-width: 0; }
.info h3 { font-size: 13.5px; line-height: 1.25; }
.req { font-size: 12px; margin-top: 3px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.req-label { color: var(--slate); }
.req-value { quotes: none; font-weight: 600; background: #FFF4DE; border-radius: 5px; padding: 1px 6px; display: inline-flex; align-items: center; gap: 4px; }
.req-value svg { width: 16px; height: 16px; }
.req-value.name { font-family: 'Hanken Grotesk', sans-serif; font-style: italic; }
.price { font-size: 12px; color: var(--slate); margin-top: 3px; }
.vip { font-family: Archivo, sans-serif; font-size: 10.5px; color: var(--gold); background: #FBF1DC; border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.card-act { margin-top: 8px; }
.act-label { font-size: 11.5px; color: var(--slate); margin-bottom: 6px; }
.options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.opt { background: #fff; border: 1.5px solid #D6DBE2; border-radius: 9px; min-height: 48px; padding: 5px 3px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: border-color .15s, transform .12s, background .15s; }
.opt:hover:not(:disabled) { border-color: var(--ink); transform: translateY(-1px); }
.opt.wrong { border-color: var(--red); background: #FFF1F0; }
.opt-script { font: italic 700 16px 'Hanken Grotesk', sans-serif; color: var(--gold); }
.opt-letter { font: 700 21px 'Hanken Grotesk', sans-serif; color: var(--gold); }
.opt-engrave { font: 500 10.5px 'IBM Plex Mono', monospace; letter-spacing: .03em; color: var(--ink); text-align: center; line-height: 1.2; }
.opt svg { width: 26px; height: 26px; }
.opt-cap { font-size: 10.5px; line-height: 1.15; text-align: center; }
.opt-cap small { display: block; color: var(--slate); font-size: 9.5px; }
.cost { font-size: 11px; color: var(--slate); margin-top: 6px; }
.deadline { font-size: 11px; color: var(--slate); margin-top: 6px; }
.card[data-level="hot"] .deadline { color: var(--darkred); font-weight: 600; }
.card.is-late .deadline { color: var(--slate); }
.card.is-late::after { content: 'LATE'; position: absolute; right: 54px; top: 12px; font: 600 9.5px Archivo, sans-serif; letter-spacing: .14em; color: var(--darkred); border: 1.5px solid var(--darkred); border-radius: 4px; padding: 1px 5px; transform: rotate(-6deg); }
.prog { height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; }
.prog span { display: block; height: 100%; background: linear-gradient(90deg, var(--ink), var(--red)); transform-origin: left; transform: scaleX(0); }
.prog-text { font-size: 11px; color: var(--slate); margin-top: 5px; }
.sparks i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #F2C230; animation: spark 1.2s ease-in-out infinite; opacity: 0; }
.sparks i:nth-child(1) { left: 18%; top: 30%; }
.sparks i:nth-child(2) { left: 70%; top: 24%; animation-delay: .4s; }
.sparks i:nth-child(3) { left: 52%; top: 72%; animation-delay: .8s; }
@keyframes spark { 40% { opacity: 1; transform: scale(1.4); } 80% { opacity: 0; transform: scale(.4); } }
.shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.85) 50%, transparent 65%); transform: translateX(-100%); animation: shine 2.6s ease-in-out infinite; }
@keyframes shine { 40%, 100% { transform: translateX(100%); } }
.pack-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; }
.pack-btn:disabled { opacity: 1; background: var(--darkred); }
.pack-btn svg { width: 18px; height: 18px; }
.packing { position: absolute; inset: 0; display: grid; place-items: center; }
.packing svg { width: 70px; }
.packing .flap, .packing .tape { transform-box: fill-box; transform-origin: center; }
.ship-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ship-btn { border: 1.5px solid #D6DBE2; background: #fff; border-radius: 9px; padding: 7px 6px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; text-align: left; font-size: 12px; font-weight: 600; transition: border-color .15s, background .15s; }
.ship-btn svg { width: 22px; height: 14px; grid-row: span 2; }
.ship-btn b { font-size: 12px; font-weight: 500; grid-column: 2; }
.ship-btn small { grid-column: 1 / -1; font-size: 10px; font-weight: 500; color: #A9E0CC; }
.ship-btn:hover { border-color: var(--ink); }
.ship-btn.express { background: var(--ink); color: #fff; border-color: var(--ink); }
.ship-btn.express:hover { background: #1E293B; }
.card[draggable="true"] { cursor: grab; }

/* Dock lanes */
.dock { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; border-top: 1px dashed rgba(15,23,42,.14); }
.lane { border: 1.5px dashed rgba(15,23,42,.18); border-radius: 10px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--slate); position: relative; overflow: hidden; transition: background .2s, border-color .2s; }
.lane-icon { color: var(--ink); height: 18px; }
.lane-icon svg { width: 30px; height: 18px; }
.lane-fee { font-size: 11px; font-weight: 500; }
.lane.promo .lane-fee { color: var(--green); }
.lane.over { background: #fff; border-color: var(--red); }
.lane.go .lane-icon { animation: drive .9s ease-in; }
.lane.express.go .lane-icon { animation: fly .9s ease-in; }
@keyframes drive { 60% { transform: translateX(70px); opacity: 0; } 61% { transform: translateX(-70px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes fly { 60% { transform: translate(70px, -26px); opacity: 0; } 61% { transform: translate(-70px, 10px); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ================= Side: guide + inbox ================= */
.side { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.guide { display: flex; gap: 10px; align-items: flex-start; }
.guide .avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: var(--shadow); flex: none; }
.bubble { position: relative; background: #fff; border-radius: 4px 14px 14px 14px; padding: 9px 12px 10px; box-shadow: var(--shadow); border: 1.5px solid transparent; flex: 1; min-height: 56px; }
.bubble b { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--darkred); }
.bubble p { font-size: 13px; line-height: 1.45; margin-top: 2px; }
.guide[data-mood="happy"] .bubble { border-color: #BFE3D3; }
.guide[data-mood="worried"] .bubble { border-color: #F2D2A6; }
.inbox { background: #fff; border: 1px solid var(--line); border-radius: 14px; flex: 1; display: flex; flex-direction: column; min-height: 0; box-shadow: var(--shadow); }
.inbox .st-icon { background: var(--ink); }
.inbox.waiting .st-count { background: var(--red); color: #fff; border-color: var(--red); }
.inbox-list { flex: 1; overflow-y: auto; padding: 0 10px 10px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.inbox-list .empty { color: var(--slate); font-size: 12.5px; text-align: center; padding: 26px 10px; border: 1.5px dashed var(--line); border-radius: 10px; }
.inbox-list.has-msgs .empty { display: none; }
.msg { background: var(--mist); border-radius: 4px 14px 14px 14px; padding: 9px 10px 10px; border: 1px solid var(--line); overflow: hidden; flex: none; --level: var(--green); }
.msg[data-level="warn"] { --level: var(--amber); }
.msg[data-level="hot"] { --level: var(--red); border-color: rgba(230,33,30,.35); }
.msg.review { background: #FFF5F4; }
.msg-head { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.initial { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.tag { font-size: 9.5px; letter-spacing: .12em; color: var(--slate); display: inline-flex; align-items: center; gap: 3px; }
.review .tag { color: var(--darkred); }
.tag svg { width: 11px; height: 11px; }
.msg-text { font-size: 13px; margin: 6px 0 8px; line-height: 1.45; }
.replies { display: flex; flex-direction: column; gap: 5px; }
.reply { text-align: left; background: #fff; border: 1.5px solid #D6DBE2; border-radius: 9px; padding: 7px 10px; font-size: 12.5px; line-height: 1.35; transition: border-color .15s; }
.reply:hover:not(:disabled) { border-color: var(--ink); }
.msg-result { font-size: 12.5px; font-weight: 600; padding: 4px 0; }
.msg-result.helpful { color: var(--green); }
.msg-result.vague { color: var(--amber); }
.msg-result.poor { color: var(--darkred); }
.keys-hint { font-size: 11px; color: var(--slate); margin-top: 10px; text-align: center; }

/* Guided first order */
.coach { position: relative; border-radius: 10px; animation: coach 1.6s ease-in-out infinite; }
@keyframes coach { 0%, 100% { box-shadow: 0 0 0 2px rgba(230,33,30,.9), 0 0 0 6px rgba(230,33,30,.15); } 50% { box-shadow: 0 0 0 2px rgba(230,33,30,.9), 0 0 0 10px rgba(230,33,30,0); } }

/* Effects layer */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.flying-parcel { position: absolute; left: 0; top: 0; width: var(--size, 96px); }
.flying-parcel svg { width: 100%; display: block; filter: drop-shadow(0 10px 12px rgba(15,23,42,.25)); }
.money-float { position: absolute; left: 0; top: 0; font-size: 17px; font-weight: 600; color: var(--green); background: #fff; border-radius: 999px; padding: 3px 10px; box-shadow: var(--shadow); white-space: nowrap; }
.tab-flyer { position: absolute; left: 0; top: 0; width: 60px; }
.tab-flyer svg { width: 100%; }
.toast { position: fixed; left: 50%; bottom: calc(20px + var(--tray-h)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 13px; z-index: 70; max-width: min(92vw, 460px); box-shadow: 0 18px 30px -18px rgba(0,0,0,.6); }
.game.ending .bench { filter: saturate(.6); transition: filter .6s; }

/* ================= Result ================= */
.result { padding: 30px 0 10px; }
.result-hero h1 { font-size: clamp(34px, 4.4vw, 58px); letter-spacing: -.04em; line-height: 1.05; margin: 14px 0 12px; max-width: 16em; }
.result-hero h1:focus { outline: none; }
.parcel-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 22px 0 8px; min-height: 10px; }
.mini-parcel { width: 44px; display: block; }
.mini-parcel svg { width: 100%; display: block; }
.result-metrics { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 12px; margin: 16px 0 18px; }
.result-metrics > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.result-metrics span { font-size: 12px; color: var(--slate); display: block; }
.result-metrics strong { font-size: 28px; font-weight: 500; display: block; margin-top: 4px; }
.result-metrics .big strong { font-size: 38px; color: var(--green); }
.result-metrics small { font-size: 11px; color: var(--slate); display: block; margin-top: 4px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.score-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.lesson { font-size: 16px; line-height: 1.55; }
.consent { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 13px; font-weight: 400; }
.consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--red); flex: none; }
#save-score.done span[aria-hidden] { display: none; }
#score-status { font-size: 13px; color: var(--green); min-height: 1em; }
.result-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.pitch { background: var(--ink); color: #fff; border-radius: 14px; overflow: hidden; display: grid; grid-template-columns: 42% 1fr; }
.pitch img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 220px; }
.pitch > div { padding: 24px 22px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.pitch h2 { font-size: 24px; }
.pitch p { color: #CBD2DC; line-height: 1.6; }

/* Dialogs */
dialog { border: 0; border-radius: 16px; padding: 26px; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 40px); box-shadow: 0 30px 60px -20px rgba(15,23,42,.5); color: var(--ink); }
dialog::backdrop { background: rgba(15,23,42,.45); }
dialog h2 { font-size: 26px; margin: 8px 0 4px; }
.dialog-close { position: absolute; right: 14px; top: 12px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 20px; line-height: 1; }
.table-wrap { overflow-x: auto; margin: 14px 0 10px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; letter-spacing: .06em; color: var(--slate); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
td:nth-child(3), td:nth-child(4) { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num { text-align: right; }
tr.me td { background: #FFF1F0; font-weight: 600; }
#board-status { font-size: 13px; color: var(--slate); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 16px 0 10px; }

/* ================= Responsive ================= */
@media (max-width: 1180px) {
  .hud { grid-template-columns: repeat(4, auto) 1fr; row-gap: 8px; }
  .hud-store { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; border-left: 0 !important; }
  .hud-store h1 { margin: 0; }
  .hud-clock { border-left: 0 !important; }
  .effects { grid-column: 1 / -1; justify-content: flex-start; }
  .play { grid-template-columns: minmax(0, 1fr) 270px; }
  .welcome { gap: 34px; }
}
@media (max-width: 980px) {
  .welcome { grid-template-columns: 1fr; }
  .welcome-art { order: -1; aspect-ratio: 16 / 9; }
  .shelf { grid-template-columns: 1fr; }
  .shelf .fine { grid-column: 1; }
  .play { grid-template-columns: 1fr; height: auto; }
  .bench { height: 70vh; min-height: 520px; }
  .side { display: grid; grid-template-columns: 1fr 1fr; }
  .inbox { max-height: 380px; }
  .result-metrics { grid-template-columns: 1fr 1fr; }
  .result-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .site-header { padding: 12px 16px; }
  .site-header img { height: 22px; }
  .edition { display: none; }
  main { padding: 0 16px; }
  .site-footer { padding: 18px 16px 22px; flex-direction: column; }
  .welcome { padding-top: 8px; gap: 22px; }
  .welcome h1 { font-size: 42px; margin: 12px 0 14px; }
  .intro { font-size: 15.5px; }
  .rules-inline { gap: 16px; margin: 18px 0; }
  .field-row { grid-template-columns: 1fr; }
  .product-shelf { grid-template-columns: repeat(3, 1fr); }
  .art-quote p { font-size: 14px; }
  .ticket { top: 48px; left: 12px; }

  body[data-screen="game"] .site-header { display: none; }
  .game { padding-bottom: calc(var(--tray-h) + 12px); }
  .hud { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 8px 4px; gap: 6px 0; margin: 8px 0 8px; border-radius: 12px; top: 6px; }
  .hud > div { padding: 0 10px; }
  .hud-store { grid-column: 1 / -1; }
  .hud-store .eyebrow { display: none; }
  .hud-store h1 { font-size: 16px; }
  .hud-clock strong { font-size: 20px; }
  .hud strong { font-size: 15px; }
  .hud span:first-child:not(.dot) { font-size: 10px; }
  .hud > div:nth-child(5) { border-left: 0; }
  .health-bar { width: 40px; }
  .strikes i { width: 12px; height: 12px; }
  .effects { grid-column: 1 / -1; padding: 0 8px !important; }
  .effects:empty { display: none; }
  .tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; position: sticky; top: calc(6px + var(--hud-mobile, 128px)); z-index: 19; background: var(--mist); padding: 4px 0 6px; }
  .tabs button { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 8px 4px; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 5px; position: relative; min-height: 44px; }
  .tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
  .tab-count { font: 500 11px 'IBM Plex Mono', monospace; background: var(--mist); color: var(--ink); border-radius: 999px; padding: 0 6px; }
  .tabs button.hot::after { content: ''; position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
  .play { display: flex; flex-direction: column; gap: 8px; }
  .side { display: contents; }
  .guide { order: -1; }
  .guide .avatar { width: 40px; height: 40px; border-width: 2px; }
  .bubble { min-height: 40px; padding: 6px 10px; }
  .bubble b { display: none; }
  .bubble p { font-size: 12.5px; margin: 0; }
  .bench { display: block; height: auto; min-height: 0; padding: 8px; }
  .bench .station { display: none; }
  .bench[data-active="incoming"] [data-station="incoming"], .bench[data-active="make"] [data-station="make"],
  .bench[data-active="pack"] [data-station="pack"], .bench[data-active="ship"] [data-station="ship"] { display: flex; }
  .station header p { display: none; }
  .tray { overflow: visible; }
  .inbox { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 30; max-height: 44vh; box-shadow: 0 -8px 30px -12px rgba(15,23,42,.35); }
  .inbox > header { padding: 8px 10px; }
  .inbox-list .empty { display: none; }
  .inbox:not(.waiting) .inbox-list { padding-bottom: 0; }
  .keys-hint { display: none; }
  .result-metrics strong { font-size: 22px; }
  .result-metrics .big strong { font-size: 30px; }
  .pitch { grid-template-columns: 1fr; }
  .pitch img { max-height: 200px; min-height: 0; }
  dialog { padding: 20px 14px; }
  td:nth-child(2), th:nth-child(2) { display: none; }
}
@media (hover: none) { .opt:hover:not(:disabled), button.product-tile:hover { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .coach { box-shadow: 0 0 0 3px var(--red); }
}
