:root { color-scheme: light; }
html, body, #activity-root { width: 100%; height: 100%; overflow: hidden; }
body { margin: 0; background: #244e3b; }
.beat-activity { height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(85px, .9fr) auto minmax(90px,.8fr); align-content: center; gap: clamp(10px,2vh,24px); position: relative; padding: 8px 3%; box-sizing: border-box; isolation: isolate; }
.beat-header { display: flex; align-items: center; justify-content: center; gap: clamp(10px,3vw,36px); min-height: 0; }
.beat-character { height: clamp(85px,19vh,190px); max-width: 24%; object-fit: contain; filter: drop-shadow(0 7px 7px #243c2826); }
.beat-caption { margin: 0; padding: 12px 22px; max-width: 440px; text-align: center; font: 600 clamp(19px,2.5vw,30px)/1.22 Fredoka,sans-serif; color: #24422e; background: #fff9e9f2; border-radius: 24px; box-shadow: 0 5px 15px #263b2520; }
.beat-path { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); width: min(100%,900px); justify-self: center; gap: clamp(5px,1.2vw,16px); padding: clamp(10px,2vw,22px); box-sizing: border-box; background: #f8edcdf2; border-radius: 28px; box-shadow: 0 8px 22px #30432826; }
.beat-cell { aspect-ratio: 1; min-width: 0; border-radius: 22%; display: flex; justify-content: center; align-items: center; position: relative; background: #eadcb7; border: 3px solid transparent; padding: 3px; box-sizing: border-box; }
.beat-cell img { width: 95%; height: 95%; object-fit: contain; pointer-events: none; }
button.beat-cell { cursor: pointer; background: #fffbeb; border: 3px dashed #7d7959; touch-action: manipulation; }
button.beat-cell:empty::after { content: ''; width: 29%; height: 29%; border: 3px dotted #897d56; border-radius: 50%; }
.beat-cell.selected { border: 3px solid #285f4a; box-shadow: inset 0 0 0 3px #fff; }
.beat-cell.verified { border: 3px solid #c59732; background: #fff0ba; }
.beat-cell.pair-cue { outline: 4px solid #b18728; outline-offset: 3px; }
.beat-pantry { display: flex; justify-content: center; align-items: center; gap: clamp(18px,5vw,60px); min-height: 0; }
.beat-choice { width: clamp(80px,13vh,145px); height: clamp(80px,13vh,145px); padding: 7px; border: 3px solid #a78043; border-radius: 25%; background: #fff9e9; box-shadow: 0 6px 12px #243b2424; cursor: pointer; touch-action: none; transition: transform 160ms cubic-bezier(.2,.8,.2,1),background 160ms; }
.beat-choice img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.beat-choice.selected { border-color: #285f4a; background: #e4f0d8; box-shadow: 0 0 0 3px #fff9e9,0 5px 12px #243b2424; }
.beat-choice:active,button.beat-cell:active { transform: scale(.94); }
.beat-activity button:focus-visible { outline: 4px solid #173e37; outline-offset: 4px; }
.beat-hand { position: fixed; left: 0; top: 0; width: clamp(58px,9vw,100px); height: auto; pointer-events: none; z-index: 5; transition: transform 650ms cubic-bezier(.2,.8,.2,1); }
.beat-drag-image { position: fixed; left: 0; top: 0; width: 76px; height: 76px; object-fit: contain; pointer-events: none; z-index: 6; opacity: .93; filter: drop-shadow(0 6px 8px #243c2833); }
.beat-hand[hidden],.beat-gesture[hidden],.beat-gesture-object[hidden],.beat-pantry[hidden],.beat-path[hidden] { display: none; }
.beat-gesture { grid-row: 2 / 4; display: flex; align-items: center; justify-content: center; gap: clamp(20px,6vw,90px); min-height: 0; }
.beat-gesture-person { height: min(42vh,350px); width: min(45%,330px); object-fit: contain; }
.beat-gesture-object { width: min(26vw,200px); height: min(26vw,200px); object-fit: contain; background: #fff5dd; border-radius: 28%; padding: 12px; box-sizing: border-box; box-shadow: 0 8px 20px #30432826; }
.beat-activity.demo .beat-pantry,.beat-activity.demo .beat-path { pointer-events: none; }
.beat-activity.paused * { animation-play-state: paused !important; }
.beat-activity.success .beat-path { animation: warm-result 1500ms cubic-bezier(.2,.8,.2,1) both; }
.beat-spark { position: absolute; left: 50%; top: 55%; width: 8px; height: 8px; background: #e5b543; border-radius: 50%; pointer-events: none; animation: seed-flight 800ms cubic-bezier(.1,.7,.2,1) both; }
@keyframes seed-flight { from { transform: translate(0,0); opacity: 1; } to { transform: translate(var(--dx),var(--dy)); opacity: 0; } }
@keyframes warm-result { 0% { box-shadow: 0 8px 22px #30432826; } 50%,100% { box-shadow: 0 8px 22px #30432826,0 0 0 6px #e3bd62; } }
@media (orientation:portrait) { .beat-activity { grid-template-rows: minmax(110px,1fr) auto minmax(110px,.8fr); padding: 5px 0; gap: 20px; } .beat-character { height: clamp(100px,18vh,170px); max-width: 25%; } .beat-header { gap: 5px; } .beat-caption { font-size: clamp(18px,4.5vw,26px); padding: 12px 10px; } .beat-path { grid-template-columns: repeat(3,minmax(0,1fr)); width: min(100%,450px); padding: 16px; gap: 12px; border-radius: 24px; } .beat-cell { max-height: 110px; } .beat-gesture { flex-direction: column; gap: 12px; } .beat-gesture-person { height: min(30vh,280px); width: 66%; } .beat-gesture-object { width: 110px; height: 110px; } }
@media (max-height:650px) and (orientation:portrait) { .beat-activity { gap: 8px; grid-template-rows: 80px auto 74px; } .beat-character { height: 80px; } .beat-caption { font-size: 18px; } .beat-path { max-width: 290px; padding: 9px; gap: 8px; } .beat-choice { height: 70px; width: 70px; } .beat-gesture-person { height: 170px; } .beat-gesture-object { width: 86px; height: 86px; } }
@media (max-height:550px) and (orientation:landscape) { .beat-activity { gap: 7px; grid-template-rows: 62px auto 66px; padding: 0 4%; } .beat-character { height: 68px; max-width: 15%; } .beat-caption { font-size: 20px; padding: 7px 18px; } .beat-path { max-width: 620px; padding: 8px 14px; gap: 9px; } .beat-cell { max-height: 80px; } .beat-choice { width: 65px; height: 65px; padding: 4px; } .beat-gesture { grid-row: 2/4; } .beat-gesture-person { height: 190px; } .beat-gesture-object { width: 125px; height: 125px; } }
@media (orientation:portrait) { .beat-header { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.8fr) minmax(0,1fr); gap: 6px; width: 100%; } .beat-character { width: 100%; max-width: none; min-width: 0; } .beat-caption { min-width: 0; width: 100%; box-sizing: border-box; font-size: clamp(18px,4.7vw,24px); padding: 12px 8px; text-wrap: balance; } .beat-path { grid-template-columns: repeat(6,minmax(44px,1fr)); width: 100%; max-width: none; padding: 6px; gap: 4px; border-radius: 16px; } .beat-cell { min-height: 44px; } }
@media (prefers-reduced-motion:reduce) { .beat-activity *, .beat-hand { animation: none !important; transition: none !important; } .beat-activity.success .beat-path { outline: 4px solid #c59732; } }
