/* Illustrated boba loading screen; the 3D scene stays idle behind it. */
#cafeWelcome{--welcome-ink:#795461;--welcome-soft:#f0d3d7;position:fixed;inset:0;z-index:1000;display:grid;place-items:center;overflow:auto;isolation:isolate;padding:24px 18px calc(24px + env(safe-area-inset-bottom));background:#fff7ed url('paper-fibres.svg');color:var(--welcome-ink);text-align:center;touch-action:manipulation}
#cafeWelcome:before{content:'';position:fixed;inset:12px;z-index:-1;border:1px dashed #d6acaf;border-radius:28px;pointer-events:none}
#cafeWelcome:after{content:'';position:fixed;inset:0;z-index:-2;pointer-events:none;background:radial-gradient(ellipse at 14% 16%,#f5d7de88,transparent 42%),radial-gradient(ellipse at 87% 85%,#e4e8cf99,transparent 42%)}
.welcome-content{width:min(100%,520px);margin:auto;position:relative;padding:8px 20px 14px}
.welcome-logo{display:block;width:clamp(220px,27vw,300px);max-width:90%;height:auto;margin:0 auto 3px}
#welcomeTheme{margin:0 0 16px;font-size:11px;letter-spacing:1.8px;text-transform:uppercase;color:#9b7980}
#welcomeTitle{font-family:Georgia,'Times New Roman',serif;font-size:clamp(25px,3.5vw,34px);font-weight:400;letter-spacing:.1px;line-height:1.2;margin:0 0 9px;color:var(--welcome-ink)}
#welcomeStatus{margin:0 auto;max-width:310px;min-height:38px;font-size:13px;line-height:1.5;font-weight:700;color:#987a81}
.welcome-drink{width:270px;max-width:100%;margin:0 auto 9px;position:relative}
#welcomeBoba{display:block;width:100%;padding:0;margin:0;border:0;border-radius:36px;box-shadow:none;background:none;cursor:grab;touch-action:none;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none;isolation:isolate}
#welcomeBoba:active{cursor:grabbing;transform:none;background:none}
#welcomeBoba:disabled{opacity:1;cursor:default}
#welcomeBoba:focus-visible{outline:2px dashed #c18b9d;outline-offset:-3px}
#welcomeCup{display:block;width:100%;height:auto;overflow:visible;filter:drop-shadow(0 3px 1px #a77a6812)}
#bobaPlayHint{margin:-9px 0 0;font-size:11px;line-height:1.5;letter-spacing:.35px;color:#a27b88}
#startCafe{display:flex;align-items:center;justify-content:center;width:max-content;max-width:100%;margin:0 auto;padding:0;min-height:48px;border:0;background:none;box-shadow:none;border-radius:15px;color:var(--welcome-ink);-webkit-tap-highlight-color:transparent}
#startCafe:disabled{opacity:1;cursor:default}
.welcome-start-label{min-height:48px;min-width:212px;display:flex;align-items:center;justify-content:center;gap:13px;padding:12px 25px;background:#f6e2e5 url('paper-fibres.svg');border:1.5px solid #c591a0;border-radius:15px 12px 17px 11px;box-shadow:0 4px 0 #dfbcc6;color:#89616f;font-size:16px;line-height:1.3;font-weight:900;transition:background .18s,transform .18s,box-shadow .18s;letter-spacing:.25px}
.welcome-start-label>svg{width:13px;height:13px;flex:none;display:none;fill:currentColor}
#cafeWelcome[data-state="loading"] .welcome-start-label{font-size:14px;background-color:#f5ede7;border-color:#d6bfb9;box-shadow:0 3px 0 #e8d5ce;color:#a28b84}
#cafeWelcome[data-state="ready"] .welcome-start-label>svg{display:block}
#cafeWelcome[data-state="ready"] #startCafe{cursor:pointer}
#startCafe:not(:disabled):hover .welcome-start-label{background-color:#f0cbd5;box-shadow:0 5px 0 #d4a1b2}
#startCafe:not(:disabled):active{transform:none}
#startCafe:not(:disabled):active .welcome-start-label{transform:translateY(3px);box-shadow:0 1px 0 #d4a1b2}
#startCafe:focus-visible{outline:3px solid #aa7e91;outline-offset:5px}
#welcomeProgress{display:flex;align-items:center;justify-content:center;gap:7px;height:22px;margin:4px 0 0}
#welcomeProgress[hidden]{display:none}
#welcomeProgress>i{display:block;width:5px;height:5px;border-radius:50%;background:#ac8c7c;animation:welcome-boba 1.25s ease-in-out infinite}
#welcomeProgress>i:nth-child(2){animation-delay:.14s;background:#d0a4b0}
#welcomeProgress>i:nth-child(3){animation-delay:.28s;background:#bdc5a4}
#welcomeHint{min-height:18px;margin:12px auto 0;max-width:310px;color:#9b7b85;font-size:12px;line-height:1.5}
#welcomeRetry{margin:14px auto 0;padding:9px 22px;min-height:44px;border:1px solid #b98994;background:#fff9f1;color:#8b6774;font-size:14px;font-weight:800}
#cafeWelcome[data-state="error"] .welcome-start-label{display:none}
#cafeWelcome[data-state="leaving"]{pointer-events:none;animation:welcome-leave .24s ease forwards}
.welcome-spark{position:absolute;pointer-events:none;color:#c59983;font-family:Georgia,serif;font-size:22px;line-height:1}
.welcome-spark.one{left:10%;top:43%;transform:rotate(10deg)}
.welcome-spark.two{right:10%;top:59%;font-size:15px;transform:rotate(-15deg)}
.welcome-spark.three{right:17%;top:34%;font-size:12px;color:#bfb991}
html[data-cafe-theme="halloween"] #cafeWelcome{--welcome-ink:#876352;background-color:#fbf1e1}
html[data-cafe-theme="halloween"] #cafeWelcome:before{border-color:#d8b18b}
html[data-cafe-theme="halloween"] #cafeWelcome:after{background:radial-gradient(ellipse at 14% 16%,#eed3b188,transparent 42%),radial-gradient(ellipse at 87% 85%,#ded3e699,transparent 42%)}
html[data-cafe-theme="halloween"] .welcome-straw-edge{stroke:#bc936c}
html[data-cafe-theme="halloween"] .welcome-straw-light{stroke:#fff0d6}
html[data-cafe-theme="halloween"] .milk-light{stop-color:#f4d19c}
html[data-cafe-theme="halloween"] .milk-rich{stop-color:#dfa269}
html[data-cafe-theme="halloween"] .welcome-start-label{background-color:#f2d9be;border-color:#c59b77;box-shadow:0 4px 0 #ddbd9c;color:#88614a}
html[data-cafe-theme="halloween"] #startCafe:not(:disabled):hover .welcome-start-label{background-color:#efcda7;box-shadow:0 5px 0 #d3ab85}
body[data-cafe-start="loading"]{overflow:hidden}
body[data-cafe-start="preview"] #cafeWelcome{display:none}
@keyframes welcome-boba{0%,65%,100%{transform:translateY(0);opacity:.55}30%{transform:translateY(-4px);opacity:1}}
@keyframes welcome-leave{to{opacity:0;transform:scale(1.015)}}
@media(max-height:740px){#cafeWelcome{padding:16px}.welcome-content{padding:5px 12px}.welcome-logo{width:215px}#welcomeTheme{margin-bottom:10px;font-size:10px}#welcomeTitle{font-size:26px}#welcomeStatus{font-size:12px;min-height:30px}.welcome-drink{width:220px;margin-bottom:8px}#welcomeHint{margin-top:10px}}
@media(max-height:590px){.welcome-logo{width:190px}#welcomeTheme{margin-bottom:6px}#welcomeTitle{font-size:23px}.welcome-drink{width:180px}#welcomeStatus{min-height:0}#welcomeHint{font-size:11px}#bobaPlayHint{font-size:10px}}
@media(max-height:480px) and (min-width:550px){.welcome-content{width:min(700px,100%);display:grid;grid-template-columns:1fr 220px;column-gap:22px;align-items:center}.welcome-logo,#welcomeTheme,#welcomeTitle,#welcomeStatus,#welcomeHint,#welcomeProgress,#welcomeRetry{grid-column:1}.welcome-drink{grid-column:2;grid-row:1/7;width:170px;margin-bottom:10px}#startCafe{grid-column:2;grid-row:7/10}.welcome-start-label{min-width:205px;font-size:14px;padding:10px 15px}.welcome-logo{width:225px}#welcomeTheme{margin-bottom:9px}.welcome-spark{display:none}}
@media(prefers-reduced-motion:reduce){#cafeWelcome *,#cafeWelcome{animation:none!important;transition:none!important}}

#cafeWelcome{display:flex;flex-direction:column;gap:12px}.welcome-content{flex:0 0 auto}.welcome-studio{display:flex;align-items:center;justify-content:center;gap:10px;flex:0 0 auto;margin-top:auto;padding:8px 0 2px;color:#514046}.welcome-studio img{width:64px;height:64px;object-fit:contain}.welcome-studio-wordmark{font-family:Nunito,sans-serif;font-size:20px;font-weight:900;line-height:.98;text-align:left;letter-spacing:-.6px}.welcome-studio-wordmark>span{display:block}.welcome-studio-dot{color:#ed759f}

/* Returning players choose a saved run before the game becomes interactive. */
#startNewCafe{display:block;min-height:44px;max-width:100%;margin:15px auto 0;padding:9px 22px;border:1px solid #c591a0;border-radius:12px;background:#fffaf2;color:#795461;font:800 14px/1.4 Nunito,sans-serif;box-shadow:none}
#startNewCafe[hidden]{display:none}
#startNewCafe:focus-visible,.new-cafe-dialog button:focus-visible{outline:3px solid #aa7e91;outline-offset:4px}
.new-cafe-dialog{width:min(420px,calc(100vw - 36px));max-height:calc(100dvh - 40px);overflow:auto;padding:26px;border:1.5px solid #d4b1a2;border-radius:24px;background:#fff9ee url('paper-fibres.svg');color:#6c5148;font:700 15px/1.6 Nunito,sans-serif;text-align:left;box-sizing:border-box;box-shadow:0 16px 60px #60443c33}
.new-cafe-dialog::backdrop{background:#5c424977;backdrop-filter:blur(4px)}
.new-cafe-dialog h2{font-size:23px;line-height:1.3;margin:0 0 14px}
.new-cafe-actions{display:grid;gap:12px;margin-top:22px}
.new-cafe-actions button{min-height:48px;width:100%;padding:12px 16px;border:1px solid #c591a0;border-radius:12px;background:#fffaf2;color:#795461;font:800 15px/1.3 Nunito,sans-serif}
#newCafeConfirm{background:#f6e2e5}
#newCafeError{color:#9c3549;font-size:14px}
@media(max-height:480px) and (min-width:550px){#startNewCafe{grid-column:2;grid-row:10;min-width:205px}}

/* Account access stays on the welcome screen, outside the inactive game. */
.welcome-account{width:min(100%,340px);box-sizing:border-box;margin:20px auto 0;padding:14px 16px;border:1px dashed #d6acaf;border-radius:16px;background:#fffaf2b3;color:var(--welcome-ink)}
#welcomeAccountTitle{display:block;font-size:14px;line-height:1.4}
#welcomeAccountDetail{margin:5px 0 9px;font-size:12px;line-height:1.5;color:#896b75}
#welcomeAccountOpen{max-width:100%;min-height:44px;margin:0 auto;padding:9px 18px;border:1px solid #c591a0;border-radius:11px;background:#fffaf2;box-shadow:none;color:var(--welcome-ink);font:800 14px/1.4 Nunito,sans-serif;white-space:normal}
#welcomeAccountOpen:not(:disabled):hover{background:#f6e2e5}
#welcomeAccountOpen:disabled{opacity:.6;cursor:default}
#welcomeAccountOpen:focus-visible{outline:3px solid #aa7e91;outline-offset:4px}
@media(max-height:740px){.welcome-account{margin-top:14px;padding:10px 14px}}
@media(max-height:480px) and (min-width:550px){.welcome-account{grid-column:1;grid-row:11;max-width:300px;margin-top:12px}}
