body:has(.ew-shell) { padding-bottom:0; }
body:has(.ew-shell) .view-container { max-width:none; padding:12px 26px 16px; }
body:has(.ew-shell) .mobile-nav { display:none; }
body:has(.ew-shell) .main-shell { min-width:0; padding-bottom:0; }
.ew-shell { --ew-ink:#1e382b; --ew-muted:#6e7a70; --ew-line:#dce3d9; --ew-green:#39724a; --ew-soft:#eff4e9; --ew-paper:#fffefa; width:100%; min-height:0; flex:1; display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--ew-line); border-radius:22px; background:var(--ew-paper); color:var(--ew-ink); }
.ew-shell * { box-sizing:border-box; }
.ew-shell button,.ew-shell textarea { font:inherit; }
.ew-shell button { cursor:pointer; }
.ew-shell button:disabled { opacity:.45; cursor:not-allowed; }
.ew-shell button:focus-visible,.ew-shell textarea:focus-visible,.ew-shell .ew-main:focus-visible { outline:3px solid #abc49f; outline-offset:3px; }
.ew-shell p,.ew-shell h2,.ew-shell h3,.ew-shell ol,.ew-shell dl { margin:0; }
.ew-header { flex-shrink:0; padding:15px 24px; display:flex; justify-content:space-between; gap:16px; align-items:center; border-bottom:1px solid var(--ew-line); }
.ew-header>div { display:flex; align-items:center; gap:12px; min-width:0; }
.ew-header>div>div { display:flex; flex-direction:column; gap:4px; min-width:0; }
.ew-header strong { font-size:15px; line-height:1.5; }
.ew-header small { color:var(--ew-muted); font-size:11px; line-height:1.6; }
.ew-brand { display:grid; place-items:center; flex-shrink:0; width:37px; height:37px; background:#f3df7c; border-radius:12px; font-size:24px; color:#456443; }
.ew-shell .ew-quiet { border:0; background:transparent; color:var(--ew-muted); padding:7px 2px; font-size:12px; line-height:1.5; white-space:nowrap; }
.ew-shell .ew-quiet:hover { color:var(--ew-green); }
.ew-modes { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; flex-shrink:0; padding:14px 24px; background:#f7f8f3; border-bottom:1px solid var(--ew-line); }
.ew-modes button { display:flex; align-items:center; justify-content:center; gap:9px; border:1px solid transparent; background:transparent; color:var(--ew-muted); border-radius:11px; padding:10px; font-size:13px; font-weight:600; }
.ew-modes button>span { display:grid; place-items:center; width:24px; height:24px; border:1px solid var(--ew-line); border-radius:50%; font-size:10px; }
.ew-modes button[aria-current="step"] { background:#fff; border-color:var(--ew-line); color:var(--ew-green); box-shadow:0 2px 3px #28432b04; }
.ew-modes button[aria-current="step"]>span { background:var(--ew-green); border-color:var(--ew-green); color:#fff; }
.ew-main { overflow:auto; flex:1; min-height:0; padding:28px 30px 34px; scrollbar-gutter:stable; }
.ew-read-grid,.ew-practice-layout { max-width:1210px; margin:0 auto; display:grid; grid-template-columns:minmax(0,1fr) 270px; gap:32px; align-items:start; }
.ew-model,.ew-typing-card { min-width:0; }
.ew-block-heading,.ew-typing-top { display:flex; gap:20px; justify-content:space-between; align-items:center; }
.ew-shell .ew-eyebrow { margin-bottom:7px; color:var(--ew-green); font-size:10px; font-weight:650; letter-spacing:.1em; }
.ew-shell h2 { font-size:25px; letter-spacing:-.035em; line-height:1.5; font-weight:650; }
.ew-shell h3 { font-size:14px; line-height:1.6; font-weight:650; }
.ew-shell .ew-model-note { margin-top:9px; font-size:11px; line-height:1.6; color:var(--ew-muted); }
.ew-paragraphs { display:flex; flex-direction:column; gap:27px; margin-top:28px; }
.ew-paragraph-role { display:flex; align-items:center; gap:8px; margin-bottom:9px; color:var(--ew-green); font-size:11px; font-weight:600; }
.ew-paragraph-role>span { font-size:9px; color:#8a9883; font-variant-numeric:tabular-nums; }
.ew-shell .ew-english { font-family:Georgia,'Times New Roman',serif; font-size:18px; line-height:1.9; color:#293b2d; white-space:pre-wrap; overflow-wrap:anywhere; }
.ew-shell .ew-translation { margin-top:10px; color:var(--ew-muted); font-size:12px; line-height:1.9; }
.ew-reading-aside,.ew-practice-aside { display:flex; flex-direction:column; gap:22px; }
.ew-reading-aside>section { padding:20px; border:1px solid var(--ew-line); border-radius:15px; background:#f7f8f2; }
.ew-reading-aside p { margin-top:10px; font-size:12px; line-height:1.85; color:#697565; }
.ew-reading-aside .ew-eyebrow { margin-top:0; }
.ew-material { margin-top:12px; padding:12px; background:#fffdf3; border-left:2px solid #d9c65c; color:#6b715f; font-size:11px; line-height:1.8; white-space:pre-line; }
.ew-structure { padding-left:18px; color:var(--ew-muted); font-size:12px; line-height:1.8; margin-top:10px !important; }
.ew-structure li+li { margin-top:5px; }
.ew-phrases { margin-top:12px !important; display:flex; flex-direction:column; gap:12px; }
.ew-phrases dt { color:#315b3b; font-family:Georgia,'Times New Roman',serif; font-size:14px; line-height:1.6; }
.ew-phrases dd { margin:2px 0 0; color:var(--ew-muted); font-size:11px; line-height:1.8; }
.ew-reading-bottom { display:flex; justify-content:space-between; align-items:center; gap:16px; border-top:1px solid var(--ew-line); padding-top:24px; margin-top:32px; }
.ew-reading-bottom>span { font-size:12px; line-height:1.7; color:var(--ew-muted); }
.ew-shell .ew-primary,.ew-shell .ew-secondary { display:inline-flex; justify-content:center; align-items:center; gap:12px; border:1px solid var(--ew-green); border-radius:11px; padding:12px 20px; background:var(--ew-green); color:white; font-size:13px; font-weight:600; min-height:44px; line-height:1.5; }
.ew-shell .ew-primary:hover { background:#2d5e3b; }
.ew-shell .ew-secondary { background:transparent; border-color:var(--ew-line); color:var(--ew-ink); }
.ew-practice-layout { grid-template-columns:minmax(0,1fr) 245px; }
.ew-sentence-progress { display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-top:22px; font-size:11px; color:var(--ew-muted); }
.ew-sentence-progress>div { width:100%; height:4px; background:#e9eee4; border-radius:4px; overflow:hidden; }
.ew-sentence-progress>div>i { display:block; height:100%; border-radius:4px; background:#75a265; transition:width .2s; }
.ew-unit-context { margin-top:24px; }
.ew-unit-context>span { display:block; margin-bottom:6px; font-size:10px; font-weight:600; color:#89947f; }
.ew-unit-context>p { font-size:13px; line-height:1.9; color:#5e6d5c; }
.ew-target,.ew-cloze-hint,.ew-recall-cue { margin-top:20px; border:1px solid #dfe6d8; border-radius:13px; padding:22px; background:#f3f6ed; }
.ew-shell .ew-target { font-family:'Courier New',monospace; font-size:21px; line-height:1.95; letter-spacing:.015em; color:#9aa092; }
.ew-target .is-correct,.ew-typed-feedback .is-correct { color:#29783d; background:#dcebd2; }
.ew-target .is-wrong,.ew-typed-feedback .is-wrong { color:#ae3932; background:#fae2dd; text-decoration:underline; text-decoration-color:#ca766b; }
.ew-target .is-cursor { position:relative; }
.ew-target .is-cursor::before,.ew-inline-cursor { display:inline-block; width:2px; height:1.15em; background:#386b3c; vertical-align:middle; }
.ew-target .is-cursor::before { content:''; position:absolute; left:-1px; top:2px; }
.ew-cloze-hint>small { font-size:10px; color:var(--ew-muted); }
.ew-cloze-hint>p { font-family:'Courier New',monospace; font-size:20px; line-height:1.9; color:#56784d; margin-top:8px; overflow-wrap:anywhere; }
.ew-recall-cue { display:flex; align-items:center; gap:12px; font-size:13px; color:#728568; }
.ew-recall-cue>span { color:#d2af31; font-size:22px; }
.ew-input-wrap { margin-top:23px; }
.ew-input-wrap>label { display:block; font-size:11px; color:var(--ew-muted); margin-bottom:9px; }
.ew-shell textarea { display:block; width:100%; min-height:128px; resize:vertical; padding:17px 18px; border:1px solid #cad6c2; border-radius:12px; background:white; color:#293b2d; font-family:'Courier New',monospace; font-size:18px; line-height:1.8; }
.ew-shell textarea::placeholder { font-family:inherit; font-size:13px; color:#99a08f; }
.ew-shell textarea:disabled { background:#f3f4ee; color:#7c8876; opacity:1; }
.ew-typed-feedback { font-family:'Courier New',monospace; font-size:15px; line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; margin-top:10px; min-height:27px; }
.ew-shell .ew-input-rules { font-size:10px; color:#8a9381; line-height:1.8; margin-top:10px; }
.ew-feedback { min-height:23px; color:#7d816e; font-size:11px; line-height:1.8; margin-top:10px; }
.ew-feedback.is-success { color:#3d7a3c; }
.ew-typing-actions { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-top:20px; }
.ew-typing-actions .ew-primary { margin-left:auto; }
.ew-reveal { margin-top:15px; padding:15px 18px; background:#fcf8e8; border-radius:10px; }
.ew-reveal[hidden] { display:none; }
.ew-reveal>span { display:block; font-size:10px; color:#9c894a; margin-bottom:5px; }
.ew-shell .ew-reveal>p { font-size:16px; }
.ew-metrics { padding:20px; background:#eef3e7; border:1px solid #dce5d2; border-radius:15px; }
.ew-metrics>div { display:flex; justify-content:space-between; align-items:baseline; gap:10px; margin-top:20px; }
.ew-metrics>div>span { color:var(--ew-muted); font-size:11px; }
.ew-metrics>div>strong { font-size:25px; font-weight:600; font-variant-numeric:tabular-nums; letter-spacing:-.04em; }
.ew-metrics>div small { font-size:9px; }
.ew-metrics>p:last-child { color:#87917e; font-size:10px; line-height:1.8; margin-top:18px; padding-top:14px; border-top:1px solid #d9e3cf; }
.ew-practice-guide { padding:0 4px; }
.ew-practice-guide ol { padding:0; list-style:none; display:flex; flex-direction:column; gap:18px; margin-top:18px; }
.ew-practice-guide li { display:flex; gap:10px; }
.ew-practice-guide li>span { flex-shrink:0; display:grid; place-items:center; width:22px; height:22px; border:1px solid var(--ew-line); border-radius:50%; font-size:9px; color:#97a08d; }
.ew-practice-guide li.is-current>span { background:#dfebd4; border-color:#dfebd4; color:#52793e; }
.ew-practice-guide strong { font-size:11px; color:#738267; font-weight:600; }
.ew-practice-guide li.is-current strong { color:#345e37; }
.ew-practice-guide li p { font-size:10px; line-height:1.8; margin-top:3px; color:#929b8a; }
.ew-shell .ew-assessment-note { color:#939b88; font-size:10px; line-height:1.8; margin-top:22px; }
.ew-stage-finished { padding:42px 10px; text-align:center; }
.ew-finish-mark { display:inline-grid; place-items:center; width:54px; height:54px; border-radius:50%; background:#e8f0dc; color:#527d3b; font-size:25px; margin-bottom:20px; }
.ew-stage-finished>p:not(.ew-eyebrow) { margin:15px auto 0; max-width:460px; font-size:13px; line-height:1.9; color:var(--ew-muted); }
.ew-finish-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:12px; margin-top:26px; }
.ew-next-card { max-width:420px; padding:24px; margin:25px auto 0; border:1px solid var(--ew-line); border-radius:16px; background:var(--ew-soft); }
.ew-next-card>span { font-size:10px; color:var(--ew-muted); }
.ew-next-card h3 { margin:8px 0; font-size:17px; }
.ew-next-card p { color:var(--ew-muted); font-size:12px; line-height:1.8; margin-bottom:18px; }
.ew-shell .ew-storage-warning { color:#a0652c !important; }
.ew-footer { flex-shrink:0; display:flex; justify-content:space-between; gap:15px; padding:12px 24px; border-top:1px solid var(--ew-line); color:#939b89; font-size:10px; line-height:1.6; }
.ew-footer .is-error { color:#a0652c; }
[data-theme="dark"] .ew-shell { --ew-ink:#e3ecdc; --ew-muted:#a7b09f; --ew-line:#3d4938; --ew-paper:#22291f; --ew-soft:#313e29; --ew-green:#84aa74; }
[data-theme="dark"] .ew-modes,[data-theme="dark"] .ew-reading-aside>section,[data-theme="dark"] .ew-target,[data-theme="dark"] .ew-cloze-hint,[data-theme="dark"] .ew-recall-cue,[data-theme="dark"] .ew-metrics { background:#2c3526; }
[data-theme="dark"] .ew-modes button[aria-current="step"],[data-theme="dark"] .ew-shell textarea { background:#22291f; color:#dce7d4; }
[data-theme="dark"] .ew-shell .ew-english { color:#dbe5d4; }
[data-theme="dark"] .ew-material,[data-theme="dark"] .ew-reveal { background:#3b3926; }
@media (max-width:1100px) {
  .ew-main { padding:24px; }
  .ew-read-grid,.ew-practice-layout { grid-template-columns:minmax(0,1fr) 225px; gap:24px; }
  .ew-shell h2 { font-size:22px; }
  .ew-reading-aside>section,.ew-metrics { padding:16px; }
  .ew-header { padding:13px 20px; }
}
@media (max-width:800px) {
  body:has(.ew-shell) .view-container { padding:10px 12px 16px; }
  body:has(.ew-shell) .rc-study-page { height:auto; min-height:calc(100dvh - 100px); }
  .ew-shell { overflow:visible; }
  .ew-main { overflow:visible; padding:23px 20px 28px; }
  .ew-read-grid,.ew-practice-layout { grid-template-columns:1fr; gap:32px; }
  .ew-reading-aside { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
  .ew-reading-aside>section:first-child { grid-column:1/-1; }
  .ew-practice-aside { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
  .ew-modes { padding:12px 16px; gap:4px; }
  .ew-modes button { font-size:12px; padding:9px 5px; gap:6px; }
  .ew-footer { flex-wrap:wrap; gap:5px; padding:11px 20px; }
}
@media (max-width:480px) {
  .ew-header { padding:13px 15px; gap:9px; }
  .ew-header strong { font-size:13px; }
  .ew-header small { font-size:9px; }
  .ew-brand { width:29px; height:29px; font-size:19px; border-radius:9px; }
  .ew-header>div { gap:8px; }
  .ew-header>.ew-quiet { font-size:10px; }
  .ew-modes { padding:10px; }
  .ew-modes button { flex-direction:column; gap:5px; font-size:10px; padding:8px 4px; }
  .ew-modes button>span { width:20px; height:20px; font-size:8px; }
  .ew-main { padding:22px 15px 26px; }
  .ew-shell h2 { font-size:20px; }
  .ew-shell .ew-english { font-size:17px; }
  .ew-reading-aside,.ew-practice-aside { display:flex; flex-direction:column; }
  .ew-reading-bottom { align-items:stretch; flex-direction:column; }
  .ew-target,.ew-cloze-hint,.ew-recall-cue { padding:17px; }
  .ew-shell .ew-target,.ew-cloze-hint>p { font-size:19px; }
  .ew-shell textarea { font-size:16px; }
  .ew-typing-top { gap:10px; }
  .ew-typing-top h2 { font-size:18px; }
  .ew-shell .ew-primary,.ew-shell .ew-secondary { padding:11px 15px; font-size:12px; }
  .ew-typing-actions { gap:8px; }
  .ew-typing-actions>.ew-quiet { font-size:10px; }
  .ew-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
  .ew-metrics>.ew-eyebrow,.ew-metrics>p:last-child { grid-column:1/-1; }
  .ew-metrics>div { display:flex; flex-direction:column; gap:7px; margin-top:0; }
  .ew-metrics>div>strong { font-size:22px; }
  .ew-metrics>p:last-child { margin-top:0; }
  .ew-stage-finished { padding:32px 0; }
}
@media (prefers-reduced-motion:reduce) { .ew-shell * { scroll-behavior:auto !important; transition:none !important; } }
