:root{font-family:"Segoe UI","Malgun Gothic",system-ui,sans-serif;color:#493d33;background:#c7ab84;font-synthesis:none;--wood:#f2c58c;--ink:#473b30;--cream:#fff7e9;--blue:#368eb8;--red:#d75b51;--line:#b08b5b}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overscroll-behavior:none}body{display:flex;justify-content:center;align-items:center;background:radial-gradient(ellipse at 50% 30%,#ecdbba,#ba9b72);overflow:hidden}button,input{font:inherit}button{touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid #255f75;outline-offset:3px}button:disabled{cursor:default}button{border:0}button[hidden],section[hidden],div[hidden],p[hidden]{display:none!important}.game{position:relative;width:min(100vw,440px);height:100dvh;max-height:1040px;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);background:var(--wood);box-shadow:0 0 0 1px #9d7b51,0 0 60px #46302135;overflow:hidden}.playfield{position:relative;width:100%;height:100%;overflow:hidden;background-color:var(--wood);background-image:repeating-linear-gradient(0deg,transparent 0 17px,#cfa56f20 18px,transparent 19px 38px),linear-gradient(90deg,#e6b77e38,transparent 13%,transparent 88%,#d6a76d40)}#scene{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.hud{position:absolute;left:9px;right:8px;top:3px;display:flex;align-items:center;gap:4px;height:39px}.icon-button{width:34px;height:34px;min-width:34px;border-radius:9px;box-shadow:inset 0 1px 0 #fff8,0 2px 0 #785a3559;font-size:20px;font-weight:800}.pause-button{color:white;background:linear-gradient(#42acd6,#287fac);border:1px solid #287699}.menu-button{background:transparent;color:#6c573e;box-shadow:none;margin-left:2px;font-size:22px}.word-counter{background:transparent;color:#58442e;white-space:nowrap;font-weight:800;padding:0 2px;flex:1;text-align:left;font-size:12px;min-height:36px}.word-counter b{font-size:14px;color:#7b542a}.word-counter small{font-size:10px;margin-left:4px;font-weight:600;opacity:.75}.hearts{font-size:15px;letter-spacing:-2px;color:#d94c61;white-space:nowrap;background:none;padding:4px 0;text-shadow:0 1px 0 #fff6;min-height:36px}.hearts .empty{color:#c2a47b}.clue{position:absolute;left:12px;right:14px;top:43px;height:26px;display:flex;gap:6px;align-items:center}.audio-button{display:flex;align-items:center;justify-content:center;background:transparent;width:30px;height:32px;font-size:18px;padding:0}.clue img{width:28px;height:28px;object-fit:contain}.meaning{font-size:13px;font-weight:600;color:#6f563b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px}.letters{margin-left:auto;color:#2f5369;font-size:20px;font-weight:850;letter-spacing:1px;white-space:nowrap;line-height:1.1}.letters.long{font-size:15px;letter-spacing:.3px}.color-queue{position:absolute;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;z-index:2}.color-card{min-width:0;border-radius:8px;border:1px solid #624f3138;box-shadow:inset 0 2px 0 #fff7,inset 0 -4px 0 #00000012,0 2px 0 #84633855;position:relative;font-weight:850;font-size:20px;text-shadow:0 1px #0001;padding:0;transition:filter .12s,transform .12s,opacity .12s}.color-card:active:not(:disabled){transform:translateY(2px);box-shadow:inset 0 1px 0 #fff5}.color-card.front:not(:disabled){border:2px solid #fff0b8;box-shadow:inset 0 2px 0 #fff8,inset 0 -4px 0 #0001,0 2px 0 #84633866}.color-card.waiting{opacity:.72;font-size:17px}.color-card:disabled:not(.waiting){opacity:.45}.color-card.empty{background:#b8956535!important;box-shadow:inset 0 1px 3px #74552c17;border:1px dashed #a8895d77;color:#9a7d56!important;opacity:.6}.color-card .color-shape{position:absolute;width:4px;height:4px;top:5px;left:5px;border-radius:50%;background:currentColor;opacity:.55}.fire-button{position:absolute;z-index:3;border:2px solid #8c4439;border-radius:12px;background:linear-gradient(145deg,#e97663,#c44e46);box-shadow:inset 0 1px 0 #ffddbd,0 3px 0 #9d4c3e;color:white;padding:3px 6px 2px;display:flex;flex-direction:column;align-items:center;justify-content:center}.fire-button svg{width:25px;height:32px;overflow:visible}.fire-button span{font-size:9px;font-weight:800;white-space:nowrap;line-height:1}.fire-button:disabled{filter:saturate(.6);opacity:.65}.fire-button.ready{animation:ready-glow 1.6s ease-in-out infinite}.fire-button:active:not(:disabled){transform:translateY(2px)}.status{position:absolute;bottom:14px;left:72px;right:12px;text-align:center;color:#745536;font-size:10px;line-height:1.2;margin:0;min-height:12px;pointer-events:none}.offline-status{position:absolute;bottom:1px;left:50%;transform:translateX(-50%);max-width:90%;font-size:9px;line-height:1.1;color:#8a704d;background:transparent;padding:0 8px;white-space:nowrap;min-height:11px}.phase-banner{position:absolute;left:50%;transform:translateX(-50%);top:49%;background:#fff5ddf2;border:1px solid #c6a16c;border-radius:12px;padding:8px 15px;font-size:15px;color:#695035;font-weight:700;white-space:nowrap;box-shadow:0 3px 12px #5c45241a;pointer-events:none}.restart-stage{position:absolute;z-index:6;left:50%;top:49%;transform:translateX(-50%);max-width:92%;white-space:nowrap;background:#3d897c;color:#fff;border:2px solid #fff0b8;border-radius:12px;padding:10px 16px;font-size:14px;font-weight:800;box-shadow:0 3px 12px #5c45242e}.toast{position:absolute;left:50%;bottom:38%;transform:translateX(-50%);max-width:90%;width:max-content;background:#584d40ed;color:#fff9e9;border-radius:9px;padding:8px 12px;font-size:12px;text-align:center;z-index:10;pointer-events:none}.result-panel{position:absolute;z-index:7;left:18px;right:18px;top:23%;background:#fff8ebf7;border:2px solid #d9b578;border-radius:20px;padding:22px 18px 15px;text-align:center;box-shadow:0 10px 32px #62432126}.result-panel>span{display:block;font-size:13px;color:#a5753e;font-weight:650}.result-panel>strong{display:block;font-size:36px;color:#304d61;letter-spacing:1px;margin:7px 0}.result-panel p{font-size:17px;line-height:1.5;margin:8px 0;color:#4a4b3e}.result-panel small{font-size:14px;color:#827059}.next-progress{height:3px;background:#daceb7;margin-top:18px;border-radius:3px;overflow:hidden}.next-progress i{height:100%;display:block;width:100%;background:#5b9876;transform-origin:left}.paused-layer,.loading-layer,.small-screen{position:absolute;inset:0;background:#edd2a8ec;z-index:20;display:flex;align-items:center;justify-content:center;text-align:center;backdrop-filter:blur(4px)}.paused-layer h1,.loading-layer h1{font-size:24px;margin:10px 0;color:#4f4c3c}.paused-layer p,.loading-layer p{font-size:13px;color:#7b6c52}.pause-mark{display:inline-flex;justify-content:center;align-items:center;width:58px;height:58px;background:#e2bb85;border-radius:18px;color:#8b6740;font-size:28px;font-weight:900}.paused-layer button,.loading-layer button{background:#3d897c;color:white;border-radius:10px;padding:11px 25px;font-size:15px;font-weight:700;margin-top:10px}.loading-layer{flex-direction:column;z-index:30;background:#f1c98f}.loading-layer img{filter:drop-shadow(0 4px 0 #bf985a66)}.loading-layer h1{letter-spacing:1px;font-size:23px;margin-bottom:0}.small-screen{z-index:25;flex-direction:column;font-weight:700;font-size:18px;line-height:1.7}.small-screen small{font-size:12px;font-weight:400}.sheet{width:min(calc(100vw - 28px),410px);max-height:min(85dvh,800px);padding:20px;border:1px solid #c5a579;border-radius:20px;background:#fff8eb;color:#524635;box-shadow:0 18px 80px #382d2455}.sheet::backdrop{background:#332c2255;backdrop-filter:blur(3px)}.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.sheet-head h2{font-size:22px;margin:0}.sheet-head button{background:none;font-size:28px;color:#8a7358;min-width:36px;min-height:36px}.sheet-note{font-size:12px;line-height:1.6;color:#89775b;margin:10px 0 15px}.switch-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #e7dbc6;font-size:14px}.switch-row input{accent-color:#3f8f7d;width:19px;height:19px}.summary-grid{display:grid;grid-template-columns:repeat(3,1fr);margin:20px 0;gap:10px}.summary-grid div{text-align:center;background:#eee4cd;padding:12px 3px;border-radius:10px}.summary-grid strong{display:block;font-size:24px;color:#3b6d5e}.summary-grid span{font-size:10px;color:#8b785a}.cache-info{font-size:12px;line-height:1.6;color:#677754}.sheet-action{display:block;width:100%;text-align:left;background:#f0e6d2;color:#61503d;padding:12px;border-radius:9px;font-size:13px;margin:7px 0;cursor:pointer}.file-action input{display:none}.tiny-note{font-size:10px;line-height:1.6;color:#a18e70;margin-top:16px}.word-search{width:100%;border:1px solid #d1bfa3;border-radius:9px;padding:11px 12px;background:#fffcf5;color:#55452e;font-size:14px;outline:none;margin:12px 0}.category-list{display:flex;overflow-x:auto;gap:6px;padding-bottom:8px;scrollbar-width:thin}.category-list button{border-radius:8px;padding:6px 10px;font-size:11px;white-space:nowrap;color:#8a765b;background:#eee1ca}.category-list button.active{color:#fff;background:#4b8c7c}.word-list{display:grid;gap:3px}.word-row{display:flex;align-items:center;text-align:left;width:100%;gap:12px;padding:9px 4px;background:none;border-bottom:1px solid #e8deca}.word-row img{width:36px;height:36px;object-fit:contain}.word-row .word-text{flex:1}.word-row strong{font-size:15px;color:#3c5361;display:block}.word-row small{font-size:11px;color:#8e7d62}.word-row .seen{font-size:13px;color:#539171}.empty-list{color:#9a8667;font-size:13px;text-align:center;padding:25px 0}.noscript{position:fixed;inset:0;background:#fff3dc;padding:40px;z-index:99}
@keyframes ready-glow{50%{box-shadow:inset 0 1px #ffddbd,0 3px #9d4c3e,0 0 0 5px #fff1b945}}
@media(max-height:699px){.hud{top:0;height:32px}.icon-button{height:28px;width:28px;min-width:28px;font-size:17px}.word-counter{font-size:10px;min-height:32px}.word-counter b{font-size:12px}.word-counter small{font-size:9px}.hearts{font-size:12px}.clue{top:31px;height:22px;gap:4px}.clue img{height:22px;width:22px}.audio-button{height:26px;width:26px;font-size:16px}.meaning{font-size:11px}.letters{font-size:18px}.status{display:none}.offline-status{bottom:1px;font-size:8px}.color-card.waiting{font-size:15px}.result-panel{top:19%;padding:16px}.result-panel>strong{font-size:30px}.result-panel p{font-size:14px}.phase-banner{font-size:13px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
.master-sound{font-weight:750}.master-sound small{display:block;margin-top:4px;font-size:10px;font-weight:400;color:#89775b}.audio-controls{padding:2px 0 12px;border-bottom:1px solid #e7dbc6}.audio-channel .switch-row{border:0;padding:12px 0 2px;font-size:13px}.volume-row{display:flex;align-items:center;gap:13px;min-height:33px}.volume-row input[type=range]{flex:1;min-width:0;height:27px;margin:0;accent-color:#3f8f7d;cursor:pointer;touch-action:pan-y}.volume-row output{min-width:36px;text-align:right;font-size:11px;font-variant-numeric:tabular-nums;color:#756449}.volume-row input:disabled{opacity:.4;cursor:default}.sound-preview{display:block;width:100%;margin-top:10px;padding:9px 12px;border:1px solid #c9d6be;border-radius:9px;background:#e5eddc;color:#3d6d58;font-size:12px;font-weight:700}.sound-preview:disabled{opacity:.45}.audio-note{font-size:10px;line-height:1.6;color:#89775b;margin:8px 0 0}.audio-button.muted{opacity:.55}
.game-guide{margin:12px 0;padding:12px;border:1px solid #ded0b6;border-radius:9px;background:#f6eddb}.game-guide summary{font-size:12px;font-weight:750;cursor:pointer;color:#5c6249}.game-guide p{font-size:11px;line-height:1.7;color:#776448;margin:9px 0 0}.game-guide strong{color:#9d493d}
.color-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}.card-letter{font-size:24px;font-weight:900;line-height:1}.card-ammo{font-size:11px;font-weight:750;line-height:1.05;letter-spacing:.2px;opacity:.92}.color-card.waiting .card-letter{font-size:21px}.color-card.waiting .card-ammo{font-size:10px}.game-guide #letter-stats{border-top:1px solid #ded0b6;padding-top:8px;color:#9d493d;font-weight:700}
.color-card{overflow:hidden}.card-face{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;background:inherit;color:inherit;border-radius:inherit;pointer-events:none}.queue-ghost{position:absolute;z-index:8;pointer-events:none;overflow:hidden;display:flex;align-items:center;justify-content:center;border:2px solid #fff0b8;will-change:transform,opacity}.card-spark{position:absolute;z-index:8;width:5px;height:5px;border-radius:1px;pointer-events:none}.toast.danger-toast{bottom:48%;background:#933d36f2;border:1px solid #f6bd8e;box-shadow:0 3px 12px #622d2729}
@media(max-height:699px){.card-letter{font-size:22px}.color-card.waiting .card-letter{font-size:15px}.color-card.waiting .card-ammo{font-size:9px}}
.display-controls{padding:12px 0 16px;border-bottom:1px solid #e7dbc6}.size-label{display:block;font-size:14px;font-weight:750}.size-note{font-size:11px;line-height:1.6;color:#89775b;margin:3px 0 14px}.size-reset{padding:8px 12px;min-height:36px;background:#e5eddc;border:1px solid #c9d6be;border-radius:8px;color:#3d6d58;font-size:12px;font-weight:700}
.word-counter .difficulty-label{display:block;margin:0;font-size:9px;line-height:11px;letter-spacing:.4px;color:#396c56;opacity:1}.game[data-difficulty=normal] .difficulty-label{color:#916322}.game[data-difficulty=hard] .difficulty-label{color:#ae3f41}.difficulty-banner{position:absolute;z-index:6;top:27%;left:50%;transform:translateX(-50%);width:230px;padding:17px 12px;text-align:center;pointer-events:none;border:2px solid #fff2bb;border-radius:16px;background:#3e7968ee;color:#fff9de;box-shadow:0 6px 0 #28594c44,0 15px 35px #58432944;animation:challenge-entry .4s ease-out}.difficulty-banner small,.difficulty-banner span{display:block;font-size:11px}.difficulty-banner strong{display:block;font-size:32px;letter-spacing:3px;margin:3px 0 5px}.game[data-difficulty=normal] .difficulty-banner{background:#a26d2aee}.game[data-difficulty=hard] .difficulty-banner{background:#a74448ee}.result-panel.success{border-color:#78a568;box-shadow:0 0 0 6px #fff0ac55,0 12px 45px #63552040;animation:result-success .5s ease-out}.result-panel.success>span{color:#3b8866;font-size:16px}.result-panel.failure{border-color:#bb6054;background:#fff0e4f7;animation:result-failure .4s ease-out}.result-panel.failure>span{color:#af423e;font-size:15px}.result-panel.failure .next-progress i{background:#bb6054}@keyframes challenge-entry{from{opacity:0;transform:translateX(-50%) scale(.8)}to{opacity:1;transform:translateX(-50%) scale(1)}}@keyframes result-success{0%{opacity:0;transform:scale(.82)}70%{transform:scale(1.04)}100%{opacity:1;transform:scale(1)}}@keyframes result-failure{0%,60%{transform:translateX(-6px)}30%,80%{transform:translateX(6px)}100%{transform:translateX(0)}}@media(prefers-reduced-motion:reduce){.difficulty-banner,.result-panel.success,.result-panel.failure{animation:none}}
.result-panel.success::before,.result-panel.failure::before{display:block;margin:0 auto 12px;width:52px;height:52px;line-height:52px;border-radius:50%;font-size:34px;font-weight:900}.result-panel.success::before{content:"✦";color:#ba8437;background:#ffebac;box-shadow:0 0 0 5px #ffedb044}.result-panel.failure::before{content:"✕";color:#b74644;background:#f8d6cb;box-shadow:0 0 0 5px #efbdaf44}.phase-banner{color:#37785b;border:2px solid #c9ae62;font-weight:850;font-size:18px;max-width:94%;white-space:normal;text-align:center}
.game[data-reduced-motion=true] .difficulty-banner,.game[data-reduced-motion=true] .result-panel,.game[data-reduced-motion=true] .fire-button{animation:none!important}
.external-audio small{display:block;font-size:10px;line-height:1.5;color:#89775b;margin-top:4px}#retry-button{display:block;width:100%;min-height:50px;padding:12px;margin-top:20px;border:2px solid #fff0b8;border-radius:12px;background:#3e8975;color:#fff9e3;font-size:17px;font-weight:850;box-shadow:0 4px 0 #28634f}#retry-button:disabled{background:#a5a28e;box-shadow:none;color:#f6f1e1;opacity:.8}#retry-button:active:not(:disabled){transform:translateY(3px);box-shadow:0 1px 0 #28634f}.result-panel.failure{top:26%;padding:18px;animation:failure-arrival .65s ease-out}.result-panel.failure>strong{font-size:30px;color:#a5403c;margin:10px 0}.result-panel.failure>span{font-size:12px}.result-panel.failure p{font-size:14px}.result-panel.failure small{display:block;font-size:12px;line-height:1.6}@keyframes failure-arrival{0%,30%{opacity:0;transform:scale(.86)}70%{opacity:1;transform:scale(1.035)}100%{opacity:1;transform:scale(1)}}
.result-panel.failure{animation:failure-arrival .35s ease-out}@keyframes failure-arrival{0%{opacity:1;transform:translateY(12px) scale(.96)}75%{opacity:1;transform:translateY(-2px) scale(1.015)}100%{opacity:1;transform:translateY(0) scale(1)}}
.fire-button.aim-window{background:linear-gradient(#8bd55d,#438f4c);border-color:#2d703b;box-shadow:inset 0 1px #efffce,0 3px #316b3b,0 0 0 5px #dfff9799}.fire-button.aim-window span{font-weight:900;color:#fffbe1}
.reward-hud{position:absolute;left:14px;right:14px;top:64px;height:12px;display:flex;align-items:center;gap:8px;font-size:10px;line-height:12px;font-weight:750;color:#77583b;pointer-events:none;z-index:2}.reward-hud span{white-space:nowrap}.reward-hud progress{flex:1;min-width:15px;height:5px;appearance:none;border:0;border-radius:4px;overflow:hidden;background:#b99b6540}.reward-hud progress::-webkit-progress-bar{background:#b99b6540;border-radius:4px}.reward-hud progress::-webkit-progress-value{background:#528866;border-radius:4px}.reward-hud.earned #answer-streak{color:#356b53}.clue{height:20px}.clue img{width:22px;height:22px}.result-reward{margin:14px auto 8px;padding:10px 8px;border:1px solid #d8b663;border-radius:10px;background:#ffedbd;color:#86601c;font-size:14px;font-weight:850}.result-detail{margin:8px 0 2px;color:#6a7156;font-size:11px;line-height:1.7}.collection-summary{margin-top:15px;padding:12px 14px;background:#eee6ce;border-radius:12px;color:#4b7257}.collection-summary strong,.collection-summary small{display:block}.collection-summary strong{font-size:14px}.collection-summary small{margin-top:7px;font-size:11px;font-weight:500;color:#897448}.collection-summary progress{display:block;margin-top:10px;width:100%;height:6px;accent-color:#518869}.word-row .seen{font-size:11px;white-space:nowrap;letter-spacing:1px}.word-row .seen[data-stars="0"]{letter-spacing:0;color:#9d8c73;font-size:10px}@media(max-height:699px){.reward-hud{top:57px;font-size:9px;height:13px}.clue{height:22px}.result-reward{font-size:12px;padding:7px 4px;margin:10px auto 6px}.result-detail{font-size:10px}}
.language-controls{padding:8px 0 6px;border-bottom:1px solid #e7dbc6}.language-controls select{display:block;width:100%;min-height:42px;margin:9px 0;padding:9px 11px;border:1px solid #c7b28e;border-radius:9px;background:#fffcf4;color:#4c5947;font:600 14px system-ui,sans-serif}.language-controls .size-note{margin-bottom:11px}.clue{gap:5px}.clue .audio-button,.clue #word-image{flex:0 0 24px}.clue .meaning{flex:1 1 110px;min-width:20px;max-width:132px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:10px;font-size:11px;max-height:20px;overflow:hidden}.clue .letters{flex:0 1 auto;min-width:0;max-width:64%;font-size:clamp(13px,4.8vw,20px);letter-spacing:.5px}.clue .letters.long{font-size:clamp(11px,3.4vw,15px);letter-spacing:0}.game-guide p[data-i18n="ui.guide2"],.game-guide p[data-i18n="ui.guide5"]{font-weight:750;color:#9d493d}.result-reward,.result-detail,.phase-banner,.sheet-note,.size-note{overflow-wrap:anywhere}.result-panel>strong{overflow-wrap:anywhere}.status{overflow-wrap:anywhere}.reward-hud{gap:6px}.reward-hud #answer-streak{font-size:9px}.collection-summary strong{line-height:1.5}.fire-button span{font-size:clamp(7px,2.2vw,9px)}@media(max-height:699px){.clue .audio-button,.clue #word-image{flex-basis:22px;width:22px}.clue .meaning{font-size:10px;line-height:10px}.reward-hud{left:10px;right:10px;gap:5px;font-size:9px}.reward-hud #answer-streak{font-size:8px}.result-panel.success{top:14%;padding:12px}.result-panel.success::before{width:36px;height:36px;line-height:36px;font-size:25px;margin-bottom:7px}.result-panel.success>strong{font-size:26px;margin:4px 0}.result-panel.success p{font-size:13px;line-height:1.3;margin:5px 0}.result-panel.success .result-reward{font-size:11px}.result-panel.success .result-detail{font-size:9px}.result-panel.failure .result-detail{font-size:10px}.phase-banner{font-size:15px}}
.difficulty-banner span{line-height:1.4;text-wrap:balance}.sheet-head h2{overflow-wrap:anywhere}.language-controls select:focus-visible{outline:3px solid #5e9a84;outline-offset:2px}

/* Keep the study field quiet; the word, balloons and colour targets carry focus. */
:root{--study-bg:#eaf4f7;--study-ink:#19384a;--study-muted:#486471;--study-surface:#f7fbfc;--study-line:#bed2db;--wood:var(--study-bg);--ink:var(--study-ink);--cream:var(--study-surface);--line:#91aebc;color:var(--study-ink);background:#c6d9df}
body{background:radial-gradient(ellipse at 50% 30%,#e6f0f3,#c7d9df)}
.game{background:var(--study-bg);box-shadow:0 0 0 1px #9bb8c4,0 0 60px #19384a20}
.playfield{background-color:var(--study-bg);background-image:none}
.menu-button,.word-counter,.word-counter b,.meaning,.letters{color:var(--study-ink)}
.hearts .empty{color:#a9c0ca}
.status,.offline-status,.reward-hud{color:var(--study-muted)}
.reward-hud progress,.reward-hud progress::-webkit-progress-bar{background:#a7c1ca55}
.color-card.empty{background:#c7dce555!important;border-color:#91aebc99;color:#547280!important;box-shadow:inset 0 1px 3px #19384a10}
.color-card.waiting,.color-card:disabled:not(.waiting),.card-ammo{opacity:1}
.color-card:disabled:not(.waiting){box-shadow:inset 0 1px 0 #fff5}
.phase-banner{background:#f7fbfcf5;border-color:#9bbac8;color:var(--study-ink);box-shadow:0 3px 12px #19384a15}
.result-panel{background:#f7fbfcf7;border-color:#a9c7d1;box-shadow:0 10px 32px #19384a20}
.result-panel>strong,.result-panel p{color:var(--study-ink)}
.result-panel small,.result-detail{color:var(--study-muted)}
.next-progress{background:#cadde3}
.paused-layer,.loading-layer,.small-screen{background:#eaf4f7f7;color:var(--study-ink)}
.paused-layer p,.loading-layer p{color:var(--study-muted)}
.loading-layer{background:var(--study-bg)}
.loading-layer img{filter:drop-shadow(0 4px 0 #91aebc55)}
.sheet{background:var(--study-surface);color:var(--study-ink);border-color:#aac5d0;box-shadow:0 18px 80px #19384a40}
.sheet::backdrop{background:#18374755}
.sheet-head button,.sheet-note,.size-note,.master-sound small,.external-audio small,.audio-note,.volume-row output,.tiny-note{color:var(--study-muted)}
.switch-row,.audio-controls,.display-controls,.language-controls{border-color:var(--study-line)}
.summary-grid div,.sheet-action,.collection-summary{background:#e1eef2}
.summary-grid span,.sheet-action,.collection-summary small{color:var(--study-muted)}
.word-search,.language-controls select{background:var(--study-surface);color:var(--study-ink);border-color:#aac5d0}
.category-list button{background:#e1edf2;color:var(--study-muted)}
.category-list button.active{background:#3c7886;color:#fff}
.word-row{border-color:#d4e4ea}
.word-row strong,.word-row small,.empty-list,.word-row .seen[data-stars="0"]{color:var(--study-muted)}
.word-row strong{color:var(--study-ink)}
.game-guide{background:#e3eff3;border-color:#bed3dc}
.game-guide summary,.game-guide p{color:var(--study-ink)}
.game-guide #letter-stats{border-color:#bed3dc}
.size-reset,.sound-preview{background:#dfedf1;border-color:#b6ced7;color:#244f61}
.noscript{background:var(--study-bg);color:var(--study-ink)}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.challenge-timer{position:absolute;left:12px;right:14px;top:43px;height:8px;border:1px solid #99b2bf;border-radius:5px;background:#b6ccd74d;z-index:3;pointer-events:none}
#challenge-time-fill,#challenge-time-loss{position:absolute;left:0;top:0;height:100%;border-radius:4px;width:100%;background:linear-gradient(90deg,#317c73,#66ab87);transform-origin:left}
#challenge-time-loss{background:repeating-linear-gradient(120deg,#ffb85d 0 3px,#ec7453 3px 6px);opacity:.85;z-index:1}
.challenge-timer>[hidden]{display:none!important}
#challenge-time-change{position:absolute;right:0;top:-4px;padding:0 4px;border-radius:4px;background:#e3f3ea;color:#245e43;font-size:9px;line-height:14px;font-weight:850;white-space:nowrap;z-index:2}#challenge-time-change.loss{background:#a43435;color:#fff7df}
.challenge-timer.warning #challenge-time-fill{background:linear-gradient(90deg,#b17a2d,#e8b452)}
.challenge-timer.urgent #challenge-time-fill{background:linear-gradient(90deg,#a8393d,#e46b53)}
.challenge-timer.time-hit{border-color:#b53e3b;box-shadow:0 0 0 2px #bc444333,0 0 12px #d3554333}
.challenge-timer.time-gain{border-color:#44886a;box-shadow:0 0 0 2px #67aa6c33}
.challenge-timer.urgent[data-running=true]{animation:countdown-alert 1.4s ease-in-out infinite}
.word-counter{min-width:0}
@keyframes countdown-alert{50%{box-shadow:0 0 0 3px #bd51492b}}
@media(max-height:699px){.challenge-timer{top:33px}}
.game[data-reduced-motion=true] .challenge-timer{animation:none!important}
@media(prefers-reduced-motion:reduce){.challenge-timer{animation:none!important}}
.clue{top:53px}.pronunciation{position:absolute;top:75px;left:12px;right:14px;height:18px;display:flex;align-items:center;gap:8px;padding:0;background:transparent;color:var(--study-ink);text-align:left;white-space:nowrap;overflow-x:auto;scrollbar-width:none;font-size:11px;line-height:16px;z-index:2}.pronunciation::-webkit-scrollbar{display:none}.pronunciation strong{font-size:12px;font-weight:800}.pronunciation span{font-family:"Segoe UI","Arial",sans-serif;font-size:11px;font-weight:600}.pronunciation:active{color:#24684e}.reward-hud{top:96px}
@media(max-height:699px){.clue{top:41px}.pronunciation{top:64px;height:18px;gap:7px}.reward-hud{top:85px}}
.damage-alert{position:absolute;left:30px;right:30px;z-index:4;padding:8px 10px;border:1px solid #d27864;border-left:4px solid #f4af72;border-radius:8px;background:#6e2b2bf2;color:#fff5e8;box-shadow:0 3px 12px #6b242433;text-align:center;pointer-events:none;line-height:1.3;animation:damage-arrival .18s ease-out}
.damage-alert strong,.damage-alert span,.damage-alert b{display:block}.damage-alert strong{font-size:14px;font-weight:900}.damage-alert span{font-size:10px;margin:2px 0}.damage-alert b{font-size:11px;color:#ffd49e;font-weight:850}
@keyframes damage-arrival{from{opacity:.5;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
.game[data-reduced-motion=true] .damage-alert{animation:none}
@media(prefers-reduced-motion:reduce){.damage-alert{animation:none}}
@media(max-height:699px){.damage-alert{left:25px;right:25px;padding:5px 7px}.damage-alert strong{font-size:12px}.damage-alert span{font-size:9px}.damage-alert b{font-size:10px}}

/* Explanations occupy the waiting supply area; the target and front card row stay clear. */
#feedback-scene{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3}
.toast,.damage-alert,.difficulty-banner,.phase-banner{box-sizing:border-box;margin:0;overflow-y:auto;overflow-wrap:anywhere;overscroll-behavior:contain}
.toast{padding:7px 9px;font-size:11px;line-height:1.35}
.damage-alert{padding:7px 8px;border-radius:8px;animation:none}
.difficulty-banner{padding:7px 9px;animation:none;box-shadow:0 3px 8px #28594c33}
.difficulty-banner strong{font-size:25px;line-height:1.1;letter-spacing:1px;margin:3px 0}
.difficulty-banner small,.difficulty-banner span{font-size:10px;line-height:1.3}
.phase-banner{padding:9px 10px;line-height:1.35;z-index:5}
.restart-stage{padding:8px;min-height:44px;white-space:normal}
.result-panel,.result-panel.success,.result-panel.failure{padding:8px 10px;border-radius:10px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;animation:none;box-shadow:0 3px 12px #19384a33}
.result-panel.success::before,.result-panel.failure::before{position:absolute;left:9px;top:7px;margin:0;width:20px;height:20px;line-height:20px;font-size:16px;box-shadow:none}
.result-panel>span,.result-panel.success>span,.result-panel.failure>span{font-size:12px;line-height:1.3;padding:0 15px}
.result-panel>strong,.result-panel.success>strong,.result-panel.failure>strong{font-size:22px;line-height:1.15;margin:3px 0}
.result-panel p,.result-panel.failure p{font-size:12px;line-height:1.35;margin:3px 0}
.result-panel small,.result-panel.failure small{font-size:11px;line-height:1.35}
.result-time-bonus{margin:5px 0;color:#246c4c;background:#dfefdd;border-radius:5px;padding:3px 6px;font-weight:850;font-size:12px}
.result-panel .result-reward{padding:4px;margin:5px 0;font-size:11px;border-radius:5px}
.result-panel .result-detail{font-size:10px;line-height:1.4;margin:4px 0}
.result-panel .next-progress{margin-top:6px}
.result-panel #retry-button{position:sticky;bottom:0;min-height:44px;padding:8px;margin:6px 0 0;font-size:14px;z-index:1}
@media(max-height:699px){.damage-alert{padding:6px 7px}.damage-alert strong{font-size:12px}.damage-alert span{font-size:9px}.damage-alert b{font-size:10px}.difficulty-banner strong{font-size:22px}.result-panel,.result-panel.success,.result-panel.failure{padding:7px 8px}.result-panel.success>strong{font-size:20px}.result-panel .result-reward{font-size:10px}.result-panel .result-detail{font-size:9px}}

/* One study line: meaning, native reading and IPA. Keep the playfield quiet. */
.time-remaining{position:absolute;left:12px;top:41px;width:40px;font-size:13px;line-height:16px;font-weight:850;font-variant-numeric:tabular-nums;color:var(--study-ink)}
.challenge-timer{left:58px;top:45px}
.clue{top:57px;height:24px;gap:5px}
.word-reading-line{display:flex;align-items:center;gap:9px;min-width:0;flex:1;overflow-x:auto;white-space:nowrap;scrollbar-width:none}
.word-reading-line::-webkit-scrollbar{display:none}
.clue .meaning{display:block;flex:0 1 auto;min-width:20px;max-width:95px;max-height:none;white-space:nowrap;font-size:12px;line-height:18px;overflow:hidden;text-overflow:ellipsis}
.pronunciation{position:static;display:inline-flex;flex:0 0 auto;width:auto;height:24px;gap:6px;overflow:visible;white-space:nowrap;min-width:0}
.pronunciation strong{font-size:12px}.pronunciation span{font-size:11px}
#status,#phase-banner,#difficulty-description,.difficulty-banner small{display:none!important}
.difficulty-banner{padding:9px}.difficulty-banner strong{margin:0;font-size:24px}
.result-panel #result-sentence,.result-panel #result-detail,.result-panel #result-reward{display:none!important}
.result-panel.success{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}
.result-panel.success::before{display:none}.result-panel.success #result-label{display:none}
.result-panel.success #result-word{margin:0}.result-panel.success #result-meaning{font-size:12px}
.result-panel .result-time-bonus{margin:0;font-size:13px}
.result-panel.failure #result-label,.result-panel.failure #result-word,.result-panel.failure #result-sentence,.result-panel.failure #result-meaning,.result-panel.failure #result-detail,.result-panel.failure #result-reward{display:none!important}
.result-panel.failure{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}
.result-panel.failure::before{position:static;flex:0 0 30px;width:30px;height:30px;line-height:30px;font-size:23px}
.result-panel.failure #retry-button{position:static;flex:0 0 auto;margin:0;width:100%;min-height:44px}
@media(max-height:699px){.time-remaining{top:31px;font-size:12px}.challenge-timer{top:35px}.clue{top:47px;height:24px}.clue .meaning{font-size:11px;max-width:80px}.pronunciation{position:static;gap:6px;height:24px}.pronunciation strong{font-size:12px}.difficulty-banner strong{font-size:22px}}

/* yejit shares the result with the learned word, inside the waiting cards. */
.result-character{position:relative;flex:0 1 110px;width:110px;height:110px;min-height:0;margin:0;pointer-events:none;isolation:isolate}
.result-character::before{content:"";position:absolute;left:25%;right:25%;bottom:4%;height:7%;border-radius:50%;background:#365d641c}
.yejit-portrait{position:relative;z-index:1;display:block;width:100%;height:100%;object-fit:contain;image-rendering:pixelated;transform-origin:50% 85%}
.result-character[data-emotion=happy] .yejit-portrait{animation:yejit-celebrate 1.5s ease-in-out infinite}
.result-character[data-emotion=sad] .yejit-portrait{animation:yejit-sad-sway 3s ease-in-out infinite}
.yejit-spark{position:absolute;z-index:2;width:8px;height:8px;background:#e6ad4a;clip-path:polygon(50% 0,62% 36%,100% 50%,62% 64%,50% 100%,38% 64%,0 50%,38% 36%);animation:yejit-twinkle 1.5s ease-in-out infinite}
.yejit-spark:nth-of-type(1){left:9%;top:19%;animation-delay:-.15s}
.yejit-spark:nth-of-type(2){right:4%;top:12%;width:10px;height:10px;animation-delay:-.65s}
.yejit-spark:nth-of-type(3){right:8%;bottom:18%;width:6px;height:6px;animation-delay:-1.1s}
.result-character[data-emotion=sad] .yejit-spark{display:none}
.result-panel[data-character-visible=true]::before{display:none}
.result-panel.success[data-character-visible=true]{display:grid;grid-template-columns:minmax(68px,.8fr) minmax(0,1.2fr);grid-template-rows:auto auto auto 6px;align-content:center;align-items:center;column-gap:8px;row-gap:4px}
.result-panel.success[data-character-visible=true] #result-character{grid-column:1;grid-row:1 / 4;justify-self:center;align-self:center;width:100%;max-width:116px;height:110px}
.result-panel.success[data-character-visible=true] #result-word{grid-column:2;grid-row:1;width:100%;font-size:clamp(17px,4.8vw,22px);line-height:1.1;min-width:0}
.result-panel.success[data-character-visible=true] #result-meaning{grid-column:2;grid-row:2;min-width:0;overflow-wrap:anywhere}
.result-panel.success[data-character-visible=true] #result-time-bonus{grid-column:2;grid-row:3;justify-self:center;font-size:12px;max-width:100%;overflow-wrap:anywhere}
.result-panel.success[data-character-visible=true] .next-progress{grid-column:1 / -1;grid-row:4;width:100%;height:4px;margin:2px 0 0;min-width:0}
.result-panel.failure[data-character-visible=true]{gap:8px}
.result-panel.failure[data-character-visible=true] #retry-button{flex:0 0 44px}
@keyframes yejit-celebrate{0%,46%,100%{transform:translateY(0) rotate(-2deg)}20%{transform:translateY(-5px) rotate(3deg)}29%{transform:translateY(0) scale(1.035,.975)}70%{transform:translateY(-3px) rotate(2deg)}}
@keyframes yejit-sad-sway{0%,100%{transform:translateY(1px) rotate(-1.5deg)}50%{transform:translateY(0) rotate(1deg)}}
@keyframes yejit-twinkle{0%,100%{opacity:.25;transform:scale(.7)}45%{opacity:1;transform:scale(1.1)}}
@media(max-height:699px){.result-character{flex-basis:82px;width:82px;height:82px}.result-panel.success[data-character-visible=true] #result-character{height:82px;max-width:94px}.result-panel.success[data-character-visible=true] #result-word{font-size:18px}.result-panel.success[data-character-visible=true] #result-time-bonus{font-size:11px}.result-panel.failure[data-character-visible=true]{gap:6px}}
.game[data-reduced-motion=true] .yejit-portrait,.game[data-reduced-motion=true] .yejit-spark{animation:none!important}
@media(prefers-reduced-motion:reduce){.yejit-portrait,.yejit-spark{animation:none!important}}

/* Keep the revealed spelling at its original right edge. A floated first row
   lets an over-wide pronunciation move below it instead of covering letters. */
.clue{top:57px;height:40px;align-items:flex-start}
.clue .audio-button{flex:0 0 30px;height:28px}
.clue #word-image{flex:0 0 28px}
.clue .word-reading-line{display:block;flex:1;min-width:0;height:40px;overflow:visible;white-space:normal;font-size:0;line-height:14px}
.clue #letters{position:static;float:right;display:block;width:auto;height:24px;max-width:60%;margin:0 0 0 8px;font-size:18px;line-height:24px;letter-spacing:.3px;text-align:right;white-space:nowrap}
.clue #letters.long{font-size:13px;letter-spacing:0}
.clue .meaning{display:inline-block;max-width:min(95px,35%);min-width:0;font-size:12px;line-height:14px;height:14px;vertical-align:top}
.clue .pronunciation{display:inline-flex;position:static;width:max-content;max-width:100%;height:14px;margin:0 0 0 8px;padding:0;line-height:14px;vertical-align:top;gap:5px;white-space:nowrap}
.clue .pronunciation strong{font-size:12px;line-height:14px}
.clue .pronunciation span{font-size:11px;line-height:14px}
.game[data-mode=falling] #letters,.game[data-mode=falling] #pronunciation-button{display:none!important}
@media(max-height:699px){.clue{top:47px}.clue .audio-button{flex-basis:26px;height:24px}.clue #word-image{flex-basis:22px}.clue #letters{font-size:16px}.clue #letters.long{font-size:12px}.clue .meaning{font-size:11px}.clue .pronunciation strong{font-size:11px}.clue .pronunciation span{font-size:10px}}
