@charset "UTF-8";
:root{--green:#184e3d;--green-dark:#113c2e;--cream:#f7f3e8;--ink:#283e32;--muted:#83877b;--line:#e3e4d8;--red:#a5493d;--ui-font:"BIZ UDPGothic","Noto Sans JP","Hiragino Sans",Meiryo,system-ui,sans-serif;--round:var(--ui-font);font-family:var(--round);color:var(--ink);background:var(--cream);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #ca9a3f;outline-offset:4px}button svg,.help-button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.icon-defs{position:absolute;width:0;height:0;overflow:hidden}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.site-header{height:100px;max-width:1440px;margin:auto;padding:0 5%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #dddfd1}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--green);font-size:18px;font-weight:800;letter-spacing:.07em}.brand small{display:block;font:9px/1.9 var(--ui-font);letter-spacing:.23em}.brand-mark{position:relative;background:var(--green);color:var(--cream);border-radius:11px;width:43px;height:43px;display:grid;place-items:center;font-size:26px;font-weight:500;transform:rotate(-5deg)}.brand-mark>span{font-size:17px;position:absolute;right:-7px;top:-8px;color:#b88443;transform:rotate(5deg)}nav{display:flex;gap:18px;align-items:center}.icon-button,.help-button{border:0;background:transparent;color:var(--green);padding:9px;display:flex;align-items:center;gap:7px;position:relative}.help-button{font-size:12px;font-weight:700}.icon-button{border:1px solid #d9ddce;border-radius:50%;width:38px;height:38px;padding:8px}.sound-slash{display:none;position:absolute;width:23px;height:2px;background:var(--green);transform:rotate(-50deg);top:17px;left:7px;border:1px solid var(--cream)}.sound-off .sound-slash{display:block}
.game-layout{max-width:1440px;margin:0 auto;position:relative;min-height:775px;height:calc(100dvh - 145px);max-height:1000px;padding:40px 5% 0}.restaurant{width:calc(100% - 410px);height:100%;position:relative}.intro{position:relative;z-index:1}.eyebrow{display:flex;align-items:center;gap:9px;font-size:11px;font-weight:600;letter-spacing:.12em}.eyebrow>span{height:7px;width:7px;background:#a24c3a;border-radius:50%}h1{font-family:var(--round);font-size:clamp(27px,3.1vw,43px);line-height:1.55;letter-spacing:.07em;font-weight:800;margin:16px 0 12px}h1 span{color:var(--red)}.intro>p{font-size:12px;line-height:2;color:#777e6f;letter-spacing:.08em;margin:0}.scoreboard{display:flex;gap:24px;align-items:center;margin-top:26px}.scoreboard>div:not(.stat-divider){display:flex;flex-direction:column;gap:7px}.stat-label{color:#7e8476;font-size:10px;letter-spacing:.09em}.scoreboard strong{font:500 25px/1.2 var(--ui-font);color:var(--green);font-variant-numeric:tabular-nums}.scoreboard small{font:10px var(--ui-font);color:#828877;margin-left:4px;letter-spacing:.07em}.stat-divider{height:31px;width:1px;background:#d8dccc}
.customer-area{position:absolute;bottom:300px;left:5%;width:90%;z-index:2}.speech-bubble{padding:18px 22px 20px;background:#fffef8;border:1.5px solid #d6dacb;border-radius:18px;box-shadow:0 5px 0 #e8e7d9;position:relative;min-height:115px}.speech-bubble:after{content:"";position:absolute;bottom:-12px;left:78px;width:19px;height:19px;background:#fffef8;border-right:1.5px solid #d6dacb;border-bottom:1.5px solid #d6dacb;transform:skewY(-15deg) rotate(40deg)}.speaker-line{display:flex;align-items:center;gap:6px;font-size:10px;color:#778471;letter-spacing:.03em}.speaker-dot{width:6px;height:6px;background:#b87d59;border-radius:50%}#talk-state{margin-left:auto;color:#a3a88f;font-size:9px}.speech-bubble p{font-weight:700;font-size:17px;line-height:1.9;letter-spacing:.03em;margin:10px 0 0;min-height:2em;overflow-wrap:anywhere}.typing:after{content:"";display:inline-block;width:2px;height:1em;margin-left:4px;background:var(--green);vertical-align:-2px;animation:blink 1s step-end infinite}.mobile-avatar{display:none}.restaurant-art{position:absolute;width:calc(100% + 54px);left:-34px;bottom:24px}.restaurant-art svg{display:block;width:100%;max-height:320px;overflow:visible}.scene-caption{position:absolute;bottom:0;left:0;right:0;display:flex;align-items:center;gap:8px;font-size:10px;letter-spacing:.06em;color:#78816e}.little-star{color:#b38548;font-size:22px}.table-tag{margin-left:auto;font:9px var(--ui-font);letter-spacing:.2em;border:1px solid #c8cfbc;padding:5px 8px;border-radius:4px}
.order-panel{width:360px;position:absolute;right:5%;bottom:0;background:#fff;box-shadow:0 14px 50px #2d453317;border:1px solid #dce0d5;border-radius:21px;overflow:hidden}.panel-top{display:flex;align-items:center;justify-content:space-between;padding:21px 23px 18px;background:#fffefb}.order-logo{font:bold italic 26px/1 var(--ui-font);color:var(--green);letter-spacing:-1px}.order-logo>span{font-size:19px;color:#a14b3a;margin-left:4px}.order-logo small{display:block;font:9px/1.7 var(--round);letter-spacing:.08em;margin-top:5px;color:#838978}.table-label{font-size:9px;color:#878b7c;border:1px solid #e3e5d9;padding:7px 9px;border-radius:5px}.table-label b{font:bold 16px var(--ui-font);margin-left:5px;color:var(--green)}.panel-tabs{display:flex;height:44px;border-bottom:1px solid #e7e9de;background:#fffefb}.panel-tabs>span,.panel-tabs>button{width:50%;border:0;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;background:none;color:#8d9188;gap:7px}.panel-tabs .active-tab{color:var(--green);border-bottom:3px solid var(--green)}#history-count{font:10px var(--ui-font);border-radius:20px;background:#edf0e6;padding:2px 5px}.order-body{padding:23px 22px 15px}.order-heading{display:flex;align-items:center;justify-content:space-between}.order-heading h2{font-size:15px;margin:0;letter-spacing:.03em}.order-heading>span{color:#9b9f94;font:9px var(--ui-font);letter-spacing:.13em}.order-instruction{font-size:10px;color:#8a8e83;line-height:1.7;margin:9px 0 17px}.code-display{display:flex;gap:9px}.digit{display:grid;place-items:center;height:66px;flex:1;border:1px solid #dfe2d7;background:#fafbf7;border-radius:8px;font:36px/1 var(--ui-font);color:var(--green);position:relative}.digit:empty:after{content:"";height:2px;width:13px;background:#d4d9cb}.digit.current{border:1.5px solid #638972;background:#f4f8ed}.digit.current:empty:after{background:#638972}.feedback{font-size:11px;min-height:20px;text-align:center;color:#8a8e81;margin:13px 0 15px;line-height:20px}.feedback.error{color:#b44436}.feedback.success{color:var(--green);font-weight:700}.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.keypad button{height:53px;border:1px solid #e4e6de;background:#fff;border-radius:9px;box-shadow:0 2px 0 #e9ebe3;font:25px var(--ui-font);color:#344d3d;touch-action:manipulation;transition:background .12s,transform .1s}.keypad button:hover:enabled{background:#f0f5e9}.keypad button:active:enabled{transform:translateY(2px);box-shadow:none;background:#e1ecd9}.keypad button:disabled{color:#adb7a6;background:#fafbf7}.keypad .utility-key{background:#f4f5ef;color:#929a89;font:11px var(--round)}.utility-key svg{vertical-align:middle;width:21px}.submit-button{display:flex;align-items:center;justify-content:center;position:relative;background:var(--green);color:#fff;border:0;border-radius:8px;width:100%;height:51px;margin-top:20px;font-size:14px;font-weight:700;letter-spacing:.06em;box-shadow:0 3px 0 var(--green-dark);transition:background .15s}.submit-button>svg{position:absolute;right:17px;width:18px}.submit-button:hover:enabled{background:#23654d}.submit-button:active:enabled{transform:translateY(2px);box-shadow:none}.submit-button:disabled{background:#a5b6a5;box-shadow:0 3px 0 #92a48f;color:#f9fcf7}.panel-bottom{text-align:center;display:flex;flex-direction:column;align-items:center;gap:12px;margin-top:15px}.keyboard-hint{font-size:9px;color:#9ca192}.panel-bottom button{font-size:10px;color:#788b72;background:none;border:0;padding:2px}#menu-button>span{margin-left:8px}.panel-footer{text-align:center;background:#f4f6ee;border-top:1px solid #e7ebdd;font-size:9px;letter-spacing:.04em;color:#8a9580;padding:11px 5px}.online-dot{display:inline-block;height:5px;width:5px;border-radius:50%;background:#849b6d;margin-right:4px}.site-footer{max-width:1440px;padding:23px 5% 18px;margin:0 auto;display:flex;justify-content:space-between;font-size:9px;letter-spacing:.07em;color:#989c8b}
dialog{border:1px solid #d9ddce;background:#fffdf7;color:var(--ink);border-radius:19px;padding:35px;width:min(480px,calc(100% - 32px));max-height:85dvh;box-shadow:0 20px 90px #12291e30}dialog::backdrop{background:#173e3355;backdrop-filter:blur(5px)}dialog[open]{animation:appear .2s ease-out}dialog h2{font-size:21px;line-height:1.6;margin:11px 0 22px;letter-spacing:.04em}.close-dialog{position:absolute;right:14px;top:10px;border:0;background:none;color:#87917f;font-size:29px;width:36px;height:36px}.dialog-eyebrow{color:#9e784a;font:10px var(--ui-font);letter-spacing:.2em}.how-to{list-style:none;padding:0;margin:25px 0}.how-to li{display:flex;gap:15px;margin:23px 0}.how-to li>span{font:20px var(--ui-font);color:#b4976b}.how-to b{font-size:13px}.how-to p{font-size:12px;line-height:1.9;color:#7c8476;margin:5px 0 0}.dialog-note{font-size:10px;line-height:1.9;color:#929783;border-top:1px solid #e4e6d9;padding-top:16px}.dialog-note a{color:var(--green)}.dialog-primary{display:flex;align-items:center;justify-content:center;gap:18px;background:var(--green);color:white;border:0;border-radius:8px;width:100%;padding:15px;margin-top:22px;font-size:13px;font-weight:700}.menu-row{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px dashed #dce0d1;font-size:12px;line-height:1.8}.menu-row code{font:18px var(--ui-font);background:#edf2e6;padding:5px 7px;border-radius:4px;color:var(--green)}.menu-row .menu-name{flex:1}.menu-row .menu-emoji{font-size:24px}.empty-history{font-size:13px;line-height:2;color:#8d9485}.result-dialog{text-align:center}.result-icon{margin:auto auto 23px;background:#e6edda;color:var(--green);font:40px var(--ui-font);width:74px;height:74px;border-radius:50%;display:grid;place-items:center}.result-dialog h2{font-size:21px}.result-dialog>p{font-size:12px;line-height:1.9;color:#848d7b}.result-stats{display:flex;justify-content:space-around;background:#f2f4ea;border-radius:10px;padding:22px 4px;margin:25px 0 10px}.result-stats>div{display:flex;flex-direction:column;gap:9px}.result-stats b{font:28px var(--ui-font);color:var(--green)}.result-stats span{font-size:10px;color:#8a927f}.result-dialog .best-message{color:#b2803c;font-weight:700;min-height:20px}.text-button{font-size:11px;margin-top:17px;padding:7px;background:none;border:0;color:#8b947e}.shake{animation:shake .35s}.celebrate .code-display{animation:pop .4s}.celebrate .digit{border-color:#7b9e69;background:#edf4e5}#guest-left,#guest-right{transform-origin:center bottom;animation:breathe 5s ease-in-out infinite}#guest-right{animation-delay:-2.5s}
@keyframes blink{50%{opacity:0}}@keyframes shake{25%,75%{transform:translateX(-5px)}50%{transform:translateX(5px)}}@keyframes pop{50%{transform:scale(1.035)}}@keyframes appear{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes breathe{50%{transform:translateY(-3px)}}
@media(min-width:1000px) and (min-height:900px){.game-layout{padding-top:55px}.customer-area{bottom:335px}.restaurant-art svg{max-height:350px}.order-panel{bottom:15px}.intro>p{font-size:13px}h1{margin-top:20px;margin-bottom:15px}}
@media(min-width:761px) and (max-width:1100px){.game-layout{padding-left:4%;padding-right:4%;min-height:760px}.restaurant{width:calc(100% - 365px)}.order-panel{right:4%;width:335px}.intro h1{font-size:28px}.scoreboard{gap:15px}.customer-area{left:0;width:100%;bottom:265px}.speech-bubble{padding:15px}.speech-bubble p{font-size:15px}.restaurant-art{width:calc(100% + 50px);left:-20px}.scene-caption{font-size:8px}.table-tag{display:none}.order-body{padding:22px 19px 15px}}
@media(min-width:761px) and (max-height:840px){.game-layout{min-height:620px;padding-top:24px}.intro h1{font-size:30px;line-height:1.4;margin:12px 0 9px}.intro>p{font-size:11px;line-height:1.8}.scoreboard{margin-top:18px}.customer-area{bottom:226px}.speech-bubble{min-height:100px;padding:13px 18px}.speech-bubble p{font-size:15px}.restaurant-art svg{max-height:242px}.panel-top{padding:14px 22px 12px}.order-body{padding-top:16px;padding-bottom:10px}.order-instruction{margin-bottom:12px}.digit{height:54px}.feedback{margin:9px 0 10px}.keypad button{height:43px}.submit-button{height:44px;margin-top:15px}.panel-bottom{margin-top:11px;gap:8px}}
@media(max-width:760px){
  body{height:100dvh;overflow:hidden}.site-header{height:53px;padding:0 17px;border:0}.brand{font-size:13px;gap:8px;letter-spacing:.04em}.brand-mark{width:29px;height:29px;border-radius:7px;font-size:18px}.brand-mark>span{font-size:13px;right:-6px;top:-6px}.brand small{font-size:6px;letter-spacing:.19em}.help-button{padding:7px 0}.help-button>span{display:none}nav{gap:12px}.help-button svg{width:21px;height:21px}.icon-button{width:29px;height:29px;padding:5px}.icon-button svg{width:17px;height:17px}.sound-slash{width:18px;top:13px;left:5px}.game-layout{height:calc(100dvh - 53px);min-height:0;max-height:none;padding:0}.restaurant{width:100%;height:calc(30dvh - 53px);display:flex;flex-direction:column;padding:0 17px 12px;gap:10px}.intro,.restaurant-art,.scene-caption,.site-footer{display:none}.scoreboard{margin:0;gap:13px;height:33px;flex-shrink:0}.scoreboard>div:not(.stat-divider){flex-direction:row;align-items:center;gap:6px}.stat-label{font-size:8px}.scoreboard strong{font-size:17px}.scoreboard small{font-size:8px;margin-left:2px}.stat-divider{height:14px}.customer-area{position:relative;inset:auto;display:flex;gap:10px;width:100%;min-height:0;flex:1;align-items:center}.mobile-avatar{display:grid;place-items:center;flex-shrink:0;width:40px;height:46px;background:#e4b490;color:#4f3d2f;font:39px var(--ui-font);border-radius:45% 45% 40% 40%;box-shadow:0 -6px 0 #4c352c;transform:rotate(-4deg)}.speech-bubble{flex:1;padding:9px 12px;min-height:0;max-height:100%;border-radius:12px;box-shadow:0 3px 0 #e8e7d9;display:flex;flex-direction:column}.speech-bubble:after{left:-5px;top:calc(50% - 5px);bottom:auto;width:10px;height:10px;transform:rotate(135deg);border-right:0;border-left:1.5px solid #d6dacb}.speaker-line{font-size:8px;gap:5px}.speaker-dot{height:4px;width:4px}#talk-state{font-size:7px}.speech-bubble p{font-size:12px;line-height:1.65;letter-spacing:.01em;margin:4px 0 0;min-height:2em;overflow:auto}.order-panel{position:fixed;left:0;right:0;bottom:0;width:100%;height:70dvh;display:flex;flex-direction:column;border-radius:20px 20px 0 0;border-width:1px 0 0;box-shadow:0 -5px 25px #1b382b09;padding-bottom:env(safe-area-inset-bottom,0px)}.panel-top{padding:12px 22px 10px;flex-shrink:0}.order-logo{font-size:23px}.order-logo>span{font-size:17px}.order-logo small{display:none}.table-label{padding:4px 8px;font-size:8px}.table-label b{font-size:14px}.panel-tabs{height:35px;flex-shrink:0}.panel-tabs>span,.panel-tabs>button{font-size:11px}.order-body{padding:15px 22px 8px;flex:1;display:flex;flex-direction:column;min-height:0;width:100%;max-width:500px;margin:auto}.order-heading h2{font-size:14px}.order-instruction{font-size:9px;margin:5px 0 10px}.code-display{gap:10px;flex-shrink:0}.digit{height:clamp(38px,7dvh,62px);font-size:30px}.feedback{font-size:10px;min-height:16px;line-height:16px;margin:7px 0 9px;flex-shrink:0}.keypad{flex:1;min-height:0;grid-template-rows:repeat(4,minmax(0,1fr));gap:7px}.keypad button{height:100%;min-height:0;font-size:24px;border-radius:7px}.keypad .utility-key{font-size:10px}.submit-button{height:clamp(35px,6dvh,50px);min-height:32px;flex-shrink:0;margin-top:12px;font-size:13px}.panel-bottom{flex-direction:row;justify-content:space-between;gap:5px;margin-top:8px;flex-shrink:0}.keyboard-hint{font-size:8px}.panel-bottom button{font-size:9px;padding:3px 0}.panel-footer{padding:7px 4px;font-size:8px;flex-shrink:0}dialog{padding:28px 23px}dialog h2{font-size:18px}.menu-row{font-size:11px;padding:11px 0}.result-dialog h2{font-size:19px}
}
@media(max-width:760px) and (max-height:690px){.site-header{height:44px}.restaurant{height:calc(30dvh - 44px);gap:5px;padding-bottom:8px}.game-layout{height:calc(100dvh - 44px)}.scoreboard{height:25px}.speaker-line{font-size:7px}#talk-state{display:none}.speech-bubble{padding:6px 9px}.speech-bubble p{font-size:11px;line-height:1.6}.order-body{padding:9px 19px 5px}.order-instruction{margin:3px 0 7px;font-size:8px}.panel-top{padding:9px 19px 7px}.panel-tabs{height:29px}.feedback{margin:5px 0;min-height:14px;line-height:14px;font-size:9px}.keypad{gap:5px}.keypad button{font-size:21px}.submit-button{margin-top:8px;height:33px}.panel-footer{padding:4px;font-size:7px}.panel-bottom{margin-top:5px}.keyboard-hint{display:none}.panel-bottom{justify-content:center}}
@media(max-width:360px){.scoreboard{gap:8px}.stat-label{font-size:7px}.scoreboard strong{font-size:15px}.scoreboard small{font-size:7px}.mobile-avatar{width:30px;height:37px;font-size:30px}.customer-area{gap:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* Several guests speak at once; the order screen keeps its original placement. */
.is-playing .intro h1{font-size:32px;line-height:1.4;margin:12px 0 0}
.is-playing .intro>p{display:none}
.rush-status{position:absolute;top:197px;left:0;margin:0;color:#7a866f;font-size:10px;letter-spacing:.05em}
.customer-area.rush-mode{top:222px;bottom:180px;left:0;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-content:start;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b7c2a6 transparent;padding:4px 8px 12px 2px;scroll-padding:8px}
.rush-customer{min-height:120px;padding:12px 13px 14px;border-radius:13px;box-shadow:0 3px 0 #e8e7d9;align-self:start;animation:appear .2s ease-out}
.rush-customer:after{left:23px;bottom:-6px;width:10px;height:10px}
.rush-customer:nth-child(even){border-color:#d7c8ad;background:#fff9ed}
.rush-customer:nth-child(even):after{background:#fff9ed;border-color:#d7c8ad}
.rush-customer .speaker-line{gap:4px;flex-wrap:wrap;font-size:9px;line-height:1.6}
.customer-name{font-weight:700;color:#678067}
.customer-badge{font-size:8px;margin-left:auto;color:#a58a68}
.rush-customer p{font-size:13px;line-height:1.75;min-height:3.5em;max-height:none;margin-top:7px}
.rush-customer.served{background:#edf2e5;border-color:#d4dec7;box-shadow:none}
.rush-customer.served:after{background:#edf2e5;border-color:#d4dec7}
.rush-customer.served .customer-badge{color:#54774d}
.rush-customer.served p{color:#7d8c72;font-weight:500;font-size:12px}
.is-playing .restaurant-art{pointer-events:none}
.is-playing .restaurant-art svg{max-height:185px}
.feedback{overflow-wrap:anywhere}
@media(min-width:761px) and (max-height:840px){.is-playing .intro h1{font-size:29px}.is-playing .scoreboard{margin-top:14px}.rush-status{top:178px}.customer-area.rush-mode{top:199px;bottom:155px}.is-playing .restaurant-art svg{max-height:155px}.rush-customer{min-height:108px}.rush-customer p{font-size:12px}}
@media(max-width:760px){
  .is-playing .restaurant{gap:4px;padding-bottom:8px}
  .rush-status{position:static;font-size:8px;line-height:12px;margin:0;flex-shrink:0}
  .customer-area.rush-mode{position:relative;inset:auto;width:100%;flex:1;min-height:0;gap:7px;align-items:start;padding:2px 5px 7px 1px;grid-template-columns:repeat(2,minmax(0,1fr))}
  .rush-customer{flex:initial;max-height:none;min-height:85px;width:100%;padding:7px 9px 10px;border-radius:10px;box-shadow:0 2px 0 #e8e7d9}
  .rush-customer:after{left:15px;top:auto;bottom:-4px;width:8px;height:8px;transform:rotate(40deg);border-left:0;border-right:1.5px solid #d6dacb}
  .rush-customer .speaker-line{font-size:7px;line-height:1.5}
  .customer-badge{font-size:6px;line-height:1.5}
  .rush-customer p,.rush-customer.served p{font-size:10px;line-height:1.65;min-height:3.3em;overflow:visible;margin-top:4px}
  .order-instruction{font-size:9px}
  .feedback{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
@media(max-width:760px) and (max-height:690px){.rush-customer{padding:6px 7px 8px;min-height:76px}.rush-status{font-size:7px;line-height:10px}.rush-customer p,.rush-customer.served p{font-size:9px}.customer-badge{margin-left:0}.order-instruction{font-size:8px}}

/* The speakers are friends at the same table. Let their speech carry the UI. */
#rush-status{position:absolute!important}
.rush-customer .speaker-line{display:none}
.rush-customer p{margin:0}
.rush-customer.served p{min-height:0}
.customer-area.rush-mode{top:105px}
@media(min-width:761px) and (max-height:840px){.customer-area.rush-mode{top:84px}}
@media(max-width:760px){.customer-area.rush-mode{top:auto}.rush-customer p,.rush-customer.served p{margin:0}.rush-customer{min-height:67px}}

/* Start outside the order pad, within the main game area. */
[hidden]{display:none!important}
.start-screen{position:absolute;inset:0 0 48%;display:grid;place-items:center;padding:24px 12px;z-index:3}
.start-button{display:block;width:min(360px,100%);min-height:78px;padding:18px 22px;border:2px solid #103c2d;border-radius:12px;background:#185b40;color:#fff;box-shadow:0 5px 0 #103c2d,0 12px 28px #173a2820;font:700 24px/1.5 var(--ui-font);letter-spacing:.02em;touch-action:manipulation}
.start-button:hover{background:#216d4c}
.start-button:active{transform:translateY(3px);box-shadow:0 2px 0 #103c2d}
.is-ready .scoreboard,.is-ready .customer-area{visibility:hidden}
.is-playing .restaurant-art,.is-playing .mobile-avatar{display:none}
.is-playing .customer-area.rush-mode{bottom:0}
.scoreboard strong{font-family:var(--ui-font);font-weight:700}
.stat-label{color:#5c6958}
.rush-customer p{font-size:16px;font-weight:600;line-height:1.8;letter-spacing:.01em}
.rush-customer.served p{font-size:14px}
.menu-row{font-size:14px}
@media(max-width:760px){
  .start-screen{inset:0;padding:12px 10px}
  .start-button{width:min(360px,100%);min-height:66px;padding:13px 18px;font-size:21px}
  .is-playing .customer-area.rush-mode{bottom:auto}
  .rush-customer p,.rush-customer.served p{font-size:13px;line-height:1.75}
  .stat-label{font-size:10px}
  .scoreboard strong{font-size:18px}
  .scoreboard small{font-size:9px}
  .menu-row{font-size:13px}
}
@media(max-width:760px) and (max-height:690px){.start-button{min-height:58px;font-size:20px}.rush-customer p,.rush-customer.served p{font-size:12px}}
@media(max-width:360px){.scoreboard{gap:8px}.stat-label{font-size:9px}.scoreboard strong{font-size:16px}.scoreboard small{font-size:8px}}

/* Three active requests, with more space for readable speech. */
.customer-area.rush-mode{grid-template-columns:minmax(0,1fr);gap:14px}
.rush-customer{min-height:125px;padding:16px 20px}
.rush-customer p{font-size:24px;line-height:1.65;min-height:2.8em;font-weight:600}
#time-left{font-variant-numeric:tabular-nums;white-space:nowrap;letter-spacing:.02em}
#time-left.time-warning{color:#b22e24}
@media(max-width:760px){
  .customer-area.rush-mode{grid-template-columns:minmax(0,1fr);gap:9px}
  .rush-customer{min-height:94px;padding:12px 14px}
  .rush-customer p{font-size:18px;line-height:1.65;min-height:3.3em}
}
@media(max-width:760px) and (max-height:690px){.rush-customer p{font-size:17px}.rush-customer{min-height:86px;padding:10px 12px}}

/* On phones, reserve enough room to read the orders in a vertical list. */
@media(max-width:760px){
  :root{--phone-pad-height:min(clamp(408px,56.4dvh,486px),max(255px,calc(100dvh - 250px)));--bubble-font:clamp(13px,2dvh,18px)}
  .restaurant{height:calc(100dvh - var(--phone-pad-height) - 53px);padding:0 8px 6px;gap:5px}
  .is-playing .restaurant{padding:0 8px 6px;gap:5px}
  .customer-area.rush-mode{
    grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(3,minmax(calc(3.8em + 8px),auto));
    gap:5px;align-content:start;align-items:stretch;overflow-y:auto;overflow-x:hidden;font-size:var(--bubble-font);
    padding:2px 1px 6px;
  }
  .rush-customer,.rush-customer[hidden]{
    min-width:0;min-height:0;max-height:none;width:100%;height:100%;padding:5px 8px 7px;
    border-radius:9px;box-shadow:0 2px 0 #e8e7d9;
  }
  .rush-customer[hidden]{display:block!important;visibility:hidden}
  .rush-customer p,.rush-customer.served p{
    min-height:0;margin:0;font-size:var(--bubble-font);line-height:1.2;
    letter-spacing:0;overflow-wrap:anywhere;word-break:break-word;
  }
}
@media(max-width:760px) and (max-height:690px){
  .restaurant,.is-playing .restaurant{height:calc(100dvh - var(--phone-pad-height) - 44px)}
}
@media(max-width:760px) and (max-height:540px){
  :root{--phone-pad-height:max(255px,60dvh,min(72dvh,calc(100dvh - 220px)));--bubble-font:clamp(11px,2.4dvh,13px)}
  .rush-customer,.rush-customer[hidden]{padding:3px 6px 4px}
  .rush-customer p,.rush-customer.served p{font-size:var(--bubble-font);line-height:1.2}
}

.rush-customer .order-number-line{display:block;white-space:nowrap}
.rush-customer .order-number{font-size:1.18em;font-weight:900;letter-spacing:.02em;color:#164a37}
.rush-customer .menu-name-emphasis{font-weight:900;color:#164a37}
@media(min-width:761px){.rush-customer p{font-size:26px}}
@media(max-width:760px){.rush-customer,.rush-customer[hidden]{padding-top:3px;padding-bottom:4px}}

.rush-customer.order-correct,.rush-customer.order-correct:nth-child(even){background:#dcf8df;border-color:#198b39;box-shadow:0 0 0 3px #41b65a,0 4px 14px #269b4766;animation:correct-pop .6s ease-out}
.rush-customer.order-correct:after,.rush-customer.order-correct:nth-child(even):after{background:#dcf8df;border-color:#198b39}
.rush-customer.order-correct:before{content:'✓ 正解！';position:absolute;z-index:2;right:6px;top:4px;padding:3px 9px;border-radius:20px;background:#168636;color:#fff;font-size:clamp(13px,3.4vw,18px);font-weight:900;line-height:1.3;box-shadow:0 2px 4px #145e3066}
@keyframes correct-pop{0%{transform:scale(1)}35%{transform:scale(1.03)}100%{transform:scale(1)}}

.result-dialog .result-icon{width:52px;height:52px;font-size:30px;margin-bottom:8px}
.result-dialog h2{margin:4px 0 12px}
.result-dialog .result-stats{margin:8px 0;padding:12px 4px}
.result-section{text-align:left;margin:14px 0}
.result-section h3{font-size:14px;margin:0 0 5px;color:var(--green)}
.result-list{border-top:1px solid #dce0d1}
.result-list .menu-row{padding:6px 0;font-size:13px;line-height:1.5}
.result-list .menu-emoji{font-size:18px}
.result-list .menu-row code{font-size:15px;white-space:nowrap}
.result-empty{font-size:13px;color:#7c8476;margin:8px 0}
.result-dialog[open]{display:flex;flex-direction:column;height:min(700px,85dvh);overflow:hidden}
.result-dialog .result-icon,.result-dialog h2,.result-dialog .result-stats,.result-dialog .best-message{flex-shrink:0}
.result-dialog .best-message{margin:2px 0}
.result-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 4px;scrollbar-width:thin}
#result-actions{flex:0 0 auto;padding-top:8px}
#result-actions button:disabled{opacity:.5;cursor:default}
#result-actions .dialog-primary{margin-top:0}
.result-buttons{display:flex;gap:8px}
.result-buttons .dialog-primary{flex:1;min-width:0;padding-left:6px;padding-right:6px}
.result-buttons .share-button{background:#222;box-shadow:none}
.result-buttons .share-button:hover:enabled{background:#444}
#result-actions .text-button{margin-top:4px}
@media(max-height:600px){.result-dialog[open]{padding-top:12px;padding-bottom:12px}.result-dialog .result-icon{width:34px;height:34px;font-size:22px;margin-bottom:2px}.result-dialog h2{margin:2px 0;font-size:17px}.result-dialog .result-stats{margin:4px 0;padding:6px 4px}.result-stats b{font-size:20px}.result-stats>div{gap:2px}.result-dialog .best-message{min-height:0}.result-section{margin:8px 0}#result-actions .dialog-primary{padding:10px}}

.timer-stat{position:relative}
.combo-bonus{position:absolute;z-index:6;left:0;top:75%;display:block;width:max-content;padding:3px 7px;border-radius:6px;background:#edf4e9;color:#315b3d;font-size:12px;line-height:1.25;font-weight:700;border:1px solid #c9ddc5;pointer-events:none}
.combo-bonus[hidden]{display:none}
.combo-bonus.bonus-pop{animation:bonus-pop 1s ease-out}
@keyframes bonus-pop{0%{opacity:0;transform:translateY(3px)}15%{opacity:1;transform:translateY(0)}80%{opacity:1}100%{opacity:0;transform:translateY(-3px)}}
@media(max-width:760px){.combo-bonus{font-size:11px;padding:2px 6px}}
