[hidden]{display:none!important}body[data-screen='auth'] .workspace,body[data-screen='home'] .workspace{display:none!important}.account-status{font-size:13px;color:#52735c;margin-left:auto}.auth-screen,.home-screen{min-height:0;flex:1;height:calc(var(--app-height,100dvh) - var(--head-height,44px));padding:clamp(10px,2vw,24px);overflow:hidden}
.auth-screen{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px;max-width:480px;margin:0 auto;width:100%;padding:16px 20px calc(16px + var(--safe-bottom,0px))}.auth-intro{flex:0 0 auto;position:relative;width:100%;text-align:left;color:#305e43;display:grid;grid-template-columns:minmax(0,1fr) 140px;align-items:center;gap:16px;min-height:0}.auth-copy{min-width:0}.auth-intro h2{font-size:24px;line-height:1.3;margin:0 0 6px}.auth-intro p{font-size:16px;line-height:1.5;margin:0;word-break:keep-all}.auth-friend{height:clamp(110px,18dvh,170px);width:100%;min-width:0}.auth-friend>svg{height:100%;width:100%}.auth-card{width:100%;flex:0 1 auto;padding:20px 24px;background:#fffdf4;border:1px solid #d8e0c2;box-shadow:0 5px 0 #d2daba50;border-radius:24px;min-height:0;max-height:100%;overflow:auto}.auth-card h2{font-size:22px;margin:0 0 10px}.auth-message{font-size:13px;line-height:1.5;color:#a04c36;min-height:0;margin:4px 0}.auth-message:empty{display:none}.account-form,#signup-account,#signup-friend-step{display:flex;flex-direction:column;gap:10px}.account-form label{display:flex;flex-direction:column;gap:5px;font-size:14px;font-weight:600}.account-form input{font-size:16px;min-height:40px;border:1px solid #c8d6b8;border-radius:10px;background:#fff;padding:8px 12px;font:inherit;width:100%}.account-form .button{min-height:42px;width:100%}.account-form .text-button{font-size:13px;min-height:25px;padding:2px}.auth-secondary{display:grid;grid-template-columns:1fr 1fr;gap:8px}.account-form p{font-size:13px;line-height:1.5}.signup-friends{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.signup-friend{padding:4px 3px;border:1px solid #d8e0c2;border-radius:10px;background:#fffdf5;color:#416046;display:flex;flex-direction:column;align-items:center;font-size:12px;min-width:0}.signup-friend svg{width:100%;height:70px}.signup-friend[aria-pressed='true']{border:2px solid #35764e;background:#e7f1d9}.starter-note{margin:0;color:#526c4e;font-size:12px!important}
.home-screen{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,3fr);gap:clamp(10px,2vw,24px)}.home-companion{display:flex;flex-direction:column;min-width:0;min-height:0;gap:8px}.character-room{isolation:isolate;position:relative;flex:1;min-height:0;overflow:hidden;border:1px solid #cfdbba;border-radius:24px;background:linear-gradient(#e6eee1 0 68%,#d2b18a 68% 69%,#e3c9a5 69%);display:flex;flex-direction:column;align-items:center;color:#305b3e;padding:12px;box-shadow:0 4px 0 #bdd0a340}.room-window{position:absolute;z-index:-1;top:11%;left:13%;width:48%;height:29%;border:7px solid #faf6e6;border-radius:40px 40px 4px 4px;background:linear-gradient(90deg,transparent 46%,#faf6e6 46% 54%,transparent 54%),linear-gradient(transparent 47%,#faf6e6 47% 54%,transparent 54%),linear-gradient(#c5e1e0 65%,#b4ce91 65%);box-shadow:0 3px 0 #7a987532}.room-shelf{position:absolute;z-index:-1;right:6%;top:45%;height:30%;width:26%;border:5px solid #b59b74;background:repeating-linear-gradient(0deg,#cab48a 0 15%,#b59b74 15% 20%)}.room-rug{position:absolute;z-index:-1;bottom:15%;left:7%;width:86%;height:16%;border-radius:50%;background:#a8bc75;box-shadow:inset 0 0 0 5px #c2cf92}.home-stats{align-self:stretch;display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:14px}#home-character-art{flex:1;min-height:0;width:100%;padding:10px 0 0}#home-character-art svg{height:100%;width:100%}.home-friend-name{font-size:20px;font-weight:700}#home-xp{font-size:12px;margin-top:4px}#home-progress{width:90%;height:6px;margin:6px 0;accent-color:#4a8154}.home-shop-hint{font-size:12px}.home-footer{display:flex;gap:6px}.home-footer .button{flex:1;min-width:0;min-height:36px;padding:5px;font-size:12px}.home-practice{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(10px,2vw,24px);min-height:0}.practice-launch{border:1px solid #d7dfbe;border-radius:24px;box-shadow:0 5px 0 #d2d8b8;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(10px,3vh,26px);padding:12px;min-width:0;color:#305b3e;background:#f1f5db}.practice-launch:hover{filter:brightness(.98);transform:translateY(-2px)}.launch-words{background:#edf1e4}.launch-english{background:#eef1f7}.launch-icon{display:grid;place-items:center;width:85%;aspect-ratio:1;max-width:150px;background:#fffaf1;border:2px solid #c7d6ac;border-radius:35%;font-size:clamp(20px,3vw,36px);font-weight:700;letter-spacing:-.07em;box-shadow:0 4px 0 #cad5b078}.launch-words .launch-icon{border-color:#bbceb6}.launch-english .launch-icon{border-color:#bacbd8}.practice-launch strong{font-size:clamp(25px,4vw,44px)}.practice-launch>span:last-child{font-size:clamp(12px,1.4vw,16px)}
.rail-companion{margin-top:0!important;flex:0 1 350px!important}.rail-controls{margin-top:auto!important}.rail-footer{display:flex;gap:4px}.rail-footer .button{min-height:30px;height:30px;min-width:0;flex:1;padding:3px;font-size:11px}.rail-footer .icon{width:15px;height:15px}#canvas-settings{display:none!important}.stroke-actions{display:flex;align-items:center;gap:5px;flex-shrink:0}.stroke-actions button{display:inline-flex;gap:4px;align-items:center;justify-content:center}#stroke-play .icon{width:13px;height:13px}.stroke-order>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stroke-order{align-items:center}.choice-buttons{display:flex;flex-wrap:wrap;gap:6px}.choice-buttons button{flex:1;min-width:70px;min-height:36px;padding:5px 7px;border:1px solid #cbd9ba;background:#fffdf5;border-radius:10px;color:#3e6044;font:inherit;font-size:14px}.choice-buttons button[aria-pressed='true']{background:#3d8052;color:#fff;border-color:#3d8052}.count-presets{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr));width:100%;gap:6px!important}.count-presets button{min-width:0;padding:6px 2px!important;font-size:14px!important}.session-field select[hidden]{display:none!important}.session-kind-label{display:none!important}.session-dialog .dialog-body{gap:10px}.rail-controls #session-counter{font-size:12px!important;line-height:20px!important}.site-head .brand-logo{height:52px;max-width:180px;object-fit:contain}.site-head .brand>div{display:none}.brand-mark{display:none!important}
:root[data-layout='mobile'] .site-head .brand-logo{height:36px;max-width:135px}:root[data-low-height='true'] .auth-screen{padding:6px 16px;gap:6px}:root[data-low-height='true'] .auth-intro h2{font-size:20px}:root[data-low-height='true'] .auth-friend{height:95px}:root[data-low-height='true'] .auth-intro p{font-size:14px}:root[data-low-height='true'] .auth-card{border-radius:16px;padding:10px 18px}:root[data-low-height='true'] .auth-card h2{font-size:18px;margin-bottom:6px}:root[data-low-height='true'] .account-form,:root[data-low-height='true'] #signup-account,:root[data-low-height='true'] #signup-friend-step{gap:5px}:root[data-low-height='true'] .account-form label{font-size:12px;gap:3px}:root[data-low-height='true'] .account-form input{min-height:29px;height:29px;padding:4px 8px}:root[data-low-height='true'] .account-form .button{height:32px;min-height:32px}:root[data-low-height='true'] .account-form .text-button{min-height:20px;font-size:12px}:root[data-low-height='true'] .signup-friend svg{height:35px}:root[data-low-height='true'] .signup-friend{font-size:10px;padding:2px}:root[data-low-height='true'] .starter-note{font-size:10px!important}:root[data-low-height='true'] .rail-companion{flex:1 1 0!important}:root[data-low-height='true'] .home-screen{padding:8px;gap:10px}:root[data-low-height='true'] .character-room{border-radius:16px;padding:8px}:root[data-low-height='true'] .home-friend-name{font-size:15px}:root[data-low-height='true'] .home-shop-hint{display:none}:root[data-low-height='true'] .home-practice{gap:10px}:root[data-low-height='true'] .practice-launch{border-radius:16px;gap:12px}:root[data-low-height='true'] .stroke-order{font-size:10px}:root[data-low-height='true'] .stroke-actions{gap:3px}:root[data-low-height='true'] .stroke-actions button{font-size:10px!important;padding:3px 5px!important}

.auth-screen,.home-screen{height:100%}

.reading-status{position:absolute;left:12px;bottom:28px;font-size:12px;color:#426a4d;background:#fffdf4e8;border-radius:8px;padding:3px 7px;pointer-events:none}.reading-status:empty{display:none}

.launch-icon{display:flex;flex-direction:column;justify-content:center;gap:6px}.course-icon{width:55%;height:55%;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.launch-icon small{font-size:14px;letter-spacing:.04em}:root[data-low-height='true'] .launch-icon small{font-size:12px}

/* Account introductions keep the writing on the left and the friend on the right. */
:root[data-screen='auth'] .auth-screen{flex-direction:column;align-items:center;grid-template-columns:none}
:root[data-screen='auth'] .auth-intro{width:100%}
:root[data-screen='auth'] .auth-card{border-radius:20px}
:root[data-screen='auth'] .account-form input{font-size:16px}
:root[data-screen='auth'] .signup-friends{grid-template-columns:repeat(5,minmax(0,1fr))}
:root[data-screen='auth'] .auth-card h2{font-size:20px}
@media(max-height:740px){
 body[data-screen='auth'] .auth-screen{gap:10px;padding-block:10px}
 body[data-screen='auth'] .auth-intro{grid-template-columns:minmax(0,1fr) 116px}body[data-screen='auth'] .auth-friend{height:116px;width:100%}
 body[data-screen='auth'] .auth-intro h2{font-size:21px;line-height:1.2;margin:0}
 body[data-screen='auth'] .auth-intro p{font-size:14px}
 body[data-screen='auth'] .auth-card{padding:14px 18px}
 body[data-screen='auth'] .account-form,body[data-screen='auth'] #signup-account,body[data-screen='auth'] #signup-friend-step{gap:7px}
}
@media(max-height:500px){
 body[data-screen='auth'] .auth-screen{gap:5px;padding-block:5px;max-width:440px}
 body[data-screen='auth'] .auth-intro{grid-template-columns:minmax(0,1fr) 80px;gap:12px}body[data-screen='auth'] .auth-friend{height:80px;width:100%}
 body[data-screen='auth'] .auth-intro h2{font-size:18px;margin-bottom:4px}
 body[data-screen='auth'] .auth-card{padding:10px 16px;border-radius:16px}
 body[data-screen='auth'] .auth-card h2{font-size:18px;margin-bottom:6px}
 body[data-screen='auth'] .account-form,body[data-screen='auth'] #signup-account,body[data-screen='auth'] #signup-friend-step{gap:5px}
 body[data-screen='auth'] .account-form label{font-size:13px;gap:3px}
 body[data-screen='auth'] .account-form input{min-height:32px;height:32px;padding:4px 8px}
 body[data-screen='auth'] .account-form .button{min-height:34px;height:34px}
 body[data-screen='auth'] .account-form .text-button{min-height:21px;font-size:12px}
 body[data-screen='auth'] .signup-friend svg{height:42px}
}
body[data-screen='auth'].keyboard-open .auth-intro{display:none}

/* Controls must accept real pointer taps above the handwriting canvas. */
.stroke-order .stroke-actions{pointer-events:auto;touch-action:manipulation}
.stroke-order .stroke-actions>button{pointer-events:auto;flex:none;border:1px solid #c5d5ba;border-radius:8px;background:#fffdf2;color:#356e4d;min-height:28px;padding:3px 7px;font:600 11px Paperlogy,sans-serif;white-space:nowrap;touch-action:manipulation}
.stroke-order .stroke-actions>button .icon{width:13px;height:13px}
.stroke-order .stroke-actions>button[aria-pressed='true']{background:#e2efd9;border-color:#65935e}
.stroke-order .stroke-actions>button:focus-visible{outline:2px solid #35764e;outline-offset:2px}
:root[data-low-height='true'] .rail-controls .input-tools .segment button{height:27px;min-height:27px;font-size:11px}
:root[data-low-height='true'] .rail-footer .button{height:27px;min-height:27px}

.password-field{display:flex;flex-direction:column;gap:5px}.password-input{position:relative;display:flex;align-items:center}.account-form .password-input input{padding-right:50px}.account-form .password-toggle{position:absolute;right:3px;top:50%;transform:translateY(-50%);display:grid;place-items:center;min-width:38px;width:38px;min-height:34px;height:34px;padding:5px;border:0;border-radius:8px;color:#456e4d;background:transparent}.password-toggle .icon{width:21px;height:21px}.password-toggle .eye-off{display:none}.password-toggle[aria-pressed='true'] .eye-open{display:none}.password-toggle[aria-pressed='true'] .eye-off{display:block}.password-toggle:focus-visible{outline:2px solid #35764e;outline-offset:1px}.device-login-note{font-size:12px!important;color:#5c765b;margin:0}.auth-screen[data-auth-view='signup'] .auth-friend{height:100px}.auth-screen[data-auth-view='signup'] .auth-intro p{display:none}.lesson-audio{position:absolute;bottom:45px;left:12px;z-index:6;width:min(290px,calc(100% - 24px));height:36px}@media(max-height:500px){.auth-screen[data-auth-view='signup'] .auth-friend{height:42px}.password-field{gap:3px}.account-form .password-toggle{height:28px;min-height:28px}}

.voice-setting{display:grid;gap:9px;padding:14px;border:1px solid #d7dfc7;border-radius:14px;background:#fbfcf5}.voice-setting h3{margin:0;font-size:16px}.voice-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px}.voice-choices button{display:flex;flex-direction:column;gap:5px;align-items:center;justify-content:center;min-height:66px;padding:9px;border:1px solid #c5d5ba;border-radius:11px;background:#fff;color:#3e6047;font:inherit}.voice-choices button strong{font-size:15px}.voice-choices button small{font-size:12px}.voice-choices button[aria-pressed='true']{border-color:#3d8052;background:#e9f2dd;box-shadow:inset 0 0 0 1px #3d8052}.voice-setting p{margin:0;color:#5c765b;font-size:12px;line-height:1.5}.voice-samples{display:flex;gap:8px}.voice-samples .button{flex:1;min-width:0;min-height:36px;font-size:13px;padding:7px}.voice-samples .icon{width:15px;height:15px}.voice-samples button[aria-pressed='true']{background:#e4eedb}#voice-preview-audio{width:100%;height:36px}#voice-preview-status:empty{display:none}

@media(max-width:380px){body[data-screen='auth'] .auth-screen{padding-inline:16px}body[data-screen='auth'] .auth-intro{grid-template-columns:minmax(0,1fr) 96px;gap:10px}body[data-screen='auth'] .auth-intro h2{font-size:20px}body[data-screen='auth'] .auth-intro p{font-size:14px}}
