/* TOKYOECHO box office. The look is the prototype's (prototype/box-office, 15 Oct 2026), unchanged apart from asset paths;
   the box office's own additions are at the end. The look is the onboarding prototype's settled one (prototypes/prologue,
   body.ui2): the poster loop, the title's light layers, one dark circle on screen right with three echoes, plain
   Helvetica in his cream (7 Oct), choices as dark circles. Values copied from prologue.css so the two read as one. */
:root { --ink: 255, 250, 208; --void: #0c0b0e; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: rgb(var(--ink)); }
body { -webkit-font-smoothing: antialiased; font-family: Helvetica, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ a computer: one 16:9 frame */
#frame {
    position: absolute; left: 50%; top: 50%;
    width: min(100vw, 177.7778vh); height: min(56.25vw, 100vh);
    transform: translate(-50%, -50%); container-type: size; background: var(--void); overflow: hidden;
}
#posterLoop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; pointer-events: none; }
#frame .title-art { position: absolute; left: 46.2%; top: 17%; width: 36%; aspect-ratio: 1400 / 402; z-index: 5; transform: translate(-55%, -50%); mix-blend-mode: screen; pointer-events: none; }
.title-art img, .m-title img { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; }

#disc { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
#disc i { position: absolute; top: 12.5cqw; left: calc(55cqw + var(--d, 0cqw)); width: 38cqw; height: 38cqw; border-radius: 50%; background: rgba(0, 0, 0, var(--a, .52)); }
#disc .echo { animation: ripple 3.6s ease-in-out infinite;
    -webkit-mask-image: radial-gradient(circle at calc(19cqw - var(--d)) 50%, transparent 0 18.95cqw, #000 19cqw);
    mask-image: radial-gradient(circle at calc(19cqw - var(--d)) 50%, transparent 0 18.95cqw, #000 19cqw); }
@keyframes ripple { 0%, 60%, 100% { opacity: .62; } 22% { opacity: 1; } }

#column { position: absolute; z-index: 5; left: 63.5%; width: 21.5%; top: 6.8cqw; bottom: 0; display: grid; align-content: center;
    font: 400 1.15cqw/1.45 Helvetica, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif; animation: buzz .1s infinite linear; }
@keyframes buzz { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(.9); } }

/* ------------------------------------------------------------------ the steps (shared) */
#steps { display: none; }
.step { grid-area: 1 / 1; display: none; }
.step.on { display: block; animation: arrive .7s ease both; }
@keyframes arrive { from { opacity: 0; transform: translateY(.4em); } }
.step p { margin: 0 0 .9cqw; }
.head { font-size: 1.55cqw; line-height: 1.28; }
.small { font-size: .95cqw; line-height: 1.4; opacity: .66; }
.link { color: inherit; opacity: .85; text-underline-offset: .2em; }

.icons { display: flex; gap: 1.1cqw; margin: .2cqw 0 .7cqw; }
.ico { display: inline-flex; flex: none; width: 2.6cqw; height: 2.6cqw; }
.ico svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }

#curve { display: block; width: 100%; aspect-ratio: 300 / 44; margin: .2cqw 0 .5cqw; overflow: visible; }

/* choices: dark circles, the first strongest */
.actions { display: flex; flex-wrap: nowrap; align-items: center; margin: .5cqw 0 .9cqw; }
.actions:empty { display: none; }
.actions button, .chips button {
    flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; align-content: center; gap: .25cqw;
    background: rgba(0, 0, 0, .55); color: rgb(var(--ink)); cursor: pointer; padding: 0 .5cqw; text-align: center;
}
.actions button { width: 6.4cqw; height: 6.4cqw; font-size: 1cqw; line-height: 1.2; }
.actions button + button { margin-left: .6cqw; background: rgba(0, 0, 0, .42); color: rgba(var(--ink), .72); }
.actions button:is(:hover, :focus-visible), .chips button:is(:hover, :focus-visible) { background: rgba(0, 0, 0, .82); color: rgb(var(--ink)); outline: none; }
.actions button .ico { width: 1.7cqw; height: 1.7cqw; opacity: .85; }
.actions button.back { width: 3.6cqw; height: 3.6cqw; background: rgba(0, 0, 0, .35); }
.reminders button { width: 5.2cqw; height: 5.2cqw; font-size: .78cqw; background: rgba(0, 0, 0, .5) !important; color: rgb(var(--ink)) !important; }
.reminders button + button { margin-left: -.5cqw; }
.reminders button .ico { width: 1.9cqw; height: 1.9cqw; }

