/* Fine shaded game surfaces. Layout remains in normal flow at every zoom level. */
:root{--adventure-blue:#48b7ff;--adventure-purple:#bd80ff;--adventure-edge:#2775b8;--adventure-panel:#071c35;--adventure-cut:polygon(12px 0,calc(100% - 12px) 0,100% 12px,100% calc(100% - 12px),calc(100% - 12px) 100%,12px 100%,0 calc(100% - 12px),0 12px)}
body{background:radial-gradient(ellipse at 50% 0,#123459 0,transparent 60%),#04152a;color:#f2f7ff;font:16px/1.55 Arial,system-ui,sans-serif}
header{background:linear-gradient(110deg,#061b32,#092745 55%,#061b32);border-bottom:2px solid #2f81c4;box-shadow:0 3px 0 #041022,0 5px 0 #164872;padding:14px max(18px,calc((100vw - 1540px)/2));gap:14px}
.header-main{gap:10px 12px}.header-main .brand.brand-logo{width:360px!important;flex-basis:360px;height:90px;margin-right:auto}.brand.brand-logo img{width:360px!important;top:-26px!important}
.header-main .header-controls{order:5;width:100%;justify-content:flex-end;padding:0;gap:16px;font-size:14px}.header-main .preview-tag{display:none}
button,.website-link{position:relative;border:2px solid #3898e3;border-radius:12px;background:linear-gradient(180deg,#285e91 0,#174572 42%,#103153 100%);color:#f7fbff;clip-path:none;box-shadow:inset 0 2px 0 #99d8ff99,inset 0 0 0 3px #062346,inset 0 -5px 0 #071b33,0 3px 0 #020c19;min-height:44px;padding:11px 18px;font:700 15px/1.45 Arial,sans-serif;transition:background .15s,border-color .15s,box-shadow .15s,transform .15s;text-shadow:0 1px 1px #061b32}
button:hover:not(:disabled),.website-link:hover{background:linear-gradient(#3478b5,#174675);border-color:#86d4ff;box-shadow:inset 0 2px #c5edff99,inset 0 0 0 3px #10385c,inset 0 -5px #082346,0 3px #020c19}
button:active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 0 0 3px #062346,inset 0 3px #082346,0 1px #020c19}
button:focus-visible,.website-link:focus-visible{outline:3px solid #fff;outline-offset:3px;box-shadow:inset 0 0 0 3px #062346}
button:disabled{opacity:.55;cursor:not-allowed;background:linear-gradient(#284464,#152c46);border-color:#50708f;box-shadow:inset 0 0 0 3px #0b213a;text-shadow:none}
button.primary{color:#fff;background:linear-gradient(#299dff,#0870d9 55%,#0854a7);border-color:#83d3ff;box-shadow:inset 0 2px #d2f2ff99,inset 0 0 0 3px #0966b5,inset 0 -5px #063d83,0 3px #03162c}
.course-menu{justify-content:center;gap:0;max-width:100%;margin:0;align-items:stretch}.course-menu button{flex:0 1 250px;min-height:64px;padding:15px 26px;font:700 20px/1.3 Arial,sans-serif;border-width:3px;border-radius:16px 16px 5px 5px;box-shadow:inset 0 3px #95d9ff88,inset 0 0 0 3px #052343,inset 0 -5px #061b33;z-index:1;margin-right:-2px;letter-spacing:0}
.course-menu button[aria-pressed=true]{background:linear-gradient(#994ae7,#7130c4 45%,#4b198e);border-color:#d29cff;color:#fff;box-shadow:inset 0 3px #f5d8ff99,inset 0 0 0 3px #582597,inset 0 -5px #32115f,0 0 16px #b064ff22;z-index:2}
.course-menu button:disabled{opacity:.65}.course-menu .note{flex:1 0 100%;text-align:center;margin:10px 0 0;color:#b3d5ef;font-size:14px}
.reading-status{display:block;font-size:12px;font-weight:400;margin-top:2px;color:#bad4e9}
.target .translation-arabic,.target .translation-arabic:hover:not(:disabled),.target .translation-arabic:disabled{background:transparent;box-shadow:none;border:0;border-radius:0;padding:0;min-height:0;opacity:1;text-shadow:none;font:inherit;color:inherit;transform:none}
.target .translation-arabic:focus-visible{outline:2px solid #aadfff;outline-offset:3px}
.workspace{max-width:1560px;grid-template-columns:300px minmax(0,1fr);padding:24px 18px;gap:20px}.workspace .practice-panel{padding:22px;gap:14px}
.lesson-sidebar,.practice-panel,.panel{background:linear-gradient(150deg,#0a2849,#071b33 70%);border:2px solid #2872b4;border-radius:16px;box-shadow:inset 0 0 0 4px #04172c,inset 0 5px #54b4f733,0 5px #020d1a}
.lesson-sidebar{padding:22px 18px}.lesson-sidebar h1{font:700 23px/1.35 Arial,sans-serif;color:#fff;margin:0 0 6px}.sidebar-note{font-size:16px;color:#b6d9f4;margin-bottom:22px}
.lesson-menu{gap:12px}.lesson-menu button{padding:16px 15px;font-size:16px;border-radius:12px}.lesson-menu small{color:#bcd9f3;font-size:14px;margin-top:5px;line-height:1.4}
.lesson-menu button[aria-current=step]{background:linear-gradient(#9446dc,#672cad 50%,#462073);border-color:#c991ff;box-shadow:inset 0 2px #ead0ff99,inset 0 0 0 3px #562890,inset 0 -5px #30134f,0 3px #020c19;color:#fff}
.lesson-menu button[aria-current=step] small{color:#ecdaff}.lesson-brief{border-top:1px solid #297bb6;padding-top:18px;margin-top:22px}.eyebrow,.lesson-brief .eyebrow{font-size:14px;color:#89d0ff;letter-spacing:.03em}.lesson-brief p{margin:8px 0 14px}.lesson-brief button{width:100%;margin-top:8px}.preview-note{color:#8fb4d4;line-height:1.6}
.drill-heading h2{font:700 clamp(23px,2.2vw,30px)/1.3 Arial,sans-serif}.drill-heading .eyebrow{color:#9ac6e8}#description{font-size:16px;color:#bfd6eb;line-height:1.6}
.steps{gap:10px}.drill-choice{min-height:56px;border-radius:12px;font-size:16px;padding:13px}.drill-choice.selected{background:linear-gradient(#9849e3,#6d2dbb 50%,#4c1986);color:#fff;border-color:#cf99ff;box-shadow:inset 0 2px #edceff99,inset 0 0 0 3px #602697,inset 0 -5px #37115f}
.drill-choice.completed:not(.selected){border-color:#79ceff;color:#e1f5ff}
.preview-controls{gap:10px;padding:0;align-items:stretch}.preview-controls label{flex:1 1 200px;justify-content:space-between;flex-direction:row-reverse;font-size:14px;font-weight:600;padding:12px 15px;min-height:50px;border:1px solid #3188ce;border-radius:10px;background:linear-gradient(#1a4772,#113152);box-shadow:inset 0 1px #91c8ee55}
.preview-controls label:has(input:checked){border-color:#60c3ff;background:linear-gradient(#1c5a92,#123e67)}
input[type=checkbox]{appearance:none;width:40px;height:24px;border-radius:20px;background:#49617b;border:1px solid #7991a9;position:relative;margin:0;flex:0 0 40px;box-shadow:inset 0 2px 4px #0005;cursor:pointer}
input[type=checkbox]::after{content:'';position:absolute;width:18px;height:18px;left:2px;top:2px;background:linear-gradient(#fff,#cbd9e7);border-radius:50%;box-shadow:0 1px 3px #0008;transition:transform .15s}
input[type=checkbox]:checked{background:#078fe5;border-color:#91d9ff}input[type=checkbox]:checked::after{transform:translateX(16px)}input[type=checkbox]:focus-visible{outline:3px solid #fff;outline-offset:3px}input[type=checkbox]:disabled{opacity:.55}
.preview-controls>button{flex:0 1 auto;padding:9px 14px}.preview-controls .audio-status{align-self:center;color:#a6c6e1;font-size:14px}
.practice-area{border:3px solid #65c4ff;border-radius:15px;box-shadow:inset 0 0 0 4px #0d5085,inset 0 0 0 7px #04172c,0 4px #041020;background:linear-gradient(130deg,#0a2849,#051a31);min-height:320px}
.practice-area:focus-within{border-color:#91d9ff;box-shadow:inset 0 0 0 4px #1d679e,inset 0 0 0 7px #04172c,0 4px #041020}
.practice-topline{padding:17px 20px 12px;border-bottom:1px solid #22527a}.practice-label{color:#b9d8ed}.practice-instructions .translation-hint{color:#cce9ff;font-size:14px}.next-letter-guide bdi{border-radius:8px;border:1px solid #70c7ff;background:linear-gradient(#226092,#113958);color:#fff}
.practice-area .target.dialogue-target{font:calc(33px * var(--typing-font-scale,1))/1.95 Arial,sans-serif;padding:18px 22px 24px}.target .dialogue-speaker{color:#57cfff;font:700 22px/1.8 Arial,sans-serif;max-width:30%;min-width:64px}.dialogue-turn{border:0;padding:5px 0;gap:18px}.dialogue-turn:nth-child(even) .dialogue-speaker{color:#f0b054}
.practice-area:not(.is-typing):not(.is-complete) .target{opacity:.52;filter:none}.target .correct{color:#9cdeff}.target .wrong{color:#ff949d;background:#76283d66}.target .partial{color:#ffd08b}.target .current{background:#18588a;color:#fff;border-color:#79d0ff}.target .word-gloss{color:#ecd1ff;font:14px/1.6 Arial,sans-serif}
.start-overlay{background:linear-gradient(#2779b8,#164575);border:2px solid #7bcfff;border-radius:12px;clip-path:none;font-size:16px;box-shadow:inset 0 0 0 3px #103451,0 4px 20px #0008;min-height:54px}
.key{height:48px;border:1px solid #4da7e9;border-radius:8px;clip-path:none;background:linear-gradient(#205788,#123759);box-shadow:inset 0 1px #8dd2ff88,inset 0 0 0 2px #0b2847,inset 0 -4px #061b32;min-height:0;font:24px/1.2 Arial,sans-serif;padding:0;flex:1;overflow:hidden}
.key.next{background:linear-gradient(#35b9ff,#008de9);border-color:#c3efff;color:#fff;box-shadow:inset 0 1px #fff9,inset 0 -4px #0760a6,0 0 10px #159aff44}.key.next small{color:#fff}.key small{font-size:12px;color:#bdd7ed}.key.home{border-bottom:3px solid #96cae9}.key.space,.shift-key{height:35px;font:14px/1.2 Arial,sans-serif}.key-mark{right:3px}.keyboard-note{color:#9abdd7;font-size:14px!important;line-height:1.5}
.bottom-bar{border-top:1px solid #297bb6;padding-top:17px;gap:16px}.lesson-progress strong{font:700 21px/1.4 Arial,sans-serif;color:#c5eaff}.lesson-progress span{font-size:14px;color:#a9c8e1}.bottom-bar .actions button{font-size:14px;padding:11px 14px;border-radius:9px}.bottom-bar .actions #check{background:linear-gradient(#994fe0,#6424ab);border-color:#c99aff;box-shadow:inset 0 2px #f0ceff77,inset 0 0 0 2px #562388,inset 0 -4px #351253}.bottom-bar .actions #repeat{border-color:#4da7e9}
.practice-meter{margin-top:12px}.practice-meter label{display:flex;justify-content:space-between;gap:12px;font-size:14px;color:#c4e5ff}.practice-meter progress{appearance:none;display:block;width:100%;height:17px;margin-top:8px;border:2px solid #57baff;border-radius:8px;overflow:hidden;background:#0c2946;padding:2px}.practice-meter progress::-webkit-progress-bar{background:#0c2946;border-radius:5px}.practice-meter progress::-webkit-progress-value{background:linear-gradient(#51ccff,#109de9);border-radius:4px;box-shadow:inset 0 1px #b0edff}.practice-meter progress::-moz-progress-bar{background:linear-gradient(#51ccff,#109de9);border-radius:4px}
.language-warning{border-radius:12px;border-color:#f4778f;background:linear-gradient(#48253a,#301d2c);color:#ffd4dd;padding:16px}.feedback #result:not(:empty){padding:12px 15px;border:1px solid #5facdf;border-radius:10px;background:#103656;color:#c8efff;line-height:1.65}
dialog{border:2px solid #5fbbfa;border-radius:16px;background:linear-gradient(#0d2c4b,#071a31);box-shadow:inset 0 0 0 4px #041426,0 15px 70px #000a;padding:25px}dialog::backdrop{background:#020d21bb;backdrop-filter:blur(4px)}dialog h2{font:700 25px/1.4 Arial,sans-serif}dialog h3{color:#c4e6ff}.dialog-head{border-bottom:1px solid #3284bb!important}.belt-note,.belt-order li,.check-parts article,.answer-correction{border-radius:10px}.check-parts article{background:linear-gradient(#153b60,#0b2642);border-color:#338ace}.belt-art{background:#05182a}.rank-tabs button[aria-selected=true]{background:linear-gradient(#9245d7,#56268f);border-color:#c390ff;color:#fff}.name-form input,textarea.listen-only-input,.response-question textarea{border-radius:10px;border:1px solid #56aeec;background:#061b32;color:#fff}
.entry-screen{max-width:980px;margin:32px auto;padding:0 18px}.entry-screen .panel{padding:32px}.entry-screen h1{font:700 clamp(25px,3vw,34px)/1.35 Arial,sans-serif}.entry-screen .check-parts h2{font:700 20px/1.4 Arial,sans-serif}.entry-screen .eyebrow{color:#cd9eff}
body.typing-course-view header{background:linear-gradient(#0b2c4e,#071b32)}body.typing-course-view .guidance-row .hand-guidance{display:block}body.typing-course-view h1,body.typing-course-view h2{font-family:Arial,sans-serif}body.typing-course-view .practice-area .target{font-family:Arial,sans-serif;padding:18px 20px}body.typing-course-view .stats{display:flex;flex-wrap:wrap}
@media(max-width:1150px){.workspace{grid-template-columns:250px minmax(0,1fr);gap:15px}.workspace .practice-panel{padding:17px}.header-main .brand.brand-logo{margin-right:auto}.course-menu button{flex:1 1 180px;max-width:270px}.bottom-bar .actions{margin-left:0}}
@media(max-width:800px){header{padding:12px 14px}.workspace{grid-template-columns:1fr;padding:18px 12px}.lesson-sidebar .lesson-menu{grid-template-columns:repeat(3,minmax(0,1fr))}.lesson-menu button{font-size:15px;padding:13px}.lesson-brief{display:block}.lesson-brief button{width:auto}.practice-area .target.dialogue-target{font-size:calc(29px * var(--typing-font-scale,1))}.header-main .header-controls{justify-content:flex-start}.course-menu button{font-size:18px;padding:15px 16px}.preview-controls label{flex-basis:180px}.practice-meter{max-width:500px}}
@media(max-width:550px){header{padding:10px;gap:12px}.header-main .brand.brand-logo{width:270px!important;flex-basis:270px;height:70px}.brand.brand-logo img{width:270px!important;top:-19px!important}.header-main>button{flex:1 1 125px;font-size:14px;padding:10px}.course-menu{gap:7px}.course-menu button{border-radius:10px;margin:0;flex:1 1 110px;min-height:58px;font-size:16px;padding:12px 10px;border-width:2px}.course-menu .note{margin:3px 0 0}.workspace{padding:12px 8px}.workspace .practice-panel{padding:12px}.lesson-sidebar{padding:18px 14px}.lesson-sidebar .lesson-menu{grid-template-columns:1fr}.lesson-menu button{font-size:16px}.drill-heading h2{font-size:23px}.preview-controls label{flex:1 1 155px;font-size:14px;padding:10px}.drill-choice{font-size:15px;flex-basis:125px}.practice-topline{padding:13px;gap:10px}.practice-area .target.dialogue-target{font-size:calc(25px * var(--typing-font-scale,1));padding:14px 12px 20px}.target .dialogue-speaker{font-size:18px;min-width:48px}.dialogue-turn{gap:10px}.key{height:40px;border-radius:5px;font-size:20px;box-shadow:inset 0 1px #8dd2ff88,inset 0 -3px #061b32}.key small{display:none}.key.space,.shift-key{height:32px;font-size:12px}.bottom-bar .actions button{flex:1 1 130px}.entry-screen{margin:20px auto;padding:0 10px}.entry-screen .panel{padding:22px}.lesson-brief button{width:100%}dialog{padding:20px}}
@media(max-width:340px){.header-main .brand.brand-logo{width:230px!important;flex-basis:230px;height:60px}.brand.brand-logo img{width:230px!important;top:-16px!important}.key{font-size:16px}.key-mark,.key-vowel{display:none}.course-menu button{flex-basis:100%;max-width:none}.preview-controls label{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}
/* Compact curriculum header: learning navigation stays close to the workspace. */
body.curriculum-view header{padding:8px max(18px,calc((100vw - 1540px)/2)) 12px;gap:8px;position:relative;z-index:10}
.curriculum-view .header-main{justify-content:space-between;gap:10px 20px}
.curriculum-view .header-main .brand.brand-logo{width:320px!important;flex-basis:320px;height:78px;margin-right:auto}
.curriculum-view .brand.brand-logo img{width:320px!important;top:-23px!important}
.header-utilities{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;min-width:0}
.header-utilities>button{font-size:14px;padding:10px 15px;min-height:44px}
.curriculum-view .course-menu{justify-content:flex-start;align-items:stretch;gap:0}
.curriculum-view .course-menu button{flex:0 1 215px;min-height:56px;max-width:none;padding:10px 20px;font-size:18px;border-width:2px;border-radius:12px 12px 5px 5px}
.curriculum-view .course-menu .note{flex:1 1 230px;text-align:right;align-self:center;margin:0 0 0 24px;font-size:14px}
.curriculum-view .workspace{padding-top:18px}
.profile-disclosure{position:relative;min-width:0}
.profile-disclosure summary{list-style:none;cursor:pointer;border:2px solid #3898e3;border-radius:12px;background:linear-gradient(#285e91,#103153);color:#fff;box-shadow:inset 0 2px #99d8ff99,inset 0 0 0 3px #062346,inset 0 -5px #071b33,0 3px #020c19;padding:10px 15px;min-height:44px;font:700 14px/1.45 Arial,sans-serif;display:flex;align-items:center;gap:12px}
.profile-disclosure summary::-webkit-details-marker{display:none}
.profile-disclosure summary::after{content:'+';font-size:19px;line-height:1;color:#b8ddff}
.profile-disclosure[open] summary{border-color:#ce99ff;background:linear-gradient(#8645c8,#492077)}
.profile-disclosure[open] summary::after{content:'−'}
.profile-disclosure summary:hover{border-color:#9ddfff}
.profile-disclosure summary:focus-visible{outline:3px solid white;outline-offset:3px}
.profile-dropdown{position:absolute;right:0;top:calc(100% + 10px);width:320px;max-width:calc(100vw - 24px);z-index:40;padding:18px;border:2px solid #5fbbfa;border-radius:14px;background:linear-gradient(#123658,#061b32);box-shadow:inset 0 0 0 3px #05162b,0 12px 35px #0009;max-height:calc(100dvh - 100px);overflow:auto}
.profile-section-label{font-size:14px;color:#bfdcf2;margin:0 0 12px;font-weight:700}
.profile-dropdown #student-questions{width:100%;text-align:left;border-color:#bd84f3;font-size:16px;padding:12px 14px}
.profile-dropdown #student-questions small{display:block;font-size:14px;font-weight:400;color:#d5e1f4;margin-top:4px}
.profile-settings{border-top:1px solid #377cb4;margin-top:18px;padding-top:16px}
.profile-dropdown .header-controls{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:16px;margin:0;padding:0;width:100%;order:0}
.profile-dropdown .text-size-controls{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px}
.profile-dropdown .text-size-controls button{min-width:40px;padding:6px 10px}
.profile-dropdown .sound-option{display:flex;justify-content:space-between;flex-direction:row-reverse;gap:12px;white-space:normal}
@media(max-width:800px){.curriculum-view .header-main .brand.brand-logo{flex-basis:280px;width:280px!important;height:70px}.curriculum-view .brand.brand-logo img{width:280px!important;top:-20px!important}.header-utilities{gap:8px}.header-utilities>button,.profile-disclosure summary{padding:9px 12px}.curriculum-view .course-menu button{flex:1 1 150px;font-size:17px}.curriculum-view .course-menu .note{flex:1 1 100%;text-align:left;margin:8px 0 0}}
@media(max-width:550px){.curriculum-view header{padding:8px 10px 12px;gap:12px}.curriculum-view .header-main{gap:10px}.curriculum-view .header-main .brand.brand-logo{width:270px!important;flex-basis:270px;height:70px}.curriculum-view .brand.brand-logo img{width:270px!important;top:-19px!important}.header-utilities{width:100%;justify-content:stretch;gap:8px}.header-utilities>button,.profile-disclosure{flex:1 1 100px}.profile-disclosure summary{justify-content:center}.curriculum-view .course-menu{gap:6px}.curriculum-view .course-menu button{flex:1 1 105px;min-height:54px;margin:0;padding:10px 8px;font-size:16px;border-radius:9px}.profile-dropdown{right:0}.curriculum-view .workspace{padding-top:14px}}
@media(max-width:340px){.curriculum-view .header-main .brand.brand-logo{width:230px!important;flex-basis:230px;height:60px}.curriculum-view .brand.brand-logo img{width:230px!important;top:-16px!important}.header-utilities>button,.profile-disclosure summary{font-size:13px}.curriculum-view .course-menu button{flex-basis:100%}}
/* Keyboard and live finger cues precede the dialogue in both learning views. */
.guidance-row{order:5;display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:18px;align-items:center;padding:14px;border:1px solid #287bb7;border-radius:13px;background:linear-gradient(130deg,#0e3255,#071d35);box-shadow:inset 0 1px #7ecaff33;margin:0}
.practice-area{order:6}.feedback{order:7}.bottom-bar{order:8}
.guidance-row .hand-guidance,body.typing-course-view .guidance-row .hand-guidance{display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:10px;padding:12px;border:1px solid #388bc6;border-radius:12px;background:linear-gradient(#16436c,#0a2947);box-shadow:inset 0 1px #9bd8ff44;min-width:0}
.finger-guide-title{margin:0;font-size:14px;font-weight:700;color:#d0edff;text-align:center}
.hand-guidance .hands{display:flex;align-items:end;justify-content:center;gap:12px;max-width:100%}
.hand-guidance .hand-unit{width:95px;min-width:0;color:#c5dff5;font-size:14px;text-align:center}
.hand-guidance .hand-unit svg{width:100%;height:90px;overflow:visible;display:block;margin:0 auto 4px}
.hand-guidance .palm{fill:#14416b;stroke:#75b8e7;stroke-width:3}
.hand-guidance .hand-finger{fill:#1b4c76;stroke:#75b8e7;stroke-width:3;stroke-linejoin:round;stroke-linecap:round;transition:fill .1s,stroke .1s}
.hand-guidance .hand-finger.active-finger{fill:#aa64ed;stroke:#ecd4ff;stroke-width:4;filter:drop-shadow(0 0 4px #aa64ed99)}
.hand-guidance .hand-hint{margin:0;min-height:42px;max-width:none;color:#d7eeff;font-size:14px;line-height:1.5;text-align:center;background:#061a2b66;padding:8px;border-radius:7px;overflow-wrap:anywhere}
.guidance-row .keyboard-note{margin:8px 0 0!important;font-size:14px!important}
body.typing-course-view .guidance-row{grid-template-columns:minmax(0,1fr) 240px}
@media(max-width:1100px){.guidance-row,body.typing-course-view .guidance-row{grid-template-columns:minmax(0,1fr);gap:12px}.guidance-row .hand-guidance,body.typing-course-view .guidance-row .hand-guidance{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 18px;align-items:center;padding:10px 14px}.finger-guide-title{grid-column:1/-1;text-align:left}.hand-guidance .hand-hint{min-height:0;text-align:left}.hand-guidance .hand-unit svg{height:72px}.hand-guidance .hand-unit{width:85px}}
@media(max-width:550px){.guidance-row{padding:10px;gap:10px}.guidance-row .hand-guidance,body.typing-course-view .guidance-row .hand-guidance{grid-template-columns:minmax(0,1fr);padding:12px}.finger-guide-title{text-align:center}.hand-guidance .hand-hint{text-align:center}.hand-guidance .hand-unit{width:100px}.hand-guidance .hand-unit svg{height:80px}.hand-guidance .hands{gap:20px}.guidance-row .keyboard-note{font-size:13px!important}}
.belt-progress-widget{display:grid;grid-template-columns:66px minmax(0,1fr);gap:12px;align-items:center;padding:16px 0 4px;border-top:1px solid #297bb6;margin-top:22px;position:relative}
.progress-belt{width:66px;height:auto;max-width:100%;display:block;filter:drop-shadow(0 2px 1px #020d1b)}
.progress-details{min-width:0}.belt-progress-widget label{font-size:15px;font-weight:700;color:#eef8ff;gap:6px;align-items:center}.belt-progress-widget output{font-size:13px;font-weight:400;color:#9acff0}.progress-details>small{display:block;font-size:13px;color:#9cbed9;margin-top:7px}
.progress-segments{display:flex;gap:3px;margin-top:9px;border:2px solid #54bcff;border-radius:9px;padding:3px;background:#04162c;box-shadow:inset 0 1px #afe8ff66,0 2px #020d1b;min-width:0}
.progress-segment{position:relative;display:block;flex:1;min-width:0;height:17px;border-radius:4px;overflow:hidden;background:linear-gradient(#234d78,#163657);box-shadow:inset 0 1px #68a8d94d}
.progress-segment i{display:block;width:var(--segment-fill,0%);height:100%;background:linear-gradient(#47c9ff,#079ce8);box-shadow:inset 0 1px #bcf0ff99,inset 0 -2px #066aa7;border-radius:3px;transition:width .12s}
.practice-meter .accessible-progress{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;margin:0;border:0}
@media(max-width:800px){.belt-progress-widget{max-width:380px}}
@media(prefers-reduced-motion:reduce){.progress-segment i{transition:none}}
/* Keep optional aids compact and remove repeated visual instruction copy. */
.hand-guidance .hand-hint{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;margin:-1px!important;border:0!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap}
.guidance-row .hand-guidance,body.typing-course-view .guidance-row .hand-guidance{display:flex;flex-direction:column;justify-content:center;gap:0;padding:12px}
.preview-controls label{flex:0 1 230px;max-width:100%;width:230px;min-width:0}
.keyboard-help{order:4;margin:0;max-width:100%}
body.typing-course-view .keyboard-help .guide-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;padding:11px 18px;font:700 14px/1.45 Arial,sans-serif;text-align:center;text-decoration:none;border:2px solid #3898e3;border-radius:10px;background:linear-gradient(#285e91,#103153);color:#eef8ff;box-shadow:inset 0 2px #99d8ff99,inset 0 0 0 3px #062346,inset 0 -4px #071b33,0 3px #020c19;white-space:normal}
body.typing-course-view .keyboard-help .guide-link:hover{border-color:#9addff;background:linear-gradient(#3478b5,#174675)}
#keyboard-guide .guide-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-bottom:16px;margin-bottom:20px;border-bottom:1px solid #3284bb}
#keyboard-guide h3{font-size:18px;margin-top:24px;color:#b9e1ff}
#keyboard-guide p{font-size:16px;color:#c7dff1;line-height:1.7}
@media(max-width:550px){.preview-controls label{flex:0 1 230px;width:230px;max-width:100%}.hand-guidance .hand-unit svg{height:76px}}
/* Four equal compact switches; audio uses its own short line. */
.preview-controls{align-items:center;gap:10px}
.toggle-row{flex:1 0 100%;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;min-width:0;max-width:100%;align-items:stretch}
.preview-controls .toggle-row label{width:auto;max-width:none;min-width:0;min-height:50px;margin:0;padding:10px 14px;gap:10px;line-height:1.4;font-size:14px;display:flex;align-items:center;justify-content:space-between;flex-direction:row-reverse}
.preview-controls>button{min-height:40px;padding:8px 14px}
.preview-controls .audio-status{margin:0}
@media(max-width:1100px){.toggle-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:550px){.toggle-row{gap:8px}.preview-controls .toggle-row label{padding:10px 12px}}
@media(max-width:380px){.toggle-row{grid-template-columns:minmax(0,1fr)}}

/* Practice feedback colours override theme and current-character styling. */
.practice-area .target .correct,.practice-area .target .vowel-mark.correct{color:#70e3a6}
.practice-area .target .partial,.practice-area .target .partial.current{color:#ffd166;background:#66501955;border-color:#ffd166}
.practice-instructions .translation-hint{color:#ffd166;border-color:#bd873f;background:#4a341c55}
.practice-panel .drill-heading{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:4px 16px}
.practice-panel .drill-heading>.eyebrow,.practice-panel .drill-heading>h2{grid-column:1}
.practice-panel .drill-heading>.practice-sound-toggle{grid-column:2;grid-row:1/3;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0;padding:10px 14px;min-height:50px;border:1px solid #3188ce;border-radius:10px;background:linear-gradient(#1a4772,#113152);box-shadow:inset 0 1px #91c8ee55;font:600 14px/1.4 Arial,sans-serif;color:#e8f3ff}
.practice-panel .practice-sound-toggle:has(input:checked){border-color:#60c3ff;background:linear-gradient(#1c5a92,#123e67)}
@media(max-width:550px){.practice-panel .drill-heading{grid-template-columns:minmax(0,1fr)}.practice-panel .drill-heading>.practice-sound-toggle{grid-column:1;grid-row:auto;justify-self:start}}

.input-line-break{display:block}.listen-check[hidden]{display:none!important}

/* Text-size controls beside sounds in each practice window. */
.practice-panel .drill-heading>.practice-tools{grid-column:2;grid-row:1/3;display:flex;align-items:stretch;flex-wrap:wrap;gap:10px;min-width:0;max-width:100%}
.practice-panel .practice-tools .practice-sound-toggle,.practice-panel .practice-tools .practice-font-controls{display:flex;align-items:center;gap:9px;margin:0;padding:8px 12px;min-height:50px;border:1px solid #3188ce;border-radius:10px;background:linear-gradient(#1a4772,#113152);box-shadow:inset 0 1px #91c8ee55;font:600 14px/1.4 Arial,sans-serif;color:#e8f3ff}
.practice-panel .practice-tools .practice-sound-toggle{justify-content:space-between}
.practice-panel .practice-font-controls button{min-width:36px;padding:5px 8px;line-height:1.4;font-size:16px}
.practice-panel .practice-font-controls output{min-width:44px;text-align:center}
.practice-panel .practice-font-controls>span{white-space:nowrap}
.practice-area .target .dialogue-speaker{font-size:calc(22px * var(--typing-font-scale,1))}
@media(max-width:900px){.practice-panel .drill-heading{grid-template-columns:minmax(0,1fr)}.practice-panel .drill-heading>.practice-tools{grid-column:1;grid-row:auto;justify-self:start}}
@media(max-width:550px){.practice-area .target .dialogue-speaker{font-size:calc(18px * var(--typing-font-scale,1))}.practice-panel .practice-tools{width:100%}.practice-panel .practice-tools .practice-font-controls,.practice-panel .practice-tools .practice-sound-toggle{flex:1 1 190px;justify-content:space-between}}

/* Replay controls stay beside the practice, below guidance. */
.practice-panel .dialogue-audio-player{order:5;display:flex;flex-wrap:wrap;align-items:center;gap:16px;width:100%;min-width:0;flex-shrink:0;padding:12px 16px;border:1px solid #3188ce;border-radius:12px;background:linear-gradient(#173f65,#102e4b);box-shadow:inset 0 1px #91c8ee55;direction:ltr}
.audio-player-buttons{display:flex;gap:8px;flex-shrink:0;flex-wrap:wrap}
.audio-autoplay-toggle{display:flex;align-items:center;gap:10px;min-height:40px;padding:6px 10px;border:1px solid #3188ce;border-radius:9px;background:linear-gradient(#1a4772,#113152);font:600 14px/1.4 Arial,sans-serif;color:#e8f3ff;cursor:pointer}
.practice-panel .audio-player-buttons button{min-height:40px;min-width:55px;padding:7px 11px;font:600 14px/1.4 Arial,sans-serif}
.practice-panel #audio-toggle{min-width:70px}
.audio-player-timeline{flex:1;min-width:0}
.audio-player-times{display:flex;justify-content:space-between;color:#c9e3f7;font:13px/1.4 Arial,sans-serif;font-variant-numeric:tabular-nums;margin-top:3px}
#audio-seek{display:block;appearance:none;width:100%;height:10px;margin:8px 0;cursor:pointer;border:1px solid #4886b6;border-radius:8px;background:linear-gradient(to right,#31b8fb var(--audio-progress,0%),#071e33 var(--audio-progress,0%));accent-color:#39baff}
#audio-seek::-webkit-slider-thumb{appearance:none;width:18px;height:18px;border:2px solid #d4efff;border-radius:50%;background:#27a7ed;box-shadow:0 2px 4px #0006}
#audio-seek::-moz-range-thumb{width:15px;height:15px;border:2px solid #d4efff;border-radius:50%;background:#27a7ed}
#audio-seek:focus-visible{outline:2px solid #b584ff;outline-offset:6px}
#audio-seek:disabled{opacity:.5;cursor:default}
@media(max-width:550px){.practice-panel .dialogue-audio-player{flex-wrap:wrap;gap:8px;padding:10px 12px}.audio-player-buttons{width:100%;justify-content:center}.audio-player-timeline{flex-basis:100%}}

.practice-panel #audio-loop[aria-pressed="true"]{background:linear-gradient(#8a3bcc,#532091);border-color:#c086f1;box-shadow:inset 0 2px #dcb0ff88,inset 0 -3px #31134f;color:#fff}
.audio-player-error{flex-basis:100%;font:14px/1.5 Arial,sans-serif;color:#ffd166}
@media(max-width:380px){.audio-player-buttons{flex-wrap:wrap}.practice-panel .audio-player-buttons button{padding:6px 8px;min-width:48px}}

/* Audio transcription uses the page scroll and keeps every line visible. */
.practice-panel .audio-only .listen-only-input{height:auto;min-height:220px!important;max-height:none!important;overflow:hidden!important;resize:none!important;margin:0!important;padding:16px 22px 24px!important;box-sizing:border-box;white-space:pre-wrap;overflow-wrap:anywhere;flex:0 0 auto}
.listening-correction{width:100%;min-width:0;max-width:100%;margin:12px 0 0;padding:16px;border:1px solid #3188ce;border-radius:12px;background:linear-gradient(#102f4e,#081e35);box-shadow:inset 0 1px #91c8ee44}
.listening-correction h3{font:600 15px/1.5 Arial,sans-serif;margin:0 0 8px;color:#e3f2ff}
.listening-correction h3:not(:first-child){margin-top:16px}
.listening-correction .comparison-line{font:calc(30px * var(--typing-font-scale,1))/1.9 Arial,sans-serif;white-space:normal;overflow-wrap:anywhere;padding:4px 0}
.listening-correction .diff-correct{color:#70e3a6}
.listening-correction .diff-wrong{color:#ff929a}
.listening-correction .diff-missing{color:#ffd166}
@media(max-width:550px){.listening-correction{padding:12px}.listening-correction .comparison-line{font-size:calc(25px * var(--typing-font-scale,1))}}
