/* Functional update of the retained local prototype, using its original art. */
:root { color:#354f43; background:#e4e9e3; }
[hidden] { display:none !important; }
button { -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
button:focus-visible, summary:focus-visible, input:focus-visible { outline:3px solid #304e78; outline-offset:3px; }
button:disabled { cursor:not-allowed; }
.app { min-height:0; height:min(920px,100dvh); }
.header { height:64px; }
.brand { color:#89462f; }
.local-label { color:#4f6559; background:#edf3e9; padding:6px 9px; border-radius:20px; font-size:12px; }
.view { height:calc(100% - 144px); }
.nav { height:80px; }
.nav button { min-height:52px; color:#52675a; }
.nav button.selected { color:#8e422d; }
.home-content { padding:18px; }
.today-card { display:block; width:100%; padding:0; text-align:left; overflow:hidden; border:1px solid #e5e6d9; border-radius:24px; background:#fffefa; box-shadow:0 7px 19px #79866c11; color:#354f43; }
.today-illustration { height:260px; position:relative; background:url('./assets/swan-web-q82.webp') center / cover; }
.today-illustration .characters { bottom:0; }
.today-copy { padding:26px 24px 30px; }
.today-copy h1 { font-size:30px; margin:12px 0 8px; }
.author { color:#536258; font-size:14px; margin:8px 0 16px; }
.preview-text { font-size:20px; line-height:1.8; color:#354f43; }
.eyebrow { color:#88492f; }
.start-reading { display:block; background:#9b4a31; color:white; padding:16px; text-align:center; border-radius:14px; font-size:17px; font-weight:700; margin-top:24px; }
.page-head p,.reward-section p { color:#526456; line-height:1.7; font-size:14px; }
.page-head { padding:25px 22px 15px; }
.map-route { margin-top:18px; }
.stop-lesson { min-height:80px; padding:16px 9px; }
.stop-lesson small { color:#526456; font-size:12px; }
.grade-stop.current .route-point { background:#9b4a31; }
.grade-stop.done .route-point { background:#407052; }
.reward-section h3 { color:#354f43; margin:0 0 10px; font-size:18px; }
.reward-section { margin:0 18px 16px; }
.primary { background:#9b4a31; color:white; box-shadow:0 3px 0 #743820; min-height:48px; }
.secondary { min-height:48px; padding:10px 14px; color:#354f43; border:1px solid #b9c5b7; background:#f3f7ef; border-radius:12px; }
.secondary:disabled { color:#5c685e; background:#e8eae4; }
.learning-records { display:grid; gap:10px; }
.record-row { text-align:left; color:#354f43; background:#f2f6ee; border:1px solid #dde5d7; border-radius:13px; padding:14px; min-height:72px; }
.record-row strong,.record-row span { display:block; }
.record-row span { margin-top:6px; font-size:13px; }
.record-continue { color:#88492f; }
.achievement-list { display:grid; gap:10px; }
.achievement { display:flex; gap:12px; padding:12px; border-radius:14px; background:#edf1e9; }
.achievement.earned { background:#f7ead7; }
.achievement-symbol { font-size:34px; color:#8e422d; }
.achievement h4 { margin:0 0 5px; font-size:16px; }
.achievement p { margin:0 0 6px; }
.achievement small { color:#536258; }
.recording-row { display:flex; gap:8px; align-items:center; justify-content:space-between; margin:14px 0; }
.recording-row small { display:block; margin-top:6px; font-size:12px; color:#536258; }
.delete-recording { white-space:nowrap; }
.danger { color:#8e352c; }
.study-head { flex:0 0 68px; padding:0 16px; color:#354f43; background:#fffefa; }
.study-head button { width:auto; min-width:76px; min-height:48px; font-size:16px; color:#354f43; }
.pinyin-toggle { display:flex; align-items:center; gap:5px; min-height:48px; padding:0 6px; font-size:14px; }
.pinyin-toggle input { width:20px; height:20px; accent-color:#407052; }
.study-body { padding:0 0 30px; }
.poem-surface { background:#fffefa; }
.poem-scene { height:145px; background:url('./assets/swan-web-q82.webp') center 45% / cover; }
.art-missing { background-image:none; background-color:#edf3e7; display:grid; place-items:center; color:#536258; font-size:14px; }
.today-illustration.art-missing p { align-self:start; margin-top:35px; }
.poem-reading { padding:18px 12px 28px; text-align:center; background:#fffefa; }
.poem-reading h1 { color:#354f43; font-size:28px; margin:0 0 6px; }
.poem-lines { margin-top:28px; }
.poem-line { font-size:26px; line-height:2.2; margin:14px 0; white-space:nowrap; }
ruby { display:inline-flex; flex-direction:column-reverse; align-items:center; vertical-align:bottom; min-width:1.4em; line-height:1.35; }
rt { display:block; font-size:12px; color:#536258; line-height:1.6; }
rp { display:none; }
.pinyin-off rt { visibility:hidden; }
.punctuation { display:inline-block; font-size:22px; width:.6em; }
.audio-gap { margin:16px 20px; padding:12px 14px; font-size:13px; line-height:1.7; color:#7a472c; background:#fcf0d9; border-radius:12px; }
.privacy-note,.completion-note { margin:16px 20px; color:#536258; font-size:13px; line-height:1.8; }
.translation { margin:24px 20px; }
.translation h2 { font-size:21px; }
.translation div { margin:14px 0; border-bottom:1px solid #e2e7dc; padding:0 0 14px; }
.translation h3 { font-size:16px; margin:0 0 5px; }
.translation p { font-size:16px; line-height:1.8; margin:0; color:#536258; }
.reflection { margin:20px; padding:14px; color:#354f43; border:1px solid #dde5d7; border-radius:12px; }
.reflection summary { min-height:48px; display:flex; align-items:center; cursor:pointer; font-weight:700; }
.reflection p { font-size:14px; line-height:1.8; }
.complete-practice { display:block; width:calc(100% - 40px); margin:24px 20px 12px; }
.reading-bar { display:flex; flex:0 0 auto; justify-content:space-around; gap:10px; padding:12px 14px calc(12px + env(safe-area-inset-bottom)); background:#fffefa; border-top:1px solid #e1e5d9; }
.reading-bar button { border:0; background:transparent; color:#354f43; display:flex; flex-direction:column; gap:6px; align-items:center; justify-content:center; min-width:76px; min-height:76px; font-size:14px; }
.control-icon { display:grid; place-items:center; width:48px; height:48px; border-radius:50%; background:#e5efdf; color:#354f43; font-size:22px; }
#recordBtn .control-icon { background:#9b4a31; color:white; }
#recordBtn.recording .control-icon { background:#9a2d3d; }
.reading-bar button:disabled { opacity:1; color:#69746c; }
.reading-bar button:disabled .control-icon { background:#e5e7e1; color:#69746c; }
.reading-bar button.playing .control-icon { background:#407052; color:white; }
.app-status { position:absolute; z-index:20; left:12px; right:12px; bottom:110px; margin:0; padding:12px 14px; color:#fff; background:#354f43; border-radius:13px; font-size:13px; line-height:1.6; pointer-events:none; }
.app-status:empty { display:none; }
dialog { width:min(380px,calc(100vw - 32px)); border:1px solid #d5dfcd; border-radius:20px; color:#354f43; background:#fffefa; padding:24px; box-shadow:0 14px 60px #132b2240; }
dialog::backdrop { background:#253f3566; }
dialog h2 { font-size:21px; margin:0 0 14px; }
dialog p { font-size:15px; line-height:1.8; }
#dialogActions { display:grid; gap:12px; }
.loading { font-size:17px; padding:28px 12px; }
@media(max-width:600px) { .app { height:100dvh; } }
@media(max-height:650px) { .today-illustration { height:175px; } .today-copy { padding:18px; } .poem-scene { height:110px; } }
@media(prefers-reduced-motion:reduce) { * { animation:none !important; transition:none !important; } }