.chips { display: flex; flex-wrap: wrap; gap: .5cqw; margin: .4cqw 0 .6cqw; max-width: 20cqw; }
.chips button { width: 4.4cqw; height: 4.4cqw; font-size: .82cqw; line-height: 1.1; }
.chips button b { font-weight: 400; font-size: 1.25cqw; }
.chips button small { font-size: .7cqw; opacity: .66; }
.chips button[disabled] { cursor: default; background: rgba(0, 0, 0, .25); color: rgba(var(--ink), .35); }
.chips button.picked { background: rgba(0, 0, 0, .85); box-shadow: inset 0 0 0 .08cqw rgba(var(--ink), .6); }
.moon { width: 1cqw; height: 1cqw; display: block; }
.moon circle { fill: rgba(var(--ink), .14); }
.moon path { fill: rgba(var(--ink), .85); }

/* the ticket */
.ticket { margin: 0 0 .6cqw; }
.ticket .t-no { margin: 0 !important; font-size: 2.5cqw; font-weight: 300; line-height: 1; letter-spacing: .02em; }
.ticket .t-no span { font-size: .45em; opacity: .66; letter-spacing: 0; vertical-align: .35em; }
.ticket .t-no b { font-weight: 300; }

/* ------------------------------------------------------------------ a phone: the onboarding's phone page */
#mobile { position: fixed; inset: 0; overflow-y: auto; background: #000 url(/assets/poster-still.jpg) 44% 50% / cover no-repeat;
    font: 400 16px/1.45 Helvetica, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif; }
