/* Original logo character; all motion is visual and never affects game state. */
.mandu{position:relative;width:150px;height:160px;flex-shrink:0;pointer-events:none}
.mandu-body{position:absolute;width:128px;height:128px;left:11px;bottom:12px;transform-origin:50% 89%;animation:mandu-idle 3s ease-in-out infinite}
.mandu-art{position:absolute;inset:0;overflow:hidden}.mandu-art img{display:block;width:427.419355%;height:100%;max-width:none;user-select:none}
.mandu-shadow{position:absolute;width:89px;height:9px;left:30px;bottom:20px;background:#0b0e0d;border-radius:50%;opacity:.6}
.mandu-spark{position:absolute;left:130px;top:18px;width:14px;height:14px;color:var(--gold);opacity:0}
.mandu-spark:before,.mandu-spark:after{content:"";position:absolute;background:currentColor;border-radius:50%}.mandu-spark:before{width:4px;height:14px;left:5px}.mandu-spark:after{height:4px;width:14px;top:5px}
.mandu.talk .mandu-body{animation:mandu-talk 1.8s ease-in-out infinite}.mandu.hop .mandu-body{animation:mandu-hop 2.4s ease-in-out infinite}.mandu.hop .mandu-shadow{animation:mandu-shadow 2.4s ease-in-out infinite}.mandu.hop .mandu-spark{animation:mandu-spark 2.4s ease-in-out infinite}
@keyframes mandu-idle{0%,100%{transform:none}35%{transform:scale(1.035,.975)}45%{transform:rotate(-2deg)}55%{transform:rotate(2deg)}65%{transform:none}}
@keyframes mandu-talk{0%,100%{transform:none}12%{transform:rotate(-3deg) scale(1.05,.95)}24%{transform:translateY(-5px) rotate(3deg)}36%{transform:scale(1.04,.96)}48%{transform:rotate(-2deg)}60%{transform:none}}
@keyframes mandu-hop{0%,4%,40%,64%,100%{transform:none}8%{transform:translateY(2px) rotate(-2deg) scale(1.12,.86)}12%{transform:translateY(-10px) rotate(-5deg) scale(.94,1.08)}16%{transform:translateY(-21px) rotate(-6deg) scale(.98,1.04)}20%{transform:translateY(-26px) rotate(-2deg)}24%{transform:translateY(-22px) rotate(5deg)}28%{transform:translateY(-11px) rotate(6deg) scale(.96,1.05)}32%{transform:translateY(2px) rotate(2deg) scale(1.14,.84)}36%{transform:rotate(-2deg) scale(.97,1.04)}44%{transform:translateY(1px) rotate(2deg) scale(1.07,.93)}48%{transform:translateY(-10px) rotate(4deg) scale(.98,1.03)}52%{transform:translateY(-12px) rotate(-3deg)}56%{transform:translateY(1px) rotate(-2deg) scale(1.08,.91)}60%{transform:rotate(2deg) scale(.99,1.02)}}
@keyframes mandu-shadow{0%,4%,40%,64%,100%{transform:none;opacity:.6}8%,32%{transform:scale(1.1,.9);opacity:.7}12%,28%,48%,52%{transform:scale(.86);opacity:.45}16%,24%{transform:scale(.7);opacity:.35}20%{transform:scale(.65);opacity:.3}}
@keyframes mandu-spark{0%,12%,32%,100%{opacity:0}16%{opacity:1}24%{opacity:.7}28%{opacity:.3}}
.coach-dialog{width:min(440px,calc(100vw - 32px));padding:24px;max-height:calc(100dvh - 32px);overflow:auto}.coach-dialog .coach-character{display:flex;justify-content:center;margin:-6px 0 6px}.coach-dialog h2{font-size:22px;line-height:1.45;margin:0 0 14px;word-break:keep-all}.coach-dialog p{font-size:16px;line-height:1.65;margin:10px 0;word-break:keep-all}.coach-dialog .meta{font-size:13px;margin-top:18px}.coach-dialog .actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin:22px 0 0}.coach-dialog button{min-height:44px;font-size:16px}
.coach-dialog h2,.coach-dialog p{text-wrap:balance}.coach-phrase{white-space:nowrap}
.coach-arrow{position:fixed;z-index:70;pointer-events:none;width:72px;height:90px;margin-left:-36px;filter:drop-shadow(0 3px 2px #101412) drop-shadow(0 0 10px #dfbf6380)}.coach-arrow span{display:block;position:relative;width:22px;height:50px;margin:auto;background:#f5ce68;border-radius:6px;animation:coach-bob .65s ease-in-out infinite}.coach-arrow span:after{content:"";position:absolute;left:-25px;bottom:-38px;border-left:36px solid transparent;border-right:36px solid transparent;border-top:40px solid #f5ce68}.coach-arrow.below{transform:rotate(180deg)}@keyframes coach-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(10px)}}
.coach-target{outline:3px solid #f5ce68;outline-offset:4px;animation:coach-focus 1s ease-in-out infinite}@keyframes coach-focus{0%,100%{box-shadow:0 0 0 5px #f5ce6820}50%{box-shadow:0 0 0 10px #f5ce6840}}
.mandu-status{display:grid;grid-template-columns:150px minmax(0,1fr);gap:22px;align-items:center;margin:22px 0}.mandu-stats .tag{margin:0 0 5px}.mandu-stats h2{font-size:26px;margin:0}.mandu-stats .meta{margin:10px 0 0}.practice-tools{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}.practice-tools button{font-size:13px;padding:6px 10px;min-height:36px}.practice-tools .practice-label{white-space:nowrap}
.achievement-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.achievement-heading>.tag{margin:0}.achievement-heading .mandu{width:68px;height:60px}.achievement-heading .mandu-body{width:50px;height:50px;left:9px;bottom:4px}.achievement-heading .mandu-shadow{width:40px;left:14px;bottom:9px;height:5px}.achievement-heading .mandu-spark{left:58px;top:4px;transform:scale(.7)}
@media(max-width:430px){.coach-dialog{padding:20px}.coach-dialog h2{font-size:20px}.mandu-status{grid-template-columns:105px minmax(0,1fr);gap:12px;padding:16px}.mandu-status .mandu{width:105px;height:130px}.mandu-status .mandu-body{width:98px;height:98px;left:3px;bottom:14px}.mandu-status .mandu-shadow{width:68px;left:18px;bottom:20px}.mandu-stats h2{font-size:23px}.practice-tools{gap:6px;flex-wrap:wrap}}
@media(max-height:500px) and (min-width:540px){.coach-dialog .coach-character{float:left;margin:0 16px 0 -8px}.coach-dialog .mandu{height:140px}.coach-dialog{width:min(620px,calc(100vw - 32px))}.coach-dialog .actions{clear:both}}
@media(prefers-reduced-motion:reduce){.mandu-body,.mandu-shadow,.mandu-spark,.mandu.talk .mandu-body,.mandu.hop .mandu-body,.mandu.hop .mandu-shadow,.mandu.hop .mandu-spark,.coach-arrow span,.coach-target{animation:none}}

/* Temporary cartoon face/effects; source artwork is reused, never modified. */
.daebak-twist{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;opacity:0}
.daebak-twist-band{transform-box:view-box;transform-origin:64px 64px}
.daebak-expression{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.daebak-effects{position:absolute;width:128px;height:128px;left:11px;bottom:12px;overflow:visible;pointer-events:none}
.daebak-expression>g,.daebak-effects>g,.daebak-closed-eyes,.daebak-sulk-eyes,.daebak-sulk-mouth,.daebak-surprised{opacity:0}
.daebak-expression>g,.daebak-effects>g{transform-box:view-box;transform-origin:64px 64px}
.daebak-expression .daebak-nose-bubble,.daebak-expression .daebak-bubble-pop{transform-origin:68px 78px}
.daebak-expression .daebak-sulk-text{transform-origin:107px 16px}
.daebak-face-turn{transform-origin:64px 76px}
.daebak-effects .daebak-dust{transform-origin:64px 116px}
.daebak-effects .daebak-star{transform-box:fill-box;transform-origin:center}
.mandu:is([data-daebak-motion="sulk"],[data-daebak-motion="sleepy"],[data-daebak-motion="dance"],[data-daebak-motion="wobble"]) .daebak-face-mask,
.mandu:is([data-daebak-motion="sulk"],[data-daebak-motion="sleepy"],[data-daebak-motion="dance"],[data-daebak-motion="wobble"]) .daebak-face-turn{opacity:1}
.mandu.daebak-managed>.mandu-spark{display:none}
.mandu.daebak-interactive{pointer-events:auto;cursor:grab;touch-action:manipulation;outline-offset:5px;border-radius:22px;user-select:none;-webkit-user-select:none}
.mandu.daebak-interactive:not([data-daebak-level="2"]){touch-action:none}
.mandu.daebak-interactive:focus-visible{outline:2px solid var(--gold,#cfb468)}
.mandu.daebak-dragging{cursor:grabbing}
.mandu.daebak-dragging .mandu-body,.mandu.daebak-reacting .mandu-body{animation:none!important}
.mandu.daebak-paused .mandu-body,.mandu.daebak-paused .mandu-shadow,.mandu.daebak-paused .mandu-spark{animation-play-state:paused!important}
.mandu[data-daebak-level="1"] .mandu-spark,.mandu[data-daebak-level="2"] .mandu-spark,.mandu[data-daebak-level="3"] .mandu-spark,.mandu[data-daebak-level="4"] .mandu-spark{animation:none!important;opacity:0!important}
.mandu.daebak-reduced-celebration .mandu-spark{opacity:1}
.daebak-dialog .daebak-action-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:18px}
.daebak-action-tabs button{padding:7px 10px;font-size:13px;min-height:36px}
.daebak-action-tabs button[aria-pressed="true"]{background:var(--gold,#cfb468);color:#171b19;border-color:var(--gold,#cfb468)}
.daebak-dialog .daebak-action-title{font-weight:600;margin:8px 0}
.daebak-dialog .daebak-action-copy{min-height:2.1em;margin:8px 0}
.daebak-playground{min-height:260px;display:flex;align-items:flex-end;justify-content:center;padding:24px 30px 12px;background:#ffffff04;border:1px solid #ffffff0c;border-radius:16px;overflow:hidden}
.daebak-dialog .daebak-keyboard{min-height:1.65em;margin:12px 0 0}
.daebak-dialog .actions{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:16px}
@media(max-width:360px){.daebak-dialog{padding:16px}.daebak-action-tabs button{font-size:12px;padding:6px 8px}.daebak-playground{min-height:250px;padding:30px 20px 12px}.daebak-playground .mandu{width:125px;height:145px}.daebak-playground .mandu-body,.daebak-playground .daebak-effects{width:104px;height:104px;left:10px}.daebak-playground .mandu-shadow{width:73px;left:25px}.daebak-dialog .actions button{font-size:14px;padding:8px}}
@media(prefers-reduced-motion:reduce){.mandu.daebak-celebrating .mandu-body,.mandu.daebak-celebrating .mandu-shadow,.mandu.daebak-celebrating .mandu-spark{animation:none!important}.mandu.daebak-celebrating .mandu-spark{opacity:1}}
@media(prefers-reduced-motion:reduce){.daebak-sleeping .daebak-sleep-expression,.daebak-sleeping .daebak-nose-bubble,.daebak-sleeping .daebak-zzz{animation:none!important}}

.achievement-heading .daebak-effects{width:50px;height:50px;left:9px;bottom:4px}
@media(max-width:430px){.mandu-status .daebak-effects{width:98px;height:98px;left:3px;bottom:14px}}
@media(prefers-reduced-motion:reduce){.mandu.daebak-celebrating.daebak-reacting .mandu-body{animation:none!important}.mandu[data-daebak-motion="sulk"] .daebak-sulk-eyes,.mandu[data-daebak-motion="sulk"] .daebak-sulk-mouth,.mandu[data-daebak-motion="sulk"] .daebak-sulk-text,.mandu[data-daebak-motion="sleepy"] .daebak-closed-eyes{opacity:1}.mandu:is([data-daebak-motion="spark"],[data-daebak-motion="roll"]) .star-1{opacity:1}}

.daebak-effects>.daebak-star-position{opacity:1}.daebak-star{opacity:0}

/* Facial expressions never add eyebrows. Sleep startle uses > < with an O mouth. */
.daebak-squeezed-eyes{display:none}
.mandu[data-daebak-motion="sleepy"] .daebak-squeezed-eyes{display:inline}
.daebak-spin-lines .spin-trail{opacity:0;transform-box:view-box}

/* 504D: convex face parts only during spinning; common face stays intact otherwise. */
.daebak-spin-part{display:none;transform-box:view-box}
.mandu[data-daebak-motion="dance"] .daebak-face-original{opacity:0}
.mandu[data-daebak-motion="dance"] .daebak-spin-part{display:inline}
.daebak-spin-lines{transform-origin:64px 76px!important}
.daebak-spin-lines .spin-trail{stroke-width:3;transform-origin:64px 76px}
.daebak-dialog .daebak-action-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:0 0 14px}
.daebak-dialog .daebak-action-tabs button{font-size:12px;min-height:38px;padding:6px 4px;line-height:1.4}
.daebak-dialog .daebak-action-title{font-size:15px;margin:8px 0 4px}
.daebak-dialog .daebak-action-copy{font-size:14px;min-height:0;margin:4px 0 12px}
.daebak-dialog .daebak-playground{min-height:220px;padding:18px 24px 12px}
.daebak-dialog .daebak-keyboard:empty{display:none}
.daebak-dialog .actions{margin-top:14px;gap:10px}
@media(max-width:480px){.daebak-dialog .daebak-action-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.daebak-dialog .daebak-playground{min-height:215px}}
