:root{color-scheme:light;--ink:#42180e;--muted:#79543c;--teal:#006c7c;--cream:#fff7e3;--edge:#e6bc72;--reading-size:18px;font-family:"M PLUS Rounded 1c",Nunito,system-ui,sans-serif;color:var(--ink);background:#71563a;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:#71563a url('./assets/detective-room-mobile.webp') center center/cover fixed;min-height:100dvh;padding:43px 8px 8px;padding-bottom:max(8px,env(safe-area-inset-bottom));}button,input,textarea{font:inherit}button,a,input,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.5}button,img{user-select:none}a{color:var(--teal)}img{max-width:100%;vertical-align:middle}button:focus-visible,a:focus-visible,textarea:focus-visible{outline:3px solid var(--teal);outline-offset:3px}button{touch-action:manipulation}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.play-shell{position:relative;isolation:isolate;display:flex;flex-direction:column;max-width:760px;height:calc(100dvh - 51px - env(safe-area-inset-bottom,0px));min-height:620px;margin:0 auto;padding:22px 13px 14px;border:2px solid #eeb55d;outline:2px solid #fff5cc;outline-offset:-6px;border-radius:30px;background:var(--cream);box-shadow:0 5px 0 #b86e31,0 8px 28px #4a1e3350}
.brand{position:absolute;object-fit:contain;top:-43px;left:50%;transform:translateX(-50%);height:58px;width:89px;filter:drop-shadow(0 3px 2px #6d3a2220)}
.heading{display:flex;gap:10px;align-items:center;min-height:43px;flex:none}.heading h1{font-size:clamp(17px,4.8vw,25px);font-weight:900;letter-spacing:-.035em;margin:0;flex:1;text-align:center;line-height:1.3;white-space:nowrap}.circle{display:grid;place-items:center;width:40px;height:40px;flex-shrink:0;border:1px solid #d99d48;border-radius:50%;background:#fff7df;box-shadow:inset 0 0 0 2px #fffbeb,inset 0 0 0 3px #dfad5b,0 3px 0 #ba8736;text-decoration:none}.circle img{width:25px;height:25px}.text-size{font-size:17px;font-weight:800;background:#fffaf1;border:1px solid #e5b873;border-radius:22px;min-width:62px;min-height:36px;padding:3px 10px;box-shadow:0 3px 5px #c99d4c20}
.tools{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:15px;flex:none}.pill{display:flex;align-items:center;justify-content:center;gap:8px;border-radius:999px;border:1.5px solid #d79c42;background:#fff7e5;font-size:17px;font-weight:900;line-height:1.25;min-height:46px;padding:8px 12px;white-space:nowrap}.pill img{width:25px;height:25px;flex:none}.pill .chevron{width:16px;height:16px;margin-left:auto}.tools .pill{justify-content:flex-start;font-size:19px;padding-inline:17px}.gold{background:#ffcd21;border-color:#e78b0d;box-shadow:inset 0 0 0 2px #fff8c0,inset 0 7px 10px #fff89d,inset 0 -7px 10px #ff9e00,0 4px 0 #c27e13,0 7px 12px #8b4b212a}.cream{background:#fff8e7;box-shadow:inset 0 0 0 2px #fffdfa,0 3px 0 #c08a38,0 6px 10px #8b4b211a}.flourish{position:relative;display:flex;align-items:center;justify-content:center;flex:none;height:26px;margin:7px 0 1px}.flourish:before,.flourish:after{content:"";flex:1;height:1px;background:#e7bb6a}.flourish img{width:31px;height:21px;object-fit:contain;margin:0 7px}
.conversation{display:flex;flex-direction:column;flex:1;min-height:0}.conversation-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:2px 4px 7px}.conversation-heading h2{font-weight:900;font-size:22px;letter-spacing:.01em;margin:0}.conversation-heading>span{font-weight:800;font-size:14px;color:var(--muted);white-space:nowrap}.conversation-window{position:relative;display:flex;min-height:0;flex:1}#messages{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#e7c789 transparent;min-height:0;width:100%;padding:5px 3px 12px;scroll-padding-bottom:20px}.welcome{font-size:var(--reading-size);line-height:1.8;margin:3px 6px 12px;color:var(--muted)}.message{display:flex;align-items:flex-end;gap:9px;margin-top:16px}.message:first-child{margin-top:0}.message.user{justify-content:flex-end}.message-content{max-width:calc(100% - 59px);min-width:0}.message.user .message-content{max-width:84%}.speaker{font-size:12px;color:var(--teal);font-weight:900;margin:0 8px 3px;text-align:right}.avatar{height:48px;width:48px;border:2px solid #edb552;border-radius:50%;padding:2px;background:#fff3d8;object-fit:contain;flex:none;align-self:flex-start;margin-top:2px}.bubble{position:relative;background:#fff5dd;border:1px solid #e7cb92;border-radius:17px;padding:11px 15px;font-weight:700;font-size:var(--reading-size);line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.message.user .bubble{background:#ddf2eb;border-color:#8ccbd0;color:#192b2b;border-bottom-right-radius:4px}.message.assistant .bubble{border-bottom-left-radius:4px}.message.pending .bubble{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:16px}.pending .bubble img{width:39px;animation:thinking 1.2s ease-in-out infinite}.message.failed .bubble{border-style:dashed}.message-error{font-size:13px;color:#a33c20;line-height:1.5;margin:6px 4px}.retry{font-size:14px;margin-top:5px;border:1px solid #a86c32;border-radius:14px;padding:6px 12px;background:#fffbef}.report{display:block;font-size:11px;color:var(--muted);background:transparent;border:0;min-height:27px;padding:4px 7px;margin-left:auto}.report:disabled{opacity:1}.new-reply{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:6px;border:1px solid #80bdc2;border-radius:22px;padding:8px 15px;background:#effaf5;color:var(--teal);box-shadow:0 2px 8px #284d4320;font-size:14px;font-weight:800;white-space:nowrap}.new-reply img{width:19px}.notice{min-height:22px;font-size:12px;color:var(--teal);font-weight:800;text-align:center;line-height:20px;flex:none}.notice.error{color:#a33c20}.composer{flex:none;padding-top:8px;border-top:1px solid #e0b45e}.mode-switch{display:flex;gap:3px;background:#efdfbe;border:0;padding:3px;border-radius:18px;margin:0 0 8px}.mode-switch label{position:relative;flex:1;text-align:center;cursor:pointer}.mode-switch input{position:absolute;opacity:0;width:100%;height:100%;inset:0;margin:0;cursor:pointer}.mode-switch span{display:block;font-size:14px;font-weight:800;padding:5px 8px;min-height:30px;border-radius:15px;color:#6c503b}.mode-switch input:checked+span{background:var(--teal);color:white;box-shadow:0 1px 3px #67402730}.mode-switch input:focus-visible+span{outline:3px solid #007c90;outline-offset:2px}.mode-switch input[value="answer"]:checked+span{background:#9c5425}.input-wrap{position:relative}.input-wrap textarea{width:100%;height:83px;resize:none;border:1px solid #e8c88c;border-radius:17px;padding:10px 14px 24px;background:#fffefd;color:#302b28;font-size:var(--reading-size);line-height:1.4;display:block}.input-wrap textarea::placeholder{color:#8b8581;font-size:16px;font-weight:700}#character-count{position:absolute;bottom:6px;right:13px;pointer-events:none;font-family:Nunito,system-ui,sans-serif;font-size:12px;color:#79706b}#character-count.over{color:#b32b11;font-weight:800}.mode-help{font-size:11px;line-height:16px;margin:3px 3px 6px;color:var(--muted)}.composer-actions{display:flex;gap:12px;justify-content:space-between}.composer-actions .pill{flex:1}.composer-actions #send{color:#fff;max-width:47%;font-size:21px;text-shadow:0 1px 2px #b96b29}.hint{background:#fffbed;color:var(--teal);border-color:var(--teal);font-size:16px}.finished{text-align:center;border-top:1px solid var(--edge);padding:6px}.finished p{margin:6px;font-size:var(--reading-size);font-weight:900}.finished .pill{margin:10px auto 2px}
dialog{width:min(560px,calc(100vw - 20px));max-height:calc(100dvh - 30px);border:2px solid #e3ad56;border-radius:26px;padding:18px;background:var(--cream);color:var(--ink);box-shadow:0 12px 50px #32180e50;font-size:16px;overflow:auto}dialog:modal{overscroll-behavior:contain}dialog::backdrop{background:#34200e99;backdrop-filter:blur(3px);overflow:hidden;overscroll-behavior:contain}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:15px}.dialog-heading h2{margin:0;font-size:24px;font-weight:900}.close{width:36px;height:36px;box-shadow:none}.close img{width:20px}.dialog-body{line-height:1.8}.reading{font-size:var(--reading-size)}.puzzle-thumbnail{display:block;margin:0 auto 14px;border:2px solid #d6a451;border-radius:18px;width:140px;height:140px}.dialog-body h3{font-size:21px;text-align:center;margin:8px 0 16px}.dialog-body p{margin:0 0 1em}.dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px}.dialog-footer .pill{font-size:16px;flex:1}.subtle-button{border:0;background:none;text-decoration:underline;text-underline-offset:4px;color:var(--muted);padding:12px 6px;font-size:14px}.dialog-intro{font-size:14px;margin:0 0 12px;color:var(--muted)}#memo{display:block;width:100%;min-height:230px;max-height:50dvh;resize:vertical;border:1px solid #d5b36a;border-radius:14px;background:#fffdf6;color:var(--ink);padding:13px;font-size:var(--reading-size);line-height:1.7}.memo-footer{display:flex;flex-direction:column;align-items:stretch;gap:18px;padding-top:10px}.memo-footer small{font-size:12px;line-height:1.5;color:var(--muted)}.size-options{display:flex;flex-direction:column;border:0;padding:0;margin:0;gap:8px}.size-options label{display:flex;align-items:center;gap:12px;padding:12px;background:#fffdf4;border:1px solid #e3bd7a;border-radius:14px}.size-options input{accent-color:var(--teal);width:18px;height:18px}.size-options small{margin-left:auto;color:var(--muted)}.size-preview{text-align:center;padding:15px 0}.dialog-done{width:100%;margin-top:16px}.consent-copy{font-size:15px;line-height:1.7}.consent-copy a{font-size:13px}.form-error{font-size:13px;color:#a33c20;line-height:1.6}.form-error:empty{display:none}#preview-label{position:fixed;top:0;left:0;right:0;z-index:10;text-align:center;font-size:11px;color:#fff;background:#006c7c;padding:2px;pointer-events:none}
@keyframes thinking{50%{opacity:.3}}@media(prefers-reduced-motion:reduce){.pending .bubble img{animation:none}}
.composer[data-mode="answer"] #send{font-size:17px;gap:6px;padding-inline:8px}.composer[data-mode="answer"] #send img{width:22px;height:22px}
.input-wrap{border:1px solid #e8c88c;border-radius:17px;background:#fffefd;overflow:hidden}.input-wrap:focus-within{outline:3px solid var(--teal);outline-offset:3px}.input-wrap textarea{border:0;border-radius:0;outline:none;height:calc(var(--reading-size)*2.8 + 16px);padding:8px 14px;}.input-wrap #character-count{position:static;display:block;min-height:19px;text-align:right;padding:0 13px 4px;line-height:15px}
@media(min-width:600px){body{padding-top:58px;background-image:url('./assets/detective-room.webp')}.play-shell{height:calc(100dvh - 70px);padding:28px 25px 20px;border-radius:34px}.brand{width:110px;height:74px;top:-55px}.heading h1{font-size:27px}.tools .pill{min-height:53px;justify-content:center}.tools .chevron{margin-left:8px}.conversation-heading h2{font-size:26px}.message-content{max-width:78%}.message.user .message-content{max-width:78%}.bubble{padding:13px 18px}.avatar{width:52px;height:52px}.message{margin-top:20px}.composer-actions .pill{min-height:49px}.input-wrap textarea{height:83px}}
@media(max-height:720px){body{padding-top:35px}.play-shell{height:calc(100dvh - 43px);min-height:540px;padding-top:18px}.brand{top:-36px;height:49px}.tools{margin-top:8px}.flourish{height:19px;margin-top:6px}.heading{min-height:37px}.heading .circle{width:35px;height:35px}.conversation-heading h2{font-size:20px}.composer{padding-top:5px}.mode-switch{margin-bottom:5px}.input-wrap textarea{height:70px}.composer-actions .pill{min-height:40px}.notice{min-height:20px}}
@media(max-width:359px){.heading h1{font-size:17px}.text-size{min-width:51px;padding-inline:6px}.tools .pill{padding-inline:12px;font-size:17px}.hint{font-size:14px}.pill{gap:6px}.play-shell{padding-inline:11px}.conversation-heading h2{font-size:20px}}
@media(max-width:359px){.composer[data-mode="answer"] #send{font-size:16px}.composer[data-mode="answer"] #send img{width:20px;height:20px}}

/* Keep the site framing outside the conversation's scrolling area. */
.help-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:3px}
.tools .help-actions .pill{justify-content:center;min-height:44px;padding:7px 10px;font-size:17px;gap:6px;box-shadow:none}
.answer-button{background:#fffaf0;border-color:#d5ac65;color:var(--ink)}
.composer-actions #send{max-width:none;width:100%}
.mode-help{font-size:12px;line-height:1.5;margin:4px 3px 7px}
@media(max-width:359px){.tools .help-actions .pill{font-size:15px;padding-inline:7px;gap:5px}.tools .help-actions .pill img{width:22px;height:22px}}
body{padding-top:83px}
.play-shell{height:calc(100dvh - 91px - env(safe-area-inset-bottom,0px))}
.chat-brand{position:absolute;top:-76px;left:50%;transform:translateX(-50%);display:flex;align-items:flex-end;justify-content:center;gap:8px;width:270px;height:86px;text-decoration:none;z-index:1}
.chat-brand .brand{position:static;transform:none;width:92px;height:69px;margin-bottom:5px;object-fit:contain}
.chat-brand .brand-cat{width:78px;height:78px;object-fit:contain;flex:none}
.opening-problem{background:#fff9e9;border:1px solid #e7cb92;border-radius:18px;padding:14px 16px;margin:0 0 20px;line-height:1.65;font-weight:500}
.opening-problem h3{margin:0 0 10px;font-size:14px;color:var(--teal);font-weight:800}
.opening-problem p{margin:0 0 .85em;white-space:pre-line}.opening-problem p:last-child{margin-bottom:0}
.site-footer{max-width:760px;margin:24px auto 0;padding:0 0 max(12px,env(safe-area-inset-bottom));text-align:center;color:#fff9e9;font-size:12px;text-shadow:0 2px 3px #38200e}
.site-footer a{color:inherit;text-decoration:none;min-height:44px;display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;letter-spacing:.03em}
.site-footer a:focus-visible{outline-color:#fff9e9}
.social-follow{display:flex;justify-content:center;gap:14px;margin-bottom:8px}
.social-follow a{width:48px;height:48px;padding:0;border:2px solid var(--teal);border-radius:50%;background:var(--cream);text-shadow:none}
.footer-links{display:flex;flex-wrap:wrap;justify-content:center}
.site-footer .copyright{font-family:Nunito,system-ui,sans-serif}
@media(min-width:600px){body{padding-top:96px}.play-shell{height:calc(100dvh - 108px)}.chat-brand{top:-88px;width:310px;height:98px;gap:10px}.chat-brand .brand{width:110px;height:83px}.chat-brand .brand-cat{width:90px;height:90px}}
@media(max-height:720px){body{padding-top:70px}.play-shell{height:calc(100dvh - 78px)}.chat-brand{top:-66px;height:76px}.chat-brand .brand-cat{width:68px;height:68px}.chat-brand .brand{width:86px;height:65px}}

/* Long localized titles and the daily allowance must leave room for the chat. */
.heading h1{min-width:0;white-space:normal;overflow-wrap:anywhere}
.conversation-heading h2{min-width:0}
.quota-info{margin:0 3px 8px;color:var(--muted);font-size:11px;line-height:1.4}
.quota-info p{margin:0}
#quota-count{font-size:13px;font-weight:800;color:var(--teal);margin-bottom:2px}
.quota-info.exhausted #quota-count{color:#a33c20}
.play-shell{min-height:680px}
:lang(en) .heading h1{font-size:clamp(17px,4.8vw,24px);letter-spacing:0}
:lang(en) .conversation-heading h2{font-size:clamp(18px,4.6vw,24px)}
:lang(en) .tools .pill{font-size:17px}
:lang(en) .tools .help-actions .pill{font-size:16px}
:lang(en) .dialog-footer{flex-wrap:wrap}
:lang(en) .dialog-footer .pill{white-space:normal}
@media(max-height:720px){.play-shell{min-height:610px}}
@media(max-width:359px){:lang(en) .tools .pill{font-size:15px;padding-inline:10px}:lang(en) .tools .help-actions .pill{font-size:14px;padding-inline:6px;gap:4px}}