.m-title { position: absolute; left: 50%; top: 13%; width: min(84vw, 460px); aspect-ratio: 1400 / 402; transform: translate(-50%, -50%); mix-blend-mode: screen; }
.m-disc { position: absolute; left: 50%; top: 61%; width: min(150vw, 640px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(0, 0, 0, .7); }
.m-text { position: absolute; left: 50%; top: 61%; transform: translate(-50%, -50%); width: min(78vw, 330px); animation: buzz .1s infinite linear; }
#mobile .step p { margin: 0 0 11px; }
#mobile .head { font-size: 21px; }
#mobile .small { font-size: 13px; }
#mobile .icons { gap: 14px; margin: 2px 0 10px; }
#mobile .ico { width: 34px; height: 34px; }
#mobile #curve { margin: 2px 0 6px; }
#mobile .actions { margin: 6px 0 12px; }
#mobile .actions button { width: 84px; height: 84px; font-size: 13px; padding: 0 6px; gap: 4px; }
#mobile .actions button + button { margin-left: 8px; }
#mobile .actions button .ico { width: 22px; height: 22px; }
#mobile .actions button.back { width: 46px; height: 46px; }
#mobile .reminders button { width: min(70px, calc((100% + 18px) / 4)); aspect-ratio: 1; height: auto; font-size: 11px; }   /* four circles: on a narrow phone they shrink to the column */
#mobile .reminders button + button { margin-left: -6px; }
#mobile .reminders button .ico { width: 22px; height: 22px; }
#mobile .chips { gap: 7px; max-width: 300px; margin: 6px 0 10px; }
#mobile .chips button { width: 62px; height: 62px; font-size: 12px; }
#mobile .chips button b { font-size: 18px; }
#mobile .chips button small { font-size: 10px; }
#mobile .moon { width: 13px; height: 13px; }
#mobile .ticket .t-no { font-size: 40px; }

/* the onboarding's later look (prologue.css, 4 Oct evening): lighter type with the film's opacity flicker, and circles
   that show on the dark circle (a faint light fill and an ink ring; the first choice strongest) */
#column, #mobile { font-family: "Helvetica Neue", Helvetica, Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif; font-weight: 300; letter-spacing: .012em; }
/* (2 Nov, his note) the film's flicker, 85–100 % ten times a second: one animation of one number, --flick, on the column. Every element of
   the column takes its brightness from it (filter: opacity, which multiplies with an element's own opacity), so all of them flicker
   together, whenever they arrive. The ticket's, the stub's and the reward's pictures are left out and stay steady: an opacity
   animation on the column itself would flicker them too.) */
@property --flick { syntax: '<number>'; inherits: true; initial-value: 1; }
#column, .m-text { animation: flick .1s infinite linear; }
@keyframes flick { 0%, 100% { --flick: 1; } 50% { --flick: .85; } }
.step > :not(#ticketImage, #stubImage, #rewardImage, #msgImage), #ticketImage > p, #stubImage > p, #msgImage > p { filter: opacity(var(--flick)); }
.actions button, .chips button { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 .06cqw rgba(var(--ink), .3); font-weight: 300; font-family: inherit; }
.actions button:first-child { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 .08cqw rgba(var(--ink), .8); color: rgb(var(--ink)); }
.actions button + button { background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 .06cqw rgba(var(--ink), .22); }
.actions button.back { background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 .06cqw rgba(var(--ink), .22); }
.reminders button { background: rgba(255, 255, 255, .07) !important; box-shadow: inset 0 0 0 .06cqw rgba(var(--ink), .3) !important; }
.actions button:is(:hover, :focus-visible), .chips button:is(:hover, :focus-visible) { background: rgba(255, 255, 255, .18) !important; }
.chips button.picked { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 .08cqw rgba(var(--ink), .8); }
.chips button[disabled] { background: rgba(255, 255, 255, .02); box-shadow: inset 0 0 0 .06cqw rgba(var(--ink), .1); }
#mobile :is(.actions, .chips) button { box-shadow: inset 0 0 0 1px rgba(var(--ink), .3); }
#mobile .actions button:first-child, #mobile .chips button.picked { box-shadow: inset 0 0 0 1.4px rgba(var(--ink), .8); }
#mobile .actions button + button { box-shadow: inset 0 0 0 1px rgba(var(--ink), .22); }
#mobile .reminders button { box-shadow: inset 0 0 0 1px rgba(var(--ink), .3) !important; }
.head { font-weight: 300; }

/* (15 Oct, his note) the night and the hour on rollers, like setting an alarm on an iPhone: one panel, both wheels */
.rollers { --row: 2.3cqw; position: relative; display: flex; gap: .5cqw; margin: .5cqw 0 .9cqw; }
.rollers::before { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--row) * 2); height: var(--row); border-radius: calc(var(--row) / 2);
    background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 .06cqw rgba(var(--ink), .3); pointer-events: none; }
.roller { position: relative; height: calc(var(--row) * 5); overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; outline: none;
    -webkit-mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); }
.roller::-webkit-scrollbar { display: none; }
.roller .pad { height: calc(var(--row) * 2); }
.roller .it { height: var(--row); display: flex; align-items: center; gap: .5cqw; padding: 0 .8cqw; scroll-snap-align: center; cursor: pointer; white-space: nowrap; font-size: 1.12cqw; }
.roller .it.full { opacity: .35; }
.roller .it small { font-size: .78em; opacity: .7; }
.r-day { flex: 1 1 auto; }
.r-hour { flex: 0 0 6.6cqw; }
.r-hour .it { justify-content: center; }
#whenSum { margin-bottom: .3cqw !important; }
.actions button:disabled { opacity: .35; cursor: default; }

