/* A warm paper detective board, with large touch-friendly suspect cards. */
.detective-game{--detective-ink:#63523f;--detective-line:#b99c75;color:var(--detective-ink)}
.detective-case-count{font-size:.85rem;color:#806b52;white-space:nowrap}
.detective-board{position:relative;overflow:hidden;border:2px solid #bc9d70;border-radius:26px;background:radial-gradient(ellipse at 20% 20%,#fff8db 0,transparent 50%),repeating-linear-gradient(0deg,#fffaf000 0 23px,#d9c39b25 24px 25px),#f4e9d0;box-shadow:inset 0 0 0 7px #fff8e7,0 6px 0 #b99c7520;padding:24px}
.detective-board-top{display:flex;justify-content:space-between;gap:12px;align-items:center}
.detective-progress-label{font-size:.65rem;font-weight:800;letter-spacing:1.7px;color:#8b7355}
.detective-stars{display:flex;gap:7px;margin-top:7px}.detective-stars>span{display:block;width:34px;height:34px}.detective-stars svg{width:100%;height:100%;overflow:visible}.detective-stars path{fill:#fffdf7;stroke:#b99c75;stroke-width:2.1;stroke-linejoin:round}.detective-stars .is-earned path{fill:#ffd36f;stroke:#c28b3c}.detective-stars .is-new{animation:detective-star-pop .6s ease-out}
.detective-chapter{text-align:right;font-weight:800;font-size:.8rem;line-height:1.7;letter-spacing:.5px}.detective-chapter small{font-size:.75rem;font-weight:500}
.detective-topic{text-align:center;margin:22px auto 24px;padding:14px 16px 12px;background:#fffdf7;border:1px solid #d8c29e;border-radius:14px;box-shadow:0 3px 0 #c5aa7f25;width:max-content;max-width:100%;transform:rotate(-1deg)}.detective-topic>span{font-size:.63rem;letter-spacing:2px;color:#987a4e;font-weight:700}.detective-topic h2{font-size:clamp(24px,4vw,36px);line-height:1.3;color:#6a7053}.detective-topic p{font-size:.85rem;margin:5px 0 0}
.detective-suspects{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:9px 0 20px}
.detective-suspect{position:relative;display:flex;flex-direction:column;align-items:center;width:100%;min-width:0;border:2px solid #c8b99d;border-radius:70px 70px 18px 18px;background:#fffdf8;padding:40px 8px 14px;box-shadow:0 5px 0 #b39b7624;cursor:pointer;color:#5e4c3a;font:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.detective-suspect:hover:not(:disabled){border-color:#8a9e80;background:#fffefb}.detective-suspect:focus-visible{outline:3px solid #618b9c;outline-offset:4px}.detective-suspect:disabled{opacity:1;cursor:default}.detective-suspect.is-innocent{border-color:#a9c4ce;background:#f6fbff}.detective-suspect.is-caught{border-color:#95ab77;background:#f8fbea}
.detective-suspect-number{position:absolute;top:12px;left:15px;width:24px;height:24px;display:grid;place-items:center;border-radius:50%;background:#e9dfcc;font-size:.72rem;font-weight:700}
.detective-reaction{position:absolute;top:13px;left:39px;right:7px;font-size:.65rem;color:#9b8b77;white-space:nowrap}.is-innocent .detective-reaction,.is-caught .detective-reaction{font-size:.75rem;font-weight:800;color:#52758b;background:white;border-radius:10px;padding:5px 3px;left:29px;top:9px;box-shadow:0 2px 0 #a6bdc335}.is-caught .detective-reaction{color:#688047}
.detective-portrait{display:grid;place-items:center;width:100%;height:150px;position:relative;overflow:hidden}.detective-escort{display:flex;align-items:flex-end;justify-content:center;width:100%;height:100%}.detective-object{position:relative;display:grid;place-items:center;width:100%;height:100%;min-width:0}.detective-shadow{width:100%;height:100%;max-width:150px;filter:drop-shadow(0 5px 0 #e7dece)}.detective-shadow path{fill:#575365;stroke:#403d4c;stroke-width:2.5;stroke-linejoin:round}.detective-shadow ellipse{fill:#e9dfcf}
.detective-word-art{display:block!important;width:90%;max-height:125px;max-width:125px;animation:detective-reveal .35s ease-out}.detective-tears{position:absolute;inset:10% 15%;width:70%;height:80%;pointer-events:none}.detective-teardrop{animation:detective-cry 1.35s ease-in infinite}.detective-teardrop-right{animation-delay:-.65s}.detective-pupils{animation:detective-eye-quiver 1.1s ease-in-out infinite}.detective-cry-mouth{animation:detective-lip-quiver .6s ease-in-out infinite}
.detective-suspect strong{display:block;width:100%;font-size:clamp(15px,1.8vw,20px);line-height:1.2;min-height:2.4em;display:grid;place-items:center;overflow-wrap:anywhere;margin-top:8px}.detective-suspect-note{font-size:.63rem;color:#95836d;min-height:2.8em;line-height:1.4;display:grid;place-items:center}
.detective-officer{width:28%;flex:none;height:80%;position:relative;z-index:1}.is-caught .detective-object{width:44%;flex:none}.is-caught .detective-escort{animation:detective-escort 2.2s ease-in both}.is-caught .detective-word-art{width:100%}
.detective-feedback{text-align:center;font-size:.85rem;line-height:1.6;border-top:1px dashed #cbb58f;padding-top:15px;min-height:44px;color:#75624a}
.detective-celebration{position:relative;display:flex;flex-direction:column;align-items:center;min-height:340px;padding:8px 0 24px;text-align:center}.detective-hama-bubble{position:relative;z-index:1;border:2px solid #a68a62;border-radius:24px;background:#fffef8;padding:12px 18px;font-size:clamp(18px,3.2vw,25px);font-weight:800;color:#788a50;max-width:100%;margin-bottom:10px}.detective-hama-bubble:after{content:'';position:absolute;left:65%;top:calc(100% - 5px);width:15px;height:15px;background:#fffef8;border-right:2px solid #a68a62;border-bottom:2px solid #a68a62;transform:rotate(45deg)}
.detective-dancing-hama{width:240px;height:240px;object-fit:contain;animation:detective-dance .65s ease-in-out infinite;transform-origin:50% 85%}.detective-celebration h2{font-size:1.5rem;color:#71864e;margin:12px 0 4px}.detective-celebration>p:last-child{font-size:.85rem;color:#8f7758}.detective-celebration h2:focus{outline:none}.detective-board.is-paused *{animation-play-state:paused!important}
.detective-game-picture{background:radial-gradient(circle at 60% 40%,#fff9df,#e8dcc0)}.detective-choice-hama{height:95%;width:75%;object-fit:contain;position:absolute;bottom:0;left:4%}.detective-choice-glass{position:absolute;right:15%;top:17%;width:50px;height:50px;border:5px solid #9b7952;border-radius:50%;background:#fff9e8cc;font-size:28px;font-weight:bold;display:grid;place-items:center;color:#8d795f;transform:rotate(15deg)}.detective-choice-glass:after{content:'';width:10px;height:25px;background:#9b7952;position:absolute;top:42px;left:34px;transform:rotate(-35deg);border-radius:5px}
@keyframes detective-dance{0%,100%{transform:rotate(-6deg) translateY(0)}50%{transform:rotate(6deg) translateY(-10px)}}
@keyframes detective-reveal{from{opacity:.2;transform:scale(.88)}to{opacity:1;transform:scale(1)}}
@keyframes detective-cry{0%,15%{transform:translateY(0);opacity:1}80%{transform:translateY(12px);opacity:.8}100%{transform:translateY(16px);opacity:0}}
@keyframes detective-eye-quiver{0%,100%{transform:translateX(-.4px)}50%{transform:translateX(.4px)}}
@keyframes detective-lip-quiver{0%,100%{transform:translateY(0)}50%{transform:translateY(.8px)}}
@keyframes detective-escort{0%,42%{transform:translateX(0)}100%{transform:translateX(130%)}}
@keyframes detective-star-pop{0%{transform:scale(.7)}60%{transform:scale(1.18)}100%{transform:scale(1)}}
@media(max-width:650px){.detective-board{padding:17px 12px;border-radius:20px}.detective-stars{gap:5px}.detective-stars>span{width:26px;height:26px}.detective-progress-label{font-size:.58rem;letter-spacing:1px}.detective-chapter{font-size:.68rem}.detective-case-count{font-size:.7rem}.detective-suspects{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 12px;padding-top:0}.detective-suspect{padding-top:36px;border-radius:48px 48px 16px 16px}.detective-portrait{height:118px}.detective-suspect strong{font-size:17px;margin-top:2px}.detective-topic{margin:18px auto 20px}.detective-topic p{font-size:.78rem}.detective-reaction{font-size:.6rem}.is-innocent .detective-reaction,.is-caught .detective-reaction{font-size:.7rem;left:26px;right:3px}.detective-suspect-note{font-size:.6rem}.detective-feedback{font-size:.78rem}.detective-dancing-hama{width:210px;height:210px}}
@media(prefers-reduced-motion:reduce){.detective-game *{animation:none!important;transition:none!important}}

.detective-shadow-word{position:absolute;left:5%;right:5%;top:52%;transform:translateY(-50%);font-size:clamp(16px,1.8vw,20px);font-weight:800;line-height:1.2;color:#fff;text-shadow:0 1px 2px #242133;background:#575365;border-radius:12px;padding:4px 2px;overflow-wrap:anywhere}.detective-word-art{mix-blend-mode:multiply}

/* Keep each expression attached to the object, including during the police escort. */
.detective-character{position:relative;display:grid;place-items:center;width:125px;max-width:100%;aspect-ratio:1;isolation:isolate}
.detective-character .detective-word-art{width:100%;max-width:100%;max-height:125px}
.detective-character .detective-tears,.detective-character .detective-scowl{position:absolute;inset:10%;width:80%;height:80%;z-index:2;pointer-events:none;overflow:visible;filter:drop-shadow(0 1px 1px #fff8)}
.is-caught .detective-character .detective-scowl{inset:0;width:100%;height:100%}
