/* Poster Cut: one art system, re-inked exclusively by tokens.css. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--body); }
button { min-width: var(--tap-min); min-height: var(--tap-min); font: inherit; cursor: pointer; color: var(--tap-ink); background: var(--accent-tap); border: 2px solid var(--line); -webkit-tap-highlight-color: var(--clear); }
button:focus-visible { outline: 3px solid var(--print); outline-offset: 4px; }
button:active { translate: 1px 2px; }
.definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.page { overflow: hidden; }
.page:after { content: ''; position: fixed; pointer-events: none; z-index: 8; inset: 0; opacity: var(--grain-opacity); background-image: repeating-radial-gradient(ellipse at 17% 32%, var(--grain) 0 .55px, var(--clear) .8px 3px); background-size: 7px 11px; }
.page-head { height: calc(68px + var(--safe-top)); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: calc(8px + var(--safe-top)) max(28px, var(--safe-right)) 8px max(28px, var(--safe-left)); border-bottom: 1px solid var(--ink); background: var(--surface); position: relative; z-index: 2; }
.wordmark { font: 28px/.9 var(--display); letter-spacing: -.02em; }
.wordmark span { display: block; margin-top: 7px; font: 700 8px var(--body); letter-spacing: .18em; }
.night-picker { display: flex; gap: 0; }
.night-picker button { background: var(--surface); color: var(--ink); padding: 0 17px; font-size: 11px; font-weight: 750; border-width: 1px; margin-left: -1px; }
.night-picker button[aria-pressed="true"] { background: var(--accent-tap); color: var(--tap-ink); box-shadow: inset 0 -4px 0 var(--tap-ink); }
.screen { min-height: calc(100svh - 68px - var(--safe-top)); position: relative; display: flex; align-items: end; justify-content: center; padding: 24px max(20px, var(--safe-right)) max(20px, var(--safe-bottom)) max(20px, var(--safe-left)); isolation: isolate; }
.poster-wall { position: absolute; inset: 10px 14% auto; display: flex; justify-content: center; gap: 5%; z-index: -2; }
.wall-poster { position: relative; width: 27%; height: 310px; padding: 17px; border: 7px solid var(--surface); outline: 1px solid var(--ink); color: var(--surface); background: var(--ink-2); transform: rotate(-5deg); box-shadow: 4px 5px 0 var(--shadow); overflow: hidden; }
.wall-poster.middle { transform: rotate(3deg); background: var(--ink); color: var(--surface); margin-top: 9px; }
.wall-poster:last-child { transform: rotate(7deg); }
.wall-poster small, .wall-poster span { display: block; font-size: 7px; font-weight: 750; letter-spacing: .16em; }
.wall-poster b { display: block; font: clamp(24px, 3.3vw, 44px)/.9 var(--display); margin-top: 9px; }
.wall-poster svg { position: absolute; width: 100%; height: 170px; left: 0; bottom: 15px; }
.wall-poster span { position: absolute; bottom: 9px; }
.poster-disc { fill: var(--surface); }
.poster-door { fill: var(--print); }
.poster-orbit { fill: none; stroke: var(--ink); stroke-width: 9; }
.side-type { position: absolute; top: 45%; font: 22px var(--display); writing-mode: vertical-rl; letter-spacing: .12em; color: var(--muted); }
.side-type.left { left: max(24px, var(--safe-left)); transform: rotate(180deg); }
.side-type.right { right: max(24px, var(--safe-right)); }
.screen-wrap { width: min(1080px, calc(100vw - max(20px, var(--safe-left)) - max(20px, var(--safe-right))), calc((100svh - 108px - var(--safe-top) - var(--safe-bottom)) * 16 / 9)); }
.play-band { position: relative; width: 100%; aspect-ratio: 16 / 9; container-type: inline-size; background: var(--surface); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); overflow: hidden; }
.hud { position: absolute; inset: 0 0 auto; height: 12%; padding: 0 3%; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--ink); background: var(--surface); z-index: 2; }
.rush-label { font: 1.65cqw var(--display); letter-spacing: .02em; }
.rush-label i { display: inline-block; font: 700 1cqw var(--body); border: 1px solid var(--ink); padding: .4cqw; margin-left: 1cqw; transform: rotate(-6deg); }
.showtime { display: flex; align-items: center; gap: 1cqw; }
.showtime span, .tips { font: 750 max(7px, .9cqw) var(--body); letter-spacing: .12em; }
.showtime strong { font: 3cqw var(--display); }
.tips b { font: 2.4cqw var(--display); margin-left: .6cqw; letter-spacing: 0; }
.lobby { position: absolute; inset: 12% 0 32%; background: repeating-linear-gradient(90deg, var(--clear) 0 24.8%, var(--panel) 24.8% 25%); }
.lobby:after { content: ''; position: absolute; inset: 0; background: var(--ink-2); opacity: .07; clip-path: polygon(0 70%, 100% 0, 100% 80%, 0 100%); }
.lobby > span { position: absolute; font: 10cqw/.83 var(--display); left: 2%; top: 12%; color: var(--panel); transform: rotate(-5deg); }
.lobby small { position: absolute; right: 2%; top: 8%; font: 700 .9cqw/1.8 var(--body); writing-mode: vertical-rl; color: var(--muted); }
.queue { position: absolute; inset: 16% 6% 31%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3%; }
.customer { position: relative; }
.character { position: absolute; width: 100%; height: 72%; bottom: -7%; overflow: visible; filter: drop-shadow(2px 3px 0 var(--shadow)); }
.body { fill: var(--ink-2); stroke: var(--line); stroke-width: 1.5; stroke-linejoin: bevel; }
.noir .body { fill: var(--ink); }
.noir .seam { stroke: var(--surface); }
.paper { fill: var(--surface); stroke: var(--line); stroke-width: 2.5; stroke-linejoin: bevel; }
.dark { fill: var(--ink); }
.detail { fill: none; stroke: var(--surface); stroke-width: 3; }
.seam { fill: none; stroke: var(--ink); stroke-width: 3; }
.thin-line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: square; }
.food-tub { fill: var(--print); stroke: var(--ink); stroke-width: 2.5; }
.paper-stripe { fill: none; stroke: var(--surface); stroke-width: 6; }
.ghost-line { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 4 3; }
.order { position: absolute; width: 12.7cqw; height: 12.7cqw; left: 50%; transform: translateX(-50%); top: 0; background: var(--surface); border-radius: 50%; z-index: 1; box-shadow: 2px 3px 0 var(--shadow); }
.order:after { content: ''; position: absolute; bottom: -3%; left: 45%; width: 13%; height: 13%; background: var(--surface); clip-path: polygon(0 0, 100% 0, 20% 100%); }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); fill: none; stroke-width: 4; }
.ring .track { stroke: var(--track); }
.ring .level { stroke: var(--patience-ok); stroke-linecap: round; }
.warn .level { stroke: var(--patience-warn); }
.crit .level { stroke: var(--patience-crit); }
.order-items { position: absolute; inset: 19% 15%; display: flex; justify-content: center; align-items: center; gap: 1%; }
.order-items > svg { width: 70%; height: 100%; }
.order-items.combo { inset: 21% 10%; }
.order-items.combo > svg { width: 50%; }
.badge { position: absolute; right: -4%; top: 1%; width: 3cqw; height: 3cqw; display: grid; place-items: center; color: var(--surface); background: var(--ink); border: 2px solid var(--surface); border-radius: 50%; font: 900 2cqw var(--body); }
.badge svg { width: 90%; height: 90%; }
.crit .badge { top: auto; bottom: 2%; background: var(--patience-crit); }
.crit { animation: impatient 2.6s infinite; }
@keyframes impatient { 0%,80%,100% { margin-left: 0; } 84%,92% { margin-left: -2px; } 88%,96% { margin-left: 2px; } }
.screen-caption { padding-top: 12px; display: flex; justify-content: space-between; font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.screen-caption b { margin: 0 6px; color: var(--print); }
/* STATIONS */
.counter { position: absolute; bottom: 4.5%; height: 29%; left: 0; right: 0; background: var(--panel); border-top: .6cqw solid var(--ink); display: grid; grid-template-columns: 33% 30% 33%; gap: 2%; padding: 0 2%; }
.counter:before { content: ''; position: absolute; inset: auto 0 -18% 0; height: 20%; background: var(--panel); z-index: -1; }
.station { position: relative; min-width: 0; padding: 0 4%; }
.station h2 { position: absolute; top: 0; left: 0; right: 0; text-align: center; margin: .7cqw 0 0; font: 1.8cqw var(--display); letter-spacing: .04em; }
.station h2 span { font: 700 .85cqw var(--body); margin-right: .4cqw; }
/* Low equipment silhouettes keep faces and order tails visible above the counter. */
.machine-art { position: absolute; width: 83%; height: 42%; bottom: 102%; left: 8.5%; }
.ingredients { position: absolute; bottom: 3%; left: 4%; right: 4%; display: grid; grid-template-columns: repeat(3, minmax(48px, 1fr)); gap: 5%; }
.ingredients > div { text-align: center; }
.ingredients button { width: 100%; height: clamp(48px, 8.4cqw, 90px); padding: 3px; border-radius: 2px; box-shadow: 2px 3px 0 var(--ink); }
.ingredients button:nth-child(odd) { transform: rotate(-1deg); }
.ingredients svg { display: block; width: 100%; height: 100%; }
/* On mustard, use stable dark ink on paper for high-contrast icon contours. */
.ingredients button, .bin-button { --ink: var(--tap-ink); --line: var(--tap-ink); --surface: var(--accent-tap); --print: var(--tap-ink); }
.ingredients > div > span { display: block; margin-top: 5px; font-size: clamp(7px, 1cqw, 11px); font-weight: 750; line-height: 1; }
.prep-station { padding: 0; }
/* Reserve two label lines below the tray, clear of the queue's feet. */
.station.prep-station h2 { top: auto; bottom: 13%; margin: 0; line-height: 1; }
.tray { position: absolute; inset: 0 0 28%; display: grid; grid-template-columns: 36% 32% 32%; align-items: center; padding: 4%; background: var(--surface); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--shadow); clip-path: polygon(0 2%, 98% 0, 100% 97%, 2% 100%); }
.tray > div { position: relative; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.tray svg { width: 100%; min-height: 0; height: 80%; }
.tray .ready-item { border-right: 1px solid var(--track); padding-right: 9%; }
.ready-item svg { height: 70%; }
.ready-label { font: 800 max(6px, .8cqw) var(--body); color: var(--patience-ok); }
.drag-cue { position: absolute; left: -1%; top: 25%; font-size: 2.5cqw; color: var(--ink); }
.build-item > span { font-size: max(6px, .7cqw); font-weight: 800; color: var(--muted); white-space: nowrap; }
.tray-caption { position: absolute; inset: auto -4% 0; margin: 0; text-align: center; font: 750 max(6px, .68cqw) var(--body); letter-spacing: .02em; }
.tray-caption span { padding: 0 .3cqw; }
.play-instruction { position: absolute; bottom: 0; left: 0; width: 100%; height: 4.5%; display: flex; gap: 1%; align-items: center; justify-content: center; margin: 0; font: 700 max(8px, .88cqw) var(--body); background: var(--ink); color: var(--surface); letter-spacing: .03em; }
.play-instruction b { border: 1px solid var(--surface); padding: 0 .35cqw; }
.play-instruction em { font-weight: 400; font-style: normal; letter-spacing: 0; }
/* STUDY SECTIONS */
.study { max-width: 1136px; margin: 0 auto; padding: 48px 28px 28px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.eyebrow { font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.section-head h1, .section-head h2 { font: clamp(30px, 4vw, 46px)/1 var(--display); margin: 12px 0 0; letter-spacing: -.025em; }
.section-head p { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 0; }
.mood-grid { display: grid; grid-template-columns: 150px repeat(4, minmax(0, 1fr)); }
.mood-corner, .mood-heading { padding: 16px 12px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; border-bottom: 1px solid var(--ink); }
.mood-heading { text-align: center; }
.mood-corner { color: var(--muted); padding-left: 0; }
.cast-label { padding: 38px 16px 20px 0; border-bottom: 1px solid var(--track); }
.cast-label > span { color: var(--print); font: 24px var(--display); }
.cast-label h3 { font: 24px/1 var(--display); margin: 12px 0; }
.cast-label p { font-size: 11px; line-height: 1.6; color: var(--muted); }
.mood-card { position: relative; display: flex; flex-direction: column; justify-content: end; height: 280px; margin: 0; border-left: 1px solid var(--track); border-bottom: 1px solid var(--track); background: linear-gradient(160deg, var(--clear) 0 50%, var(--panel) 50% 100%); container-type: inline-size; }
.mood-character { position: relative; width: 90%; height: 75%; min-height: 0; flex: 0 1 auto; left: 5%; }
.mood-card .order { width: 48px; height: 48px; top: 12px; left: auto; right: 10px; transform: none; }
.mood-card .badge { width: 17px; height: 17px; font-size: 12px; border-width: 1px; }
.mood-card figcaption { flex: 0 0 auto; width: 100%; min-height: 44px; padding: 7px 10px; font-size: 9px; line-height: 1.5; background: var(--surface); color: var(--muted); border-top: 1px solid var(--track); }
.mood-card figcaption b { display: none; }
.study-note { margin: 16px 0 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.states { padding-top: 36px; padding-bottom: 48px; }
.state-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding-top: 24px; }
.state-card { border: 1px solid var(--ink); box-shadow: 3px 3px 0 var(--shadow); }
.mini-scene { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--ink); background: var(--panel); }
.mini-time { position: absolute; left: 0; right: 0; top: 0; padding: 9px 12px; font-size: 7px; letter-spacing: .1em; font-weight: 800; background: var(--surface); border-bottom: 1px solid var(--ink); }
.mini-counter { position: absolute; bottom: 0; width: 100%; height: 23%; display: flex; align-items: center; justify-content: space-around; background: var(--surface); border-top: 3px solid var(--ink); font-size: 7px; font-weight: 800; }
.empty-message, .loading-message { position: absolute; inset: 21% 3% 26%; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.empty-message svg { width: 64px; height: 42px; }
.mini-scene strong { display: block; font: 22px var(--display); text-align: center; }
.mini-scene p { margin: 6px 0 0; font-size: 9px; text-align: center; }
.reel { width: 40px; height: 40px; animation: reel-turn 8s linear infinite; margin-bottom: 4px; }
@keyframes reel-turn { to { transform: rotate(360deg); } }
.loading-track { width: 50%; height: 4px; background: var(--track); margin-top: 8px; }
.loading-track span { display: block; height: 100%; width: 63%; background: var(--ink-2); }
.leaving-guest { position: absolute; height: 70%; width: 46%; right: -12%; top: 16%; opacity: .55; transform: rotate(9deg); }
.exit-cue { position: absolute; right: 20%; top: 25%; font-size: 28px; }
.wrong-item { position: absolute; width: 57px; height: 68px; left: 13%; bottom: 24%; }
.wrong-item svg { width: 100%; height: 100%; }
.wrong-item > span { position: absolute; top: -4px; right: -7px; background: var(--patience-crit); color: var(--surface); font: 900 24px/28px var(--body); width: 28px; height: 28px; text-align: center; border-radius: 50%; }
.bin-arrow { position: absolute; left: 38%; bottom: 35%; font-size: 24px; }
.bin-button { position: absolute; left: 50%; bottom: 2%; width: 48px; height: 48px; padding: 2px; box-shadow: 2px 2px 0 var(--ink); z-index: 1; }
.failed-scene .mini-counter span:nth-child(2) { visibility: hidden; }
.bin-button svg { width: 100%; height: 100%; }
.state-copy { padding: 17px; }
.state-copy h3 { font: 25px var(--display); margin: 9px 0; }
.state-copy p { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0; }
.page-foot { border-top: 1px solid var(--ink); padding: 24px 28px; display: flex; justify-content: space-between; gap: 20px; font-size: 8px; font-weight: 750; letter-spacing: .1em; }
.rotate-hint { display: none; position: fixed; inset: 0; background: var(--surface); z-index: 10; padding: 32px; align-items: center; justify-content: center; text-align: center; flex-direction: column; }
.rotate-hint > svg { width: 100px; height: 100px; margin: 44px 0 25px; }
.rotate-hint h2 { font: 64px/.88 var(--display); margin: 0; text-transform: uppercase; letter-spacing: -.03em; }
.rotate-hint p { font-size: 13px; line-height: 1.7; margin: 23px 0; color: var(--muted); }
.rotate-hint button { padding: 12px 20px; box-shadow: 3px 4px 0 var(--ink); font-size: 12px; font-weight: 800; }
.rotate-foot { position: absolute; bottom: max(32px, var(--safe-bottom)); font-size: 8px; letter-spacing: .12em; }
@media (max-height: 480px) and (orientation: landscape) {
  .page-head { height: calc(56px + var(--safe-top)); padding-top: calc(4px + var(--safe-top)); padding-bottom: 4px; }
  .wordmark { font-size: 24px; }
  .wordmark span { font-size: 7px; margin-top: 4px; }
  .screen { min-height: calc(100svh - 56px - var(--safe-top)); padding-top: 4px; padding-bottom: max(7px, var(--safe-bottom)); align-items: center; }
  .screen-wrap { width: min(1080px, calc(100vw - max(20px, var(--safe-left)) - max(20px, var(--safe-right))), calc((100svh - 80px - var(--safe-top) - var(--safe-bottom)) * 16 / 9)); }
  .screen-caption { padding-top: 7px; font-size: 6px; }
  .poster-wall { inset: 12% -14% auto; justify-content: space-between; opacity: .55; }
  .wall-poster { width: 30%; height: 260px; }
  .wall-poster.middle { display: none; }
  .side-type { display: none; }
  .ingredients { gap: 5px; left: 2%; right: 2%; }
  .station h2 { margin-top: .6cqw; font-size: 1.6cqw; }
  .ingredients > div > span { margin-top: 4px; }
}
@media (max-width: 760px) {
  .mood-grid { grid-template-columns: 100px repeat(4, minmax(0, 1fr)); }
  .mood-card { height: 230px; }
  .mood-card .order { width: 38px; height: 38px; right: 3px; }
  .cast-label h3 { font-size: 20px; }
  .mood-card figcaption { font-size: 8px; padding: 5px; min-height: 54px; }
  .state-grid { gap: 12px; }
  .mini-scene strong { font-size: 17px; }
  .mini-scene p { font-size: 8px; }
}
@media (orientation: portrait) {
  .rotate-hint:not([hidden]) { display: flex; }
  .page-head { height: auto; min-height: calc(116px + var(--safe-top)); flex-wrap: wrap; padding: calc(15px + var(--safe-top)) max(20px, var(--safe-right)) 15px max(20px, var(--safe-left)); gap: 12px; }
  .night-picker { width: 100%; }
  .night-picker button { flex: 1; padding: 0 10px; }
  .screen { min-height: 460px; padding: 25px 20px; overflow: auto; justify-content: start; align-items: center; }
  .screen-wrap { width: 560px; min-width: 560px; }
  .poster-wall { inset: 0 -20% auto; }
  .side-type { display: none; }
  .screen-caption { font-size: 7px; }
  .page-foot { flex-direction: column; padding: 20px; }
}
/* Study cards need readable columns even in a narrow landscape window. */
@media (max-width: 600px), (orientation: portrait) {
  .study { padding: 32px 20px; }
  .section-head { display: block; }
  .section-head p { margin-top: 12px; }
  .mood-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mood-corner, .mood-heading { display: none; }
  .cast-label { grid-column: 1 / -1; padding: 24px 0 10px; }
  .cast-label h3 { display: inline; margin-left: 10px; }
  .cast-label p { margin: 8px 0; }
  .mood-card { height: 260px; }
  .mood-card figcaption b { display: block; text-transform: uppercase; color: var(--ink); font-size: 9px; }
  .state-grid { grid-template-columns: 1fr; gap: 20px; }
  .mini-scene strong { font-size: 24px; }
  .mini-scene p { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
}