/* the stub, after the visit */
.stub .t-no { font-size: 3.4cqw; }
.stub-when { display: flex; align-items: center; gap: .5cqw; }
.stub-when .moon { width: 1.2cqw; height: 1.2cqw; }

#mobile .rollers { --row: 38px; gap: 8px; margin: 6px 0 12px; }
#mobile .rollers::before { box-shadow: inset 0 0 0 1px rgba(var(--ink), .3); }
#mobile .roller .it { font-size: 17px; gap: 8px; padding: 0 12px; }
#mobile .r-hour { flex-basis: 92px; }
#mobile .stub .t-no { font-size: 54px; }
#mobile .stub-when .moon { width: 16px; height: 16px; }

/* (15 Oct, his question) the phone's background loops too: the same poster loop as on a computer, cropped to the
   phone, over the still that shows until it plays */
#mPoster { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 44% 50%; z-index: 0; pointer-events: none; }
.m-title, .m-disc, .m-text { z-index: 1; }
#bookedBye { margin-bottom: .5cqw !important; }
#mobile #bookedBye { margin-bottom: 6px !important; }

/* ------------------------------------------------------------------ the box office's additions (27 Oct 2026) */
.curve { display: block; width: 100%; aspect-ratio: 300 / 44; margin: .2cqw 0 .5cqw; overflow: visible; }
#mobile .curve { margin: 2px 0 6px; }
.warn { opacity: .9; }
#steps a.link { cursor: pointer; }
#turnstile:empty { display: none; }
#ticketImage:empty, #stubImage:empty, #rewardImage:empty, #msgImage:empty, #msgNote:empty, #bookedMore:empty, #bookedPass:empty { display: none; }
#ticketImage img, #stubImage img, #rewardImage img, #msgImage img { display: block; width: 100%; max-width: 15cqw; height: auto; margin: .3cqw 0 .8cqw; border-radius: .3cqw; }
#mobile #ticketImage img, #mobile #stubImage img, #mobile #rewardImage img, #mobile #msgImage img { max-width: 220px; border-radius: 4px; margin: 4px 0 12px; }
.torn { position: relative; opacity: .55; }
.torn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 47%, rgba(0,0,0,.85) 48%, transparent 50%); pointer-events: none; }
.others a { margin-right: .6em; }
#stepMessage .head { margin-bottom: .6cqw; }
#counterLead, #goneLead { margin-bottom: 1.1cqw; }
#mobile #counterLead, #mobile #goneLead { margin-bottom: 14px; }
.dropping #frame, .dropping #mobile { outline: 2px dashed rgba(var(--ink), .5); outline-offset: -12px; }
@media (prefers-reduced-motion: reduce) { #column, .m-text, #disc .echo { animation: none !important; } }
#ticketImage p { margin-top: -.4cqw; }
/* the live ticket (client/lib/live-ticket.ts): the picture, with two drawn layers over it (multiplied, screened) that
   leave clicks to the pictures, so right-click and long-press save the saved picture (below); the whole pivots a little in 3D */
#ticketImage .live, #rewardImage .live, #msgImage .live { position: relative; width: 100%; max-width: 15cqw; margin: .3cqw 0 .8cqw; transform-origin: 50% 50%; will-change: transform; }
#ticketImage .live img, #rewardImage .live img, #msgImage .live img { max-width: 100%; margin: 0; }
/* the saved picture (the print with one frame of the live view baked in) lies unseen over the plain print the live ticket is drawn over, so that
   right-click, long-press and dragging the picture give the saved one */
.live img.saved { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.live canvas.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; border-radius: .3cqw; }
.live canvas.ink { mix-blend-mode: multiply; }
.live canvas.light { mix-blend-mode: normal; }
#mobile #ticketImage .live, #mobile #rewardImage .live, #mobile #msgImage .live { max-width: 220px; margin: 4px 0 12px; }
#mobile .live canvas.fx { border-radius: 4px; }
#scanVideo { display: block; width: 100%; border-radius: .4cqw; margin: .3cqw 0 .6cqw; }
#scanVideo[hidden] { display: none; }
#stubImage .pair { display: flex; align-items: flex-start; gap: .8cqw; margin: .3cqw 0 .6cqw; }
#stubImage .pair img { margin: 0; }
#stubImage .torn-img { width: 38%; opacity: .5; clip-path: polygon(0 0, 100% 0, 100% 58%, 86% 63%, 72% 57%, 58% 64%, 44% 58%, 30% 64%, 15% 58%, 0 63%); }
#stubImage .stub-img { width: 58%; }
#mobile #stubImage .pair { gap: 10px; margin: 4px 0 10px; }
#mobile #stubImage .stub-img { max-width: none; }

/* the demo (a box office whose clock runs fast): one small, quiet line at the very top of every page, in the page's own cream.
   It is a line of the page: nothing is drawn on a ticket's or a stub's picture. Beside the clock, where the demo has them, its
   controls: small text buttons in the same line (the line itself lets clicks through; only the buttons take them). */
#demoBar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; padding: max(6px, env(safe-area-inset-top)) 16px 0; text-align: center; pointer-events: none;
    font: 400 clamp(10px, .85vw, 13px)/1.2 Helvetica, "Helvetica Neue", Arial, sans-serif; letter-spacing: .14em; font-variant-numeric: tabular-nums;
    color: rgba(var(--ink), .6); text-shadow: 0 0 6px rgba(0, 0, 0, .9); }
