@font-face {
  font-family: Fraunces;
  src: url("assets/fraunces-roman.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Fraunces;
  src: url("assets/fraunces-italic.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
:root { --display: Fraunces, Georgia, serif; }
.opening h1, h2, .wordmark>span, .dish-row>span:first-child, .print-caption>span {
  font-family: var(--display);
  font-variation-settings: "SOFT" 45, "WONK" 1, "opsz" 85;
}
.wordmark>span {font-weight:650; font-size:1.9rem}
.opening h1 { font-weight:550; font-size:clamp(4.25rem,6.85vw,8rem); line-height:.96; letter-spacing:-.082em; }
.opening h1 em { font-family:var(--display); font-weight:530; font-size:1.43em; line-height:1; letter-spacing:-.08em; font-variation-settings:"SOFT" 70,"WONK" 1,"opsz" 113; }
.intro {max-width:21em; font-family:var(--display); font-weight:330; font-size:clamp(1.06rem,1.28vw,1.33rem); font-variation-settings:"SOFT" 20,"opsz" 14;}
.section-intro h2,.kitchen h2,.visit h2 {font-weight:470}
.section-intro h2 em,.kitchen h2 em,.visit h2 em {font-weight:475;}
.opening h1 {letter-spacing:-.06em;word-spacing:.055em;}
.print-caption>span,.dish-row>span:first-child {font-weight:430;}
.dish-row>span:first-child {font-size:clamp(1.25rem,2.08vw,2.18rem);}
.section-intro>p,.kitchen-copy>p:not(.eyebrow) {font-family:var(--display);font-variation-settings:"SOFT" 18,"opsz" 13;font-weight:330;}
.kitchen-copy>p:not(.eyebrow) {font-size:1.15rem;}

/* The bowl and the rack share one visible area, including on small phones. */
#builder {width:min(1010px,95vw);max-width:none;max-height:none;border:1px solid #453b2c;border-radius:3px;overflow:visible;}
#builder[open] {display:flex;flex-direction:column;height:min(702px,93dvh);}
#builder .dialog-head {padding:7px 16px 7px 22px;flex:none;border-bottom:1px solid #c5b99f;}
.counter-brand {display:flex;align-items:center;gap:9px;font-size:.91rem;font-weight:550;}
.counter-brand img {width:18px;height:32px;object-fit:contain;}
.counter-layout {display:grid;grid-template-columns:43% 57%;flex:1;min-height:0;}
.counter-stage {position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#f5e6c5;
  background:radial-gradient(ellipse at 52% 42%,#4e6550 0%,#314a3e 48%,#203a32 100%);border-right:1px solid #352f25;}
.counter-stage:before {content:"";position:absolute;inset:0;z-index:-1;background:url("assets/paper.png");mix-blend-mode:screen;opacity:.66;}
.counter-stage:after {content:"";position:absolute;inset:11px;border:1px solid #d5b87856;pointer-events:none;}
.bowl-assembly {width:86%;max-width:395px;aspect-ratio:1;position:relative;isolation:isolate;flex:none;}
.bowl-face {position:absolute;inset:4%;filter:drop-shadow(3px 13px 7px #12241d94);}
.porcelain {width:100%;height:100%;object-fit:contain;user-select:none;pointer-events:none;}
.chopsticks {position:absolute;inset:-7% 12% 7% 15%;transform:rotate(34deg);z-index:-1;pointer-events:none;}
.chopsticks:before,.chopsticks:after {content:"";position:absolute;height:102%;width:6px;background:linear-gradient(90deg,#381b13,#bb7c4e 36%,#865032 72%,#663c29);clip-path:polygon(0 0,100% 0,64% 100%,39% 100%);right:22%;border-top:4px solid #c49c68;}
.chopsticks:after {right:17%;transform:rotate(3deg);}
#bowl-food,.seasoning {position:absolute;inset:0;pointer-events:none;}
#bowl-food img {position:absolute;max-width:none;transform:translate(-50%,-50%) rotate(var(--turn));filter:drop-shadow(1px 3px 1px #57301e38);user-select:none;}
.seasoning {inset:19%;border-radius:50%;background:radial-gradient(ellipse at 42% 36%,#e4943d 0,#b6421d 69%,#8e321d 100%);opacity:0;transition:opacity .35s;}
.counter-stage[data-style="soup"] .seasoning {opacity:.76;}
.counter-stage[data-style="soup"][data-heat="Ghost Pepper"] .seasoning {opacity:.98;}
#builder[data-step="season"] .counter-stage[data-style="dry"]:not([data-heat="Fragrant"]) .seasoning,
#builder[data-step="ticket"] .counter-stage[data-style="dry"] .seasoning {opacity:.2;}
.stage-caption {display:grid;justify-items:center;gap:5px;position:relative;margin-top:12px;text-align:center;}
#replay-toss {margin-top:3px;}
.stage-caption>span[lang] {font-family:var(--chinese);color:#f0d69c;letter-spacing:.2em;font-size:1.1rem;}
.stage-caption strong {font:italic 480 clamp(1.4rem,2.4vw,2.15rem)/1.12 var(--display);letter-spacing:-.065em;}
#stage-count {font-size:.9rem;color:#eadfc5;}
.counter-pane {min-width:0;min-height:0;display:flex;flex-direction:column;}
.counter-scroll {padding:25px 30px 18px;overflow-y:auto;min-height:0;flex:1;scrollbar-width:thin;overscroll-behavior:contain;}
#pot-title {font:510 clamp(2.25rem,3.2vw,3.7rem)/1.03 var(--display);letter-spacing:-.07em;margin:9px 0 8px;outline:none;}
.counter-copy {color:var(--muted);font-size:.96rem;line-height:1.42;}
.counter-pane fieldset {margin:18px 0 0;}
.counter-pane legend,.rack-head>span {font-size:.91rem;font-weight:550;}
.portion-line .choices,.counter-pane .choices {gap:0;display:inline-flex;border:1px solid #b6a891;}
.counter-pane .choices label+label {border-left:1px solid #b6a891;}
.counter-pane .choices span {border:0;padding:9px 15px;border-radius:0;min-height:36px;}
.rack-head {display:flex;align-items:center;justify-content:space-between;margin:14px 0 6px;}
.text-action {text-decoration:underline;text-underline-offset:4px;font-size:.9rem;color:var(--red);padding:7px 3px;}
.ingredient-rack {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;}
.pantry-tile {position:relative;min-width:0;min-height:87px;padding:7px 3px 5px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:#eadfca50;border:1px solid #c7baa4;border-radius:2px;color:var(--ink);}
.pantry-tile img {height:45px;width:71px;object-fit:contain;transition:transform .18s;}
.item-name {font-size:.88rem;line-height:1.15;}
.pick-mark {position:absolute;top:4px;right:6px;font-size:.94rem;color:#766747;line-height:1;}
.pantry-tile[aria-pressed="true"] {background:#e4eadb;border-color:#687b60;box-shadow:inset 0 -2px #687b60;}
.pantry-tile[aria-pressed="true"] .pick-mark {color:#324f36;}
@media(hover:hover) {.pantry-tile:hover img {transform:translateY(-2px) rotate(-4deg);}.pantry-tile:hover {border-color:#80745c;}}
.flying-pick {position:fixed;z-index:3;max-width:none;object-fit:contain;pointer-events:none;filter:drop-shadow(1px 6px 3px #42200f44);transform-origin:center;}
.counter-foot {display:flex;flex:none;align-items:center;gap:12px;padding:14px 28px;border-top:1px solid var(--line);background:#eee5d5;}
.counter-foot .button {margin-inline-start:auto;min-width:116px;min-height:44px;border-radius:.5rem;background:#3b3026;color:#fff5e7;font-size:.95rem;}
.counter-foot .button:hover:enabled {background:#544033;}
.counter-foot .button:disabled {background:#d4c9b6;color:#635b4e;border-color:#c0b39c;}
#season-step legend {margin-bottom:8px;}
#season-step .heat-choices span {min-height:64px;justify-content:center;}
#season-step .select-pair {margin-top:22px;}
#receipt-lines {margin:13px 0 0;border-top:1px dashed #a79577;}
#receipt-lines>div {padding:9px 0;}
#receipt-lines dd {max-width:70%;font-weight:450;line-height:1.3;}
.printed-note {background:#fcf7e9 url("assets/paper.png");margin:16px 0 5px;padding:14px 18px 18px;box-shadow:0 2px 6px #49362418;border:1px solid #d6c8ad;border-bottom:3px dotted #d5c8b1;}
.ticket-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;}
.ticket-heading>span {font:560 1.55rem/1.2 var(--display);letter-spacing:-.045em;}
.ticket-heading small {display:block;font:400 .78rem var(--sans);letter-spacing:.02em;color:var(--muted);}
.ticket-seal {width:22px;height:39px;object-fit:contain;transform:rotate(8deg);}
#builder[data-step="ticket"] .ticket-seal {animation:ink-stamp .45s ease-out both;}
@keyframes ink-stamp {0% {opacity:0;transform:scale(1.5) rotate(17deg);}50% {opacity:1;transform:scale(.95) rotate(7deg);}100% {transform:scale(1) rotate(8deg);}}
@media(max-width:760px) {
  #builder[open] {width:min(510px,98vw);height:min(890px,96dvh);}
  #builder .dialog-head {padding:3px 10px 3px 13px;}
  .counter-brand {font-size:.83rem;}.counter-brand img {height:27px;width:15px;}
  .counter-layout {grid-template-columns:1fr;grid-template-rows:clamp(124px,22dvh,174px) minmax(0,1fr);}
  .counter-stage {border-right:0;border-bottom:1px solid #423a2e;flex-direction:row;justify-content:center;gap:6%;}
  .counter-stage:after {inset:6px;}
  .bowl-assembly {width:auto;height:98%;max-width:49%;}
  .bowl-face {inset:4%;}
  .stage-caption {margin-top:0;justify-items:start;text-align:left;max-width:45%;gap:3px;}
  .stage-caption strong {font-size:1.56rem;}
  .stage-caption>span[lang] {font-size:.9rem;}
  #stage-count {font-size:.8rem;}
  .counter-scroll {padding:14px 17px;}
  #pot-title {font-size:2rem;margin:4px 0;}
  .counter-copy {font-size:.9rem;}
  .counter-pane fieldset {margin-top:11px;}
  .counter-pane .choices span {min-height:37px;padding:8px 14px;}
  .rack-head {margin:6px 0 3px;}
  .pantry-tile {min-height:72px;}.pantry-tile img {height:37px;width:60px;}
  .counter-foot {padding:8px 15px;gap:8px;}
  .counter-foot .button {padding-inline:14px;min-width:98px;}
  .opening h1 {white-space:normal;font-size:clamp(2.75rem,9.2vw,4.7rem);line-height:1.05;}
  .opening h1 em {font-size:1.12em;margin-left:.12em;}
  .intro {font-size:1.05rem;line-height:1.45;}
  .dish-row>span:first-child {font-size:1.35rem;}
}
@media(max-height:610px) and (max-width:760px) {
  .counter-layout {grid-template-rows:99px minmax(0,1fr);}
  #builder[open] {height:98dvh;}
}
@media(min-width:761px) and (max-height:650px) {
  .bowl-assembly {max-height:52dvh;width:auto;}
}
