/* 1-800-SHILL game. Same wall, same paper, same ink as the site (tokens.css + site.css). */

body.game { min-height: 100vh; }
.game [hidden] { display: none !important; }
.g-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 60px; padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line-2);
}
.g-brand { color: var(--ink); display: block; }
.g-word { height: 19px; width: auto; }
.g-top-right { display: flex; align-items: center; gap: 10px; }
.g-chip { cursor: pointer; }
.g-chip b { font-weight: 600; }

/* ---------- front desk ---------- */
.front { max-width: 1180px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--gutter) 64px; }
.office-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 28px; padding: 12px 16px; background: var(--paper); border: 1.5px dashed var(--line-3); border-radius: var(--r-2); font-size: 15px; }
.office-banner .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; }
.front-grid { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.front-flyer { rotate: -1deg; }
.front-flyer .flyer-pitch { margin-bottom: 4cqi; }
.day-tab.is-locked { background: #E6E0D2; color: rgba(26, 23, 20, .45); cursor: not-allowed; animation: none; }
.day-tab.is-locked::before { content: ""; position: absolute; top: 2.4cqi; left: 50%; width: 2.6cqi; height: 2.2cqi; margin-left: -1.3cqi; border: .5cqi solid rgba(26, 23, 20, .4); border-bottom: 0; border-radius: 1.4cqi 1.4cqi 0 0; }
.day-tab.is-done .tab-num::after { content: " ✓"; }
.front-side { display: grid; gap: 20px; }
.file-card .file-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.how-card { padding: 20px 22px; }
.how-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.how-card ol { margin: 0 0 12px; padding-left: 20px; color: var(--ink-2); font-size: 14.5px; }
.how-card li { padding: 3px 0; }
.how-card p { font-size: 13.5px; margin: 0; }
.reset { justify-self: start; font-size: 14px; color: var(--ink-2); }
.front-legal { margin: 40px 0 0; font-size: 13.5px; color: var(--muted); }

/* ---------- briefing, end of day, endings ---------- */
.brief { max-width: 860px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--gutter) 64px; }
.brief .memo h1 { margin: 26px 0 18px; }
.brief-pitch { padding: 16px 0; border-top: 1px solid var(--line-2); }
.brief-pitch .label { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.brief-pitch p { margin: 0 0 8px; }
.brief-pitch ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 15px; }
.code { display: inline-block; padding: 1px 6px; border: 1.5px solid var(--ink); border-radius: 3px; font: 600 11px/1.5 var(--f-mono); color: var(--ink); letter-spacing: .04em; }
.brief-note { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line-2); color: var(--ink-2); }
.brief-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.stamp.is-gold { color: #9A7206; border-color: #C99A12; box-shadow: inset 0 0 0 .06em var(--paper), inset 0 0 0 .12em #C99A12; }
.perf { width: 100%; border-collapse: collapse; margin: 6px 0 0; }
.perf td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.perf td:last-child { text-align: right; }
.perf tr.sum td { border-top: 2px solid var(--ink); font-weight: 650; }
.ending .memo-body { margin: 12px 0 0; }

/* ---------- the shift ---------- */
.shift { height: 100vh; min-height: 700px; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.hud {
  display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); flex-wrap: wrap;
  padding: 10px var(--gutter); background: var(--paper); border-bottom: 2px solid var(--ink);
}
.hud-brand svg { width: 34px; height: 34px; }
.hud .label { display: block; margin-bottom: 3px; }
.hud-day b { font: 850 22px/1 var(--f-display); font-stretch: var(--display-stretch); }
.hud-clock b { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hud-quota { min-width: 120px; }
.qtabs { display: flex; gap: 3px; height: 34px; }
.qtab { position: relative; width: 20px; background: var(--gold); border-top: 1.5px dashed rgba(26, 23, 20, .4); display: grid; place-items: center; }
.qtab i { font: 600 8.5px/1 var(--f-mono); font-style: normal; writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .06em; }
.qtab.is-torn { background: transparent; border-top-color: transparent; }
.qtab.is-torn i { visibility: hidden; }
.qtab.is-torn::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 5px; background: var(--gold); clip-path: polygon(0 0, 100% 0, 100% 50%, 80% 90%, 60% 40%, 40% 100%, 20% 45%, 0 80%); }
.qtab-fall { position: fixed; z-index: 70; pointer-events: none; animation: fall .8s cubic-bezier(.45, 0, .8, .5) forwards; transform-origin: 50% 0; }
.hud-stats { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); }
.hud-stats b { color: var(--ink); }
.hud-btns { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.desk { display: grid; grid-template-columns: 270px minmax(0, 1fr) minmax(0, 360px); gap: 16px; padding: 16px var(--gutter); min-height: 0; }
.phone-col { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.phone { background: #D8D1C3; border-radius: 22px 22px 12px 12px; padding: 12px 12px 14px; box-shadow: inset 0 -4px 0 rgba(26, 23, 20, .14), var(--shadow-paper); }
.handset { padding: 2px 18px 10px; }
.handset svg { width: 100%; height: auto; }
.lines { display: grid; gap: 8px; }
.line {
  display: grid; grid-template-columns: 14px auto 1fr; grid-template-rows: auto auto; gap: 2px 10px; align-items: center;
  width: 100%; padding: 10px 12px; text-align: left; cursor: pointer;
  background: var(--paper); border: 1.5px solid rgba(26, 23, 20, .35); border-radius: var(--r-2);
  box-shadow: 0 2px 0 rgba(26, 23, 20, .35);
}
.line[aria-disabled="true"] { cursor: default; }
.line .led { grid-row: 1 / 3; width: 12px; height: 12px; border-radius: 50%; background: #B9B1A3; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
.line-no { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; }
.line-who { font-weight: 650; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line-st { grid-column: 2 / 4; font-size: 11.5px; color: var(--muted); }
.line.is-ringing { border-color: var(--ink); animation: buzz 1.1s steps(2, jump-none) infinite; }
.line.is-ringing .led { background: var(--red); animation: ring 0.5s steps(2, jump-none) infinite; }
.line.is-ringing .line-st { color: var(--red); font-weight: 600; }
.line.is-active { border-color: var(--ink); background: #FFF6D6; }
.line.is-active .led { background: var(--gold); box-shadow: 0 0 0 2px var(--ink); }
.line:focus-visible { outline-offset: 2px; }
@keyframes buzz { 0%, 49% { translate: 0 0; } 50%, 100% { translate: 1.5px 0; } }
.pad-deco { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 12px; }
.pad-deco span { display: grid; place-items: center; height: 22px; background: #EDE8DD; border-radius: 4px; font: 500 9.5px/1 var(--f-mono); color: var(--ink-2); box-shadow: 0 1.5px 0 rgba(26, 23, 20, .25); }
.missed { padding: 14px 16px; min-height: 0; overflow: auto; }
.missed h3 { font: 900 17px/1 var(--f-display); font-stretch: var(--display-stretch); text-transform: uppercase; margin-bottom: 10px; }
.missed ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.mini-slip { background: var(--slip); padding: 8px 10px; border-radius: 3px; display: grid; gap: 2px; }
.mini-slip span { font-size: 11.5px; color: var(--ink-2); }

/* the call sheet */
.callsheet { display: flex; flex-direction: column; min-height: 0; overflow: auto; padding: 16px 20px 12px; }
.callsheet > * { flex: none; }
.caller { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px 14px; align-items: start; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.portrait { width: 72px; height: 72px; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1.5px var(--ink); }
.portrait svg { width: 100%; height: 100%; }
.portrait.big { width: 140px; height: 140px; margin-bottom: 14px; }
.who { display: grid; gap: 2px; min-width: 0; }
.who b { font: 900 24px/1 var(--f-display); font-stretch: var(--display-stretch); }
.who .of { font-weight: 600; color: var(--ink-2); font-size: 14.5px; }
.who .worry { font-size: 13.5px; color: var(--ink-2); }
.who .about { font-size: 11.5px; color: var(--muted); }
.meters { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.meters .delta { grid-column: 1 / -1; }
.meter { display: grid; grid-template-columns: 62px 1fr 40px; gap: 8px; align-items: center; }
.meter .label { margin: 0; }
.meter b { font-size: 13px; text-align: right; }
.bar { position: relative; height: 12px; background: var(--wall-2); border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-2); }
.bar i { position: absolute; inset: 0; transform-origin: 0 50%; transition: transform .25s var(--ease); }
.bar.trust i { background: var(--gold); }
.bar.pat i { background: var(--ink-2); transition: none; }
.bar.pat i.is-low { background: var(--red); }
.bar .mark { position: absolute; top: -2px; bottom: -2px; left: 70%; width: 2px; background: var(--ink); }
.delta { min-height: 18px; margin: 2px 0 0; font-size: 12px; }
.delta.is-good { color: var(--good); }
.delta.is-bad { color: var(--bad); }
.log { flex: 1 1 auto !important; min-height: 110px; overflow: auto; padding: 14px 2px; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; cursor: default; }
.bubble { max-width: 82%; margin: 0; padding: 10px 13px; border-radius: 10px; font-size: 15.5px; line-height: 1.4; }
.bubble.them { align-self: flex-start; background: var(--slip); border-bottom-left-radius: 2px; }
.bubble.you { align-self: flex-end; background: var(--wall-2); border-bottom-right-radius: 2px; }
.opts { display: grid; gap: 8px; min-height: 40px; }
.opt {
  display: grid; grid-template-columns: 24px auto 1fr; gap: 10px; align-items: center;
  width: 100%; padding: 9px 12px; text-align: left; cursor: pointer;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--r-2); box-shadow: 0 2px 0 var(--ink);
  font-size: 15px; line-height: 1.35;
  transition: transform var(--t-press) var(--ease), background-color var(--t-hover) var(--ease);
}
.opt:hover { background: #FFF6D6; }
.opt:active { transform: translateY(2px); box-shadow: none; }
.opt-key { width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-size: 12px; }
.tac { display: inline-block; padding: 2px 7px; border: 1px solid var(--line-3); border-radius: 999px; font: 600 11px/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; color: var(--ink-2); }
.tac.like { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.tac.hate { border-color: var(--red); color: var(--red); }
.waiting { margin: 0; padding: 10px 2px; font-size: 13px; color: var(--ink-2); }
.call-actions { display: flex; align-items: center; gap: 14px; padding-top: 12px; margin-top: 10px; border-top: 1px solid var(--line-2); }
.call-actions .btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.call-actions .btn.is-ready { animation: ready 1.4s var(--ease) infinite; }
@keyframes ready { 0%, 100% { box-shadow: 0 2px 0 var(--ink), 0 0 0 0 rgba(242, 194, 48, .0); } 50% { box-shadow: 0 2px 0 var(--ink), 0 0 0 6px rgba(242, 194, 48, .45); } }
.close-hint { font-size: 12px; color: var(--muted); }
.call-actions .btn-text { margin-left: auto; font-size: 14px; color: var(--ink-2); }
.idle { margin: auto 0; padding: 24px 6px; text-align: center; }
.idle .kicker { justify-content: center; }
.idle h2 { font-size: clamp(30px, 3vw, 42px); margin-bottom: 10px; }
.idle p { max-width: 30em; margin: 0 auto; }

/* the computer */
.computer { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.monitor { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--ink); border-radius: 14px; padding: 8px 10px 12px; box-shadow: var(--shadow-paper); }
.os-bar { display: flex; justify-content: space-between; gap: 10px; padding: 2px 6px 8px; color: var(--paper); font: 600 11.5px/1 var(--f-mono); letter-spacing: .06em; }
.screen { flex: 1; min-height: 0; overflow: auto; background: var(--paper); border-radius: 6px; padding: 14px; position: relative; }
.os { display: grid; gap: 12px; }
.os-card { padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-2); background: #fff; }
.os-card .label { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.os-card h3 { font: 900 22px/1 var(--f-display); font-stretch: var(--display-stretch); margin-bottom: 6px; }
.os-card p { font-size: 14px; color: var(--ink-2); margin: 0 0 6px; }
.os-card ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.notes { list-style: none; padding: 0 !important; display: grid; gap: 6px; }
.notes li { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.notes b { margin-right: 4px; color: var(--ink); }
.sticky { background: #F7E27A; padding: 12px 14px; rotate: -1deg; box-shadow: var(--shadow-paper); font-size: 13.5px; }
.sticky ol { margin: 6px 0 0; padding-left: 18px; }
.power-off { position: absolute; inset: 0; display: grid; place-content: center; gap: 6px; text-align: center; background: #22201C; color: var(--paper); padding: 20px; }
.power-off b { font: 900 30px/1 var(--f-display); font-stretch: var(--display-stretch); }
.power-off span { font-size: 12.5px; color: #CFC8BB; }

.chaos .fire { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--paper); border: 2px solid var(--red); border-radius: var(--r-2); }
.chaos .fire b { display: block; font-weight: 700; }
.chaos .fire .mono { font-size: 12px; color: var(--ink-2); }
.chaos .fire.is-power, .chaos .fire.is-out { grid-template-columns: 1fr; border-color: var(--ink); }
.flame { width: 26px; height: 34px; background: var(--red); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; box-shadow: inset 0 -8px 0 var(--gold); animation: flick .35s steps(2, jump-none) infinite; }
@keyframes flick { 0%, 49% { transform: scaleY(1) skewX(-4deg); } 50%, 100% { transform: scaleY(.88) skewX(5deg); } }

/* case files (mini-games) */
.case { display: grid; gap: 10px; }
.case-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.case-title { font: 900 21px/1.05 var(--f-display); font-stretch: var(--display-stretch); }
.case-time { font-size: 13px; font-weight: 600; }
.case-bar { height: 8px; background: var(--wall-2); border-radius: 4px; overflow: hidden; }
.case-bar span { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; }
.case-bar span.is-low { background: var(--red); }
.case-how { margin: 0; font-size: 14px; color: var(--ink-2); }
.case-note { margin: 0; min-height: 18px; font-size: 12.5px; color: var(--ink-2); }
.case.is-won .case-note { color: var(--good); font-weight: 600; }
.case.is-lost .case-note { color: var(--bad); font-weight: 600; }
.forms { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-card { position: relative; display: grid; gap: 6px; padding: 12px; text-align: left; cursor: pointer; background: #fff; border: 1.5px solid var(--line-3); border-radius: 4px; box-shadow: 0 2px 0 var(--line-3); overflow: hidden; }
.form-card:hover { border-color: var(--ink); }
.form-no { font-size: 10.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.form-name { font-weight: 700; font-size: 15.5px; }
.form-lines { display: grid; gap: 4px; }
.form-lines i { height: 3px; background: var(--wall-2); border-radius: 2px; }
.form-lines i:nth-child(2) { width: 70%; }
.form-lines i:nth-child(3) { width: 45%; }
.form-stamp { position: absolute; right: 8px; bottom: 10px; padding: 2px 6px; border: 2px solid var(--red); color: var(--red); font: 900 14px/1 var(--f-display); font-stretch: var(--display-stretch); text-transform: uppercase; rotate: -12deg; opacity: 0; transform: scale(1.6); transition: opacity .12s, transform .12s; }
.form-card.is-stamped .form-stamp { opacity: .9; transform: scale(1); }
.form-card.is-wrong { border-color: var(--bad); background: #FBEDEA; }
.dial { display: grid; gap: 10px; justify-items: center; }
.lcd { width: 100%; padding: 10px 12px; background: #CFD8C4; border-radius: 4px; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .25); font-size: 22px; font-weight: 600; letter-spacing: .06em; }
.lcd-pre { color: rgba(26, 23, 20, .55); }
.lcd-cur { animation: ring 1s steps(2, jump-none) infinite; }
.pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 8px; }
.key { display: grid; place-items: center; gap: 0; height: 52px; background: #fff; border: 1.5px solid var(--ink); border-radius: 8px; box-shadow: 0 2px 0 var(--ink); cursor: pointer; }
.key b { font: 600 20px/1 var(--f-mono); }
.key small { font: 600 9.5px/1 var(--f-mono); letter-spacing: .1em; color: var(--ink-2); }
.key:active, .key.is-ok { transform: translateY(2px); box-shadow: none; background: #FFF6D6; }
.key.is-bad { background: #FBEDEA; border-color: var(--bad); }
.typer { display: grid; gap: 10px; }
.type-target { margin: 0; font-size: 18px; line-height: 1.5; padding: 10px 12px; background: #fff; border: 1px dashed var(--line-3); border-radius: 4px; }
.type-target span.ok { background: rgba(242, 194, 48, .6); }
.type-target span.bad { background: #F6C9C3; color: var(--bad); }
.type-in { font-size: 17px; }
.whack-score { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.whack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hole { position: relative; aspect-ratio: 1.25; background: var(--wall-2); border: 1.5px solid var(--line-3); border-radius: 8px; overflow: hidden; cursor: pointer; padding: 0; touch-action: manipulation; }
.hole .pop { position: absolute; inset: 8%; display: grid; place-items: center; transform: translateY(110%); transition: transform .12s var(--ease); }
.hole .pop svg { width: 86%; height: 86%; }
.hole.is-up .pop { transform: translateY(0); }
.hole.is-up.is-target { background: #FFF6D6; }

/* pause */
.pause { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(26, 23, 20, .55); padding: 20px; }
.pause-card { max-width: 460px; padding: 30px; text-align: center; }
.pause-card h2 { margin-bottom: 10px; }
.pause-actions { display: grid; gap: 12px; justify-items: center; margin-top: 22px; }

/* ---------- day 7 ---------- */
.review { max-width: 1100px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--gutter) 64px; }
.review-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.review-file { padding: 22px; }
.review-file h2 { font: 900 26px/1 var(--f-display); font-stretch: var(--display-stretch); }
.review-call { min-height: 520px; }
.review-call .opt { grid-template-columns: auto 1fr; }

/* ---------- smaller screens ---------- */
@media (max-width: 1180px) {
  .desk { grid-template-columns: 260px minmax(0, 1fr); }
  .computer { grid-column: 1 / -1; }
  .shift { height: auto; min-height: 100vh; }
  .monitor { min-height: 360px; }
  .callsheet { min-height: 560px; }
}
@media (max-width: 860px) {
  .front-grid, .review-grid { grid-template-columns: minmax(0, 1fr); }
  .front-flyer { max-width: 560px; }
  .desk { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .phone { padding: 10px; }
  .handset, .pad-deco { display: none; }
  .lines { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .line { grid-template-columns: 10px 1fr; padding: 8px; }
  .line .led { grid-row: auto; width: 10px; height: 10px; }
  .line-who { grid-column: 1 / -1; font-size: 13px; }
  .line-st { grid-column: 1 / -1; font-size: 10.5px; }
  .missed { display: none; }
  .caller { grid-template-columns: 64px minmax(0, 1fr); }
  .portrait { width: 64px; height: 64px; }
  .meters { grid-template-columns: minmax(0, 1fr); }
  .who b { font-size: 22px; }
  .log { max-height: 38vh; }
  .hud { gap: 10px 16px; padding: 8px 12px; }
  .hud-brand, .hud-stats { display: none; }
  .hud-day b { font-size: 17px; }
  .hud-clock b { font-size: 18px; }
  .callsheet { min-height: 520px; padding: 14px; }
  .pad { grid-template-columns: repeat(3, 64px); }
  .bubble { max-width: 92%; }
}
