/* The lettering sits beside the chef, with the rising tone part of the title. */
#opening #titleName{
  display:grid;grid-template-columns:auto auto;grid-template-areas:"invite invite" "sushi final";
  align-items:baseline;justify-content:start;column-gap:.08em;row-gap:.1em;
  width:max-content;max-width:100%;font-size:clamp(47px,min(8.4vw,15vh),155px);line-height:1;
  white-space:nowrap;letter-spacing:.015em
}
#opening #titleName .titleInvite{grid-area:invite;color:#f2d7ab;font:800 .34em/1.14 "PingFang HK","Microsoft JhengHei",sans-serif;letter-spacing:.17em}
#opening #titleName .titleSushi{grid-area:sushi;color:#fff4d7;text-shadow:2px 3px #753d35,4px 6px #291f2c}
#opening #titleName .titleFinal{grid-area:final;color:#ffd09b;font-size:.40em;align-self:end;margin:0 0 .08em}
.titleFinal em,.hudTitle em{font-family:"Arial",sans-serif;color:#9cd9be;font-style:normal;letter-spacing:-.13em;margin-right:.1em}
.openingMeta{display:flex;align-items:center;gap:15px;flex-wrap:wrap;margin-top:clamp(7px,1.9vh,22px)}
#titleBook{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:4px 9px;color:#ffe6bd;border-bottom:1px solid #d0ae79;background:#142132bd;font-size:clamp(12px,1.2vw,17px);font-weight:700}
#titleBook i{color:#a4d9c1}#menuBest{margin:0}
.brand .hudTitle{display:grid;gap:1px;line-height:1.05;font-size:clamp(15px,2.65vh,28px);letter-spacing:.03em}
.hudTitle span:first-child{font-size:.57em;color:#c9d8ca;letter-spacing:.16em}
#overlay{position:fixed;inset:0;z-index:50}
#overlay .modal{overscroll-behavior:contain;scrollbar-color:#7a8a83 #263248}
button:focus-visible,summary:focus-visible,select:focus-visible,[role=button]:focus-visible{outline:3px solid #ffd088;outline-offset:2px}
#game[data-mode=dinner] .bayTicket{
  width:74%;grid-template-columns:auto clamp(24px,2.7vw,47px) minmax(0,1fr) auto;
  grid-template-areas:"table food habit count" "table food recipe pieces";gap:.28em .32em;padding-inline:.35em
}
#game[data-mode=dinner] .bay .dock{width:24%}
#game[data-mode=dinner] .bayTicket img{display:block;grid-area:food;width:100%;height:auto;max-height:48px;object-fit:contain}
#game[data-mode=dinner] .bayTicket .tableTag{padding-right:.3em}
#game[data-mode=dinner] .bayTicket .rushTag{max-width:100%;overflow:hidden;text-overflow:ellipsis}
#game[data-mode=dinner] .bayTicket strong{white-space:nowrap}
#game .board[data-stage=done] #boardAction,#game .board[data-stage=ready] #boardAction{background:#204e49;border:1px solid #cce1a8;color:#fff4cc}
#kitchenStory{
  position:absolute;top:5%;right:1.6%;z-index:2;display:grid;grid-template-columns:clamp(50px,6.7vw,100px) minmax(0,1fr);
  align-items:center;width:min(36%,420px);min-height:0;padding:4px 6px 4px 4px;gap:8px;
  background:linear-gradient(105deg,#253938fb,#182a32f7);color:#fff0d5;border:1px solid #93a995;border-left:3px solid #e4b77d;
  box-shadow:2px 3px #17232c99;pointer-events:none;image-rendering:auto
}
#storyPicture{display:block;width:100%;aspect-ratio:1;object-fit:cover;border:1px solid #b7ab82;image-rendering:pixelated}
.storyCaption{min-width:0;display:grid;gap:2px;padding-right:16px;line-height:1.24}
#storyDish{color:#a9d9c7;font-size:clamp(10px,1.26vh,14px);font-weight:750}
#storyName{font-size:clamp(13px,1.8vh,21px);letter-spacing:.025em}
#storyLine{margin:0;line-height:1.35;font-size:clamp(12px,1.58vh,17px);color:#ffedcf}
#storySteps{display:flex;gap:3px;margin-top:3px}
#storySteps i{width:13px;height:2px;background:#64716a}
#storySteps i:first-child,#storySteps[data-beat="1"] i:nth-child(2),#storySteps[data-beat="2"] i{background:#e4bc78}
#foldStory{position:absolute;right:0;top:0;display:grid;place-items:center;min-width:32px;min-height:32px;
  background:transparent;color:#efe1c6;font:700 20px/1 sans-serif;pointer-events:auto;touch-action:manipulation}
.view:has(#kitchenStory:not([hidden])) #arrival{right:auto;left:1.5%;bottom:4%;max-width:60%}
.view:has(#kitchenStory:not([hidden])) #serviceNote{right:auto;left:2%;top:auto;bottom:6%;max-width:55%}
.view:has(#kitchenStory:not([hidden])):has(#arrival.show) #serviceNote{opacity:0}
#overlay:has(.recipeBook) .modal{width:min(790px,96vw);background:#21353d;border-color:#90a495}
#overlay:has(.recipeBook) .modalHead{gap:14px;border-color:#61766e;padding-bottom:8px}
#overlay:has(.recipeBook) .chefBadge{width:clamp(36px,6vh,57px)}
.recipeTabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;margin:12px 0}
.recipeTabs .recipeTab{display:flex;align-items:center;justify-content:center;gap:.24em;min-height:43px;padding:3px;font-size:clamp(11px,1.55vh,17px);background:#30464b;box-shadow:none;border:1px solid #637a76;color:#faf1d6}
.recipeTab img{width:clamp(22px,2.6vw,39px);height:26px;object-fit:contain}
.recipeTabs .recipeTab[aria-pressed=true]{color:#372f29;background:#f4dab0;border-color:#ffe1a1;box-shadow:inset 0 -3px #b58253}
.bookHeading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0}
.bookHeading h2{font:900 clamp(20px,3vh,32px)/1.2 "Songti HK","Songti TC",serif;color:#ffe4ad;margin:0}
#bookVariant{max-width:55%;min-height:36px;padding:2px 7px;font:inherit;font-size:14px;color:#fff0cf;background:#30474a;border:1px solid #8e9c87}
.bookStrip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.bookStrip figure{min-width:0;margin:0;background:#f1e0bf;color:#43352d;border:1px solid #ac997c}
.bookStrip figure>img{display:block;width:100%;aspect-ratio:1.18;object-fit:cover;image-rendering:pixelated}
.bookStrip figcaption{padding:7px;display:grid;gap:3px;font-size:clamp(13px,1.7vh,18px);line-height:1.4}
.bookStrip figcaption b{color:#77513c;font-size:.86em}
.modal .bookCount{font-size:13px;color:#c0ccb8;margin:9px 0 2px}.modal .shiftStories{color:#c3e2cf}
.rulesFold summary{cursor:pointer;padding:6px 0;color:#f5d69f;font-weight:700}
@media(orientation:portrait){
  #opening #titleName{font-size:clamp(43px,min(14.2vw,9.5dvh),105px)}
  .openingMeta{gap:10px;margin-top:6px}#titleBook{min-height:38px}
  .brand .hudTitle{font-size:clamp(13px,3.65vw,23px)}
  #game[data-mode=dinner] .bayTicket,#game[data-mode=dinner] .bay.current .bayTicket{
    width:100%;height:60%;padding:2px 4px;grid-template-columns:1.25em minmax(0,1fr) auto;grid-template-rows:repeat(3,auto);
    grid-template-areas:"table table habit" "food recipe recipe" "count count pieces";gap:2px .15em
  }
  #game[data-mode=dinner] .bay .dock{width:94%;height:36%}
  #game[data-mode=dinner] .bayTicket img{height:1.45em;width:1.45em}
  #game[data-mode=dinner] .bayTicket strong{font-size:1em}
  #kitchenStory{top:4px;right:4px;width:min(55%,350px);grid-template-columns:clamp(34px,9.8vw,64px) minmax(0,1fr);gap:5px;padding:3px;border-left-width:2px}
  .storyCaption{padding-right:4px;gap:1px}#storyDish{font-size:10px;padding-right:20px}#storyName{font-size:12px;padding-right:8px}
  #storyLine{font-size:11px;line-height:1.26}#storySteps{margin-top:1px}#foldStory{min-width:28px;min-height:28px;font-size:16px}
  .recipeTabs{grid-template-columns:repeat(3,minmax(0,1fr));margin:8px 0;gap:4px}
  .recipeTabs .recipeTab{min-height:38px;font-size:13px}
  .bookStrip{gap:4px}.bookStrip figure>img{aspect-ratio:1}.bookStrip figcaption{padding:5px;font-size:13px}
  #overlay:has(.recipeBook) .modal{padding-inline:12px}
}
@media(max-width:410px) and (orientation:portrait){.brand .portraithud{display:none}.brand .hudTitle{font-size:13px}}
@media(orientation:landscape) and (max-height:520px){
  #opening #titleName{font-size:clamp(34px,12.8vh,64px)}
  .menuContent{top:54%;width:49%}.openingMeta{margin-top:4px}
  #titleBook{min-height:29px;font-size:11px}.menuName>p{margin-top:5px}
  #kitchenStory{grid-template-columns:42px minmax(0,1fr);top:3px;gap:5px;width:min(35%,315px);padding:2px 4px}
  #storyDish{display:none}#storyName{font-size:11px}#storyLine{font-size:10px;line-height:1.18}
  #storySteps{margin:0}.storyCaption{padding-right:12px}.brand .hudTitle{font-size:14px}
  .recipeTabs{margin:5px 0}.recipeTabs .recipeTab{min-height:32px}.bookStrip figure>img{max-height:25dvh;object-fit:contain;background:#293533}
  .bookStrip figcaption{padding:3px 6px;font-size:12px}.modal .bookCount{margin-top:3px;font-size:11px}
  .bookHeading{margin:5px 0}#bookVariant{min-height:28px}.bookHeading h2{font-size:18px}
}
@media(prefers-reduced-motion:no-preference){#kitchenStory:not([hidden]){animation:noteOpen .21s ease-out}@keyframes noteOpen{from{opacity:.3;transform:translateY(3px)}to{opacity:1;transform:none}}}
@media(prefers-reduced-motion:reduce){#opening *,#overlay *{animation:none!important;transition:none!important}}
@media(prefers-reduced-motion:no-preference){
  #kitchenStory[data-beat="0"] #storyPicture{animation:prepStill .42s ease-out}
  #kitchenStory[data-beat="1"] #storyPicture{animation:workStill .42s ease-out}
  #kitchenStory[data-beat="2"] #storyPicture{animation:plateStill .42s ease-out}
  @keyframes prepStill{from{opacity:.55}to{opacity:1}}
  @keyframes workStill{from{opacity:.6;transform:translateY(2px)}to{opacity:1;transform:none}}
  @keyframes plateStill{from{opacity:.6;transform:scale(.96)}to{opacity:1;transform:none}}
}
