:root {
  color-scheme: dark;
  --ink: #2b211c; --paper: #fff4df; --peach: #ffa176; --mint: #86ddb2;
  --sun: #ffd36c; --lilac: #cbdaf5; --coral: #ff9a81;
  --display: 'Arial Black', 'DejaVu Sans', system-ui, sans-serif;
  --mono: ui-monospace, monospace;
  color: var(--paper); background: #211b18; font-family: system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 80% 0%, #573328, transparent 55rem),
    radial-gradient(circle at 2px 2px, #f7a47a17 1px, transparent 1.5px) 0 0 / 9px 9px, #211b18;
}
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 3px solid #fff5e0; outline-offset: 4px; }
.top, main, footer { width: min(1110px, 100% - 54px); margin: auto; }
.top { min-height: 65px; display: flex; justify-content: space-between; align-items: center; gap: .5rem; border-bottom: 1px solid #735445; }
.brand { color: var(--paper); text-decoration: none; font: 1000 1.35rem/1 var(--display); letter-spacing: .04em; white-space: nowrap; }
.brand span { color: var(--peach); margin-left: .38em; font: 700 .875rem/1 var(--mono); }
.top-actions { display: flex; gap: .4rem; }
.utility {
  font-size: .875rem; font-weight: 750; min-height: 40px; border: 1px solid #ab816a;
  background: #392b24; color: var(--paper); border-radius: .45rem; padding: .3rem .65rem;
}
.utility:hover, .utility[aria-pressed="true"] { background: var(--mint); color: var(--ink); border-color: var(--mint); }
.poster { margin: 1.45rem 0 1.65rem; }
.poster h1 {
  width: fit-content; max-width: 100%; color: var(--paper); margin: 0;
  font: 1000 clamp(2.55rem, 8.5vw, 6.2rem)/.93 var(--display);
  letter-spacing: -.065em; text-shadow: 3px 4px #d84a30, 6px 8px #1b1411; transform: rotate(-2deg);
  overflow-wrap: anywhere;
}
.poster h1 em { color: var(--peach); font-style: normal; }
.poster p { margin: .9rem 0 0; font-size: clamp(1rem,2vw,1.18rem); color: #f4ecd9; }
.cabinet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .86fr); gap: clamp(18px,3vw,36px); align-items: start; }
.stage {
  position: relative; isolation: isolate; border: 4px solid #211812; border-radius: 1.5rem;
  box-shadow: 0 5px #170e0b, 0 0 0 2px #f7a47a; overflow: hidden; background: #49bdb3;
}
.stage canvas { display: block; width: 100%; height: auto; }
.stage-caption {
  position: absolute; inset: auto 4% 7% auto; max-width: 60%; color: var(--ink); background: var(--paper);
  padding: .28em .5em; border: 3px solid var(--ink); border-radius: .33em; box-shadow: 2px 3px var(--ink);
  transform: rotate(-7deg); font: 1000 clamp(1rem, 2.3vw, 1.8rem)/1 var(--display); text-align: center;
  overflow-wrap: anywhere;
}
.stage-progress {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 12px;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
  box-shadow: 0 2px var(--ink);
}
.stage-progress i {
  width: clamp(12px,2.35vw,22px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: #e5d0ac;
}
.stage-progress [data-phase="done"] { background: #83d68b; }
.stage-progress [data-phase="now"] { background: #f07b50; }
.stage-caption:empty { display: none; }
.stage-caption.pop { animation: caption .42s cubic-bezier(.14,.7,.28,1.25) both; }
@keyframes caption { from { opacity: 0; transform: translate(16px, 13px) rotate(8deg) scale(.65); } }
.advisor {
  color-scheme: light; color: var(--ink); background: #f4ecd9; border: 3px solid #2b211c;
  border-radius: 1.25rem; box-shadow: 5px 6px #d84a30, 8px 9px #1b120e; padding: clamp(1rem,2.5vw,1.55rem); min-width: 0;
}
.panel-content:has(.eyebrow) .answer { animation: deal .3s cubic-bezier(.24,.71,.32,1.16) both; }
.panel-content .answer:nth-child(2) { animation-delay: .035s; }
.panel-content .answer:nth-child(3) { animation-delay: .07s; }
.panel-content .answer:nth-child(4) { animation-delay: .105s; }
@keyframes deal { from { opacity: 0; translate: 0 8px; scale: .96; } }
.panel-content > :first-child { margin-top: 0; }
.panel-content h2 {
  margin: .5rem 0 .48rem; font: 950 clamp(1.5rem, 3.1vw, 2.4rem)/1.01 var(--display); letter-spacing: -.036em;
  overflow-wrap: anywhere;
}
.panel-content h2:focus { outline: none; }
.eyebrow { color: #87432c; margin: 0 0 .55rem; font: 850 .875rem/1.25 var(--mono); text-transform: uppercase; }
.detail { color: #57483d; margin: 0 0 .85rem; font-size: 1rem; line-height: 1.36; }
.language-grid, .answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .55rem; margin-top: .85rem; }
.answer-grid.list { grid-template-columns: 1fr; }
.choice, .answer {
  --tint: var(--mint);
  border: 2px solid var(--ink); border-radius: .68rem; min-height: 52px; color: var(--ink); background: var(--tint);
  text-align: left; font-weight: 830; box-shadow: 0 3px var(--ink);
  transition: transform .14s, box-shadow .14s, filter .14s; min-width: 0;
}
.choice:hover, .answer:hover { filter: saturate(1.22); transform: translateY(-2px) rotate(-.5deg); box-shadow: 0 5px var(--ink); }
.choice:active, .answer:active { transform: translateY(2px); box-shadow: 0 1px var(--ink); }
.choice:focus-visible, .answer:focus-visible, .quiet:focus-visible { outline-color: #285a59; }
[data-color="sun"] { --tint: var(--sun); }
[data-color="lilac"] { --tint: var(--lilac); }
[data-color="coral"] { --tint: var(--coral); }
.choice { display: flex; align-items: center; gap: .55rem; padding: .76rem .62rem; font-size: clamp(1rem, 2vw, 1.16rem); }
.choice small { flex: none; background: #332821; color: var(--paper); border-radius: .26rem; padding: .24em .3em; font: 800 .75rem/1 var(--mono); }
.answer { display: flex; align-items: center; gap: .45rem; padding: .46rem .56rem; font-size: 1rem; line-height: 1.12; }
.answer span { min-width: 0; overflow-wrap: anywhere; }
.answer:hover canvas, .answer:focus-visible canvas { transform: rotate(-9deg) scale(1.12); }
.answer canvas { transition: transform .14s; }
.answer small { display: block; font: 650 .875rem/1.2 system-ui,sans-serif; margin-top: .22rem; }
.answer canvas { display: block; flex: 0 0 auto; width: 33px; height: 33px; }
.links { display: flex; flex-wrap: wrap; gap: .15rem .9rem; margin-top: .6rem; }
.quiet { color: #85371f; border: 0; background: transparent; padding: .35rem 0; min-height: 43px; font-size: .9rem; font-weight: 800; text-decoration: underline; text-underline-offset: .2em; text-align: start; }
.quiet:hover, .quiet[aria-pressed='true'] { color: #2b211c; }
.quiet[aria-pressed='true'] { text-decoration-thickness: 3px; }
.source { margin: .35rem 0 0; color: #57483d; font: 700 .8rem/1.35 var(--mono); }
.ticket { position: relative; border-bottom: 2px dashed #b28c71; padding-bottom: .78rem; }
.ticket.enter { animation: ticket .34s cubic-bezier(.22,.74,.3,1.22) both; }
@keyframes ticket { from { opacity: 0; transform: translateY(10px) rotate(-2deg); } }
.ticket-meta { display: flex; flex-wrap: wrap; gap: .35rem; margin: .6rem 0; }
.ticket-meta span { background: #332821; color: #fff4df; font: 800 .875rem/1.2 var(--mono); border-radius: .4em; padding: .35em .52em; }
.result-reason { color: #3d2e25; font-weight: 760; font-size: 1.08rem; margin: .8rem 0 .3rem; }
.ingredients { color: #57483d; font-size: 1rem; line-height: 1.4; margin: 0; }
.language-note { color: #85371f; margin: .35rem 0 0; font-size: .875rem; }
.drink-list { display: grid; gap: .45rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
footer { display: flex; justify-content: space-between; border-top: 1px solid #735445; color: #e5d0ac; font: 700 .8rem/1.35 var(--mono); padding: .85rem 0; margin-top: 1.55rem; }
@media (max-width: 740px) {
  .top, main, footer { width: calc(100% - 30px); }
  .top { min-height: 56px; }
  .poster { margin: 1.05rem 0 1.2rem; }
  .poster p { margin-top: .7rem; line-height: 1.3; }
  .cabinet { grid-template-columns: 1fr; gap: 13px; }
  .stage { border-radius: 1rem; }
  .advisor { border-radius: .95rem; }
  .answer small { font-size: .86rem; }
}
@media (max-width: 390px) {
  .top, main, footer { width: calc(100% - 24px); }
  .utility { min-height: 44px; }
  .answer, .choice { padding-inline: .42rem; gap: .34rem; }
  .answer canvas { width: 29px; height: 29px; }
  .answer small { margin-top: .16rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; animation-delay: 0s !important; }
}

[data-tone="mint"] .stage { box-shadow: 0 5px #170e0b, 0 0 0 2px var(--mint); }
[data-tone="sun"] .stage { box-shadow: 0 5px #170e0b, 0 0 0 2px var(--sun); }
[data-tone="lilac"] .stage { box-shadow: 0 5px #170e0b, 0 0 0 2px var(--lilac); }
.ticket-meta .glass-label { color: #473023; background: #f5d2b5; }

.brand {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: .48rem .65rem;
  border-radius: .45rem;
  background: var(--paper);
}
.brand img { display: block; width: clamp(104px,32vw,148px); height: auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
[data-mode="locale"] .cabinet { grid-template-columns: minmax(0,700px); justify-content: center; }
[data-mode="locale"] .advisor { display: none; }
footer { align-items: baseline; gap: 1rem; }
footer a { color: var(--paper); text-underline-offset: .25em; }

.language-dialog {
  width: min(92%,420px);
  max-height: calc(100dvh - 2rem);
  color: var(--ink);
  background: #f4ecd9;
  border: 3px solid var(--ink);
  border-radius: 1.15rem;
  padding: clamp(1rem,4vw,1.65rem);
  box-shadow: 5px 6px #d84a30, 8px 10px #1b120e;
  color-scheme: light;
}
.language-dialog[open] { animation: language-arrive .3s cubic-bezier(.22,.63,.35,1.22) both; }
.language-dialog::backdrop { background: #211711ab; backdrop-filter: blur(2px); }
@keyframes language-arrive { from { opacity: 0; transform: translateY(8px) scale(.94); } }
.language-dialog h2 {
  margin: .24rem 0 .3rem;
  font: 950 clamp(1.55rem,6vw,2.25rem)/1.07 var(--display);
  letter-spacing: -.04em;
}
.language-dialog .language-grid { gap: .65rem; padding: 0 .18rem .18rem 0; }
.language-dialog .choice { min-height: 55px; padding: .47rem .65rem; }
.flag { font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif; font-size: 1.5rem; flex: none; line-height: 1; }
.language-close { position: absolute; top: .42rem; right: .5rem; }
.language-close .utility {
  min-height: 38px;
  min-width: 38px;
  color: var(--ink);
  background: #f0ddcb;
  padding: .05em .25em;
  font-size: 1.4rem;
}
.language-dialog:has(.language-close button:not([hidden])) h2 { padding-right: 28px; }
.language-dialog a { display: inline-block; margin-top: 1rem; color: #85371f; font-size: .875rem; font-weight: 750; text-underline-offset: .2em; }
.language-dialog a:focus-visible, .language-close button:focus-visible { outline-color: #285a59; }
.bartender {
  display: grid;
  grid-template-columns: clamp(70px,22vw,104px) minmax(0,1fr);
  gap: .66rem;
  align-items: center;
  margin-top: .5rem;
  animation: language-arrive .4s .16s cubic-bezier(.22,.63,.35,1.22) both;
}
.bartender img { width: 100%; height: auto; filter: drop-shadow(0 2px #c98a6a); }
.bartender-speech {
  position: relative;
  padding: .54rem .65rem;
  border: 2px solid var(--ink);
  border-radius: .65rem;
  background: #fff8e9;
  box-shadow: 0 2px #d98862;
}
.bartender-speech::before {
  content: '';
  position: absolute;
  width: 9px;
  height: 9px;
  left: -6px;
  top: 47%;
  border: solid var(--ink);
  border-width: 0 0 2px 2px;
  background: #fff8e9;
  transform: rotate(45deg);
}
.bartender-quip { margin: 0; font-size: .92rem; font-weight: 650; line-height: 1.35; white-space: pre-line; }
.bartender-name { display: block; margin-bottom: .16rem; color: #7a3a27; font-weight: 850; }