#demoControls:not(:empty)::before, #demoControls button + button::before { content: "\00b7"; margin: 0 .55em; }
#demoControls button { font: inherit; letter-spacing: inherit; color: inherit; text-shadow: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
    pointer-events: auto; text-underline-offset: .25em; }
#demoControls button + button::before { pointer-events: none; text-decoration: none; display: inline-block; }
#demoControls button:is(:hover, :focus-visible) { color: rgb(var(--ink)); text-decoration: underline; outline: none; }
#demoControls button:disabled { opacity: .5; cursor: default; }

/* a phone showing its ticket to a computer's camera */
#present { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; }
#present img { max-width: 100%; max-height: 74vh; }
#present p { color: rgb(var(--ink)); font: 300 15px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif; text-align: center; max-width: 320px; margin: 0; opacity: .8; }
#present button { font: 300 15px "Helvetica Neue", Helvetica, Arial, sans-serif; color: rgb(var(--ink)); background: rgba(255,255,255,.08); border: 0; border-radius: 999px; padding: .6em 1.4em; box-shadow: inset 0 0 0 1px rgba(var(--ink), .4); }

/* (2 Nov, the director: the dark circles as the onboarding's, the echoes growing denser toward the text circle) the onboarding's
   final values (onboarding.css "the echo pulse, gentle", and its phone page), which this page had in their 4 Oct form */
#disc .echo { --a: .2; opacity: .72; animation: pulse2 3.2s ease-in-out infinite; }
@keyframes pulse2 { 0%, 55%, 100% { opacity: .72; } 20% { opacity: 1; } }
#disc .main { animation: none; opacity: 1; }
.m-title { top: 15%; }
.m-disc { top: 63%; background: rgba(0, 0, 0, .58); }
.m-text { top: 63%; width: min(76vw, 340px); }
#mobile .step p { margin: 0 0 12px; }
@media (orientation: landscape) and (max-height: 520px) {
    .m-title { left: 27%; top: 50%; width: 40vw; }
    .m-disc { left: 72%; top: 50%; width: 120vh; } .m-text { left: 72%; top: 50%; width: 44vw; }
}
