:root{
  color-scheme:light;
  --bg:#fffaf5;--surface:#fffefd;--surface2:#fff7f0;--ink:#403936;--ink2:#2f2927;
  --muted:#7e726c;--line:#eadfd8;--line2:#dbc9bf;--rose:#e78f89;--rose2:#db7772;
  --peach:#f2ad8b;--apricot:#f1c17d;--danger:#b65f5f;--success:#698c73;
  --brand:linear-gradient(135deg,#efa09b 0%,#f3b58d 56%,#f2cb84 100%);
  --brand-soft:linear-gradient(135deg,rgba(239,160,155,.18),rgba(243,181,141,.18),rgba(242,203,132,.19));
  --shadow:0 10px 30px rgba(94,66,48,.08);--shadow2:0 24px 70px rgba(75,48,33,.17);
  --radius:22px;--header:68px;--nav:76px;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);
  --ui:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang TC","Noto Sans TC","Microsoft JhengHei",sans-serif;
  --serif:"Iowan Old Style","Songti TC","Noto Serif TC",serif;
  --kai:"BiauKaiTC","DFKai-SB","標楷體","KaiTi TC",serif;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html{min-height:100%;background:var(--bg)}body{margin:0;min-height:100%;font:16px/1.55 var(--ui);color:var(--ink);background:radial-gradient(circle at 0 0,rgba(239,160,155,.12),transparent 25rem),radial-gradient(circle at 100% 8%,rgba(242,203,132,.13),transparent 25rem),var(--bg);overflow-x:hidden}body[data-theme=dark]{color-scheme:dark;--bg:#181514;--surface:#24201e;--surface2:#302925;--ink:#f5eeea;--ink2:#fffaf7;--muted:#c1b3ac;--line:#443b36;--line2:#5a4a43;--shadow:0 10px 30px rgba(0,0,0,.28);--shadow2:0 24px 70px rgba(0,0,0,.42)}button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer}img{max-width:100%}[hidden]{display:none!important}:focus-visible{outline:3px solid rgba(222,119,114,.25);outline-offset:2px}.app-shell{min-height:100vh;padding-top:calc(var(--header) + var(--safe-top));padding-bottom:calc(var(--nav) + var(--safe-bottom))}.app-header{position:fixed;z-index:30;inset:0 0 auto;height:calc(var(--header) + var(--safe-top));padding-top:var(--safe-top);background:color-mix(in srgb,var(--bg) 88%,transparent);border-bottom:1px solid color-mix(in srgb,var(--line) 78%,transparent);backdrop-filter:blur(22px) saturate(1.2);-webkit-backdrop-filter:blur(22px) saturate(1.2)}.header-inner{height:var(--header);max-width:1120px;margin:auto;padding:0 16px;display:flex;align-items:center;gap:10px}.brand{display:flex;align-items:center;gap:10px;min-width:0}.logo-image{width:43px;height:43px;border-radius:14px;box-shadow:0 8px 22px rgba(178,111,81,.14)}.brand-copy{display:grid;min-width:0;text-align:left}.brand-title{font-weight:800;color:var(--ink2);letter-spacing:.04em}.brand-subtitle{font-size:.73rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header-spacer{flex:1}.header-actions{display:flex;gap:7px}.icon{width:22px;height:22px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.icon-sm{width:17px;height:17px}.icon-lg{width:28px;height:28px}.icon-btn{width:42px;height:42px;padding:0;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:var(--shadow);display:grid;place-items:center}.btn-ghost{border:0;background:transparent;box-shadow:none}.app-main{max-width:1120px;margin:auto;padding:22px 16px 42px}.view{animation:fade-in .2s ease both}@keyframes fade-in{from{opacity:.35;transform:translateY(4px)}to{opacity:1;transform:none}}.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin:4px 2px 18px}.page-title{margin:0;color:var(--ink2);font-size:clamp(1.55rem,5vw,2.15rem);line-height:1.17;letter-spacing:.02em}.page-kicker{margin:4px 0 0;color:var(--muted);font-size:.88rem}.page-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.section{margin-bottom:24px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 2px 10px}.section-title{font-size:1.04rem;color:var(--ink2);font-weight:770;margin:0}.section-note,.field-help,.source-note{font-size:.76rem;color:var(--muted)}.card{background:color-mix(in srgb,var(--surface) 96%,transparent);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}.card-pad{padding:18px}.card-soft{background:var(--brand-soft)}.card-press{transition:transform .15s,border-color .15s}.card-press:active{transform:scale(.987)}.hero-card{padding:22px;min-height:190px;background:linear-gradient(125deg,rgba(255,255,255,.91),rgba(255,249,244,.88)),var(--brand-soft);position:relative;isolation:isolate}.hero-card:after{content:"";position:absolute;width:260px;height:260px;border-radius:50%;right:-90px;bottom:-115px;background:var(--brand);opacity:.16;z-index:-1}.hero-kicker{font-size:.8rem;color:var(--muted);letter-spacing:.08em;margin-bottom:10px}.hero-quote{font-family:var(--serif);font-size:clamp(1.25rem,5.5vw,1.75rem);line-height:1.65;margin:0;color:var(--ink2)}.hero-meta{margin-top:14px;color:var(--muted);font-size:.8rem}.grid{display:grid;gap:12px}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.quick-action{min-height:84px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:10px 5px;color:var(--ink);font-size:.8rem}.quick-action .icon{color:var(--rose2)}.item-card{display:flex;gap:12px;align-items:flex-start;padding:15px}.item-leading{width:44px;height:44px;flex:none;border-radius:15px;background:var(--brand-soft);display:grid;place-items:center;color:var(--rose2)}.item-body{min-width:0;flex:1}.item-title{font-weight:750;color:var(--ink2);line-height:1.35}.item-text{margin-top:4px;color:var(--muted);font-size:.87rem;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-line}.item-meta{display:flex;gap:7px;flex-wrap:wrap;margin-top:7px;color:var(--muted);font-size:.74rem}.item-thumb{width:70px;height:70px;object-fit:cover;border-radius:14px;border:1px solid var(--line);flex:none}.empty{padding:32px 20px;text-align:center;color:var(--muted)}.empty-mark{width:58px;height:58px;border-radius:20px;background:var(--brand-soft);display:grid;place-items:center;margin:0 auto 12px;color:var(--rose2)}.empty h3{margin:0 0 6px;color:var(--ink2)}.empty p{max-width:34rem;margin:0 auto 15px}.btn{min-height:42px;border:1px solid var(--line);border-radius:14px;background:var(--surface);padding:9px 14px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:7px;text-decoration:none}.btn-primary{background:var(--brand);border-color:transparent;color:#4b302c;box-shadow:0 10px 23px rgba(218,118,101,.22)}.btn-soft{background:var(--brand-soft)}.btn-danger{color:var(--danger);background:color-mix(in srgb,var(--danger) 8%,var(--surface))}.btn-sm{min-height:34px;padding:6px 10px;border-radius:11px;font-size:.82rem}.btn-block{width:100%}.link-btn{border:0;background:transparent;color:var(--rose2);font-weight:730;padding:4px}.chips{display:flex;gap:7px;flex-wrap:wrap}.chip{border:1px solid var(--line);border-radius:999px;background:var(--surface);padding:6px 10px;font-size:.77rem;color:var(--muted);display:inline-flex;align-items:center;gap:5px}.chip.active{border-color:rgba(218,119,114,.45);background:var(--brand-soft);color:#70413e}.badge{display:inline-flex;border-radius:999px;padding:3px 8px;font-size:.7rem;font-weight:700;background:var(--surface2);color:var(--muted)}.badge-success{color:var(--success);background:rgba(105,140,115,.13)}.field{display:grid;gap:7px}.field+.field{margin-top:14px}.field-label{font-size:.81rem;color:var(--muted);font-weight:700}.input,.textarea,.select{width:100%;border:1px solid var(--line);border-radius:15px;background:var(--surface);padding:12px 13px;outline:none}.textarea{min-height:120px;resize:vertical;line-height:1.7}.input:focus,.textarea:focus,.select:focus{border-color:var(--rose);box-shadow:0 0 0 4px rgba(222,119,114,.18)}.inline-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.bottom-nav{position:fixed;z-index:32;left:0;right:0;bottom:0;height:calc(var(--nav) + var(--safe-bottom));padding:8px 8px var(--safe-bottom);background:color-mix(in srgb,var(--surface) 92%,transparent);border-top:1px solid var(--line);backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px)}.nav-inner{height:60px;max-width:720px;margin:auto;display:grid;grid-template-columns:repeat(5,1fr);gap:3px}.nav-btn{border:0;background:transparent;border-radius:16px;color:var(--muted);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:.69rem;font-weight:680}.nav-btn.active{color:var(--rose2);background:var(--brand-soft)}.fab{position:fixed;z-index:35;right:18px;bottom:calc(var(--nav) + var(--safe-bottom) + 15px);width:56px;height:56px;border-radius:19px;border:1px solid rgba(255,255,255,.65);background:var(--brand);box-shadow:0 15px 34px rgba(205,111,91,.3);display:grid;place-items:center;color:#4b302c}.overlay-root{position:fixed;z-index:90;inset:0;pointer-events:none}.overlay-root.active{pointer-events:auto}.backdrop{position:absolute;inset:0;background:rgba(45,34,29,.31);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.sheet,.modal{position:absolute;background:var(--surface);box-shadow:var(--shadow2);overflow:auto}.sheet{left:0;right:0;bottom:0;max-height:88vh;border-radius:28px 28px 0 0;padding:10px 16px calc(22px + var(--safe-bottom));animation:sheet-up .2s ease both}@keyframes sheet-up{from{transform:translateY(18px);opacity:.4}to{transform:none;opacity:1}}.modal{left:50%;top:50%;width:min(92vw,620px);max-height:90vh;transform:translate(-50%,-50%);border:1px solid var(--line);border-radius:28px;padding:20px}.modal-wide{width:min(96vw,980px)}.sheet-handle{width:42px;height:5px;border-radius:999px;background:var(--line2);margin:2px auto 14px}.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:14px}.sheet-title{margin:0;font-size:1.22rem;color:var(--ink2)}.sheet-body{display:grid;gap:14px}.sheet-actions{position:sticky;bottom:calc(-22px - var(--safe-bottom));display:flex;gap:8px;justify-content:flex-end;padding:14px 0 calc(12px + var(--safe-bottom));margin-top:10px;background:linear-gradient(to bottom,transparent,var(--surface) 22%)}.toast-stack{position:fixed;z-index:130;left:50%;bottom:calc(var(--nav) + var(--safe-bottom) + 18px);transform:translateX(-50%);width:min(90vw,460px);display:grid;gap:8px;pointer-events:none}.toast{padding:12px 15px;border-radius:15px;background:rgba(48,42,39,.95);color:#fff;box-shadow:var(--shadow);font-size:.87rem}.toast.success{background:rgba(75,111,82,.96)}.toast.error{background:rgba(142,67,67,.96)}.timeline{display:grid;gap:13px}.timeline-day{font-size:.8rem;font-weight:760;color:var(--muted);padding:4px}.timeline-item{position:relative;margin-left:10px;padding-left:22px;margin-bottom:11px}.timeline-item:before{content:"";position:absolute;left:0;top:9px;width:9px;height:9px;border-radius:50%;background:var(--brand);box-shadow:0 0 0 5px var(--bg)}.timeline-item:after{content:"";position:absolute;left:4px;top:20px;bottom:-21px;width:1px;background:var(--line)}.timeline-item:last-child:after{display:none}.detail-header{padding:20px;background:var(--brand-soft);border:1px solid var(--line);border-radius:var(--radius);margin-bottom:14px}.detail-title{font-family:var(--serif);font-size:clamp(1.5rem,6vw,2.25rem);margin:0 0 12px;color:var(--ink2)}.detail-tools{display:flex;gap:8px;flex-wrap:wrap}.timer{font-variant-numeric:tabular-nums}.timer.running{color:#7a3937}.entry-list{display:grid;gap:10px}.entry-card{padding:15px;border:1px solid var(--line);border-radius:20px;background:var(--surface)}.entry-top{display:flex;align-items:center;gap:8px}.entry-type{font-size:.71rem;color:var(--rose2);font-weight:750;background:var(--brand-soft);padding:4px 8px;border-radius:999px}.entry-date{margin-left:auto;font-size:.73rem;color:var(--muted)}.entry-content{margin-top:10px;white-space:pre-wrap;line-height:1.75;overflow-wrap:anywhere}.entry-media{display:block;width:100%;max-height:380px;object-fit:contain;border-radius:16px;border:1px solid var(--line);margin-top:11px;background:#fff}.entry-actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap;margin-top:10px}.dictionary-result{display:grid;gap:10px}.dict-entry{padding:15px;border:1px solid var(--line);border-radius:19px;background:var(--surface)}.dict-title{font-family:var(--serif);font-size:1.45rem;color:var(--ink2);font-weight:700}.dict-pron{color:var(--rose2);margin-top:3px}.dict-definition{white-space:pre-line;line-height:1.8;margin-top:10px}.stroke-stage{display:grid;gap:12px}.stroke-canvas-wrap{position:relative;width:100%;max-width:430px;aspect-ratio:1;margin:auto;border:1px solid var(--line);border-radius:22px;background:#fff;overflow:hidden}.stroke-canvas{width:100%;height:100%;display:block;touch-action:none}.stroke-character{text-align:center;font:700 2rem var(--kai)}.stroke-controls{display:flex;gap:7px;justify-content:center;flex-wrap:wrap}.basic-strokes{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.basic-stroke-btn{min-height:60px;border:1px solid var(--line);border-radius:15px;background:var(--surface);font:1.35rem var(--kai);display:grid;place-items:center}.basic-stroke-btn small{font:11px var(--ui);color:var(--muted)}.basic-stroke-btn.active{background:var(--brand-soft);border-color:rgba(218,119,114,.45)}.block-editor{display:grid;gap:10px}.editor-block{border:1px solid var(--line);border-radius:18px;padding:13px}.block-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.block-kind{font-size:.77rem;color:var(--muted);font-weight:700}.candidate-list{display:grid;gap:9px}.candidate{display:flex;gap:11px;align-items:flex-start;padding:12px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}.candidate input{margin-top:5px}.candidate-copy{min-width:0;flex:1}.candidate-title{font-weight:700}.candidate-text{font-size:.8rem;color:var(--muted);margin-top:2px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.outcome-card{padding:17px}.outcome-title{font-weight:780;color:var(--ink2);font-size:1.04rem}.outcome-sub{font-size:.82rem;color:var(--muted);margin-top:4px}.outcome-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:13px}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.stat{text-align:center;padding:12px;border-radius:16px;background:rgba(255,255,255,.55);border:1px solid rgba(220,196,181,.7)}.stat strong{display:block;font-size:1.35rem;color:var(--ink2)}.stat span{font-size:.74rem;color:var(--muted)}.report-preview-shell{background:#d7d1cc;padding:16px;border-radius:22px;overflow:auto;max-height:74vh}.report-page{width:210mm;min-height:297mm;margin:0 auto 14px;padding:18mm 17mm;background:#fff;color:#222;box-shadow:0 8px 28px rgba(0,0,0,.15);font-family:var(--kai);position:relative}.report-cover{display:grid;place-items:center;text-align:center}.report-cover-kicker{font-size:15pt;letter-spacing:.3em}.report-cover-course{font-size:30pt;margin:18mm 0 8mm}.report-rule{height:3px;width:74%;margin:0 auto 18mm;background:linear-gradient(90deg,#e99994,#f2c583)}.report-cover-title{font-size:22pt;margin-bottom:24mm}.report-cover-meta{font-size:14pt;line-height:2}.report-heading{font-size:19pt;margin:0 0 8mm;padding-bottom:3mm;border-bottom:2px solid #e7a29c}.report-subheading{font-size:14pt;margin:7mm 0 3mm}.report-body{font-size:11.5pt;line-height:1.75;white-space:pre-wrap}.report-card{border:1px solid #d8ccc4;border-radius:4mm;padding:5mm;margin-bottom:5mm;break-inside:avoid}.report-meta{font:9.5pt var(--ui);color:#666;margin-bottom:2mm}.report-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:4mm;margin:6mm 0}.report-stat{border:1px solid #d8ccc4;border-radius:3mm;padding:4mm;text-align:center}.report-stat strong{display:block;font-size:18pt}.report-footer{position:absolute;bottom:8mm;left:17mm;right:17mm;padding-top:2mm;border-top:1px solid #ddd;font:8.5pt var(--ui);color:#777;display:flex;justify-content:space-between}.settings-group{margin-bottom:14px}.settings-title{margin:0 4px 7px;font-size:.78rem;color:var(--muted);letter-spacing:.08em}.settings-card{padding:0 15px;border:1px solid var(--line);border-radius:20px;background:var(--surface)}.settings-row{min-height:57px;display:flex;align-items:center;gap:11px;border-bottom:1px solid var(--line);padding:9px 0}.settings-row:last-child{border-bottom:0}.settings-leading{width:36px;height:36px;border-radius:12px;background:var(--brand-soft);display:grid;place-items:center;color:var(--rose2);flex:none}.settings-copy{min-width:0;flex:1;display:grid}.settings-name{font-weight:700;color:var(--ink2)}.settings-desc{font-size:.73rem;color:var(--muted)}.settings-status{font-size:.73rem;color:var(--muted);white-space:nowrap}.setup-list{display:grid;gap:8px}.setup-item{display:flex;align-items:center;gap:11px;padding:11px;border:1px solid var(--line);border-radius:16px}.setup-icon{width:38px;height:38px;border-radius:13px;background:var(--brand-soft);display:grid;place-items:center;color:var(--rose2);flex:none}.setup-copy{display:grid;min-width:0;flex:1}.setup-name{font-weight:700}.setup-note{font-size:.74rem;color:var(--muted)}.first-run-logo{width:90px;height:90px;border-radius:26px;display:block;margin:2px auto 14px;box-shadow:var(--shadow)}.lock-screen{position:fixed;z-index:200;inset:0;background:var(--bg);display:grid;place-items:center;padding:24px}.lock-card{width:min(100%,380px);text-align:center}.pin-dots{display:flex;justify-content:center;gap:11px;margin:18px}.pin-dot{width:13px;height:13px;border:1px solid var(--line2);border-radius:50%}.pin-dot.filled{background:var(--rose);border-color:var(--rose)}.pin-pad{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.pin-key{aspect-ratio:1.4;border:1px solid var(--line);border-radius:18px;background:var(--surface);font-weight:750;font-size:1.2rem}.skeleton{position:relative;overflow:hidden;background:var(--surface2);border-radius:16px}.skeleton:after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);animation:shine 1.25s infinite}@keyframes shine{to{transform:translateX(100%)}}
@media(min-width:760px){:root{--nav:0px;--header:74px}.app-shell{padding-left:220px;padding-bottom:0}.app-header{left:220px}.header-inner{padding:0 28px}.bottom-nav{left:0;top:0;right:auto;bottom:0;width:220px;height:100vh;padding:calc(22px + var(--safe-top)) 14px 22px;border-top:0;border-right:1px solid var(--line)}.bottom-nav:before{content:"語文素養";display:block;height:54px;padding:12px;font-weight:800;color:var(--ink2)}.nav-inner{height:auto;display:flex;flex-direction:column;gap:7px}.nav-btn{height:48px;flex-direction:row;justify-content:flex-start;padding:0 14px;gap:12px;font-size:.91rem}.fab{right:28px;bottom:28px}.sheet{left:50%;right:auto;bottom:24px;width:min(680px,92vw);border-radius:28px;transform:translateX(-50%);padding-bottom:22px}.sheet-actions{bottom:-22px}.quick-grid{grid-template-columns:repeat(4,minmax(110px,1fr))}}
@media(min-width:1080px){.app-shell{padding-left:248px}.app-header{left:248px}.bottom-nav{width:248px}.app-main{padding:30px 30px 50px}.home-layout{display:grid;grid-template-columns:1.4fr .8fr;gap:18px}.detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;align-items:start}}
@media(max-width:560px){.grid-2,.grid-3,.inline-fields{grid-template-columns:1fr}.quick-grid{gap:7px}.quick-action{min-height:78px;font-size:.74rem}.stat-grid{grid-template-columns:repeat(2,1fr)}.report-preview-shell{padding:7px}.basic-strokes{grid-template-columns:repeat(4,1fr)}.sheet-actions{flex-wrap:wrap}.sheet-actions .btn{flex:1}}

@media(orientation:landscape) and (min-width:900px){
  .motion-card,.motion-section{animation-delay:0s!important}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}

/* ==========================================================================
   語文素養 v3.0 — Final App Design System
   Goal: native-app rhythm, low chrome, single accent, stable 4px spacing grid.
   ========================================================================== */
:root{
  color-scheme:light;
  --bg:#fbf8f4;
  --surface:#fffdfa;
  --surface2:#f7f0ea;
  --ink:#292522;
  --ink2:#292522;
  --muted:#817771;
  --line:#e8dfd8;
  --line2:#d9cec6;
  --rose:#d97d76;
  --rose2:#c96e68;
  --peach:#e8a07c;
  --apricot:#ddb76e;
  --danger:#a94f4c;
  --success:#66816e;
  --brand:#d97d76;
  --brand-soft:#f7e9e4;
  --shadow:none;
  --shadow2:0 14px 42px rgba(55,43,36,.14);
  --radius:14px;
  --header:66px;
  --nav:72px;
  --safe-top:env(safe-area-inset-top,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --ui:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang TC","Noto Sans TC","Microsoft JhengHei",sans-serif;
  --serif:"Iowan Old Style","Songti TC","Noto Serif TC",serif;
  --kai:"BiauKaiTC","DFKai-SB","標楷體","KaiTi TC",serif;

  --sp1:4px;--sp2:8px;--sp3:12px;--sp4:16px;--sp5:20px;--sp6:24px;--sp8:32px;--sp10:40px;
  --motion-fast:110ms;
  --motion-base:170ms;
  --ease:cubic-bezier(.2,.75,.25,1);
}
body[data-theme=dark]{
  color-scheme:dark;
  --bg:#171513;--surface:#201d1b;--surface2:#292522;--ink:#f4efeb;--ink2:#f4efeb;
  --muted:#b8ada6;--line:#3b3531;--line2:#514841;--brand-soft:#352725;
}
html{background:var(--bg);min-height:100%;overscroll-behavior:none}
body{
  margin:0;min-height:100dvh;overflow-x:hidden;
  background:var(--bg)!important;color:var(--ink);
  font:15px/1.62 var(--ui);
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  overscroll-behavior:none;
}
body::before{display:none!important}
button{touch-action:manipulation}
.app-shell{min-height:100dvh;background:var(--bg);padding-top:calc(var(--header) + var(--safe-top));padding-bottom:calc(var(--nav) + var(--safe-bottom))}
.app-header{
  height:calc(var(--header) + var(--safe-top));padding-top:var(--safe-top);
  background:rgba(251,248,244,.97)!important;border-bottom:1px solid var(--line)!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
}
body[data-theme=dark] .app-header{background:rgba(23,21,19,.97)!important}
.header-inner{height:var(--header);max-width:760px;padding:0 20px;gap:10px}
.brand{min-height:44px;padding:0;gap:9px}
.logo-image{width:34px;height:34px;border-radius:0!important;box-shadow:none!important;object-fit:contain}
.brand-title{font-size:16px;line-height:1.2;font-weight:760;letter-spacing:.01em}
.brand-subtitle{display:none}
.header-actions{gap:2px}
.icon-btn{
  width:42px;height:42px;border:0!important;border-radius:50%;background:transparent!important;box-shadow:none!important;
}
.icon-btn:active{background:var(--surface2)!important}
.icon{stroke-width:1.65!important}
.app-main{max-width:760px;margin:auto;padding:25px 20px 48px}
.view{animation:none!important}
.page-head{align-items:flex-start;margin:0 0 24px;gap:14px}
.page-title{font-size:28px!important;line-height:1.18;letter-spacing:-.02em;font-weight:760}
.page-kicker{font-size:13px;line-height:1.62;margin-top:7px;max-width:34em}
.page-actions{gap:4px;align-self:center}
.page-actions .btn:not(.btn-primary){border-color:transparent!important;background:transparent!important}
.section{margin-bottom:30px}
.section-head{margin:0 0 9px;align-items:center}
.section-title,.settings-title{font-size:13px!important;line-height:1.4;font-weight:700!important;letter-spacing:.055em;color:var(--muted)!important}
.section-note,.field-help,.source-note{font-size:12px;line-height:1.55}

/* Low-chrome surfaces */
.card,.settings-card,.entry-card,.outcome-card{background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important}
.card-pad{padding:0}
.card-press{transition:background var(--motion-fast) var(--ease)}
.card-press:active{transform:none!important;background:var(--surface2)!important}
.grid{gap:0}
.item-card{
  min-height:68px;align-items:center;gap:12px;padding:14px 0!important;
  border-bottom:1px solid var(--line)!important;
  content-visibility:auto;contain-intrinsic-size:68px;
}
.item-card:first-child{border-top:1px solid var(--line)!important}
.item-leading{width:31px;height:31px;border-radius:0;background:transparent!important;color:var(--rose2)}
.item-title{font-size:15px;font-weight:710;line-height:1.42}
.item-text{font-size:12.5px;line-height:1.55;margin-top:3px;-webkit-line-clamp:2}
.item-meta{font-size:11.5px;line-height:1.4;margin-top:5px;gap:9px}
.item-thumb{width:52px;height:52px;border:0;border-radius:9px}
.empty{padding:30px 0}
.empty-mark{width:42px;height:42px;border-radius:0;background:transparent!important;margin-bottom:7px}
.empty h3{font-size:16px;margin-bottom:5px}
.empty p{font-size:13px;line-height:1.6}

/* Buttons */
.btn{
  min-height:42px;border:1px solid var(--line);border-radius:12px;background:var(--surface);
  padding:9px 13px;font-size:13px;font-weight:680;box-shadow:none!important;
}
.btn-primary{background:var(--brand)!important;border-color:var(--brand)!important;color:#fff!important}
.btn-primary:active{transform:scale(.99)}
.btn-soft{background:var(--brand-soft)!important;border-color:transparent!important}
.btn-sm{min-height:34px;padding:6px 9px;font-size:12px;border-radius:10px}
.link-btn{color:var(--rose2);min-height:36px}
.chips{
  gap:7px;flex-wrap:nowrap;overflow-x:auto;padding:1px 0 5px;scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.chips::-webkit-scrollbar{display:none}
.chip{
  flex:0 0 auto;background:transparent;border:1px solid var(--line);border-radius:999px;
  padding:7px 11px;font-size:12px;line-height:1.2;color:var(--muted);
}
.chip.active{background:var(--ink)!important;color:var(--bg)!important;border-color:var(--ink)!important}

/* Inputs */
.field{gap:6px}.field+.field{margin-top:14px}
.field-label{font-size:12px;font-weight:680}
.input,.textarea,.select{
  border:1px solid var(--line);border-radius:12px;background:var(--surface);
  padding:11px 12px;box-shadow:none!important;
}
.input:focus,.textarea:focus,.select:focus{border-color:var(--rose);box-shadow:0 0 0 3px color-mix(in srgb,var(--rose) 15%,transparent)!important}
.textarea{line-height:1.7}

/* Navigation */
.bottom-nav{
  height:calc(var(--nav) + var(--safe-bottom));padding:7px 7px var(--safe-bottom);
  background:rgba(255,253,250,.98)!important;border-top:1px solid var(--line)!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important;
}
body[data-theme=dark] .bottom-nav{background:rgba(32,29,27,.98)!important}
.nav-inner{height:58px;max-width:620px;gap:0}
.nav-btn{
  position:relative;border-radius:0;background:transparent!important;color:var(--muted);
  gap:3px;font-size:10.5px;font-weight:620;
}
.nav-btn .icon{width:20px!important;height:20px!important}
.nav-btn.active{color:var(--rose2)!important}
.nav-btn.active::before{
  content:"";position:absolute;top:-7px;width:18px;height:2px;border-radius:2px;background:var(--rose2)
}
.fab{
  width:52px;height:52px;right:20px;bottom:calc(var(--nav) + var(--safe-bottom) + 14px);
  border:0!important;border-radius:50%;background:var(--brand)!important;color:#fff!important;
  box-shadow:0 5px 16px rgba(70,50,42,.14)!important;
}

/* Home */
.home-welcome{margin:0 0 23px}
.home-eyebrow{font-size:11.5px;color:var(--muted);letter-spacing:.055em}
.home-welcome h1{font-size:28px;line-height:1.18;letter-spacing:-.025em;margin:7px 0 7px}
.home-welcome p{font-size:13px;color:var(--muted);margin:0;line-height:1.6}
.home-layout-v2{display:block!important}
.home-primary,.home-secondary{min-width:0}
.home-capture{padding:0!important;margin-bottom:32px!important}
.home-capture-main{
  width:100%;min-height:55px;border:0!important;border-radius:14px;background:var(--brand)!important;color:white!important;
  display:flex;align-items:center;gap:12px;padding:0 17px;text-align:left;
}
.home-capture-mark{display:grid;place-items:center}
.home-capture-copy{display:grid;flex:1}
.home-capture-copy strong{font-size:15px}.home-capture-copy small{font-size:11.5px;opacity:.84;margin-top:1px}
.home-capture-shortcuts{
  display:grid!important;grid-template-columns:repeat(3,1fr)!important;
  border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-top:12px!important;
}
.home-capture-shortcuts button{
  min-height:61px;border:0!important;border-right:1px solid var(--line)!important;border-radius:0!important;background:transparent!important;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font-size:11.5px;
}
.home-capture-shortcuts button:last-child{border-right:0!important}
.home-capture-shortcuts .icon{width:19px!important;height:19px!important;color:var(--rose2)}
.home-focus-card,.home-memory-card,.home-outcome{
  background:transparent!important;border:0!important;border-top:1px solid var(--line)!important;border-radius:0!important;
  padding:19px 0!important;box-shadow:none!important;
}
.home-focus-card h2{font-size:20px;line-height:1.35;margin:5px 0}
.home-focus-card p,.home-memory-card p,.home-outcome p{font-size:12.5px;line-height:1.6}
.home-focus-button,.home-outcome-button{border:0!important;background:transparent!important;color:var(--rose2)!important;padding:6px 0!important;min-height:34px}
.home-section-title{margin-top:29px!important;padding-bottom:8px!important;border-bottom:1px solid var(--line)!important}
.home-section-title span{font-size:13px;font-weight:700;color:var(--muted);letter-spacing:.045em}
.home-recent-row{
  border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;background:transparent!important;
  padding:13px 0!important;content-visibility:auto;contain-intrinsic-size:64px;
}
.home-memory-card blockquote{font-size:18px!important;line-height:1.78!important}

/* Records */
.timeline{gap:0}
.timeline-day{font-size:11.5px;font-weight:650;padding:17px 0 6px}
.timeline-item{margin:0!important;padding:0!important}
.timeline-item:before,.timeline-item:after{display:none!important}
.timeline-item .card{
  padding:14px 0!important;border-bottom:1px solid var(--line)!important;
  content-visibility:auto;contain-intrinsic-size:70px;
}
.timeline-item .item-title{font-size:14px}
.timeline-item .item-text{font-size:12.5px}

/* Outcomes */
.outcome-card{
  min-height:94px;padding:19px 0!important;border-bottom:1px solid var(--line)!important;
  content-visibility:auto;contain-intrinsic-size:110px;
}
.outcome-card:first-child{border-top:1px solid var(--line)!important}
.outcome-title{font-size:17px;font-weight:740}
.outcome-sub{font-size:12.5px;line-height:1.55;margin-top:3px}
.outcome-actions{gap:13px;margin-top:9px}
.outcome-actions .btn{background:transparent!important;border:0!important;color:var(--rose2)!important;padding:5px 0!important;min-height:32px}

/* Settings */
.settings-group{margin-bottom:29px}
.settings-title{margin:0 0 7px}
.settings-card{border-top:1px solid var(--line)!important}
.settings-row{
  width:100%;min-height:66px;padding:11px 0!important;gap:11px;border-bottom:1px solid var(--line)!important;
  text-align:left;content-visibility:auto;contain-intrinsic-size:66px;
}
.settings-leading{width:28px;height:28px;border-radius:0;background:transparent!important;color:var(--rose2)}
.settings-leading .icon{width:18px!important;height:18px!important}
.settings-name{font-size:14.5px;font-weight:700}
.settings-desc{font-size:11.5px;line-height:1.45;margin-top:2px}
.settings-status{font-size:11.5px;color:var(--muted);max-width:78px;text-align:right;overflow:hidden;text-overflow:ellipsis}
.settings-row>.icon-sm{color:#aaa09a}

/* Sheets and modals */
.backdrop{background:rgba(40,34,30,.23)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.sheet,.modal{background:var(--surface)!important;box-shadow:var(--shadow2)!important}
.sheet{border-radius:22px 22px 0 0;padding:9px 20px calc(20px + var(--safe-bottom))}
.modal{border:1px solid var(--line);border-radius:20px;padding:20px}
.sheet-title{font-size:20px}
.sheet-body{gap:15px}
.sheet-actions{background:linear-gradient(to bottom,transparent,var(--surface) 20%)}

/* Dictionaries, stroke practice, editor */
.dict-entry{padding:16px 0!important;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;background:transparent!important}
.dict-title{font-size:21px}.dict-definition{font-size:13px;line-height:1.75}
.stroke-canvas-wrap{border-radius:14px;box-shadow:none!important}
.basic-strokes{gap:7px}
.basic-stroke-btn{border-radius:11px;box-shadow:none!important}
.editor-block{border-radius:12px;border-color:var(--line)}
.candidate{border-radius:12px;border-color:var(--line)}
.report-preview-shell{border-radius:14px}

/* Performance/stability */
img{content-visibility:auto}
.toast{box-shadow:none}
.skeleton:after{animation-duration:1.5s}
@media(max-width:560px){
  .grid-2,.grid-3,.inline-fields{grid-template-columns:1fr}
  .app-main{padding:23px 20px 46px}
  .page-title{font-size:27px!important}
  .page-actions .btn:not(.btn-primary){font-size:0;width:40px;padding:0}
  .page-actions .btn:not(.btn-primary) .icon{width:19px!important;height:19px!important}
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .report-preview-shell{padding:6px}
  .basic-strokes{grid-template-columns:repeat(4,1fr)}
  .sheet-actions{flex-wrap:wrap}.sheet-actions .btn{flex:1}
}
@media(min-width:760px){
  :root{--nav:0px;--header:70px}
  .app-shell{padding-left:196px;padding-bottom:0}
  .app-header{left:196px}.header-inner{padding:0 28px}
  .bottom-nav{left:0;top:0;right:auto;bottom:0;width:196px;height:100vh;padding:calc(18px + var(--safe-top)) 12px 18px;border-right:1px solid var(--line)}
  .bottom-nav:before{content:"語文素養";display:block;height:48px;padding:10px 12px;font-size:16px;font-weight:760}
  .nav-inner{height:auto;display:flex;flex-direction:column;gap:4px}
  .nav-btn{height:46px;flex-direction:row;justify-content:flex-start;padding:0 12px;gap:11px;font-size:13px;border-radius:10px!important}
  .nav-btn.active{background:var(--brand-soft)!important}.nav-btn.active::before{display:none}
  .fab{right:28px;bottom:28px}
  .sheet{left:50%;right:auto;bottom:22px;width:min(650px,92vw);border-radius:22px;transform:translateX(-50%);padding-bottom:20px}
}

@media(orientation:landscape) and (min-width:900px){
  .motion-card,.motion-section{animation-delay:0s!important}
}
@media(prefers-reduced-motion:reduce){
  *,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

/* v4.0: final interaction and hidden MISALIGNMENT layer */
body[data-theme=dark]{--bg:#000;--surface:#090909;--surface2:#151515;--ink:#fff;--ink2:#fff;--muted:#b9b2ae;--line:#292929;--line2:#3b3b3b;--brand:#df8580;--brand-soft:#291817;--rose:#df8580;--rose2:#e99590;--shadow:none;--shadow2:0 18px 48px rgba(0,0,0,.5)}
body[data-theme=dark] .app-header{background:rgba(0,0,0,.97)!important}body[data-theme=dark] .bottom-nav{background:rgba(5,5,5,.98)!important}
.fab{display:none!important}
.view{animation:v4-enter 150ms var(--ease) both!important}@keyframes v4-enter{from{opacity:.985;transform:translateX(3px)}to{opacity:1;transform:none}}
.misalignment-nudge{margin-top:14px;padding-top:11px;border-top:1px solid var(--line)}
.misalignment-nudge-toggle{border:0;background:transparent;padding:7px 0;color:var(--muted);font:650 12.5px/1.4 var(--ui)}
.misalignment-nudge-body{padding:10px 0 2px}.misalignment-nudge-label{font-size:11px;color:var(--muted);letter-spacing:.08em;margin-bottom:5px}.misalignment-nudge-question{font-size:14px;line-height:1.65}
.misalignment-nudge-actions{display:flex;gap:15px;margin-top:8px}.misalignment-nudge-actions .link-btn{font-size:12px;padding:4px 0}.misalignment-nudge-actions .muted{color:var(--muted)}

@media(orientation:landscape) and (min-width:900px){
  .motion-card,.motion-section{animation-delay:0s!important}
}
@media(prefers-reduced-motion:reduce){.view{animation:none!important}}

/* v4.2 PIN: round keypad, softer than the old rectangular grid */
.lock-screen{padding:24px 22px;background:var(--bg)}
.lock-card{width:min(100%,340px)}
.lock-card .first-run-logo{width:72px;height:72px;margin-bottom:13px}
.pin-dots{gap:10px;margin:20px auto 24px}
.pin-dot{width:11px;height:11px;border-width:1.5px}
.pin-pad{grid-template-columns:repeat(3,76px);justify-content:center;gap:14px 18px}
.pin-key{
  width:76px;height:76px;aspect-ratio:1;border:1px solid var(--line);
  border-radius:50%!important;background:var(--surface)!important;
  font-size:1.28rem;font-weight:620;box-shadow:none!important;
  transition:transform var(--motion-fast) var(--ease),background var(--motion-fast) var(--ease)
}
.pin-key:active{transform:scale(.96);background:var(--surface2)!important}
.pin-key[data-pin-key="清除"],.pin-key[data-pin-key="退格"]{
  border-color:transparent;background:transparent!important;font-size:.78rem;font-weight:650;color:var(--muted)
}
body[data-theme=dark] .pin-key{background:#111!important;border-color:#2a2a2a}
body[data-theme=dark] .pin-key:active{background:#1d1d1d!important}

/* Admissions / portfolio preparation */
.admission-entry{margin-bottom:25px!important}
.admission-entry-row{
  width:100%;min-height:68px;display:flex;align-items:center;gap:12px;
  padding:12px 0;border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);
  background:transparent;color:var(--ink);text-align:left
}
.admission-entry-icon{width:30px;height:30px;display:grid;place-items:center;color:var(--rose2)}
.admission-entry-copy{display:grid;gap:2px;flex:1}.admission-entry-copy strong{font-size:14.5px}.admission-entry-copy small{font-size:11.5px;line-height:1.45;color:var(--muted)}
.admission-route-list,.admission-targets,.admission-skill-list,.source-list{border-top:1px solid var(--line)}
.admission-route,.admission-target-row,.admission-skill-row,.source-row{
  padding:14px 0;border-bottom:1px solid var(--line);background:transparent
}
.admission-route strong,.admission-skill-title,.source-copy strong{font-size:14.5px}
.admission-route p{font-size:12.5px;line-height:1.62;color:var(--muted);margin:4px 0}
.admission-source-tag{display:block;font-size:10.5px;line-height:1.45;color:var(--muted);margin-top:5px}
.admission-target-row,.source-row{display:flex;align-items:center;gap:10px}
.admission-target-copy,.source-copy{display:grid;gap:2px;flex:1}
.admission-target-copy strong{font-size:14px}.admission-target-copy small,.source-copy small{font-size:11.5px;color:var(--muted);line-height:1.45}
.admission-target-actions{display:flex;gap:10px}
.admission-skill-row{display:grid;grid-template-columns:minmax(110px,.38fr) 1fr;gap:16px}
.admission-skill-note{font-size:12px;line-height:1.55;color:var(--muted)}
.source-row{text-decoration:none;color:var(--ink)}
.admission-actions{padding-top:14px}
.admission-evidence-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1px;background:var(--line);border:1px solid var(--line);border-radius:14px;overflow:hidden;margin-bottom:14px}
.admission-evidence-grid>div{background:var(--surface);padding:15px;display:grid;gap:2px}
.admission-evidence-grid strong{font-size:22px}.admission-evidence-grid span{font-size:11.5px;color:var(--muted)}
@media(max-width:380px){.pin-pad{grid-template-columns:repeat(3,70px);gap:12px 16px}.pin-key{width:70px;height:70px}.admission-skill-row{grid-template-columns:1fr;gap:4px}}

/* v5 practice / analytics / exam / previews */
.practice-topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:end;margin-bottom:18px}
.practice-char-input{display:flex;gap:8px;align-items:center}.practice-char-input .input{max-width:120px}
.practice-pronunciation{display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto;align-items:center;justify-content:end;column-gap:8px}
.practice-pronunciation .stroke-character{font-size:64px;line-height:1;margin:0}
.vertical-bopomofo{grid-column:2;grid-row:1;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:17px;line-height:1.05;min-width:22px}
.practice-pinyin{grid-column:1/3;grid-row:2;text-align:center;font-size:12px;color:var(--muted);margin-top:5px}
.practice-voice{width:42px;height:42px;border:0;border-radius:50%;background:var(--brand-soft);color:var(--rose2);display:grid;place-items:center}
.analysis-summary{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.analysis-summary>div{padding:15px 10px;border-right:1px solid var(--line);display:grid;gap:2px}.analysis-summary>div:last-child{border-right:0}.analysis-summary strong{font-size:22px}.analysis-summary span{font-size:11px;color:var(--muted)}
.analysis-bars{display:grid;gap:12px}.analysis-bar-row{display:grid;grid-template-columns:70px 1fr 36px;align-items:center;gap:10px;font-size:12px}.analysis-bar-row>div{height:7px;background:var(--surface2);border-radius:999px;overflow:hidden}.analysis-bar-row i{display:block;height:100%;background:var(--rose2);border-radius:999px}.analysis-bar-row b{text-align:right;font-size:11px}
.exam-card{border-top:1px solid var(--line);padding-top:18px}.exam-lead{font-size:13px;line-height:1.65;color:var(--muted)}.exam-actions,.exam-save-row{display:flex;gap:9px;flex-wrap:wrap}.exam-guide{margin:14px 0;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-size:13px;line-height:1.65}.exam-history{border-top:1px solid var(--line)}.exam-history-row{display:grid;gap:3px;padding:12px 0;border-bottom:1px solid var(--line)}.exam-history-row span{font-size:12px;line-height:1.5;color:var(--muted)}.exam-history-row small{font-size:10.5px;color:var(--muted)}
.source-preview{display:grid;gap:10px;min-height:min(74vh,760px)}.source-preview-bar{display:flex;justify-content:space-between;gap:10px}.source-preview-frame{width:100%;height:min(68vh,720px);border:1px solid var(--line);border-radius:12px;background:#fff}
@media(max-width:560px){.practice-topbar{grid-template-columns:1fr}.practice-pronunciation{justify-content:start}.analysis-summary{grid-template-columns:repeat(2,1fr)}.source-preview-frame{height:62vh}}

.report-article-summary{border-top:1px solid #ded7d1;margin-top:10px}
.report-article-summary>div{display:grid;gap:3px;padding:9px 0;border-bottom:1px solid #e8e1dc}
.report-article-summary strong{font-size:13px}.report-article-summary span,.report-note{font-size:11px;line-height:1.55;color:#786f69}

/* v5 practice */
.practice-toolbar{display:grid;grid-template-columns:1fr 170px;gap:12px;align-items:end}
.practice-input-row{display:flex;gap:8px}
.practice-pronunciation{display:grid;grid-template-columns:minmax(110px,150px) 34px 1fr 42px;gap:10px;align-items:center;margin:18px 0}
.practice-pronunciation .stroke-character{margin:0!important;min-height:142px;display:grid;place-items:center;font-size:104px;line-height:1}
.practice-zhuyin{min-height:105px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:22px;line-height:1.08;color:var(--ink)}
.practice-romanization{font-size:15px;color:var(--muted);align-self:end;padding-bottom:14px}
.practice-voice{width:42px;height:42px;border-radius:50%;border:1px solid var(--line);background:transparent;color:var(--rose2);display:grid;place-items:center}
.practice-voice:active{background:var(--surface2)}
/* report preview */
.report-overview-row{display:flex;justify-content:space-between;gap:18px;padding:8px 0;border-bottom:1px solid #e9ded6;font-size:12px}
.report-overview-row span{color:#756b66;text-align:right}
.report-bars{display:grid;gap:8px;margin:12px 0 24px}.report-bars>div{display:grid;grid-template-columns:70px 1fr 30px;gap:10px;align-items:center;font-size:12px}.report-bars i{height:7px;background:#d9827d;border-radius:99px;display:block;width:min(100%,calc((var(--value) + 1)*8%));opacity:.72}.report-bars b{text-align:right}
/* final polish */
.source-preview-bar{position:sticky;top:0;z-index:2;background:var(--surface);padding-bottom:8px}
.source-preview-frame{width:100%;min-height:62vh;border:1px solid var(--line);border-radius:14px;background:#fff}
@media(max-width:560px){.practice-toolbar{grid-template-columns:1fr}.practice-pronunciation{grid-template-columns:118px 30px 1fr 42px}.practice-pronunciation .stroke-character{font-size:92px}}

.practice-zhuyin{position:relative;display:grid!important;place-items:center!important}
.practice-zhuyin-core{display:flex;flex-direction:column;align-items:center;line-height:1.08}
.practice-zhuyin-tone{position:absolute;right:0;bottom:17px;font-size:.8em;color:var(--muted)}

/* v5 professional report preview: no gradient/card dashboard look */
.report-rule{height:2px!important;background:#d9cbc3!important}
.report-card{border:0!important;border-top:1px solid #ddd2ca!important;border-radius:0!important;padding:4mm 0!important;margin-bottom:5mm!important}
.report-stats{gap:0!important;border-top:1px solid #ddd2ca;border-bottom:1px solid #ddd2ca}
.report-stat{border:0!important;border-right:1px solid #eee4de!important;border-radius:0!important;padding:4mm 2mm!important}
.report-stat:nth-child(3n){border-right:0!important}

/* v6 execution + layout reliability */
.btn,.link-btn,.home-focus-button,.home-capture-main,.admission-entry-row,.settings-row{white-space:nowrap}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;line-height:1.2;max-width:100%}
.page-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:start!important;column-gap:14px;row-gap:12px}
.page-head>div:first-child{min-width:0}
.page-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:nowrap!important;max-width:100%}
.home-focus-button{display:flex!important;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:42px}
.home-focus-button .icon{flex:none}
.outcome-card .outcome-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.outcome-card .outcome-actions .btn{width:auto!important;min-width:0}
.boot-error{max-width:520px;margin:16vh auto 0;text-align:center}.boot-error-mark{width:46px;height:46px;border:1px solid var(--line);border-radius:50%;display:grid;place-items:center;margin:0 auto 14px;color:var(--rose2);font-weight:800}.boot-error-actions{display:flex;justify-content:center;gap:10px;margin:20px 0}
.source-preview-safe{display:grid;gap:16px}.source-preview-source{display:flex;align-items:flex-start;gap:12px;padding:15px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.source-preview-source>.icon{flex:none;color:var(--rose2)}.source-preview-source p{font-size:12px;line-height:1.6;color:var(--muted);margin:4px 0 0;white-space:normal}
.self-test-list{border-top:1px solid var(--line)}.self-test-row{display:flex;gap:12px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}.self-test-row>div{display:grid;gap:2px;min-width:0}.self-test-row strong{font-size:14px}.self-test-row small{font-size:11.5px;color:var(--muted);white-space:normal}.self-test-state{min-width:42px;font-size:11px;font-weight:700}.self-test-state.ok{color:var(--success)}.self-test-state.bad{color:var(--danger)}
@media(max-width:560px){
  .page-head{grid-template-columns:minmax(0,1fr) auto!important}
  .page-actions .btn{padding-inline:10px}
  .page-actions .btn-primary{font-size:12px!important;width:auto!important;min-width:max-content}
  .page-actions .btn:not(.btn-primary){width:38px!important;height:38px!important;padding:0!important;font-size:0!important;border-radius:50%}
  .page-actions .btn:not(.btn-primary) .icon{width:18px!important;height:18px!important}
  .home-focus-button{padding:7px 0!important}
}
@media(max-width:360px){
  .app-main{padding-left:16px;padding-right:16px}
  .page-title{font-size:25px!important}
  .page-actions{gap:4px}
  .page-actions .btn-primary{padding-inline:9px;font-size:11.5px!important}
}

/* ==========================================================================
   v7 FINAL MOBILE INTERACTION PATCH
   Same version number by design. This block overrides legacy layers.
   ========================================================================== */
html,body{touch-action:manipulation}
button,a,input,textarea,select,label,[role="button"]{pointer-events:auto}
button,a,[role="button"]{-webkit-tap-highlight-color:rgba(217,125,118,.10)}
button:disabled{opacity:.45;pointer-events:none}
.fab,#global-add-btn{display:none!important;visibility:hidden!important;pointer-events:none!important}
.app-header{z-index:40!important}
.bottom-nav{z-index:45!important}
.overlay-root{z-index:100!important;pointer-events:none}
.overlay-root.active{pointer-events:auto}
.app-main{position:relative;z-index:1}
.page-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;column-gap:14px!important}
.page-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;flex-wrap:wrap!important;max-width:100%}
.page-actions .btn{width:auto!important;max-width:100%!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;font-size:12.5px!important;padding-inline:11px!important}
.page-actions .btn .icon{flex:0 0 auto}
.home-focus-button,.home-outcome-button,.admission-entry-row,.home-recent-row{
  width:100%!important;display:flex!important;align-items:center!important
}
.home-focus-button,.home-outcome-button{justify-content:space-between!important;white-space:nowrap!important;gap:12px!important}
.home-focus-button .icon,.home-outcome-button .icon{flex:0 0 auto!important;margin-left:auto!important}
.item-card,.settings-row,.outcome-card,.timeline-item .card,.home-recent-row{
  content-visibility:visible!important;contain:none!important
}
.btn,.icon-btn,.nav-btn,.chip,.link-btn,.quick-action,.home-focus-button,.home-outcome-button,
.admission-entry-row,.home-recent-row,.settings-row,.candidate,.pin-key{
  position:relative;z-index:2;cursor:pointer
}
.icon-btn{display:grid!important;place-items:center!important;flex:0 0 42px}
.icon-btn .icon{width:20px!important;height:20px!important}
.btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;line-height:1.25!important}
.btn-block{width:100%!important}
.quick-grid{gap:8px!important}
.quick-action{min-height:70px!important;padding:11px 8px!important;border-radius:13px!important}
.quick-action .icon{width:20px!important;height:20px!important}
.nav-btn{min-width:0!important}
.nav-btn span{white-space:nowrap!important}
.sheet{max-height:min(88dvh,820px)!important;overflow:auto!important;-webkit-overflow-scrolling:touch}
.sheet-actions{position:sticky!important;bottom:0!important;z-index:5!important;background:var(--surface)!important;padding-top:10px!important}
.source-preview-frame{min-height:55dvh!important}
@media(max-width:560px){
  .app-main{padding-left:18px!important;padding-right:18px!important}
  .page-head{grid-template-columns:minmax(0,1fr)!important;row-gap:12px!important}
  .page-actions{justify-content:flex-start!important;width:100%!important;overflow-x:auto!important;flex-wrap:nowrap!important;padding-bottom:2px!important;scrollbar-width:none}
  .page-actions::-webkit-scrollbar{display:none}
  .page-actions .btn:not(.btn-primary){font-size:12.5px!important;width:auto!important;padding:8px 10px!important}
  .page-actions .btn:not(.btn-primary) .icon{width:17px!important;height:17px!important}
  .page-title{font-size:26px!important}
  .page-kicker{max-width:100%!important}
  .home-capture-shortcuts{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .home-capture-shortcuts button{min-width:0!important;padding:8px 4px!important}
  .home-capture-shortcuts button span{white-space:nowrap!important}
  .settings-status{max-width:90px!important}
  .admission-skill-row{grid-template-columns:1fr!important}
  .candidate{align-items:flex-start!important}
  .stroke-controls{display:flex!important;gap:7px!important;overflow-x:auto!important;padding-bottom:3px!important}
  .stroke-controls .btn{flex:0 0 auto!important;white-space:nowrap!important}
}

/* v7.0 r4 — execution-layer fix */
#global-add-btn,.fab{display:none!important;visibility:hidden!important;pointer-events:none!important}
.overlay-root{pointer-events:none!important}
.overlay-root.active{pointer-events:auto!important}
.app-shell,.app-main,.view{pointer-events:auto!important}
.app-main{isolation:isolate}
button,a,[role="button"],[data-action],[data-nav],[data-open-article],[data-open-outcome],[data-entry-action]{
  pointer-events:auto!important;
  touch-action:manipulation!important;
  -webkit-user-select:none;
  user-select:none;
}
input,textarea,select{pointer-events:auto!important;touch-action:auto!important;-webkit-user-select:text;user-select:text}
.page-actions,.detail-tools,.outcome-actions,.stroke-controls,.exam-actions,.exam-save-row{position:relative;z-index:3}
.bottom-nav{pointer-events:auto!important}
.nav-inner,.nav-btn{pointer-events:auto!important}
.nav-btn{z-index:2}
@media(max-width:560px){
  .page-actions{max-width:100%;overflow-x:auto!important}
  .page-actions .btn{flex:0 0 auto!important}
  .home-focus-button,.home-outcome-button{min-width:0!important}
}

/* ==========================================================================
   v7.0 r6 — tested, text-first mobile UI
   ========================================================================== */
#global-add-btn,.fab{display:none!important;pointer-events:none!important}
.setup-notice{width:100%;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;margin:-2px 0 22px;border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:transparent;color:var(--ink);text-align:left}
.setup-notice span:first-child{display:grid;gap:2px}.setup-notice strong{font-size:13.5px}.setup-notice small{font-size:11.5px;color:var(--muted);line-height:1.45}.setup-notice-action{font-size:12px;color:var(--rose2);white-space:nowrap}
.utility-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:0 0 18px}
.utility-row-three{grid-template-columns:repeat(3,minmax(0,1fr))}
.utility-row button{min-height:46px;border:0;border-right:1px solid var(--line);background:transparent;color:var(--ink);font:680 12.5px/1.3 var(--ui);white-space:nowrap}
.utility-row button:last-child{border-right:0}.utility-row button:active{background:var(--surface2)}
.primary-row{display:flex;justify-content:flex-start;margin:-2px 0 20px}.primary-row .btn{min-width:126px}
/* Symbols are kept only where universally understood: search, notification, audio controls and bottom navigation. */
.btn .icon,.quick-action .icon,.home-capture-main .icon,.home-capture-shortcuts .icon,.home-focus-button .icon,.home-outcome-button .icon,.home-recent-icon,.item-leading,.settings-leading,.setup-icon,.admission-entry-icon,.settings-row>.icon-sm{display:none!important}
.btn{gap:0!important}.home-capture-main{justify-content:flex-start!important}.home-capture-copy{padding-left:0!important}.home-capture-main>.icon:last-child{display:none!important}
.home-capture-shortcuts button{font-weight:680!important}.home-focus-button,.home-outcome-button{justify-content:flex-start!important}.home-outcome-button{width:auto!important;min-width:70px!important}
.settings-row{grid-template-columns:minmax(0,1fr) auto!important;padding:13px 0!important;gap:14px!important}.settings-status{max-width:94px!important;color:var(--muted)!important}
.admission-entry-row{grid-template-columns:minmax(0,1fr)!important}.admission-entry-row>.icon{display:none!important}
.page-actions .btn{white-space:nowrap!important}.page-head{margin-bottom:22px!important}
/* First-run/manual device sheet is simple, not a card wall. */
.setup-list{border-top:1px solid var(--line)!important}.setup-item{border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;padding:12px 0!important;background:transparent!important}.setup-item .btn{min-width:58px!important}
@media(max-width:560px){
 .app-main{padding-left:19px!important;padding-right:19px!important}
 .page-title{font-size:26px!important}.page-kicker{font-size:12.5px!important}
 .home-capture-main{min-height:56px!important}.home-capture-shortcuts button{min-height:56px!important}
 .bottom-nav .nav-btn{font-size:11.5px!important}.bottom-nav .nav-btn .icon{width:19px!important;height:19px!important}
}

/* r6 final cleanup */
.empty-mark{display:none!important}.empty{padding-top:38px!important}
.toast.success{background:rgba(42,38,36,.96)!important;border-left:3px solid var(--rose)!important}.toast.error{background:rgba(80,37,37,.97)!important}

/* r6 populated-home alignment */
.home-focus-top,.home-section-title{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important}
.home-focus-date,.home-section-title small{font-size:11px!important;color:var(--muted)!important;white-space:nowrap!important}
.home-memory-card{display:block!important;width:100%!important;text-align:left!important;border:0!important;background:transparent!important;padding:17px 0!important;color:var(--ink)!important}
.home-memory-card blockquote{margin:0 0 8px!important}.home-memory-card>span{font-size:11.5px!important;color:var(--muted)!important}
.home-outcome{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:18px!important}
.home-outcome>div{display:grid!important;gap:3px!important;min-width:0!important}.home-outcome .home-label{font-size:11px!important;color:var(--muted)!important}.home-outcome strong{font-size:14px!important;line-height:1.45!important}.home-outcome small{font-size:11.5px!important;color:var(--muted)!important}
.home-outcome-button{min-width:auto!important;width:auto!important;padding:6px 0!important;font-size:12px!important;white-space:nowrap!important}

/* 語文素養 v7.0 — 行動版穩定排版層。只處理顯示與點擊，不改資料。 */
:root{
  --v7-max:720px;
  --v7-pad:18px;
  --v7-gap:14px;
}
html,body{background:var(--bg)!important;overflow-x:hidden}
body{font-size:15px;line-height:1.6}
button,a,input,textarea,select{touch-action:manipulation}
button,a,[role="button"]{pointer-events:auto!important}
/* Safari：互動列不可使用 content-visibility，避免 hit-test 不穩 */
.item-card,.home-recent-row,.timeline-item .card,.outcome-card,.settings-row,img{content-visibility:visible!important;contain:none!important}

.app-main{max-width:var(--v7-max);padding:24px var(--v7-pad) 44px}
.header-inner{max-width:var(--v7-max);padding:0 var(--v7-pad)}
.logo-image{width:36px;height:36px;object-fit:contain;border-radius:0!important;box-shadow:none!important}
.brand-title{font-size:16px;white-space:nowrap}
.icon{width:20px;height:20px;stroke-width:1.7!important}
.icon-sm{width:16px;height:16px}
.icon-btn{width:44px;height:44px;border-radius:50%!important}

/* 每頁先有清楚標題，再放操作；手機不把按鈕文字藏掉 */
.page-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:start!important;gap:12px 14px;margin:0 0 24px!important}
.page-title{font-size:28px!important;line-height:1.18!important;margin:0}
.page-kicker{font-size:13px;line-height:1.55;margin-top:6px;max-width:38em}
.page-actions{display:flex!important;align-items:center!important;justify-content:flex-end;gap:7px!important;flex-wrap:wrap!important}
.page-actions .btn,.page-actions .btn:not(.btn-primary){font-size:12.5px!important;width:auto!important;padding:8px 11px!important;white-space:nowrap!important;background:var(--surface)!important;border:1px solid var(--line)!important}
.page-actions .btn.btn-primary{background:var(--brand)!important;border-color:var(--brand)!important;color:#fff!important}
.page-actions .btn .icon{width:16px!important;height:16px!important}

.btn{min-height:44px!important;border-radius:12px!important;padding:9px 13px!important;line-height:1.25!important;white-space:nowrap!important;flex:none}
.btn-sm{min-height:38px!important;padding:7px 10px!important;font-size:12px!important}
.btn-block{width:100%!important;white-space:normal!important}
.link-btn{min-height:40px!important;padding:7px 2px!important}

/* 主頁：避免「開始一篇」箭頭掉行 */
.home-capture-main{min-height:62px!important;border-radius:14px!important}
.home-capture-copy{min-width:0}
.home-capture-copy strong,.home-capture-copy small{white-space:normal!important}
.home-capture-shortcuts{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.home-capture-shortcuts button{min-width:0!important;padding:9px 4px!important;white-space:nowrap!important}
.home-focus-button{width:100%!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;white-space:nowrap!important}
.home-focus-button span{white-space:nowrap!important}
.home-focus-button .icon{flex:none}
.home-outcome-button{width:44px!important;height:44px!important;display:grid!important;place-items:center!important}

/* 功能多但不擁擠 */
.section{margin-bottom:28px!important}
.section-head{min-height:40px;margin:0 0 8px!important}
.section-title{font-size:13px!important;letter-spacing:.04em!important}
.detail-tools,.outcome-actions,.stroke-controls,.exam-actions,.exam-save-row,.admission-actions{display:flex!important;gap:8px!important;flex-wrap:wrap!important;align-items:center}
.detail-tools .btn{flex:0 0 auto}

/* 清單保持對齊 */
.item-card{display:grid!important;grid-template-columns:34px minmax(0,1fr) auto;align-items:center!important;gap:11px!important;padding:14px 0!important}
.item-leading{width:30px!important;height:30px!important;display:grid;place-items:center}
.item-body{min-width:0}
.item-card>.btn{justify-self:end}
.item-title{overflow-wrap:anywhere}
.item-text{overflow-wrap:anywhere}

/* 設定：四欄固定，不再文字擠成一團 */
.settings-row{display:grid!important;grid-template-columns:30px minmax(0,1fr) auto 18px;align-items:center!important;gap:10px!important;min-height:68px!important;padding:11px 0!important}
.settings-leading{width:30px!important;height:30px!important}
.settings-copy{min-width:0!important}
.settings-name{font-size:14.5px!important;line-height:1.3}
.settings-desc{font-size:11.5px!important;line-height:1.45!important;white-space:normal!important}
.settings-status{max-width:90px!important;font-size:11.5px!important;text-align:right!important;white-space:normal!important;line-height:1.3!important}
.settings-row>.icon-sm{justify-self:end}

/* 成果：建立成果必須單行 */
.outcome-card{padding:18px 0!important}
.outcome-actions .btn{min-height:40px!important;padding:6px 2px!important}
.admission-entry-row{min-height:72px!important;padding:13px 0!important}
.admission-entry-copy{min-width:0}
.admission-entry-copy strong{font-size:14.5px;line-height:1.35}
.admission-entry-copy small{font-size:11.5px;line-height:1.45;white-space:normal}

/* 書房、紀錄 chips 水平滾動，不擠多行 */
.chips{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:7px!important;padding:1px 0 6px!important;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:0 0 auto!important;white-space:nowrap!important;min-height:36px}

/* 練字 */
.practice-toolbar{grid-template-columns:minmax(0,1fr) 150px!important}
.practice-input-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:8px!important}
.practice-pronunciation{grid-template-columns:118px 34px minmax(0,1fr) 44px!important}
.stroke-canvas-wrap{max-width:420px!important;border-radius:14px!important}
.basic-strokes{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.basic-stroke-btn{min-width:0!important}

/* Modal / Sheet：避免按鈕被底部安全區壓住 */
.overlay-root.active{pointer-events:auto!important}
.sheet,.modal{overscroll-behavior:contain}
.sheet-actions{display:flex!important;gap:8px!important;flex-wrap:wrap!important;padding-bottom:calc(12px + var(--safe-bottom))!important}
.sheet-actions .btn{flex:1 1 auto!important}
.modal-wide{width:min(96vw,940px)!important}
.source-preview-frame{min-height:58vh!important}

/* PIN 圓形 */
.pin-pad{grid-template-columns:repeat(3,74px)!important;gap:13px 17px!important;justify-content:center!important}
.pin-key{width:74px!important;height:74px!important;aspect-ratio:1!important;border-radius:50%!important}

/* 自我檢查 */
.self-check-summary{display:flex;align-items:baseline;gap:8px;padding:4px 0 14px;border-bottom:1px solid var(--line)}
.self-check-summary strong{font-size:28px}.self-check-summary span{font-size:12px;color:var(--muted)}
.self-check-list{display:grid}.self-check-row{display:grid;grid-template-columns:24px minmax(0,1fr);gap:4px 9px;padding:11px 0;border-bottom:1px solid var(--line)}
.self-check-row span{grid-row:1/3;color:var(--rose2)}.self-check-row strong{font-size:13.5px}.self-check-row small{font-size:11.5px;color:var(--muted)}

/* 黑底白字＋粉色輔助 */
body[data-theme=dark]{--bg:#000!important;--surface:#0b0b0b!important;--surface2:#151515!important;--ink:#fff!important;--ink2:#fff!important;--muted:#b8b0ac!important;--line:#292929!important;--brand:#d7817c!important;--rose2:#e99a95!important}
body[data-theme=dark] .app-header{background:rgba(0,0,0,.98)!important}
body[data-theme=dark] .bottom-nav{background:rgba(5,5,5,.99)!important}

/* 固定浮動＋不出現 */
.fab{display:none!important}

@media(max-width:560px){
  .app-main{padding:21px 17px 42px!important}
  .header-inner{padding:0 17px!important}
  .page-head{grid-template-columns:1fr!important;gap:10px!important}
  .page-title{font-size:26px!important}
  .page-actions{justify-content:flex-start!important;width:100%;flex-wrap:nowrap!important;overflow-x:auto!important;padding-bottom:3px;scrollbar-width:none}
  .page-actions::-webkit-scrollbar{display:none}
  .page-actions .btn,.page-actions .btn:not(.btn-primary){font-size:12px!important;min-height:40px!important}
  .home-welcome h1{font-size:27px!important}
  .settings-status{max-width:76px!important}
  .practice-toolbar{grid-template-columns:1fr!important}
  .practice-pronunciation{grid-template-columns:106px 30px minmax(0,1fr) 42px!important}
  .practice-pronunciation .stroke-character{font-size:82px!important}
  .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:360px){
  .app-main{padding-left:14px!important;padding-right:14px!important}
  .header-inner{padding-left:14px!important;padding-right:14px!important}
  .brand-title{font-size:15px}
  .home-capture-shortcuts button{font-size:11px!important}
  .settings-row{grid-template-columns:27px minmax(0,1fr) 66px 16px;gap:8px!important}
  .pin-pad{grid-template-columns:repeat(3,68px)!important}.pin-key{width:68px!important;height:68px!important}
}

@media(min-width:760px){
  .app-main{max-width:960px;padding:30px 28px 48px!important}
  .header-inner{max-width:960px;padding:0 28px!important}
}


@media(orientation:landscape) and (min-width:900px){
  .motion-card,.motion-section{animation-delay:0s!important}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* r6 */
.page-actions{max-width:100%}.sheet-actions .btn{white-space:nowrap}

/* 語文素養 7.0｜修訂 1.0 Design System */
:root{
  color-scheme:light;
  --bg:#FBF8F4;
  --surface:#FFFFFF;
  --surface-soft:#F5EFEA;
  --surface-strong:#EEE5DF;
  --ink:#282321;
  --muted:#766D67;
  --quiet:#A29891;
  --line:#E8DFD8;
  --line-strong:#D7CBC3;
  --accent:#CF7E77;
  --accent-strong:#B96762;
  --accent-soft:#F5E5E1;
  --success:#607665;
  --danger:#A85652;
  --shadow:0 16px 44px rgba(65,49,40,.10);
  --radius-sm:10px;
  --radius:15px;
  --radius-lg:24px;
  --header-h:68px;
  --nav-h:72px;
  --safe-top:env(safe-area-inset-top,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --ease:cubic-bezier(.2,.75,.25,1);
  --motion-fast:140ms;
  --motion:190ms;
  --ui:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang TC","Noto Sans TC","Microsoft JhengHei",sans-serif;
}
body[data-theme=dark]{
  color-scheme:dark;
  --bg:#12100F;
  --surface:#1B1816;
  --surface-soft:#24201D;
  --surface-strong:#2D2824;
  --ink:#F7F3EF;
  --muted:#B9B0AA;
  --quiet:#8D8580;
  --line:#342E2A;
  --line-strong:#4A413B;
  --accent:#D99B95;
  --accent-strong:#E4AEA8;
  --accent-soft:#342422;
  --success:#8DA495;
  --danger:#D47D78;
  --shadow:0 20px 54px rgba(0,0,0,.30);
}
*{box-sizing:border-box}
html{background:var(--bg);min-height:100%;overflow-x:hidden;scroll-behavior:smooth}
body{margin:0;min-height:100dvh;background:var(--bg)!important;color:var(--ink);font:15px/1.62 var(--ui);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;overflow-x:hidden;overscroll-behavior-y:none}
button,input,textarea,select{font:inherit;color:inherit}
button,a,[role=button]{touch-action:manipulation;-webkit-tap-highlight-color:rgba(207,126,119,.11)}
button{cursor:pointer}
img,svg,canvas,iframe{max-width:100%}
img{height:auto}
.fab,#global-add-btn{display:none!important;pointer-events:none!important}

.app-shell{min-height:100dvh;padding-top:calc(var(--header-h) + var(--safe-top));padding-bottom:calc(var(--nav-h) + var(--safe-bottom));background:var(--bg)}
.app-header{position:fixed;z-index:50;left:0;right:0;top:0;height:calc(var(--header-h) + var(--safe-top));padding-top:var(--safe-top);background:color-mix(in srgb,var(--bg) 96%,transparent);border-bottom:1px solid var(--line);backdrop-filter:saturate(120%) blur(14px);-webkit-backdrop-filter:saturate(120%) blur(14px)}
.header-inner{height:var(--header-h);max-width:760px;margin:auto;padding:0 18px;display:flex;align-items:center;gap:9px}
.brand{display:flex;align-items:center;gap:9px;min-width:0;min-height:44px;padding:0;border:0;background:transparent;color:var(--ink);text-align:left}
.logo-image{width:34px;height:34px;object-fit:contain;border-radius:0!important;box-shadow:none!important;flex:none}
.brand-copy{display:grid;min-width:0}
.brand-title{font-size:16px;font-weight:760;line-height:1.2;white-space:nowrap}
.brand-subtitle{font-size:11px;color:var(--muted);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}
.header-spacer{flex:1}.header-actions{display:flex;gap:2px}
.icon-btn{width:42px!important;height:42px!important;display:grid!important;place-items:center!important;border:0!important;border-radius:50%!important;background:transparent!important;color:var(--ink)!important;box-shadow:none!important}
.icon-btn:active{background:var(--surface-soft)!important}
.icon{fill:none!important;stroke:currentColor!important;stroke-width:1.65!important;stroke-linecap:round!important;stroke-linejoin:round!important}

.app-main{width:min(100%,760px);margin:auto;padding:24px 18px 52px;min-width:0}
.view{min-width:0;animation:view-in var(--motion) var(--ease) both}
@keyframes view-in{from{opacity:.01;transform:translate3d(7px,0,0)}to{opacity:1;transform:none}}
.page-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:12px 16px!important;align-items:start!important;margin:0 0 24px!important}
.page-title{margin:0!important;font-size:28px!important;line-height:1.18!important;font-weight:780!important;letter-spacing:-.025em!important}
.page-kicker{margin:7px 0 0!important;color:var(--muted)!important;font-size:13px!important;line-height:1.55!important;max-width:40em}
.page-actions{display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:wrap!important;justify-content:flex-end!important}

.btn{min-height:44px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;padding:9px 14px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--surface)!important;color:var(--ink)!important;font-size:13px!important;font-weight:690!important;line-height:1.25!important;white-space:nowrap!important;box-shadow:none!important;transition:transform var(--motion-fast) var(--ease),background var(--motion-fast) var(--ease),border-color var(--motion-fast) var(--ease)}
.btn:active{transform:scale(.985);background:var(--surface-soft)!important}
.btn-primary{background:var(--accent)!important;border-color:var(--accent)!important;color:#fff!important}
.btn-primary:active{background:var(--accent-strong)!important}
.btn-soft{background:var(--accent-soft)!important;border-color:transparent!important;color:var(--accent-strong)!important}
.btn-danger,.text-danger{color:var(--danger)!important}
.btn-block{width:100%!important}.btn-sm{min-height:38px!important;padding:7px 10px!important;font-size:12px!important}
.text-action,.link-btn,.calendar-inline{min-height:40px;border:0;background:transparent;color:var(--accent-strong);font-size:12.5px;font-weight:700;padding:6px 0;white-space:nowrap}
.text-action:active,.link-btn:active,.calendar-inline:active{opacity:.65}
.primary-cta{width:100%;min-height:54px;border:0;border-radius:15px;background:var(--accent);color:#fff;font-size:15px;font-weight:760;padding:12px 17px;text-align:center;transition:transform var(--motion-fast) var(--ease),background var(--motion-fast) var(--ease)}
.primary-cta:active{transform:scale(.99);background:var(--accent-strong)}
.section{margin:30px 0}.section-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:38px;padding-bottom:8px;border-bottom:1px solid var(--line);font-size:13px;font-weight:720;color:var(--muted)}
.section-row small{font-size:11.5px;font-weight:500;color:var(--quiet);text-align:right}
.section-eyebrow,.stage-status,.account-step{font-size:11px;font-weight:760;letter-spacing:.075em;text-transform:uppercase;color:var(--accent-strong)}
.quiet-empty,.home-empty-copy{color:var(--muted);font-size:13px;line-height:1.65;margin:16px 0}
.load-more{display:block;margin:18px auto 0;min-height:42px;border:0;background:transparent;color:var(--accent-strong);font-weight:700}

/* Account */
.account-gate{position:fixed;z-index:220;inset:0;display:grid;place-items:center;padding:calc(22px + var(--safe-top)) 20px calc(22px + var(--safe-bottom));background:var(--bg);overflow:auto}
.account-gate-panel{width:min(100%,410px);display:grid;gap:16px;padding:26px 22px;border:1px solid var(--line);border-radius:26px;background:var(--surface);box-shadow:var(--shadow)}
.account-brand{display:flex;align-items:center;gap:9px;font-weight:780}.account-brand img{width:34px;height:34px;object-fit:contain}
.account-gate h1{margin:0;font-size:27px;line-height:1.2}.account-gate p{margin:0;color:var(--muted);font-size:13px;line-height:1.65}
.account-gate form{display:grid;gap:13px}.account-gate label{display:grid;gap:6px;font-size:12px;font-weight:690;color:var(--muted)}
.account-avatar{display:grid;place-items:center;border-radius:50%;object-fit:cover;background:var(--accent-soft);color:var(--accent-strong);font-weight:780;overflow:hidden;flex:none}
.account-avatar-sm{width:38px;height:38px;font-size:15px}.account-avatar-md{width:54px;height:54px;font-size:19px}.account-avatar-lg{width:88px;height:88px;font-size:28px}
.account-avatar-picker{justify-self:center;display:grid;justify-items:center;gap:7px;border:0;background:transparent;color:var(--muted)}
.account-note,.account-local-note,.voice-setting-note{padding:12px 14px;border-radius:13px;background:var(--surface-soft);color:var(--muted);font-size:12px;line-height:1.6}
.account-login-panel{text-align:center;justify-items:center}.account-login-panel form{width:100%;text-align:left}
.account-settings-card,.account-sync-note{width:100%;display:flex;align-items:center;gap:13px;padding:13px 0;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left}
.account-settings-card>span:nth-child(2),.account-sync-note>span{display:grid;gap:2px;min-width:0;flex:1}.account-settings-card strong,.account-sync-note strong{font-size:14.5px}.account-settings-card small,.account-sync-note span{font-size:11.5px;color:var(--muted);line-height:1.45}
.account-sync-note{display:grid;gap:2px;color:var(--ink)}.account-editor-head{display:flex;align-items:center;gap:14px;margin-bottom:14px}
.account-password-details{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px 0}.account-password-details summary{font-weight:700;cursor:pointer}
.settings-switch{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 0}.settings-switch span{display:grid}.settings-switch small{font-size:11.5px;color:var(--muted)}

/* Home / stage */
.home-profile-line{display:flex;align-items:center;gap:10px;margin-bottom:18px}.home-profile-line>div{display:grid}.home-profile-line span{font-size:11px;color:var(--muted)}.home-profile-line strong{font-size:15px}
.stage-home-card,.stage-empty-card,.current-stage-v7{padding:20px;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);box-shadow:0 8px 26px rgba(65,49,40,.055)}
.stage-home-top,.stage-current-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.stage-home-card h1,.stage-empty-card h1{margin:7px 0 4px;font-size:24px;line-height:1.25}.stage-home-card p,.stage-empty-card p,.current-stage-v7 p{margin:0;color:var(--muted);font-size:12.5px;line-height:1.6}
.stage-empty-card>span{font-size:11.5px;color:var(--muted)}.stage-empty-card .primary-cta{margin-top:18px}
.stage-progress-line{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin-top:20px;position:relative}.stage-progress-line:before{content:"";position:absolute;left:8%;right:8%;top:7px;height:1px;background:var(--line)}.stage-progress-line span{position:relative;display:grid;justify-items:center;gap:6px;text-align:center}.stage-progress-line i{z-index:1;width:15px;height:15px;border-radius:50%;border:2px solid var(--line-strong);background:var(--surface)}.stage-progress-line .done i{border-color:var(--success);background:var(--success)}.stage-progress-line .current i{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}.stage-progress-line small{font-size:9.5px;color:var(--quiet);line-height:1.25}
.home-quick-v7{display:grid;grid-template-columns:repeat(3,1fr);margin:14px 0 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.home-quick-v7 button{min-height:52px;border:0;border-right:1px solid var(--line);background:transparent;font-size:13px;font-weight:690}.home-quick-v7 button:last-child{border-right:0}.home-quick-v7 button:active{background:var(--surface-soft)}
.home-focus-v7{padding:24px 0;border-bottom:1px solid var(--line)}.home-focus-v7 h2{font-size:22px;margin:6px 0}.home-focus-v7 p{margin:0 0 16px;color:var(--muted);font-size:13px}
.stage-stats-v7{margin-top:28px}.stage-stat-grid,.analysis-summary-v7{display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--line)}.stage-stat-grid>div,.analysis-summary-v7>div{padding:16px 4px;text-align:center;border-right:1px solid var(--line)}.stage-stat-grid>div:last-child,.analysis-summary-v7>div:last-child{border-right:0}.stage-stat-grid strong,.analysis-summary-v7 strong{display:block;font-size:21px}.stage-stat-grid span,.analysis-summary-v7 span{font-size:10.5px;color:var(--muted)}
.home-memory-v7{margin-top:28px}.home-memory-v7>button{width:100%;padding:18px 0;border:0;background:transparent;text-align:left}.home-memory-v7 blockquote{margin:0 0 8px;font:18px/1.72 "Iowan Old Style","Songti TC","Noto Serif TC",serif;color:var(--ink)}.home-memory-v7 small{color:var(--muted)}

/* Segments / records / library */
.segmented{display:inline-grid;grid-auto-flow:column;grid-auto-columns:1fr;padding:3px;border-radius:12px;background:var(--surface-soft)}.segmented button{min-height:36px;padding:6px 14px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-size:12px;font-weight:700;white-space:nowrap}.segmented button.active{background:var(--surface);color:var(--ink);box-shadow:0 2px 8px rgba(45,34,28,.07)}
.records-topbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}.compact-chips{margin-bottom:12px!important}
.timeline-v7{display:grid}.timeline-day{padding:17px 0 7px;font-size:11.5px;font-weight:720;color:var(--muted)}.timeline-row{width:100%;display:grid;grid-template-columns:15px minmax(0,1fr) auto;gap:10px;align-items:start;padding:13px 0;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left}.timeline-dot{width:8px;height:8px;margin-top:7px;border-radius:50%;background:var(--accent-soft);border:2px solid var(--accent)}.timeline-copy{display:grid;min-width:0}.timeline-copy strong{font-size:13.5px;line-height:1.45}.timeline-copy small{margin-top:2px;color:var(--muted);font-size:11.5px;line-height:1.45}.timeline-row time{font-size:10.5px;color:var(--quiet)}
.library-search{margin-bottom:12px}.library-segments{width:100%;grid-template-columns:repeat(4,1fr);margin-bottom:16px}.library-segments button{padding-inline:8px}
.practice-hub-v7{display:grid;border-top:1px solid var(--line);margin-bottom:18px}.practice-hub-v7 button,.article-tools-v7 button{display:grid;gap:2px;width:100%;padding:15px 0;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left}.practice-hub-v7 strong,.article-tools-v7 strong{font-size:14.5px}.practice-hub-v7 small,.article-tools-v7 small{color:var(--muted);font-size:11.5px}
.library-word-row{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid var(--line)}.library-word-row>div{display:grid;min-width:0;flex:1}.library-word-row strong{font-size:15px}.library-word-row small{color:var(--muted);font-size:11.5px}.library-word-row p{margin:4px 0 0;color:var(--muted);font-size:12.5px}

/* Article */
.article-hero-v7{padding-bottom:22px;border-bottom:1px solid var(--line)}.article-hero-v7 h1{margin:7px 0 8px;font-size:28px;line-height:1.35}.article-hero-v7>p{color:var(--muted)}.article-meta-v7{display:flex;gap:13px;margin:14px 0;color:var(--muted);font-size:11.5px}.article-quick-v7{display:grid;grid-template-columns:repeat(3,1fr);margin-top:10px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.article-quick-v7 button{min-height:48px;border:0;border-right:1px solid var(--line);background:transparent;font-size:12.5px;font-weight:700}.article-quick-v7 button:last-child{border-right:0}.article-tags-v7{display:flex;gap:6px;flex-wrap:wrap;margin-top:14px}.article-tags-v7 span{padding:5px 9px;border-radius:999px;background:var(--surface-soft);font-size:11px;color:var(--muted)}.article-tools-v7{margin-top:28px;border-top:1px solid var(--line)}

/* Stage outcomes */
.current-stage-v7{margin-bottom:30px}.stage-current-head h2{margin:4px 0;font-size:22px}.stage-current-head>div>span{font-size:11px;color:var(--accent-strong);font-weight:760}
.stage-progress-list{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:20px 0}.stage-progress-list>div{display:grid;justify-items:center;gap:6px;color:var(--quiet);font-size:10px;text-align:center}.stage-progress-list i{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;border:1px solid var(--line-strong);font-style:normal;background:var(--surface)}.stage-progress-list .done i{background:var(--success);border-color:var(--success);color:#fff}.stage-progress-list .current{color:var(--ink);font-weight:700}.stage-progress-list .current i{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
.stage-summary-line{display:flex;gap:12px;flex-wrap:wrap;padding:12px 0;color:var(--muted);font-size:11.5px;border-top:1px solid var(--line)}.stage-primary-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.calendar-inline{width:100%;text-align:center;margin-top:4px}
.completed-stage-list{display:grid}.completed-stage-list>button{display:flex;align-items:center;gap:12px;width:100%;padding:14px 0;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left}.completed-stage-list>button>span{display:grid;gap:2px;min-width:0;flex:1}.completed-stage-list strong{font-size:14px}.completed-stage-list small{font-size:11.5px;color:var(--muted)}
.outcome-workspace-v7{display:grid;gap:24px}.outcome-overview-v7{padding:16px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}.outcome-overview-v7 p{margin:14px 0 0;color:var(--muted);font-size:12.5px}.candidate-list-v7{display:grid}.candidate{display:grid!important;grid-template-columns:24px minmax(0,1fr)!important;gap:10px!important;padding:13px 0!important;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;background:transparent!important}.candidate input{width:18px;height:18px;margin-top:3px;accent-color:var(--accent)}.candidate-copy{display:grid!important;min-width:0}.candidate-copy strong{font-size:14px}.candidate-copy>span{font-size:12px;color:var(--muted);line-height:1.5}.candidate-copy small{font-size:10.5px;color:var(--quiet)}
.reflection-v7{display:grid;gap:14px}.reflection-v7 label{display:grid;gap:6px;font-size:13px;font-weight:700}.outcome-actions-v7{padding:18px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);align-self:start}.outcome-actions-v7 h2{margin:0 0 4px;font-size:16px}.outcome-actions-v7 p{margin:0 0 13px;color:var(--muted);font-size:11.5px}.outcome-actions-v7 .btn{margin-bottom:7px}.text-danger{width:100%;min-height:40px;border:0;background:transparent;font-weight:700}
.stage-wizard{display:grid;gap:17px}.stage-stepper{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.stage-stepper>span{display:grid;justify-items:center;gap:4px;color:var(--quiet);font-size:11px}.stage-stepper>span:before{content:"";width:24px;height:24px;display:grid;place-items:center;border-radius:50%;background:var(--surface-soft)}.stage-stepper>span.active{color:var(--ink);font-weight:700}.stage-stepper>span.active:before{background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent)}.stage-stepper small{font-size:9px}.stage-wizard h3{font-size:20px;margin:0}.stage-wizard section>p{color:var(--muted);font-size:12.5px}.stage-wizard-actions{display:flex;justify-content:flex-end;gap:8px;position:sticky;bottom:0;padding-top:10px;background:var(--surface)}.stage-complete-summary{display:grid;gap:3px;padding:16px;border-radius:14px;background:var(--accent-soft)}.stage-complete-summary strong{font-size:17px}.stage-complete-summary span{font-size:12px;color:var(--muted)}

/* Practice */
.practice-stage-v7{display:grid;gap:22px}.practice-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 170px;gap:12px}.practice-toolbar label{display:grid;gap:6px;color:var(--muted);font-size:12px;font-weight:700}.practice-input-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.practice-pronunciation-v7{display:grid;grid-template-columns:150px 38px minmax(0,1fr) auto;gap:10px;align-items:center}.practice-main-char{display:grid;place-items:center;min-height:150px;font-size:112px;line-height:1;background:var(--surface);border:1px solid var(--line);border-radius:16px}.practice-zhuyin{position:relative;display:grid;place-items:center;min-height:92px;font-size:22px}.practice-zhuyin-core{display:flex;flex-direction:column;align-items:center;line-height:1.08}.practice-zhuyin-tone{position:absolute;right:-2px;bottom:18px;font-size:16px;color:var(--muted)}.practice-pinyin{color:var(--muted);font-size:15px}.stroke-order-v7{display:grid;gap:10px}.stroke-canvas-wrap{width:min(100%,440px);margin:auto;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#fff}.stroke-canvas{display:block;width:100%;aspect-ratio:1}.stroke-controls{display:flex;gap:7px;flex-wrap:wrap;justify-content:center}.source-note{font-size:10.5px!important;color:var(--quiet)!important;line-height:1.55!important}
.practice-grid-v7{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.practice-cell{position:relative;min-width:0;padding:34px 8px 8px;border:1px solid var(--line);border-radius:15px;background:#fff;color:#302A27;overflow:hidden;transition:border-color var(--motion-fast),box-shadow var(--motion-fast)}.practice-cell.active{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.practice-cell>span{position:absolute;top:8px;left:10px;font-size:10.5px;color:#756B66}.practice-cell canvas{display:block;width:100%;aspect-ratio:1}.practice-demo-char{display:grid;place-items:center;aspect-ratio:1;font-size:clamp(88px,21vw,150px);line-height:1}.practice-controls-v7{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.practice-controls-v7 .btn-primary{flex:1 1 190px}
.basic-strokes{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:7px!important}.basic-stroke-btn{min-width:0!important;min-height:62px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--surface)!important;display:grid!important;place-items:center!important;gap:1px!important}.basic-stroke-btn span{font-size:21px}.basic-stroke-btn small{font-size:9.5px;color:var(--muted)}
.voice-setting-note{margin-bottom:12px}.range-labels{display:flex;justify-content:space-between;color:var(--quiet);font-size:10px}

/* Exam */
.exam-source-strip{display:flex;align-items:center;gap:14px;padding:13px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-bottom:18px}.exam-source-strip>div{display:grid;gap:2px;min-width:0;flex:1}.exam-source-strip strong{font-size:13.5px}.exam-source-strip small{font-size:11px;color:var(--muted);line-height:1.45}
.exam-flow-v7{padding:20px;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface)}.exam-flow-v7>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.exam-flow-v7>header>div:first-child{display:grid;gap:4px}.exam-flow-v7 header span{font-size:11px;color:var(--accent-strong);font-weight:750}.exam-flow-v7 h2{margin:0;font-size:23px;line-height:1.35}.exam-flow-v7 header p{margin:0;color:var(--muted);font-size:11.5px}.exam-tags{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}.exam-tags span{padding:4px 7px;border-radius:999px;background:var(--accent-soft);font-size:9.5px!important;color:var(--accent-strong)!important}
.exam-material{margin:18px 0;padding:16px;border-radius:14px;background:var(--surface-soft)}.exam-material>span{font-size:10.5px;color:var(--muted);font-weight:750}.exam-material p{margin:7px 0 0;font-size:16px;line-height:1.75}.exam-question h3{font-size:17px;line-height:1.5}.exam-options{display:grid;gap:8px}.exam-option{display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;align-items:center;min-height:56px;padding:10px 12px;border:1px solid var(--line);border-radius:13px;background:transparent;text-align:left}.exam-option>span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--surface-soft);font-size:12px}.exam-option strong{font-size:13px;line-height:1.45}.exam-option.selected{border-color:var(--accent);background:var(--accent-soft)}.exam-option.selected>span{background:var(--accent);color:#fff}.exam-option.correct{border-color:var(--success);background:color-mix(in srgb,var(--success) 12%,var(--surface))}.exam-option.not-quite{border-color:var(--accent)}
.exam-hint-v7{margin-top:13px;padding:13px 15px;border-left:3px solid var(--accent);background:var(--accent-soft)}.exam-hint-v7 span{font-size:10.5px;color:var(--accent-strong);font-weight:750}.exam-hint-v7 p{margin:5px 0 0;font-size:13px}.exam-flow-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.exam-explanation-v7{display:grid;gap:14px;margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}.answer-line{display:grid;gap:3px}.answer-line span,.explain-block h3,.takeaway span,.exam-extension span{font-size:11px;color:var(--muted);font-weight:750}.answer-line strong{font-size:17px}.explain-block h3{margin:0 0 5px}.explain-block p,.exam-explanation-v7 details p,.takeaway p,.exam-extension p{margin:0;font-size:13px;line-height:1.65}.exam-explanation-v7 details{padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.exam-explanation-v7 summary{font-size:13px;font-weight:700;cursor:pointer}.takeaway,.exam-extension{padding:13px 14px;border-radius:13px;background:var(--surface-soft)}.exam-note-v7{display:grid;gap:10px;margin-top:18px}.exam-note-v7 label{display:grid;gap:6px;font-size:12px;font-weight:700}.exam-note-v7>div{display:flex;justify-content:flex-end;gap:8px}
.exam-history-v7{display:grid}.exam-history-v7 button{display:grid;gap:2px;width:100%;padding:13px 0;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left}.exam-history-v7 strong{font-size:13.5px}.exam-history-v7 span{font-size:11.5px;color:var(--muted)}.exam-history-v7 small{font-size:10px;color:var(--quiet)}

/* Analytics */
.analysis-summary-v7{margin-bottom:24px;border-top:1px solid var(--line)}.analysis-bars-v7{display:grid;gap:11px;margin-top:14px}.analysis-bars-v7>div{display:grid;grid-template-columns:56px minmax(0,1fr) 74px;gap:10px;align-items:center;font-size:11.5px}.analysis-bars-v7 i{height:7px;border-radius:999px;background:var(--surface-strong);overflow:hidden}.analysis-bars-v7 i b{display:block;height:100%;border-radius:inherit;background:var(--accent)}.analysis-bars-v7>div>strong{text-align:right;font-size:10.5px;color:var(--muted)}.analysis-bars-v7.mismatch i b{background:var(--accent-strong)}

/* Existing rows / settings */
.item-card,.settings-row,.outcome-card,.home-recent-row,.timeline-item .card{content-visibility:visible!important;contain:none!important}
.item-card{display:grid!important;grid-template-columns:32px minmax(0,1fr) auto!important;gap:11px!important;align-items:center!important;padding:14px 0!important;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}.item-leading{width:30px!important;height:30px!important;background:transparent!important;color:var(--accent-strong)!important}.item-title{font-size:14px!important}.item-text{font-size:11.5px!important;color:var(--muted)!important}.item-meta{font-size:10.5px!important;color:var(--quiet)!important}
.settings-group{margin:0 0 28px}.settings-title{margin:0 0 7px;font-size:12px;letter-spacing:.055em;color:var(--muted)}.settings-card{border-top:1px solid var(--line)!important;background:transparent!important;border-radius:0!important;box-shadow:none!important}.settings-row{width:100%;display:grid!important;grid-template-columns:30px minmax(0,1fr) auto 17px!important;gap:10px!important;align-items:center!important;min-height:66px!important;padding:11px 0!important;border:0!important;border-bottom:1px solid var(--line)!important;background:transparent!important;text-align:left!important}.settings-leading{width:28px!important;height:28px!important;background:transparent!important;color:var(--accent-strong)!important}.settings-copy{display:grid;min-width:0}.settings-name{font-size:14px!important}.settings-desc{font-size:11px!important;color:var(--muted)!important;line-height:1.45!important}.settings-status{max-width:92px;font-size:10.5px!important;color:var(--muted)!important;text-align:right!important;line-height:1.3!important}

/* Forms / overlays */
.field{display:grid;gap:6px}.field+.field{margin-top:13px}.field-label{font-size:12px;font-weight:700;color:var(--muted)}.field-help{font-size:10.5px;color:var(--quiet)}
.input,.textarea,.select{width:100%;min-height:45px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);outline:none;box-shadow:none}.textarea{min-height:104px;resize:vertical;line-height:1.65}.input:focus,.textarea:focus,.select:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.overlay-root{position:fixed;z-index:110;inset:0;pointer-events:none}.overlay-root.active{pointer-events:auto}.backdrop{position:absolute;inset:0;background:rgba(35,29,25,.28);backdrop-filter:none!important}.sheet,.modal{position:absolute;left:0;right:0;bottom:0;max-height:min(88dvh,820px);overflow:auto;padding:10px 18px calc(18px + var(--safe-bottom));border-radius:24px 24px 0 0;background:var(--surface);box-shadow:var(--shadow);overscroll-behavior:contain}.sheet-handle{width:42px;height:4px;margin:0 auto 14px;border-radius:999px;background:var(--line-strong)}.sheet-title{font-size:21px}.sheet-body{display:grid;gap:14px}.sheet-actions{position:sticky!important;bottom:calc(-18px - var(--safe-bottom));z-index:4;display:flex!important;justify-content:flex-end!important;gap:8px!important;flex-wrap:wrap!important;margin:16px -18px calc(-18px - var(--safe-bottom));padding:12px 18px calc(18px + var(--safe-bottom));background:var(--surface);border-top:1px solid var(--line)}
.source-preview-frame{width:100%;height:min(64dvh,720px);border:1px solid var(--line);border-radius:14px;background:#fff;object-fit:contain}.source-preview-bar{display:flex;justify-content:space-between;gap:8px;position:sticky;top:0;z-index:2;padding-bottom:8px;background:var(--surface)}

.bottom-nav{position:fixed;z-index:55;left:0;right:0;bottom:0;height:calc(var(--nav-h) + var(--safe-bottom));padding:7px 5px var(--safe-bottom);background:color-mix(in srgb,var(--surface) 97%,transparent);border-top:1px solid var(--line);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.nav-inner{height:58px;max-width:620px;margin:auto;display:grid;grid-template-columns:repeat(5,1fr)}.nav-brand{display:none}.nav-btn{position:relative;min-width:0;border:0;border-radius:0;background:transparent;color:var(--muted);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:10.5px;font-weight:650}.nav-btn .icon{width:20px!important;height:20px!important}.nav-btn.active{color:var(--accent-strong)}.nav-btn.active:before{content:"";position:absolute;top:-7px;width:18px;height:2px;border-radius:2px;background:var(--accent)}

/* External documents and official graphics: never crop */
.exam-official-image,.official-question-image,.source-preview img,.source-preview svg{display:block;max-width:100%;height:auto;object-fit:contain!important;object-position:center!important}

@media(max-width:600px){
  .app-main{padding:21px 17px 44px}.header-inner{padding:0 17px}.page-head{grid-template-columns:1fr!important;gap:10px!important}.page-actions{justify-content:flex-start!important;flex-wrap:nowrap!important;overflow-x:auto!important;padding-bottom:2px;scrollbar-width:none}.page-actions::-webkit-scrollbar{display:none}.page-title{font-size:26px!important}.stage-home-card,.stage-empty-card,.current-stage-v7,.exam-flow-v7{padding:18px}.stage-stat-grid,.analysis-summary-v7{grid-template-columns:repeat(2,1fr)}.stage-stat-grid>div:nth-child(2),.analysis-summary-v7>div:nth-child(2){border-right:0}.stage-stat-grid>div:nth-child(-n+2),.analysis-summary-v7>div:nth-child(-n+2){border-bottom:1px solid var(--line)}.records-topbar{align-items:flex-end}.practice-toolbar{grid-template-columns:1fr}.practice-pronunciation-v7{grid-template-columns:112px 34px minmax(0,1fr);grid-template-areas:"char zhuyin pinyin" "char . voice"}.practice-main-char{grid-area:char;min-height:112px;font-size:82px}.practice-zhuyin{grid-area:zhuyin}.practice-pinyin{grid-area:pinyin}.practice-pronunciation-v7 .text-action{grid-area:voice;justify-self:start}.practice-grid-v7{gap:8px}.practice-cell{padding-top:30px}.basic-strokes{grid-template-columns:repeat(4,minmax(0,1fr))!important}.exam-flow-v7>header{display:grid}.exam-tags{justify-content:flex-start}.exam-flow-actions,.exam-note-v7>div{display:grid;grid-template-columns:1fr 1fr}.stage-primary-actions{grid-template-columns:1fr}.analysis-bars-v7>div{grid-template-columns:48px minmax(0,1fr) 64px}.settings-status{max-width:74px}
}

/* iPad wide landscape + Mac-like layout. Portrait remains phone-like. */
@media(orientation:landscape) and (min-width:900px){
  :root{--sidebar:224px;--header-h:68px;--nav-h:0px}
  .app-shell{padding:var(--header-h) 0 0 var(--sidebar);min-height:100dvh}
  .app-header{left:var(--sidebar)}
  .header-inner{max-width:1120px;padding:0 30px}
  .brand{gap:0}.brand .logo-image,.brand .brand-title{display:none}.brand-copy{display:block}.brand-subtitle{display:block;max-width:none;font-size:17px;font-weight:760;color:var(--ink)}
  .app-main{width:min(100%,1120px);padding:32px 30px 60px}
  .bottom-nav{left:0;top:0;right:auto;bottom:0;width:var(--sidebar);height:100dvh;padding:18px 12px;border-top:0;border-right:1px solid var(--line);background:var(--surface);backdrop-filter:none}
  .nav-inner{height:auto;max-width:none;display:flex;flex-direction:column;gap:4px}
  .nav-brand{display:grid;grid-template-columns:38px minmax(0,1fr);grid-template-rows:auto auto;column-gap:10px;align-items:center;padding:6px 10px 22px;margin-bottom:7px;border-bottom:1px solid var(--line)}.nav-brand img{grid-row:1/3;width:38px;height:38px;object-fit:contain}.nav-brand span{font-size:16px;font-weight:780}.nav-brand small{font-size:10.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .nav-btn{height:48px;flex-direction:row;justify-content:flex-start;gap:11px;padding:0 12px;border-radius:11px;font-size:13px}.nav-btn.active{background:var(--accent-soft);color:var(--accent-strong)}.nav-btn.active:before{display:none}
  .outcome-workspace-v7{grid-template-columns:minmax(0,1fr) 280px}.outcome-actions-v7{position:sticky;top:92px}
  .home-v7{max-width:900px}.home-v7 .stage-home-card{max-width:760px}.practice-stage-v7{grid-template-columns:minmax(0,1fr);max-width:900px}.practice-grid-v7{grid-template-columns:repeat(4,minmax(0,1fr))}.exam-flow-v7{max-width:820px}.stage-empty-card{max-width:660px}
  .sheet,.modal{left:50%;right:auto;bottom:24px;width:min(680px,calc(100vw - var(--sidebar) - 64px));border-radius:24px;transform:translateX(-50%);padding-bottom:20px}.sheet-actions{bottom:-20px;margin-bottom:-20px;padding-bottom:20px}.modal-wide,.sheet.wide{width:min(980px,calc(100vw - var(--sidebar) - 64px))!important}
}


@media(orientation:landscape) and (min-width:900px){
  .motion-card,.motion-section{animation-delay:0s!important}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.view,.sheet,.modal,.btn,.primary-cta,.practice-cell{animation:none!important;transition:none!important;transform:none!important}}

/* r7 final dark-token override: legacy files used !important black values. */
body[data-theme=dark]{
  --bg:#12100F!important;
  --surface:#1B1816!important;
  --surface2:#24201D!important;
  --surface-soft:#24201D!important;
  --surface-strong:#2D2824!important;
  --ink:#F7F3EF!important;
  --ink2:#F7F3EF!important;
  --muted:#B9B0AA!important;
  --line:#342E2A!important;
  --line2:#4A413B!important;
  --line-strong:#4A413B!important;
  --brand:#D99B95!important;
  --brand-soft:#342422!important;
  --rose2:#E4AEA8!important;
  background:#12100F!important;
}
html:has(body[data-theme=dark]){background:#12100F!important}

/* r7 final sidebar/header coordination and duplicate-brand guard */
.bottom-nav::before{display:none!important;content:none!important}
body[data-theme=dark] .app-header{background:rgba(18,16,15,.96)!important;border-color:#342E2A!important}
body[data-theme=dark] .bottom-nav{background:#1B1816!important;border-color:#342E2A!important}
body[data-theme=dark] .nav-btn.active{background:#342422!important}
\n/* r7 RC1: preview and sheet controls must stay inside the viewport */\n.sheet-head{position:sticky;top:-10px;z-index:8;margin:-10px -18px 0;padding:10px 18px 13px;background:var(--surface);border-bottom:1px solid var(--line)}\n.modal .sheet-head{top:-20px;margin:-20px -20px 0;padding:18px 20px 13px}\n.sheet-actions{position:sticky!important;bottom:calc(-18px - var(--safe-bottom))!important;z-index:9!important}\n.modal .sheet-actions{bottom:-20px!important;margin-left:-20px!important;margin-right:-20px!important;padding-left:20px!important;padding-right:20px!important}\n.report-preview-shell{max-height:none!important;overflow:visible!important}\n.source-preview-fallback{padding:12px 0 2px;color:var(--muted);font-size:12px;line-height:1.55}.source-preview-fallback p{margin:4px 0 0}\n@media(max-width:600px){.source-preview-frame{height:56dvh!important;min-height:420px!important}.modal-wide{width:calc(100vw - 20px)!important;max-height:92dvh!important}}\n
.report-preview-topbar{position:sticky;top:68px;z-index:7;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:8px 0;background:var(--surface);border-bottom:1px solid var(--line)}.report-preview-topbar span{font-size:11px;color:var(--muted);text-align:right}
@media(max-width:600px){.report-preview-topbar{top:66px}.report-preview-topbar span{display:none}}

/* r7 final settings readability: buttons stay tappable, descriptions may wrap normally. */
.settings-row,.settings-copy,.settings-name,.settings-desc{white-space:normal!important}
.settings-row{grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;column-gap:16px!important}
.settings-copy{min-width:0!important;display:grid!important;gap:3px!important}
.settings-name{line-height:1.35!important}
.settings-desc{line-height:1.55!important;overflow-wrap:anywhere!important}
.settings-status{align-self:start!important;padding-top:2px!important;white-space:nowrap!important;max-width:96px!important}
@media(max-width:380px){.settings-status{max-width:72px!important;font-size:10px!important}}

.toast{transition:opacity .16s ease,transform .16s ease}.toast.leaving{opacity:0;transform:translateY(6px)}
/* r7 RC2: modal geometry must never inherit the legacy 50% transform */
@media(max-width:899px), (orientation:portrait){
  .modal{
    left:10px!important;right:10px!important;top:auto!important;bottom:max(10px,var(--safe-bottom))!important;
    width:auto!important;max-width:none!important;max-height:calc(100dvh - max(20px,var(--safe-top)) - max(20px,var(--safe-bottom)))!important;
    transform:none!important;border-radius:24px!important;padding:18px!important;
  }
  .modal-wide{left:10px!important;right:10px!important;width:auto!important}
  .modal .sheet-head{top:-18px;margin:-18px -18px 0;padding:16px 18px 12px}
  .modal .sheet-actions{bottom:-18px!important;margin-left:-18px!important;margin-right:-18px!important;padding-left:18px!important;padding-right:18px!important}
}
@media(orientation:landscape) and (min-width:900px){
  .sheet,.modal{top:auto!important}
}

/* r7 final candidate — library row placement and compact stroke-order stage */
.item-card>.item-leading{
  display:grid!important;
  grid-column:1!important;
  align-self:center!important;
}
.item-card>.item-body{
  grid-column:2!important;
  min-width:0!important;
  width:auto!important;
}
.item-card>svg:last-child,
.item-card>.icon:last-child{
  grid-column:3!important;
  justify-self:end!important;
}
.stroke-order-v7 .stroke-canvas-wrap{
  width:min(100%,320px)!important;
  max-width:320px!important;
}
@media(max-width:430px){
  .stroke-order-v7 .stroke-canvas-wrap{width:min(100%,292px)!important;max-width:292px!important}
}
.toast-stack{display:block!important}
.toast-stack>.toast:not(:last-child){display:none!important}

/* r7 final — opaque fixed chrome prevents content from visually bleeding under the header */
.app-header{background:var(--bg)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}


/* ======================================================================
   語文素養 7.0｜Complete Home & Flow Design Layer
   Mobbin: flow / Collect UI: visual restraint / Open Design: stable tokens
   ====================================================================== */
:root{
  --complete-accent:#C87972;
  --complete-accent-strong:#AD5F59;
  --complete-accent-soft:#F4E2DD;
  --complete-paper:#FFFDFC;
  --complete-ink:#27211F;
  --complete-shadow:0 22px 65px rgba(83,58,45,.11);
  --complete-ease:cubic-bezier(.22,.78,.24,1);
}
body[data-theme=dark]{--complete-paper:#1C1917;--complete-ink:#F7F2EE;--complete-shadow:0 24px 70px rgba(0,0,0,.30)}
.app-main{padding-bottom:calc(54px + var(--safe-bottom))!important}
.view{animation:complete-page-in .2s var(--complete-ease) both!important}
@keyframes complete-page-in{from{opacity:.92;transform:translate3d(0,3px,0)}to{opacity:1;transform:none}}
.motion-card,.motion-section{animation:complete-rise .22s var(--complete-ease) both}
.motion-section{animation-delay:.02s}.motion-section:nth-of-type(3){animation-delay:.04s}.motion-section:nth-of-type(4){animation-delay:.06s}
@keyframes complete-rise{from{opacity:.92;transform:translate3d(0,4px,0)}to{opacity:1;transform:none}}

/* Home */
.home-complete{position:relative;max-width:820px;margin:auto}
.home-profile-complete{display:flex;align-items:center;gap:11px;margin:0 0 17px;padding:0 2px}
.home-profile-complete>div{display:grid;min-width:0}.home-profile-complete>div span{font-size:11px;color:var(--muted)}.home-profile-complete>div strong{font-size:14px;line-height:1.25}.home-profile-complete time{margin-left:auto;font-size:11px;color:var(--muted)}
.home-stage-hero,.home-stage-empty{position:relative;overflow:hidden;border:1px solid color-mix(in srgb,var(--accent) 24%,var(--line));border-radius:28px;background:linear-gradient(145deg,color-mix(in srgb,var(--surface) 94%,var(--accent-soft)),var(--surface));padding:23px 22px;box-shadow:var(--complete-shadow)}
.home-stage-hero>*:not(.home-stage-ambient){position:relative;z-index:2}.home-stage-ambient{position:absolute;inset:0;pointer-events:none;opacity:.52}.home-stage-ambient i{position:absolute;border:1px solid color-mix(in srgb,var(--accent) 30%,transparent);border-radius:50%}.home-stage-ambient i:nth-child(1){width:180px;height:180px;right:-55px;top:-90px}.home-stage-ambient i:nth-child(2){width:95px;height:95px;right:22px;top:-24px}.home-stage-ambient i:nth-child(3){width:7px;height:7px;right:64px;top:55px;background:var(--accent);border:0;animation:home-dot-pulse 2.6s ease-in-out infinite}
@keyframes home-dot-pulse{50%{transform:scale(1.45);opacity:.55}}
.home-stage-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.stage-status-pill{display:inline-flex;align-items:center;min-height:25px;padding:3px 10px;border-radius:999px;background:var(--accent-soft);color:var(--accent-strong);font-size:10.5px;font-weight:760;letter-spacing:.04em}.home-stage-head h1{font-size:25px;line-height:1.24;margin:11px 0 5px;letter-spacing:-.025em}.home-stage-head p{font-size:12px;color:var(--muted);margin:0}
.home-stage-progress{margin-top:24px;padding-top:18px;border-top:1px solid color-mix(in srgb,var(--line) 78%,transparent)}.home-progress-copy,.home-progress-foot{display:flex;align-items:center;justify-content:space-between;gap:18px}.home-progress-copy span,.home-progress-foot span{font-size:10.5px;color:var(--muted)}.home-progress-copy strong{font-size:12px}.home-progress-track{height:5px;margin:8px 0 11px;border-radius:99px;background:var(--surface-strong);overflow:hidden}.home-progress-track i{display:block;height:100%;border-radius:99px;background:var(--accent);animation:progress-grow .6s var(--complete-ease) both;transform-origin:left}@keyframes progress-grow{from{transform:scaleX(.05)}to{transform:scaleX(1)}}.home-progress-foot strong{font-size:12.5px}
.home-stage-empty span{font-size:11px;color:var(--accent-strong);font-weight:760}.home-stage-empty h1{font-size:28px;margin:8px 0}.home-stage-empty p{font-size:13px;color:var(--muted);max-width:38em;margin:0 0 18px}
.home-capture-complete{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-bottom:1px solid var(--line);margin:14px 0 22px}.home-capture-complete button{min-height:64px;border:0;border-right:1px solid var(--line);background:transparent;text-align:left;padding:10px 13px;display:grid;align-content:center;gap:2px}.home-capture-complete button:last-child{border-right:0}.home-capture-complete strong{font-size:13.5px}.home-capture-complete small{font-size:10.5px;color:var(--muted)}.home-capture-complete button:active{background:var(--surface-soft)}
.home-focus-complete{display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:15px;align-items:center;padding:19px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.home-focus-index{width:44px;height:44px;border-radius:14px;background:var(--accent-soft);display:grid;place-items:center;color:var(--accent-strong);font-weight:800}.home-focus-copy{min-width:0}.home-focus-copy>span{font-size:10.5px;color:var(--muted)}.home-focus-copy h2{font-size:19px;line-height:1.35;margin:2px 0}.home-focus-copy p{font-size:11.5px;line-height:1.55;color:var(--muted);margin:0}.home-focus-cta{min-height:42px;border:0;background:transparent;color:var(--accent-strong);font-weight:760;white-space:nowrap;padding:8px 0}
.home-section-heading{margin:29px 0 9px;border-bottom:1px solid var(--line);padding-bottom:8px}.home-section-heading>div{display:flex;align-items:end;justify-content:space-between;gap:14px}.home-section-heading span{font-size:13px;font-weight:750}.home-section-heading small{font-size:10.5px;color:var(--muted)}
.home-path-list{display:grid}.home-path-list>button{display:grid;grid-template-columns:58px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:70px;padding:12px 0;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left}.home-path-list>button:active{background:var(--surface-soft)}.path-order{font-size:11px;color:var(--accent-strong);font-weight:760}.home-path-list>button>span:nth-child(2){display:grid;min-width:0}.home-path-list strong{font-size:14px}.home-path-list small{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-path-list em{font-style:normal;font-size:11px;color:var(--muted);white-space:nowrap}
.home-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.home-summary-grid>div{padding:14px 7px;text-align:center;border-right:1px solid var(--line)}.home-summary-grid>div:last-child{border-right:0}.home-summary-grid strong{display:block;font-size:20px;line-height:1.1}.home-summary-grid span{font-size:10.5px;color:var(--muted)}
.home-memory-complete>button{width:100%;border:0;background:transparent;text-align:left;padding:16px 0;color:var(--ink)}.home-memory-complete blockquote{font-family:var(--kai,serif);font-size:17px;line-height:1.85;margin:0 0 6px}.home-memory-complete>button>span{font-size:10.5px;color:var(--muted)}

/* Outcomes / admissions discoverability */
.outcomes-hub-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:4px;border-radius:14px;background:var(--surface-soft);margin:0 0 18px}.outcomes-hub-nav button{min-height:40px;border:0;border-radius:10px;background:transparent;color:var(--muted);font-size:12px;font-weight:720}.outcomes-hub-nav button.active{background:var(--surface);color:var(--ink);box-shadow:0 3px 12px rgba(56,39,30,.07)}.outcomes-hub-nav button:disabled{opacity:.38}
.current-stage-complete{padding:22px;border:1px solid var(--line);border-radius:24px;background:var(--surface);box-shadow:0 12px 36px rgba(75,53,42,.07)}.current-stage-meter{margin:18px 0}.current-stage-meter>div{display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}.current-stage-meter>div strong{color:var(--ink)}.current-stage-meter>i{display:block;height:5px;background:var(--surface-strong);border-radius:99px;overflow:hidden;margin-top:7px}.current-stage-meter b{display:block;height:100%;border-radius:99px;background:var(--accent);animation:progress-grow .6s var(--complete-ease) both}
.completed-stage-list>button em{font-style:normal;font-size:11px;color:var(--muted)}
.outcomes-admission-callout{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:end;margin-top:34px;padding:20px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.outcomes-admission-callout span{font-size:10.5px;color:var(--accent-strong);font-weight:750}.outcomes-admission-callout h2{font-size:18px;margin:5px 0}.outcomes-admission-callout p{font-size:11.5px;color:var(--muted);margin:0}.outcomes-admission-callout button{border:0;background:transparent;color:var(--accent-strong);font-weight:750;white-space:nowrap;padding:8px 0}
.admission-stage-snapshot{padding:21px;border:1px solid var(--line);border-radius:24px;background:var(--surface)}.admission-stage-snapshot>div:first-child span{font-size:10.5px;color:var(--accent-strong);font-weight:760}.admission-stage-snapshot h2{font-size:21px;margin:5px 0}.admission-stage-snapshot p{font-size:11.5px;color:var(--muted);margin:0}.admission-snapshot-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin-top:18px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.admission-snapshot-grid>div{padding:12px 8px;text-align:center;border-right:1px solid var(--line)}.admission-snapshot-grid>div:last-child{border-right:0}.admission-snapshot-grid strong{display:block;font-size:18px}.admission-snapshot-grid span{display:block;font-size:10.5px;font-weight:720}.admission-snapshot-grid small{display:block;font-size:9px;color:var(--muted);margin-top:2px}
.communication-path{display:grid}.communication-path article{display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}.communication-path article>span{font-size:10.5px;color:var(--accent-strong);font-weight:780}.communication-path strong{font-size:14px}.communication-path p{font-size:11.5px;color:var(--muted);margin:2px 0 0}.admission-empty{padding:18px 0}.admission-empty p{font-size:12px;color:var(--muted)}.source-row em{font-style:normal;font-size:11px;color:var(--muted)}

/* General refinement */
.page-title{font-size:29px!important}.page-kicker{max-width:52em}.section{margin:28px 0!important}.segmented{background:var(--surface-soft)!important;border-radius:13px!important;padding:4px!important}.segmented button{border-radius:9px!important}.timeline-row,.library-word-row,.completed-stage-list>button,.source-row,.admission-target-row{transition:background .15s ease,transform .15s ease}.timeline-row:active,.completed-stage-list>button:active,.source-row:active{background:var(--surface-soft);transform:scale(.997)}
.sheet,.modal{animation:complete-sheet-in .24s var(--complete-ease) both!important}@keyframes complete-sheet-in{from{opacity:.001;translate:0 18px}to{opacity:1;translate:0 0}}

@media(max-width:600px){
  .home-stage-hero,.home-stage-empty{padding:20px 18px;border-radius:24px}.home-stage-head h1{font-size:23px}.home-focus-complete{grid-template-columns:46px minmax(0,1fr);gap:12px}.home-focus-cta{grid-column:2;justify-self:start}.home-path-list>button{grid-template-columns:50px minmax(0,1fr) auto}.home-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.home-summary-grid>div:nth-child(2){border-right:0}.home-summary-grid>div:nth-child(-n+2){border-bottom:1px solid var(--line)}.outcomes-admission-callout{grid-template-columns:1fr}.outcomes-admission-callout button{justify-self:start}.admission-snapshot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admission-snapshot-grid>div{border-bottom:1px solid var(--line)}.admission-snapshot-grid>div:nth-child(2n){border-right:0}.admission-snapshot-grid>div:last-child{grid-column:1/-1;border-bottom:0}.home-capture-complete button{padding-left:9px;padding-right:9px}
}
@media(orientation:landscape) and (min-width:900px){
  .home-complete{max-width:980px}.home-complete{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(290px,.75fr);gap:0 26px}.home-profile-complete{grid-column:1/-1}.home-stage-hero,.home-stage-empty{grid-column:1}.home-capture-complete{grid-column:1}.home-focus-complete{grid-column:1}.home-path{grid-column:2;grid-row:2/5;margin-top:0}.home-summary-complete,.home-memory-complete{grid-column:1}.home-path .home-section-heading{margin-top:0}.home-path-list>button{grid-template-columns:50px minmax(0,1fr)}.home-path-list em{grid-column:2}.admission-snapshot-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
}

@media(orientation:landscape) and (min-width:900px){
  .motion-card,.motion-section{animation-delay:0s!important}
}
@media(prefers-reduced-motion:reduce){.motion-card,.motion-section,.home-stage-ambient i,.home-progress-track i,.current-stage-meter b,.view,.sheet,.modal{animation:none!important;transition:none!important}}

/* 7.0 final revision 1.0 — 70 題探索與圖文 */
.exam-theme-list,.official-year-list{display:grid;gap:8px}.exam-theme-list button,.official-year-row{width:100%;min-height:66px;border:1px solid var(--line);border-radius:16px;background:var(--surface);padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:14px;text-align:left}.exam-theme-list button span,.official-year-row span{display:grid;gap:3px}.exam-theme-list button strong,.official-year-row strong{font-size:14px;color:var(--ink2)}.exam-theme-list button small,.official-year-row small{font-size:11px;color:var(--muted);line-height:1.45}.exam-theme-list button em,.official-year-row em{font-style:normal;font-size:12px;color:var(--muted);white-space:nowrap}.exam-theme-list button.active{border-color:color-mix(in srgb,var(--rose) 58%,var(--line));background:var(--brand-soft)}.official-year-row:disabled{opacity:.55}.exam-media-card{width:100%;border:1px solid var(--line);border-radius:18px;background:#fff;padding:8px;display:grid;gap:7px;margin:0 0 15px}.exam-media-card img{width:100%;height:auto;max-height:310px;object-fit:contain;border-radius:12px}.exam-media-card span{font-size:11px;color:#756b66;text-align:center}.exam-media-viewer{display:grid;gap:12px}.exam-media-viewer img{width:100%;height:auto;max-height:72dvh;object-fit:contain;background:#fff;border:1px solid var(--line);border-radius:16px}.exam-media-viewer p{margin:0;color:var(--muted);font-size:12px}.exam-material>div{display:flex;justify-content:space-between;align-items:center;gap:10px}.exam-listen-button{min-height:36px;border:1px solid var(--line);border-radius:999px;background:var(--surface);padding:6px 12px;font-size:12px;color:var(--rose2)}.exam-official-entry{display:flex;align-items:center;gap:14px;justify-content:space-between;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:15px 0;margin:24px 0 0}.exam-official-entry>div{display:grid;gap:3px}.exam-official-entry strong{font-size:14px;color:var(--ink2)}.exam-official-entry small{font-size:11px;color:var(--muted)}.exam-count-note{margin:10px 0 0;color:var(--muted);font-size:11px;line-height:1.55}.exam-explanation-v7 .explain-block h3{letter-spacing:.02em}
@media(max-width:560px){.exam-flow-v7 header{gap:10px}.exam-tags{justify-content:flex-start}.exam-media-card img{max-height:230px}.page-actions{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}.page-actions::-webkit-scrollbar{display:none}.page-actions .btn{flex:0 0 auto}}


/* ======================================================================
   語文素養 7.0・修訂 1.1
   首頁聚焦／今日一題：減少入口、移除壓力百分比、保留柔和動態
   ====================================================================== */
.home-stage-progress{margin-top:22px;padding-top:16px}
.home-stage-journey{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin-top:14px;position:relative}
.home-stage-journey:before{content:"";position:absolute;left:7%;right:7%;top:7px;height:1px;background:var(--line)}
.home-stage-journey span{position:relative;display:grid;justify-items:center;gap:7px;min-width:0;color:var(--muted)}
.home-stage-journey i{position:relative;z-index:1;width:14px;height:14px;border-radius:50%;border:2px solid var(--surface);background:var(--surface-strong);box-shadow:0 0 0 1px var(--line)}
.home-stage-journey small{font-size:9.5px;line-height:1.25;text-align:center;white-space:nowrap}
.home-stage-journey span.done i{background:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.home-stage-journey span.current i{background:var(--surface);box-shadow:0 0 0 2px var(--accent)}
.home-stage-journey span.current small{color:var(--ink);font-weight:760}
.home-today-card{margin-top:22px;padding:20px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center}
.home-today-card>div{min-width:0}.home-today-card span{display:block;font-size:10.5px;color:var(--accent-strong);font-weight:760;letter-spacing:.04em}.home-today-card h2{margin:5px 0 4px;font-size:18px;line-height:1.35}.home-today-card p{margin:0;max-width:42em;color:var(--muted);font-size:11.5px;line-height:1.6}
.home-today-card>button{min-height:42px;border:0;background:transparent;color:var(--accent-strong);font-weight:760;white-space:nowrap;padding:8px 0}
.home-revision-11 .home-summary-complete{margin-top:26px}
.home-revision-11 .home-memory-complete{margin-top:26px}
.exam-page-final .page-head{margin-bottom:8px}
.exam-page-final .page-actions{display:none!important}
.exam-top-actions{display:flex;gap:16px;margin:0 0 14px}
.exam-top-actions .text-action{min-height:38px;padding:4px 0}
.exam-flow-v7{scroll-margin-top:84px}
.exam-theme-list{display:grid;border-top:1px solid var(--line)}
.exam-theme-list>button{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;min-height:66px;padding:12px 0;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left;color:var(--ink)}
.exam-theme-list>button span{display:grid;gap:3px}.exam-theme-list strong{font-size:14px}.exam-theme-list small{font-size:11px;line-height:1.45;color:var(--muted)}.exam-theme-list em{font-style:normal;font-size:11px;color:var(--muted)}
.exam-theme-list>button.active strong,.exam-theme-list>button.active em{color:var(--accent-strong)}
@media(max-width:600px){
  .home-stage-journey small{font-size:8.8px}.home-today-card{grid-template-columns:1fr;gap:8px}.home-today-card>button{justify-self:start}.home-stage-journey:before{left:9%;right:9%}
}
@media(orientation:landscape) and (min-width:900px){
  .home-revision-11{grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr)}
  .home-revision-11 .home-today-card{grid-column:2;grid-row:2/5;margin-top:0;align-self:start;padding:22px;border:1px solid var(--line);border-radius:22px;background:var(--surface)}
  .home-revision-11 .home-summary-complete,.home-revision-11 .home-memory-complete{grid-column:1}
}
