@charset "UTF-8";
:root{font-family:ui-rounded,"Hiragino Kaku Gothic ProN","Yu Gothic",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#f6ead6;background:#14100d;font-synthesis:none;--ink:#f6ead6;--muted:#c2b3a0;--glass:#1a130ee0;--line:#ffffff24;--accent:#f4b64a;--accent-ink:#2a1602;--red:#ff7a5c;--green:#a8e09a;--water:#8fd0ee}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{overscroll-behavior:none}
button,select{font:inherit;color:inherit;-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:0}button:disabled{cursor:default}
button:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
button:active:not(:disabled){transform:translateY(2px)}[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
#app{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:54px minmax(0,1fr);height:100%;height:100dvh;padding-bottom:env(safe-area-inset-bottom)}
.toolbar{display:flex;align-items:center;gap:14px;padding:0 18px;background:#17110d;border-bottom:1px solid var(--line);z-index:3}
.brand{display:flex;align-items:center;gap:8px;font-weight:850;font-size:16px;text-decoration:none;color:var(--ink);white-space:nowrap}
.brand-mark{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--accent);color:var(--accent-ink);font-weight:950;font-size:21px;font-style:italic}
.toolbar-rule{height:22px;width:1px;background:var(--line)}h1{font-size:15px;margin:0;font-weight:800;white-space:nowrap}
.toolbar-actions{margin-inline-start:auto;display:flex;align-items:center;gap:8px}
.icon-button{display:grid;place-items:center;min-width:44px;height:44px;border:1px solid var(--line);background:#ffffff0d;border-radius:12px;font-size:19px;font-weight:700}
.icon-button[aria-pressed=false]{opacity:.45;text-decoration:line-through}
.language-wrap select{height:44px;min-width:104px;border:1px solid var(--line);border-radius:12px;padding:0 10px;background:#241a12;font-size:12px}
.stage{position:relative;overflow:hidden;isolation:isolate;background:#080605}
.stage>canvas{display:block;width:100%;height:100%;touch-action:none;outline:none;user-select:none;-webkit-user-select:none;cursor:grab}
.loading{position:absolute;inset:0;display:grid;place-items:center;background:#080605;color:var(--muted);font-weight:700;z-index:2;transition:opacity .5s}.loading.done{opacity:0;pointer-events:none}
/* the photo of your cat, which round it is, how long is left, and what to do */
.top{position:absolute;top:10px;left:12px;right:12px;display:flex;gap:10px;align-items:flex-start;pointer-events:none;text-align:start}
.top-side{display:grid;gap:6px;justify-items:start;min-width:0;flex:1}
.top-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.chip{padding:6px 14px;border-radius:999px;background:var(--glass);border:1px solid var(--line);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);font-size:15px;font-weight:900;white-space:nowrap}
.chip.clock{display:inline-flex;align-items:center;gap:7px;padding:4px 14px 4px 10px;font-size:22px;line-height:1.15;font-variant-numeric:tabular-nums;direction:ltr;color:var(--ink);transition:color .2s,border-color .2s}
.chip.clock i{width:15px;height:15px;border-radius:50%;border:2.5px solid currentColor;position:relative;opacity:.85;flex:none}.chip.clock i::after{content:"";position:absolute;left:50%;top:50%;width:2.5px;height:6px;margin:-5.5px 0 0 -1.25px;border-radius:2px;background:currentColor;transform-origin:50% 5.5px}
.chip.clock:not(.idle) i::after{animation:clock-hand 2s linear infinite}.chip.clock.idle{color:var(--muted)}
.chip.clock.low{color:var(--red);border-color:#ff7a5c88;animation:clock-low 1s ease-in-out infinite}
@keyframes clock-hand{to{transform:rotate(360deg)}}@keyframes clock-low{0%,100%{transform:scale(1)}12%{transform:scale(1.14)}}
.hint{margin:0;padding:7px 14px;border-radius:14px;background:var(--glass);border:1px solid var(--line);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);font-size:14.5px;font-weight:800;line-height:1.4;max-width:min(560px,100%);text-shadow:0 1px 2px #0008}
.feedback{position:absolute;left:50%;top:calc(var(--top,110px) + 10px);transform:translate(-50%,0) scale(.94);display:grid;justify-items:center;padding:10px 18px;border-radius:16px;background:var(--glass);border:1px solid var(--line);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);font-weight:900;font-size:18px;text-align:center;opacity:0;transition:opacity .2s,transform .2s;pointer-events:none;max-width:86%;line-height:1.4}
.feedback.show{opacity:1;transform:translate(-50%,0) scale(1)}.feedback.good{color:var(--green)}.feedback small{font-size:13px;font-weight:800;color:var(--muted);font-variant-numeric:tabular-nums}.feedback small:empty{display:none}
.coach{position:absolute;left:50%;top:calc(var(--top,110px) + 10px);transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:9px 8px 9px 16px;border-radius:18px;background:#2a1a0ef5;border:2px solid var(--accent);box-shadow:0 6px 24px #000a;font-size:16px;font-weight:850;line-height:1.35;width:max-content;max-width:94%;text-align:start;z-index:1}
[dir=rtl] .coach{padding:9px 16px 9px 8px}
.coach button{flex:none;width:44px;height:44px;margin:-7px -4px;border-radius:50%;background:#ffffff14;color:var(--muted);font-size:18px;line-height:1}
.overlay{position:absolute;inset:0;display:grid;place-items:center;padding:18px;background:radial-gradient(ellipse at center,#08060599 0%,#080605d9 100%);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);z-index:2}
.overlay.clear{background:linear-gradient(180deg,#08060500 45%,#080605b8 100%);backdrop-filter:none;-webkit-backdrop-filter:none;place-items:end center;pointer-events:none}.overlay.clear .panel{pointer-events:auto;width:min(440px,100%)}
.panel{width:min(460px,100%);max-height:100%;overflow:auto;padding:24px 24px 20px;border-radius:22px;background:#241a12f2;border:1px solid var(--line);box-shadow:0 24px 70px #000a;text-align:center}
.panel.result{padding:16px 20px 14px;background:#241a12ee}
.eyebrow{font-size:11px;font-weight:800;letter-spacing:.16em;color:var(--accent)}
h2{margin:8px 0 6px;font-size:30px;letter-spacing:-.02em}.panel.result h2{font-size:24px;margin:6px 0 0;line-height:1.25;color:#ffe2a8}.lead{margin:0 0 16px;font-size:15px;line-height:1.55;color:#eadfce}
.review{margin:8px 0 6px;font-size:15px;line-height:1.62;color:#f3e6d2;text-align:start}
.actions{display:flex;gap:10px;justify-content:center;align-items:center;flex-wrap:wrap;margin-top:12px}
.panel.result .actions{position:sticky;bottom:-14px;margin:8px -6px -6px;padding:8px 0 10px;background:linear-gradient(180deg,#241a1200,#241a12 30%)}
.primary-button{min-height:48px;min-width:150px;padding:0 22px;border-radius:14px;font-weight:850;font-size:16px;touch-action:manipulation;background:var(--accent);color:var(--accent-ink)}
.text-button{padding:4px 10px;min-height:44px;background:none;color:var(--muted);font-size:13px;font-weight:750;text-decoration:underline;text-underline-offset:4px;border-radius:10px}.text-button:hover{color:var(--ink)}
.fine-print{margin:8px 0 0;font-size:12px;color:var(--muted);line-height:1.5}.fine-print:empty,.record:empty{display:none}
.record{margin:6px 0 0;font-weight:800;color:var(--accent)}
.result-top{display:flex;align-items:center;justify-content:center;gap:18px;margin-top:4px;flex-wrap:wrap}
.result-score{display:flex;align-items:baseline;gap:6px;direction:ltr}.result-score strong{font-size:44px;letter-spacing:-.04em;line-height:1.05;font-variant-numeric:tabular-nums;color:var(--accent)}.result-score span{font-size:15px;color:var(--muted);font-weight:800}
#help-steps{text-align:start;margin:10px 0 0;padding-inline-start:20px;font-size:14px;line-height:1.6}#help-steps li{margin-bottom:4px}
.tips{text-align:start;margin:10px 0 0;padding-inline-start:20px;font-size:13px;line-height:1.6;color:var(--muted)}
@media (max-width:640px){.toolbar{padding:0 10px;gap:8px}.toolbar-rule,h1,.wide-tool,.brand span:last-child{display:none}.top{top:8px;left:8px;right:8px;gap:5px}.chip{font-size:14px;padding:5px 12px}.hint{font-size:13.5px;padding:6px 11px}h2{font-size:26px}.panel{padding:20px 16px 16px}.panel.result{padding:12px 14px 12px}.panel.result h2{font-size:21px}.review{font-size:14px;line-height:1.58}.result-score strong{font-size:38px}.coach{font-size:15px}.feedback{font-size:16px}}
@media (prefers-reduced-motion:reduce){.chip.clock,.chip.clock i::after,.photo.pulse{animation:none!important}.feedback{transition:none}}
/* a phone on its side: the panels stand at one side, out of the way of the cats */
@media (orientation:landscape) and (max-height:560px){.top{inset-inline-end:auto;width:min(380px,56vw)}.overlay.clear{place-items:center end;background:linear-gradient(90deg,#08060500 45%,#080605b8 100%)}[dir=rtl] .overlay.clear{background:linear-gradient(270deg,#08060500 45%,#080605b8 100%)}.overlay.clear .panel{width:min(370px,54vw)}.panel{padding:14px 16px 12px}h2{font-size:22px}.panel.result h2{font-size:18px}.review{font-size:13px;line-height:1.5}.lead{font-size:13.5px;margin-bottom:10px}.result-score strong{font-size:32px}.panel.result .eyebrow{display:none}.panel.result{padding:10px 14px 10px;display:flex;flex-direction:column}.panel.result .review{order:2}.panel.result .record,.panel.result .fine-print{order:3}.panel.result .actions{order:4}.panel.result .result-top{gap:10px;flex-wrap:nowrap}.primary-button{min-height:44px}}
/* the photo: a print with a white border; a tap makes it bigger */
.photo-slot{position:relative;flex:none;--w:118px;width:var(--w);height:calc(var(--w) + 16px);z-index:2}
.photo{position:absolute;inset-inline-start:0;top:0;width:100%;padding:6px 6px 22px;border-radius:8px;background:#fbf6ea;box-shadow:0 6px 22px #0009,0 0 0 1px #0002;transform:rotate(-2.5deg);transform-origin:20% 0;pointer-events:auto;transition:width .22s,transform .22s;animation:photo-in .45s cubic-bezier(.2,1.5,.4,1) both}
[dir=rtl] .photo{transform:rotate(2.5deg);transform-origin:80% 0}
.photo canvas{display:block;width:100%;aspect-ratio:1;border-radius:3px;background:#3d5a26}
.photo-tag{position:absolute;left:0;right:0;bottom:3px;font-size:11.5px;font-weight:900;color:#5b3f24;text-align:center;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 6px}
.photo.big{width:min(232px,58vw);transform:rotate(-1deg)}.photo:active{transform:rotate(-2.5deg) scale(.98)!important}
.photo.pulse{animation:photo-in .45s cubic-bezier(.2,1.5,.4,1) both,photo-pulse 1.3s ease-in-out .5s infinite}
@keyframes photo-in{from{transform:rotate(-14deg) translateY(-40px) scale(.6);opacity:0}}@keyframes photo-pulse{0%,100%{box-shadow:0 6px 22px #0009,0 0 0 3px #f4b64a}50%{box-shadow:0 6px 22px #0009,0 0 0 9px #f4b64a66}}
.chip.round{color:var(--accent)}.chip.clock b{min-width:2.6ch;text-align:center}
.zoom{position:absolute;inset-inline-end:12px;bottom:14px;display:flex;flex-direction:row-reverse;gap:8px;z-index:1}.stage.wide .zoom{flex-direction:column}
.zoom button{width:48px;height:48px;border-radius:50%;background:var(--glass);border:1px solid var(--line);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);font-size:24px;font-weight:800;line-height:1;touch-action:manipulation}.zoom button:disabled{opacity:.35}
/* what a cat answers when it is touched: floats up from the cat and fades */
.marks-layer{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.marks-layer span{position:absolute;transform:translate(-50%,-50%);font-weight:950;font-size:20px;white-space:nowrap;text-shadow:0 2px 6px #000b,0 0 2px #000;animation:mark-up 1s ease-out forwards;direction:ltr}
.marks-layer .no{color:#ffb4a2}.marks-layer .heart{color:#ff7d9c;font-size:26px;animation-duration:1.5s}.marks-layer .yes{color:#ffe28a;font-size:24px;animation-duration:1.6s}
@keyframes mark-up{0%{opacity:0;transform:translate(-50%,-30%) scale(.5)}15%{opacity:1;transform:translate(-50%,-70%) scale(1.15)}100%{opacity:0;transform:translate(calc(-50% + var(--dx,0px)),calc(-50% - 74px)) scale(1)}}
/* the three photos again in the results, each with how long it took */
.shots{display:flex;gap:8px;margin:0;padding:0;list-style:none}
.shots li{position:relative;width:74px;padding:4px 4px 3px;border-radius:6px;background:#fbf6ea;color:#5b3f24;font-size:11.5px;font-weight:900;line-height:1.35;text-align:center;box-shadow:0 3px 10px #0007}.shots li:nth-child(odd){transform:rotate(-2deg)}.shots li:nth-child(even){transform:rotate(1.5deg)}
.shots img{display:block;width:100%;aspect-ratio:1;border-radius:3px;background:#3d5a26;object-fit:cover}.shots li.lost img{filter:grayscale(.85) brightness(.75)}.shots li b{display:block;font-variant-numeric:tabular-nums;direction:ltr}.shots li small{display:block;font-size:10.5px;color:#9a6a1c;font-variant-numeric:tabular-nums}.shots li.lost small{color:#a0503c}.shots li small{direction:ltr}
.coach{top:auto}
@media (max-width:640px){.photo-slot{--w:102px}.zoom button{width:46px;height:46px}.shots li{width:66px}}
@media (orientation:landscape) and (max-height:560px){.photo-slot{--w:96px}.photo.big{width:min(200px,40vh)}.shots li{width:58px;font-size:10.5px}.zoom{bottom:8px}}
.stage.wide .top{flex-direction:column;inset-inline-end:auto;width:214px;gap:14px}.stage.wide .photo-slot{--w:150px}.stage.wide .photo.big{width:min(300px,60vh)}.stage.wide .hint{max-width:214px}
@media (max-height:560px){.stage.wide .top{width:176px;gap:10px}.stage.wide .photo-slot{--w:104px}.stage.wide .photo.big{width:min(210px,56vh)}.stage.wide .hint{font-size:12.5px;padding:5px 9px}.stage.wide .chip{font-size:13px;padding:4px 10px}.stage.wide .chip.clock{font-size:18px}}

/* Keep ranking and result controls reachable in embedded phone layouts. */
.toolbar-actions #world-button{width:44px;font-size:0}.toolbar-actions #world-button::before{content:'🏆';font-size:20px}
#result-panel[hidden]{display:none}.result-score{white-space:nowrap}.result-footer{padding-top:8px}#rank-start-status:empty{display:none}
@media(max-width:720px){.toolbar{gap:6px;padding-inline:8px}.toolbar h1,.toolbar-rule,.wide-tool,.brand span:last-child{display:none}.toolbar-actions{gap:5px}.language-wrap select{width:104px;min-width:0}}
@media(orientation:landscape) and (max-height:340px){#ready-panel{padding:8px 14px}#ready-panel .eyebrow{display:none}#ready-panel h2{font-size:20px}#ready-panel .lead{font-size:12px;line-height:1.35;margin:5px 0}.overlay{padding:6px}#result-panel h2{font-size:16px}.result-score strong{font-size:26px}.result-body .review{font-size:12px}.panel.result .result-footer .actions{display:grid;grid-template-columns:1fr 1fr}}

/* Keep score visible while long localized reviews scroll independently. */
#result-panel>.result-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;text-align:start;padding-bottom:8px;border-bottom:1px solid var(--line)}
#result-panel>.result-heading h2{font-size:clamp(17px,4.5vmin,24px)}
#result-panel .result-footer .actions{position:static;margin:0;padding:0;background:none}
#result-panel .result-body>.review{margin-top:0}#result-panel .result-top{margin:0}
@media(orientation:landscape) and (max-height:420px){#result-panel>.result-heading{padding-block:2px}#result-panel .result-heading h2{font-size:16px}#result-panel .result-score strong{font-size:28px}}

#result-panel .result-footer>:is(.fine-print,.actions,.end-game-tools){order:0}
