:root {
  color-scheme: dark;
  --night: #0e2327;
  --paper: #fff0d5;
  --ink: #2f221c;
  --muted: #725646;
  --line: #dfc2a0;
  --red: #a5272e;
  --gold: #f3b770;
  --title: "Songti SC", "Noto Serif CJK SC", "STSong", "SimSun", Georgia, serif;
  --body: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Trebuchet MS", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 20% -10%, #294548 0, transparent 55%), var(--night);
  color: #fff2dd;
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
button:focus-visible, a:focus-visible {
  outline: 3px solid #2aa69b;
  outline-offset: 3px;
}
.site { width: min(1120px, calc(100% - 56px)); margin-inline: auto; }
.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 89px;
}
.brand {
  font-family: var(--title);
  color: #fff0d6;
  gap: 12px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 1.18rem;
  font-weight: 700;
}
.emblem {
  display: grid;
  place-content: center;
  position: relative;
  width: 34px;
  height: 35px;
  border-radius: 50%;
  transform: rotate(28deg);
  background: #20383a;
  flex: none;
}
.emblem::before {
  content: "";
  position: absolute;
  left: calc(50% - 1px);
  top: 6px;
  width: 2px;
  height: 25px;
  background: #f5c18a;
}
.emblem i {
  z-index: 1;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: -1px;
  background: radial-gradient(circle at 36% 28%, #ffd7a0, #df6351 40%, #9f2229 80%);
}
.tools, .languages { display: flex; align-items: center; gap: 8px; }
.utility, .languages button {
  min-height: 44px;
  background: transparent;
  color: #f7dfbf;
  border: 1px solid #7a928f65;
  padding: 0 12px;
  border-radius: 7px;
  font-size: .84rem;
  white-space: nowrap;
}
.utility:hover, .languages button:hover { background: #fff1d515; }
.languages { gap: 0; border: 1px solid #7a928f65; border-radius: 7px; padding: 2px; }
.languages button { min-width: 42px; min-height: 42px; border: 0; border-radius: 5px; padding: 0 6px; }
.languages button[aria-pressed=true] { background: #f5d3a5; color: #1e3130; font-weight: 800; }
.frame {
  display: grid;
  grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr);
  min-height: 668px;
  border: 1px solid #e1b98465;
  border-radius: 20px;
  overflow: clip;
  box-shadow: 0 24px 95px #020b0c65;
}
.poster { position: relative; background: #0b1f23; min-height: 100%; margin: 0; overflow: hidden; }
.poster img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; }
.poster::after { content: ""; position: absolute; inset: 42% 0 0; background: linear-gradient(transparent 60%, #071c20d6); pointer-events: none; }
.poster-bottom {
  position: absolute;
  z-index: 1;
  left: 28px;
  right: 28px;
  bottom: 23px;
  color: #ffdeb0;
  display: flex;
  align-items: center;
  border-top: 1px solid #ffdeb066;
  padding-top: 13px;
  gap: 10px;
  font-size: .81rem;
  letter-spacing: .12em;
}
.counter {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  color-scheme: light;
  background: radial-gradient(ellipse at 105% 0%, #fccd966b, transparent 55%), var(--paper);
  color: var(--ink);
  padding: clamp(24px, 4vw, 52px);
}
.frame[data-playing=true] .counter { justify-content: flex-start; padding-top: 30px; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--title); }
h1 { font-size: clamp(2.05rem, 4.6vw, 3.88rem); line-height: 1.05; letter-spacing: -.045em; text-wrap: balance; }
.intro-kicker {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--red);
  font-size: .8rem;
  letter-spacing: .14em;
  font-weight: 800;
  margin-bottom: 18px;
}
.intro-copy { margin-top: 18px; color: var(--muted); line-height: 1.65; max-width: 37ch; }
.intro-flow {
  list-style: none;
  padding: 16px 0;
  margin: 23px 0;
  border-block: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.intro-flow li { color: var(--muted); font-size: .84rem; display: flex; align-items: center; gap: 5px; }
.intro-flow strong { color: var(--red); font-family: Georgia, serif; font-weight: 400; }
.action-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; align-items: center; }
.primary, .secondary {
  border: 1px solid transparent;
  font-weight: 800;
  padding: 10px 19px;
  min-height: 47px;
  border-radius: 8px;
  line-height: 1.22;
}
.primary { color: #fff7e8; background: var(--red); box-shadow: 0 3px 0 #781b22; }
.primary:not(:disabled):hover { background: #be333b; }
.primary:not(:disabled):active { translate: 0 2px; box-shadow: 0 1px 0 #781b22; }
.primary:disabled { opacity: .72; box-shadow: none; }
.secondary { color: #5e3828; border-color: #ba9571; background: #fff8e24d; }
.secondary:hover { background: #fffbec; }
kbd { font: .7em var(--body); margin-inline-start: .4em; padding: .13em .32em; border: 1px solid currentColor; border-radius: 3px; opacity: .82; }
.best { margin-top: 17px; font-size: .82rem; color: var(--muted); }
.order-line { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.order-line strong { color: var(--red); font-size: .91rem; }
.order-line span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.steps {
  margin: 13px 0 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  gap: 4px;
}
.steps li { padding-top: 6px; border-top: 3px solid #dcbf9d; color: #76594b; font-size: .75rem; }
.steps li[data-past=true] { border-color: #4a8270; color: #386851; }
.steps li[aria-current=step] { border-color: var(--red); color: var(--red); font-weight: 800; }
.phase-title { font-size: clamp(1.65rem, 3vw, 2.55rem); line-height: 1.1; overflow-wrap: anywhere; }
.instruction { margin-top: 7px; color: var(--muted); font-size: .9rem; line-height: 1.47; }
.ticket {
  margin-top: 13px;
  padding: 10px 13px;
  border: 1px dashed #b9906b;
  border-left: 4px solid var(--red);
  background: #fff9e8;
  border-radius: 5px;
}
.ticket-label { display: block; font-size: .74rem; font-weight: 800; color: var(--red); margin-bottom: 4px; }
.ticket p { font-size: .93rem; line-height: 1.48; overflow-wrap: anywhere; }
.ticket .next-token { font-weight: 800; color: #a2262b; text-decoration: underline; text-underline-offset: .19em; }
.ticket .placed { color: #45614a; }
.skewer {
  min-height: 77px;
  margin: 9px 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: repeating-linear-gradient(5deg, transparent 0 18px, #e6c7a050 20px, transparent 22px 37px), #f4dbb9;
  border-radius: 9px;
  border: 1px solid #e3bc94;
}
.skewer-track { width: min(88%, 385px); display: flex; align-items: center; justify-content: center; gap: 0; position: relative; min-height: 65px; padding: 5px 13px 5px 27px; }
.skewer-track::before {
  content: "";
  position: absolute;
  width: 99%;
  height: 6px;
  border-radius: 50% 15% 15% 45%;
  background: linear-gradient(#eeb777, #b47940);
  box-shadow: 0 2px 4px #6b3a2940;
}
.bead {
  flex: 0 1 clamp(25px, 4vw, 45px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 48% 50% 44% 47%;
  font-size: clamp(.83rem, 2.4vw, 1.44rem);
  background: radial-gradient(ellipse at 28% 22%, #fffaefbf, transparent 30%), var(--fruit, #ad433a);
  box-shadow: inset 0 -5px 9px #471d2949, 2px 3px 4px #5f281b39;
  border: 1px solid #5c291f31;
  animation: appear .16s ease-out both;
}
.bead.missing { background: #ffecd0b0; border: 1px dashed #b9906b; box-shadow: none; animation: none; }
.skewer[data-glazed=true] .bead { outline: 2px solid #fff2bc; box-shadow: inset 0 -5px 8px #471f2b59, 0 0 6px #f6a350; }
@keyframes appear { from { scale: .83; } to { scale: 1; } }
.tray { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.ingredient {
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  padding: 5px 2px;
  line-height: 1.1;
  color: #4e3326;
  font-size: .78rem;
  background: #fff7e4;
  border: 1px solid #d2ac86;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.ingredient:hover { border-color: #a1272d; background: #fffdf0; }
.ingredient:active { background: #f9d2a7; }
.ingredient .icon { font-size: 1.26rem; }
.ingredient .token-key { font-size: .64rem; color: #81604e; }
.feedback { margin-top: 9px; overflow-wrap: anywhere; color: #6c4933; min-height: 1.5em; font-size: .81rem; line-height: 1.35; }
.feedback.good { color: #28644a; }
.feedback.bad { color: #952e28; }
.cookware {
  position: relative;
  isolation: isolate;
  height: 120px;
  margin: 11px 0 8px;
  border-radius: 9px;
  background: radial-gradient(ellipse at center, #805039, #392c2a 65%, #2d2322);
  display: grid;
  align-items: center;
  justify-items: center;
  overflow: hidden;
}
.pan {
  width: 230px;
  max-width: 64%;
  height: 89px;
  border-radius: 50%;
  border: 8px solid #202326;
  background: radial-gradient(ellipse at 50% 61%, var(--syrup, #d6a77f), #835021 65%, #4a2917);
  box-shadow: 0 5px 3px #161617, inset 0 0 10px #861c0e54;
  position: relative;
}
.pan::before {
  content: "";
  position: absolute;
  height: 14px;
  width: 44%;
  right: -41%;
  top: 51%;
  border-radius: 2px 8px 8px 0;
  background: linear-gradient(#3d3432, #1c1c1c);
  z-index: -1;
}
.pan i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--bubble, 8px);
  aspect-ratio: 1;
  border: 1px solid #ffe7bb;
  box-shadow: 0 0 4px #fbd2947a;
  border-radius: 50%;
  animation: bubble 1s var(--delay) infinite both;
}
[data-heat=ready] .pan { --syrup: #ffc05f; --bubble: 5px; }
[data-heat=burnt] .pan { --syrup: #784022; }
@keyframes bubble { 0%, 100% { opacity: .25; scale: .7; } 45% { opacity: .85; scale: 1.1; } }
.meter {
  height: 16px;
  margin: 12px 0 7px;
  position: relative;
  border: 1px solid #c09572;
  border-radius: 5px;
  background: #edc6a4;
}
.zone { position: absolute; top: 0; bottom: 0; background: #6b9e7b; border-inline: 2px solid #28644a; }
.needle { position: absolute; top: -4px; bottom: -4px; width: 4px; border-radius: 3px; background: #302524; box-shadow: 0 0 0 1px #fff8e3; translate: -50% 0; }
.readout { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: .78rem; }
.readout strong { color: var(--ink); }
.cooling { height: 9px; width: 100%; accent-color: #41785f; display: block; margin: 12px 0; }
.cast {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-content: start;
  min-height: 61px;
  margin-top: 12px;
  padding: 8px;
  background: #f2d9ba;
  border-radius: 7px;
}
.rune { font-size: .82rem; padding: 6px 8px; border-radius: 4px; color: #375845; background: #ecf0d9; border: 1px solid #9dad89; }
.rune.blank { min-width: 28px; text-align: center; color: #77553d; background: #fff3d9; border: 1px dashed #b08a64; }
.scorecard { margin-top: 15px; }
.grade { color: var(--red); font-family: var(--title); font-size: 1.21rem; font-weight: bold; }
.score { font-family: Georgia, serif; color: var(--red); font-weight: 700; font-size: 2.6rem; white-space: nowrap; }
.score small { color: var(--muted); font-size: .88rem; margin-left: 4px; }
.breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 17px; margin: 5px 0; }
.breakdown div { display: flex; justify-content: space-between; gap: 5px; padding: 6px 0; border-bottom: 1px dashed #bc987683; font-size: .82rem; }
.breakdown dt { color: var(--muted); }
.breakdown dd { margin: 0; font-weight: bold; white-space: nowrap; }
.summary-line { margin-top: 11px; font-size: .85rem; color: var(--muted); }
.footer { min-height: 62px; display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: .77rem; color: #d9c5ab; padding-bottom: env(safe-area-inset-bottom); }
.footer a { text-underline-offset: .24em; }
dialog {
  color-scheme: light;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 15px 75px #0008;
  border-radius: 14px;
  width: min(520px, calc(100% - 26px));
  max-height: calc(100dvh - 30px);
  padding: clamp(20px, 5vw, 32px);
}
dialog::backdrop { background: #06191cbd; }
dialog h2 { font-size: 1.7rem; }
dialog ol { padding-left: 1.3rem; font-size: .92rem; line-height: 1.58; }
dialog li + li { margin-top: 7px; }
dialog p { font-size: .84rem; line-height: 1.5; color: var(--muted); margin: 12px 0; }
.toast { position: fixed; z-index: 2; bottom: 20px; left: 50%; translate: -50% 0; max-width: calc(100% - 26px); width: max-content; padding: 10px 16px; border-radius: 8px; background: #20443d; color: #fff2da; box-shadow: 0 4px 15px #13252260; font-size: .88rem; }
.share-text { width: 100%; min-height: 4em; padding: 8px; color: var(--ink); background: #fff8e4; border: 1px solid #b48c69; border-radius: 5px; font: inherit; font-size: .86rem; margin-top: 8px; }
@media (max-width: 750px) {
  .site { width: min(560px, calc(100% - 22px)); }
  .mast { min-height: 68px; gap: 5px; }
  .brand { font-size: .98rem; gap: 5px; }
  .emblem { width: 26px; height: 30px; }
  .emblem::before { top: 3px; }
  .tools { gap: 4px; }
  .utility { padding-inline: 6px; font-size: .76rem; }
  .languages button { min-width: 33px; padding-inline: 4px; font-size: .76rem; }
  .frame { display: flex; flex-direction: column; border-radius: 13px; min-height: auto; }
  .poster { height: clamp(194px, 56vw, 315px); min-height: 0; }
  .poster img { object-position: 50% 46%; }
  .poster-bottom { bottom: 10px; left: 13px; right: 13px; padding-top: 6px; font-size: .7rem; }
  .frame[data-playing=true] .poster { display: none; }
  .counter, .frame[data-playing=true] .counter { padding: 17px 15px 20px; }
  .intro-kicker { margin-bottom: 12px; }
  .intro-copy { margin-top: 11px; }
  .intro-flow { margin-block: 14px; padding-block: 9px; }
  .intro-flow li { font-size: .74rem; }
  .steps { margin: 9px 0 13px; }
  .score { font-size: 2.2rem; }
  .footer { min-height: 50px; }
}
@media (max-width: 365px) {
  .emblem { display: none; }
  .brand { font-size: .89rem; }
  .ticket { padding: 7px; }
  .ingredient { font-size: .76rem; }
}
@media (pointer: coarse) { kbd, .token-key { display: none; } .ingredient { min-height: 55px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
