/* Approved layout 05, adapted to real lesson feedback. Coffee/ocean preview. */
html[data-palette=coffee] .app{--token-ink:#abcfee;--token-bg:#263c4a;--token-line:#89b5cf}
.token-review{margin:26px 0}.token-review-heading{display:flex;justify-content:space-between;align-items:baseline;gap:15px;margin:0 0 15px}.token-review-heading>span{font-size:13px;font-weight:600}.token-review-heading small{font-size:11px;line-height:1.7;color:var(--a-muted,#8b8279)}.review-token-list{display:flex;flex-wrap:wrap;gap:12px}.review-token{display:flex;align-items:center;gap:13px;max-width:100%;min-height:64px;padding:16px 18px;border-radius:12px;background:var(--a-panel,#29251f);border:1px solid var(--a-line,#5b5143);color:var(--a-text,#eee);font:inherit;cursor:pointer;flex-wrap:wrap;text-align:start;box-shadow:inset 0 1px #ffffff0c,0 3px 0 #0003}.review-token del{font-size:17px;color:#b6a898;text-decoration-color:#9c8571;text-decoration-thickness:1px;overflow-wrap:anywhere}.review-token strong{font-weight:600;font-size:20px;line-height:1.6;color:var(--token-ink,var(--a-accent,#e6c68f));overflow-wrap:anywhere}.review-token>svg{color:var(--a-muted,#b7a58c);flex-shrink:0}.review-token>small{font-size:10px;color:var(--a-muted,#b7a58c)}.review-token[aria-pressed=true]{background:linear-gradient(130deg,var(--token-bg,#3d3325),var(--a-panel,#29251f));border-color:var(--token-line,var(--a-accent,#d1b27c));box-shadow:inset 0 1px #ffffff1c,0 3px 0 #0004}.review-token[aria-pressed=true]>svg,.review-token[aria-pressed=true]>small{color:var(--token-ink,var(--a-accent,#d1b27c))}.review-token-active{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:20px 0;padding-inline-start:13px;border-inline-start:2px solid var(--token-line,#b69b74);font-size:13px;color:var(--a-muted,#aa9a87)}.review-token-active>span{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.review-token-active b{color:var(--token-ink,var(--a-accent,#dfc191));font-weight:600}.review-token-active small{font-size:11px}.review-token:focus-visible{outline:3px solid var(--token-line,#d2b688);outline-offset:4px}
html[data-palette=coffee] .app .token-sentences{display:block;margin:20px 0 0;border:0;border-top:1px solid #bca47f24;border-bottom:1px solid #bca47f24;padding:0;background:transparent}
html[data-palette=coffee] .app .token-sentences .repair-row{display:flex;gap:10px;border:0;box-shadow:none;border-radius:0;padding:20px 0;background:transparent}
html[data-palette=coffee] .app .token-sentences .repair-before{border-bottom:1px solid #bca47f15}
html[data-palette=coffee] .app .token-sentences .repair-before p{font-size:17px;line-height:1.95;color:#bcb1a2;font-weight:400}
html[data-palette=coffee] .app .token-sentences .repair-after p{font-size:22px;line-height:1.95;color:#e9e1d5;font-weight:450}
html[data-palette=coffee] .app .token-sentences .repair-dot{flex-shrink:0;margin-top:2px;color:#a89b87}
html[data-palette=coffee] .app .token-sentences .repair-after .repair-dot{color:var(--token-ink)}
html[data-palette=coffee] .app .token-sentences .repair-row>div{min-width:0}
html[data-palette=coffee] .app .token-sentences .repair-row small{color:#b8ac99;font-size:11px;margin-bottom:8px}
html[data-palette=coffee] .app .token-sentences del{background:transparent;color:#c4ab96;border:0;border-bottom:1px solid transparent;padding:1px 3px;box-shadow:none;text-decoration-color:#b2957d}
html[data-palette=coffee] .app .token-sentences del.active-change{background:#a68b6810;border-bottom:1px dotted #ac8d6e}
html[data-palette=coffee] .app .token-sentences mark{background:transparent;color:var(--token-ink);border:1px solid #ffffff15;border-radius:5px;padding:2px 5px;box-shadow:none;font-weight:550}
html[data-palette=coffee] .app .token-sentences mark.active-change{background:var(--token-bg);border-color:var(--token-line);box-shadow:inset 0 1px #ffffff14,0 2px 0 #0002}
html[data-palette=coffee] .app :is(.word-example mark,.reason-term,.answer-result mark){color:var(--token-ink);background:#263c4a;border:1px solid #89b5cf4d;border-bottom-color:#89b5cf80;border-radius:4px;padding:1px 4px;box-shadow:none;font-weight:600;box-decoration-break:clone;-webkit-box-decoration-break:clone}
html[data-palette=coffee] .app .word-combinations span{background:linear-gradient(130deg,#2b3436,#28231e);border-color:#89b5cf32;box-shadow:inset 0 1px #ffffff0c;color:#d8e2e3}
html[data-palette=coffee] .app .word-jump button[aria-pressed=true]{color:var(--token-ink);background:#263c4a;border-color:#89b5cf80}
html[data-palette=coffee] .app .evidence-card{background:linear-gradient(115deg,#263c4a66,#25231e);border-inline-start:2px solid var(--token-line);border-top:1px solid #89b5cf19;box-shadow:inset 0 1px #ffffff09}
html[data-palette=coffee] .app .evidence-card blockquote{color:#d3e1e8;font-weight:450}
html[data-palette=coffee] .app .evidence-heading{color:var(--token-ink)}
html[data-palette=coffee] .app .node-detail blockquote{background:linear-gradient(120deg,#263c4a88,#29251e);color:#d9e6e9;border-color:#89b5cf66;border-inline-start:2px solid var(--token-line);box-shadow:inset 0 1px #ffffff0b;border-radius:3px 12px 12px 3px}
html[data-palette=coffee] .app .node-detail .reason-term{padding:1px 3px}
html[data-palette=coffee] .app .writing-checklist input:checked{accent-color:#89b5cf}
html[data-palette=coffee] .app .answer-details .model-answer{background:linear-gradient(130deg,#263c4a44,#24211c);border-inline-start:2px solid var(--token-line);padding:24px;border-radius:3px 14px 14px 3px;color:#e0e7e8;line-height:1.95}
html[data-palette=coffee] .app .reason-block{background:transparent;border:0;border-radius:0;padding:0;margin:26px 0}
html[data-palette=coffee] .app .reason-block h4{color:#c7d8e3;font-size:13px}
html[data-palette=coffee] .app .reason-block p{font-size:16px;line-height:2;color:#d4c7b6}
@media(max-width:700px){.token-review-heading{flex-direction:column;gap:6px}.review-token{padding:13px 15px;gap:10px;min-height:60px}.review-token strong{font-size:19px}.review-token del{font-size:16px}html[data-palette=coffee] .app .token-sentences .repair-after p{font-size:20px}html[data-palette=coffee] .app .token-sentences .repair-before p{font-size:16px}}

html[data-palette=coffee] .app .reason-term.reason-term{background:transparent;border:0;border-bottom:1px solid #89b5cf55;border-radius:0;padding:0 1px;box-shadow:none;font-weight:500;color:#bfd8e8}

html[data-palette=coffee] .app .answer-details .model-answer{font-weight:450;font-size:19px}
html[data-palette=coffee] .app .knowledge-formulas>div{background:linear-gradient(120deg,#263c4a77,#24211c);border:1px solid #89b5cf30;border-radius:12px;box-shadow:inset 0 1px #ffffff0a;padding:18px}
html[data-palette=coffee] .app .knowledge-formulas>div>span{color:#abcfee}
html[data-palette=coffee] .app .knowledge-formulas>div p{color:#d4e2e8}
html[data-palette=coffee] .app .grammar-form-grid article p>span{border-inline-start:2px solid #89b5cf66;padding-inline-start:10px;color:#d4e2e8}
/* A failed local save must not also show a successful-save caption. */
.app:has(> .storage-notice) .question-bottom > span,
.app:has(> .storage-notice) .saved-hint { display:none; }

/* November 1: answer first, visible reasons, functional native audio. */
body .app .answer-state{display:inline-flex;align-items:center;gap:6px;margin-inline-start:auto;flex-shrink:0;font-size:12px;line-height:1.4;white-space:nowrap}
body .app .option>span:nth-of-type(2){flex:1;min-width:0}
html[data-palette=coffee] .app .option.correct,
html[data-palette=coffee] .app .option.correct.selected{background:#e4d4b8;border:2px solid #eedfc5;color:#302519;box-shadow:inset 0 1px #fff5}
html[data-palette=coffee] .app .option.correct .option-letter{color:#302519;background:#cfbc98;border-color:#a48b653d}
html[data-palette=coffee] .app .option.correct .answer-state{color:#264b3c}
html[data-palette=coffee] .app .option.wrong,
html[data-palette=coffee] .app .option.wrong.selected{background:#392629;border:2px solid #b97c80;color:#f5e2de;box-shadow:none}
html[data-palette=coffee] .app .option.wrong .option-letter{color:#f5d0cb;background:#543338;border-color:#c58b8d66}
html[data-palette=coffee] .app .option.wrong .answer-state{color:#ffc2b9}
body .app .reference-only{margin:22px 0}
body .app .choice-reason-visible{display:block;padding:20px 0 4px;margin-top:18px;border-top:1px solid var(--a-line)}
body .app .choice-reason-visible h4{font-size:14px;margin:0 0 10px;color:var(--a-text)}
body .app .choice-reason-visible p{margin:0;line-height:1.9;font-size:15px;color:var(--a-muted)}
body .app audio.listening-player,
html[data-palette=coffee] .app audio.listening-player{padding:0;height:54px;min-height:54px;display:block;width:100%;border:0;border-radius:14px;background:#e4d4b8;box-shadow:none;color-scheme:light}
body .app audio.listening-player::before{display:none}
html[data-palette=coffee] .app .material-heading>b,
html[data-palette=coffee] .app .level-tag.static,
html[data-palette=coffee] .app .word-level{background:#e4d4b8;color:#302519;border:1px solid #cdb58e;font-weight:800;font-size:13px;padding:5px 10px;line-height:1.5;opacity:1}
body .app .rule-card-visible{padding:24px;min-width:0}
body .app .rule-card-visible h3{font-size:16px;line-height:1.5;margin:0 0 13px;color:var(--a-text);border-inline-start:3px solid #89b5cf;padding-inline-start:12px}
body .app .rule-card-visible>p{font-size:15px;line-height:1.9;margin:0 0 16px}
body .app .rule-card-visible .example-sentence{padding:16px 18px;background:#263c4a33;border-radius:10px;border:1px solid #89b5cf20;font-size:17px;font-weight:450;margin-bottom:0;line-height:1.9}
body .app .rule-card-visible mark{background:#345165;color:#dbedf8;border:0;border-bottom:2px solid #91b9d0;padding:2px 4px;border-radius:4px;box-decoration-break:clone;-webkit-box-decoration-break:clone}
@media(max-width:700px){body .app .answer-state{font-size:11px;gap:4px}body .app .answer-state svg{width:16px}body .app .rule-card-visible{padding:20px}body .app .rule-card-visible .example-sentence{padding:13px;font-size:16px}body .app audio.listening-player{min-width:0}}
body .app .rules-section .rule-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}
/* Keep cross-unit recommendations outside the active answer flow. */
body .app:has(.lesson-pane[data-view="practice"]:not([hidden])) .related-section{display:none}

/* Practice studio: readable parallel workspaces and restrained rewards. */
body .app .unit-count{min-width:96px;min-height:88px;padding:12px 22px;display:grid;place-items:center;line-height:1.1;border-radius:22px;font-variant-numeric:tabular-nums;flex-shrink:0}
body .app .question-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:24px}
body .app .question-input-side,body .app .question-feedback-side{min-width:0}
body .app .question-feedback-side .feedback{margin:0;padding:0;border-top:0;outline-offset:6px}
body .app .question-feedback-side .question-bottom{margin-top:25px;padding-top:20px}
body .app .question-feedback-side .reason-block{margin-top:20px}
body .app .question-feedback-side .reason-block>h4{margin-bottom:12px}
body .app .question-input-side fieldset:disabled{opacity:1}
body .app .question-input-side fieldset:disabled .option{cursor:default}
body .app .question-input-side fieldset:disabled .option:hover{transform:none}
body .app .answer-state{font-size:15px;font-weight:700;gap:8px}
body .app .answer-state svg{width:20px;height:20px;stroke-width:2.5}
body .app .answer-waiting{min-height:255px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px;text-align:center;border:1px dashed #b99a7138;border-radius:20px;padding:30px;background:#17151233}
body .app .answer-waiting>svg{width:76px;height:76px;fill:#332b22;stroke:#bfa47d;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
body .app .answer-waiting>svg circle{fill:#28231e;stroke:#91b1bf}
body .app .answer-waiting p{font-size:14px;line-height:1.8;max-width:240px;margin:0;color:#c1b4a5}
body .app .reward-medal{display:inline-flex;align-items:center;gap:9px;padding:8px 12px;border-radius:13px;background:linear-gradient(135deg,#4c3e2b,#302820);border:1px solid #cfb18166;color:#f3d8a5;box-shadow:inset 0 1px #fff2;white-space:nowrap}
body .app .reward-medal svg{width:34px;height:34px;overflow:visible;fill:none;stroke:#f0cd8e;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
body .app .reward-medal b{font-size:14px}
body .app .earned-now{animation:medal-arrive .65s cubic-bezier(.2,.8,.3,1) both}
body .app .earned-now svg>path:first-of-type{stroke-dasharray:40;stroke-dashoffset:40;animation:medal-draw .45s .2s ease forwards}
body .app .earned-now .medal-ray{animation:medal-rays .85s ease-out both;transform-origin:center}
@keyframes medal-arrive{from{opacity:0;transform:translateY(8px) scale(.92)}to{opacity:1;transform:none}}
@keyframes medal-draw{to{stroke-dashoffset:0}}
@keyframes medal-rays{from{opacity:0;transform:scale(.7)}40%{opacity:1}to{opacity:0;transform:scale(1.3)}}
@media(min-width:1000px){body .app .unit-workspace{display:block;max-width:none;width:100%}body .app .practice-main{width:100%;max-width:none}body .app .question-card{padding:30px}body .app .question-card:not(.writing-question) .question-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:34px;align-items:start}body .app .question-card:not(.writing-question) .question-feedback-side{padding-inline-start:30px;border-inline-start:1px solid #c5ad8626;position:sticky;top:20px}body .app .question-context h3{font-size:23px}body .app .question-input-side .option{padding:16px 14px;gap:10px}body .app .question-input-side .option .answer-state{flex-direction:column;gap:3px;font-size:13px}body .app .question-feedback-side .review-verdict h3{font-size:24px}body .app .question-feedback-side .feedback-heading{gap:10px;flex-wrap:wrap}body .app .question-feedback-side .answer-result p{font-size:23px}}
@media(max-width:999px){body .app .answer-waiting{display:none}body .app .answer-state{font-size:14px}body .app .question-feedback-side{border-top:1px solid #c5ad8626;padding-top:24px}}
@media(max-width:540px){body .app .question-input-side .option{flex-wrap:wrap}body .app .question-input-side .answer-state{width:100%;justify-content:flex-end;font-size:14px;padding-top:4px}body .app .unit-count{min-width:82px;min-height:78px;padding:12px 18px;font-size:42px}}
body .app.reduce-motion .earned-now,body .app.reduce-motion .earned-now svg path{animation:none;stroke-dashoffset:0}
@media(prefers-reduced-motion:reduce){body .app .earned-now,body .app .earned-now svg path{animation:none;stroke-dashoffset:0}}

/* Custom player: native audio engine, our own controls, no simulated waveform. */
body .app .rove-player{margin:26px 0;border-radius:21px;padding:22px;background:linear-gradient(135deg,#352d25,#24201c);border:1px solid #a98b613f;box-shadow:inset 0 1px #f3ddb51a,0 12px 30px #0002}
body .app .rove-player audio{display:none!important}
body .app .rove-player-main{display:flex;align-items:center;gap:22px}
body .app .rove-play{width:58px;height:58px;min-width:58px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#eddbb8,#c4a273);color:#302519;border:1px solid #f4e7cc66;box-shadow:inset 0 1px #fff6,0 5px 18px #0003}
body .app .rove-play svg{fill:currentColor;stroke-width:1.5}
body .app .rove-timeline{flex:1;min-width:0}
body .app .rove-time{display:flex;align-items:center;justify-content:space-between;color:#e5d6bf;font-size:13px;font-variant-numeric:tabular-nums;margin-bottom:10px}
body .app .rove-player input[type=range]{appearance:none;-webkit-appearance:none;display:block;width:100%;height:24px;margin:0;background:transparent;cursor:pointer;padding:0;border:0;accent-color:#dfc492}
body .app .rove-player input[type=range]::-webkit-slider-runnable-track{height:5px;background:linear-gradient(to right,#e4ca98 var(--played,100%),#675846 var(--played,100%));border-radius:8px}
body .app .rove-player input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:14px;height:14px;margin-top:-4.5px;background:#f2ddba;border-radius:50%;border:2px solid #aa8756;box-shadow:0 0 0 4px #e4ca9810}
body .app .rove-player input[type=range]::-moz-range-track{height:5px;background:#675846;border-radius:8px}
body .app .rove-player input[type=range]::-moz-range-progress{height:5px;background:#e4ca98}
body .app .rove-player input[type=range]::-moz-range-thumb{background:#f2ddba;border:2px solid #aa8756;width:12px;height:12px;border-radius:50%}
body .app .rove-player-tools{display:flex;align-items:center;gap:14px;margin-top:18px;padding-top:12px;border-top:1px solid #d5bc8e1b}
body .app .audio-jumps{display:flex;gap:4px}
body .app .audio-jumps button,body .app .rove-volume button{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;color:#d6c4a8;border-radius:10px;gap:3px}
body .app .audio-jumps button span{font-size:10px;font-weight:700}
body .app .rove-player button:hover{filter:brightness(1.12)}
body .app .rove-speed select{background:#42372c;color:#ecd8b4;border:1px solid #b797652f;border-radius:10px;min-height:40px;font-size:13px;padding:6px 10px}
body .app .rove-volume{display:flex;align-items:center;gap:4px;margin-left:auto}
body .app .rove-volume input[type=range]{width:70px}
body .app .player-pulse{display:flex;gap:3px;align-items:center;height:15px}
body .app .player-pulse i{width:3px;height:4px;border-radius:3px;background:#bda177}
body .app .is-playing .player-pulse i{animation:player-pulse .85s ease-in-out infinite alternate}
body .app .is-playing .player-pulse i:nth-child(2){animation-delay:-.3s}body .app .is-playing .player-pulse i:nth-child(3){animation-delay:-.55s}body .app .is-playing .player-pulse i:nth-child(4){animation-delay:-.1s}
@keyframes player-pulse{to{height:14px}}
body .app .audio-error{color:#f0b8ae;font-size:14px;margin:12px 0 0}
@media(max-width:600px){body .app .rove-player{padding:16px;border-radius:17px}body .app .rove-player-main{gap:15px}body .app .rove-play{width:48px;height:48px;min-width:48px}body .app .rove-player-tools{gap:5px;flex-wrap:wrap}body .app .rove-volume input[type=range]{width:42px}body .app .audio-jumps button{min-width:38px}}
@media(prefers-reduced-motion:reduce){body .app .is-playing .player-pulse i{animation:none;height:8px}}
body .app.reduce-motion .is-playing .player-pulse i{animation:none;height:8px}

/* Explicit navigation and a real lesson overview. */
body .app .unit-tabs{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin;gap:9px;padding-bottom:12px}
body .app .unit-tabs>a{flex-shrink:0;white-space:nowrap;font-size:14px;padding:13px 17px}
body .app .question-library{border:0;background:none;padding:0;margin-top:20px}
body .app .question-library>h2{font-size:28px;margin:0 0 22px}
body .app .library-question{padding:28px;border:1px solid #c8a97932;border-radius:18px;background:#28221d;margin:20px 0}
body .app .library-question ol{line-height:2;padding-inline-start:25px}
body .app .library-question>details{margin-top:20px;padding-top:18px;border-top:1px solid #b69b752e}
body .app .lesson-help{margin-top:35px}
body .app .review-schedule{padding:18px 22px;background:#2a251f;border:1px solid #c7ab7d33;border-radius:14px;margin:20px 0}
body .app .review-schedule p{margin:0 0 7px;color:#ead9bd}
body .app .review-schedule small{color:#beaf9c;font-size:13px}
body .app .unit-guide-image{display:block;width:100%;height:auto;max-width:1000px;margin:20px auto;border-radius:18px}
body .app .guide-level{background:#e4d4b8;color:#302519;padding:8px 14px;font-weight:700;border-radius:12px}
body .app .concept-map-root{margin:25px auto 0;max-width:600px;background:#e4d4b8;color:#302519;border-radius:18px;padding:24px 30px;text-align:center;font-size:26px;font-weight:700}
body .app .concept-map-branches{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:24px;padding-top:45px;position:relative}
body .app .concept-map-branches::before{content:'';position:absolute;top:0;height:45px;left:50%;border-left:1px solid #ad9570}
body .app .concept-map-node{padding:26px;border:1px solid #b8a07a4d;border-radius:18px;background:linear-gradient(140deg,#332b23,#25211d)}
body .app .concept-index{font-size:12px;color:#9fc3d4;letter-spacing:.12em}
body .app .concept-map-node h3{font-size:21px;line-height:1.5;margin:12px 0}
body .app .concept-map-node p{font-size:15px;line-height:1.9}
body .app .concept-map-node blockquote,body .app .route-step blockquote{padding:16px;background:#263c4a30;border:1px solid #89b5cf25;border-radius:12px;color:#e5e0d4;font-size:17px;line-height:1.8}
body .app :is(.concept-map-node,.route-step) mark{color:#d9edf8;background:#345165;border-bottom:2px solid #91b9d0;border-radius:4px;padding:2px 4px;box-decoration-break:clone;-webkit-box-decoration-break:clone}

/* One route, one occurrence per question. */
body .app .route-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:40px;align-items:start}
body .app .route-summary{position:sticky;top:22px;text-align:center;padding:28px 20px;background:linear-gradient(160deg,#342b22,#221e19);border:1px solid #c6a37338;border-radius:24px;display:flex;flex-direction:column;align-items:center}
body .app .route-progress-art{width:150px;height:150px;fill:none;stroke-width:5}
body .app .route-ring-track{stroke:#5b4c3b}
body .app .route-ring-fill{stroke:#e6cc9b;stroke-linecap:round;transform:rotate(-90deg);transform-origin:center}
body .app .route-ring-check{stroke:#d4bc92;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
body .app .route-summary>strong{font-size:35px;margin-top:10px;color:#f0dfbf;font-variant-numeric:tabular-nums}
body .app .route-summary>strong small{font-size:16px;font-weight:400;color:#bba88c}
body .app .route-summary>p{font-size:13px;margin:3px 0 17px}
body .app .route-summary>span{font-size:13px;line-height:1.8;color:#d0bea2}
body .app .route-summary>.button{margin-top:24px;width:100%}
body .app .route-steps{display:grid;gap:22px}
body .app .route-step{display:grid;grid-template-columns:38px minmax(0,1fr);gap:16px;position:relative}
body .app .route-step:not(:last-child)::before{content:'';position:absolute;inset-inline-start:18px;top:38px;bottom:-23px;border-inline-start:1px solid #947b554f}
body .app .route-step-marker{z-index:1;display:grid;place-items:center;align-self:start;width:38px;height:38px;border-radius:50%;background:#342c23;border:1px solid #967b534d;color:#d9bc8e;font-size:12px;font-weight:750}
body .app .route-step.is-current .route-step-marker{background:#e4d4b8;color:#302519;box-shadow:0 0 0 5px #e4d4b80a}
body .app .route-step.is-complete .route-step-marker{background:#2d4347;color:#b6d4dc;border-color:#7daab55c}
body .app .route-step-body{padding:23px 26px;background:linear-gradient(135deg,#302820,#241f1b);border:1px solid #b89b7030;border-radius:18px}
body .app .route-step.is-current .route-step-body{border-color:#d7b98583;box-shadow:inset 0 1px #f0dcbf16}
body .app .route-step-heading{display:flex;align-items:center;gap:14px}
body .app .route-step-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:#c5a77613;color:#dfc69d;flex-shrink:0}
body .app .route-step-heading small{font-size:11px;color:#c4af90}
body .app .route-step-heading h3{font-size:19px;line-height:1.5;margin:5px 0 0}
body .app .route-step-count{margin-inline-start:auto;font-size:13px;color:#cfbd9f;white-space:nowrap;font-variant-numeric:tabular-nums}
body .app .route-step-body>p{margin:18px 0 0;font-size:14px;line-height:1.9}
body .app .route-step-bottom{display:flex;gap:24px;align-items:center;margin-top:20px}
body .app .route-step-track{height:4px;flex:1;background:#594b3b;border-radius:8px;overflow:hidden}
body .app .route-step-track>i{display:block;height:100%;background:#d5b67e}
body .app .route-step-bottom .text-link{font-size:13px;flex-shrink:0}
@media(max-width:760px){body .app .route-layout{grid-template-columns:1fr;gap:26px}body .app .route-summary{position:static;display:grid;grid-template-columns:80px 1fr;gap:5px 18px;text-align:start;padding:20px}body .app .route-progress-art{width:80px;height:80px;grid-row:1/4}body .app .route-summary>strong{margin:0;font-size:28px}body .app .route-summary>p{margin:0}body .app .route-summary>.button{grid-column:1/-1;margin-top:12px}body .app .route-step{grid-template-columns:30px minmax(0,1fr);gap:10px}body .app .route-step-marker{width:30px;height:30px}body .app .route-step:not(:last-child)::before{inset-inline-start:14px;top:30px}body .app .route-step-body{padding:18px 16px}body .app .route-step-heading{gap:10px;flex-wrap:wrap}body .app .route-step-icon{display:none}body .app .route-step-heading h3{font-size:18px}body .app .route-step-bottom{gap:12px}body .app .library-question{padding:20px 16px}body .app .concept-map-root{font-size:22px;padding:22px}body .app .concept-map-node{padding:21px}}
/* Final legibility pass: answer status and reward ink. */
body .app .option .answer-state b{font-size:15px;line-height:1.4;font-weight:700}
body .app .feedback .reward.reward-medal,body .app .feedback .reward.reward-medal b{color:#ead1a0}
body .app .feedback .reward.reward-medal svg{color:#e1bc77}
@media(max-width:360px){body .app .rove-volume input[type=range]{display:none}body .app .rove-player-tools{flex-wrap:nowrap}body .app .audio-jumps button{min-width:40px}body .app .rove-speed select{padding-inline:7px}}
body .app .rove-player input:focus-visible,body .app .rove-player select:focus-visible,body .app .rove-player button:focus-visible{outline:2px solid #b9d5e7;outline-offset:4px;border-radius:10px}
body .app .unit-count{width:max-content;align-self:flex-start}
body .app .unit-tabs{display:flex;align-items:center}
body .app .unit-tabs>.unit-utility{margin-inline-start:auto}
@media(max-width:760px){body .app .unit-tabs>.unit-utility{margin-inline-start:0}}
/* Focused answer flow, compact progress, full lesson results. */
body .app .concise-feedback:empty{display:none}
body .app .concise-feedback{justify-content:flex-end;margin:0 0 15px}
body .app .question-bottom .next-question{background:#e4d4b8;color:#302519;border:1px solid #f0e4cd;border-radius:13px;padding:13px 24px;min-height:48px;font-weight:750;box-shadow:inset 0 1px #fff6}
body .app .question-bottom .next-question:disabled{background:#302b25;color:#8c8275;border-color:#53483a;box-shadow:none;cursor:not-allowed;opacity:.65}
body .app .practice-toolbar{display:flex;align-items:center;gap:18px;margin:0 0 20px;padding:16px 0;font-size:14px;color:#ddcbb0;position:relative}
body .app .practice-toolbar>span{font-variant-numeric:tabular-nums;white-space:nowrap}
body .app .practice-progress{height:4px;background:#4b4033;border-radius:8px;flex:1;max-width:250px;overflow:hidden}
body .app .practice-progress i{display:block;background:#dbc39a;height:100%;border-radius:8px}
body .app .compact-question-nav{margin-inline-start:auto}
body .app .compact-question-nav summary{display:flex;align-items:center;gap:8px;cursor:pointer;min-height:40px;list-style:none}
body .app .compact-question-nav .question-dots{position:absolute;z-index:5;inset-inline-end:0;top:65px;padding:18px;max-width:min(460px,100%);background:#27221c;border:1px solid #6c5840;border-radius:16px;box-shadow:0 18px 40px #0007;display:grid;grid-template-columns:repeat(6,1fr)}
body .app .practice-toolbar>.text-link{font-size:14px;min-height:44px}
body .app .review-due-only{margin:28px 0;padding-top:20px;border-top:1px solid #564839}
body .app .review-due-only h3{font-size:18px}.due-question-list{display:flex;flex-wrap:wrap;gap:12px}
body .app .unit-results{padding:30px;border:1px solid #67533a70;border-radius:24px;background:linear-gradient(130deg,#302920,#1e1b17)}
body .app .unit-results header h2{font-size:34px;margin:10px 0}.unit-results header>p{color:#bfae97;font-size:14px}
body .app .result-metrics{display:flex;gap:12px;margin:27px 0;flex-wrap:wrap}
body .app .result-metric{flex:1;min-width:105px;padding:20px;border-radius:18px;background:#27221c;display:flex;flex-direction:column;gap:9px;border:1px solid #5b4d39}
body .app .result-metric strong{font-size:36px;line-height:1;font-variant-numeric:tabular-nums}
body .app .result-metric.correct{background:#e4d4b8;color:#302519;border-color:#e4d4b8}
body .app .result-metric.wrong{background:#38282a;color:#eab1a8;border-color:#a17172}
body .app .result-metric span{font-size:14px}
body .app .result-actions{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:28px}
body .app .result-row{padding:24px 0;border-top:1px solid #9b805839}
body .app .result-row-top{display:flex;align-items:center;gap:18px;flex-wrap:wrap;font-size:14px}
body .app .result-index{font-variant-numeric:tabular-nums;color:#bca78a}
body .app .result-status{display:flex;gap:7px;align-items:center;font-weight:700;color:#d6c4a6}
body .app .result-row.correct .result-status{color:#e4d4b8}body .app .result-row.wrong .result-status{color:#e6a49b}body .app .result-row.unresolved .result-status{color:#b8d2e4}
body .app .result-row-top>.text-link{margin-inline-start:auto;min-height:40px;font-size:13px}
body .app .result-row h3{font-size:19px;line-height:1.6;margin:16px 0 8px}
body .app .result-context{font-size:15px;color:#c1b39e;line-height:1.8}
body .app .result-row details{margin-top:14px}body .app .result-row summary{font-size:14px;cursor:pointer;padding:10px 0}
body .app .result-answer-pair{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:10px}
body .app .result-answer-pair>div{padding:20px;background:#191713;border-radius:15px;min-width:0}
body .app .result-answer-pair small{color:#bcaa90;font-size:13px}body .app .result-answer-pair p{overflow-wrap:anywhere;line-height:1.8}
body .app .guide-image-button{display:block;position:relative;width:100%;max-width:1100px;margin:24px auto 40px;padding:0;border:0;border-radius:20px;overflow:hidden;background:#e9ddc3;cursor:zoom-in}
body .app .guide-image-button .unit-guide-image{display:block;width:100%;height:auto;margin:0;border:0;border-radius:0;object-fit:contain}
body .app .guide-image-button>span{position:absolute;bottom:14px;right:14px;display:flex;align-items:center;gap:8px;color:#f2e9d8;background:#26231ee8;padding:10px 14px;border-radius:12px;font-size:13px}
body .app .guide-dialog{background:#1d1a15;border:1px solid #6a5741;border-radius:20px;width:94vw;max-width:1600px;height:90vh;padding:55px 20px 20px;color:#f4ecd9}
body .app .guide-dialog::backdrop{background:#000c;backdrop-filter:blur(6px)}
body .app .guide-dialog>div{overflow:auto;max-height:calc(90vh - 100px)}
body .app .guide-dialog img{display:block;width:max(100%,1000px);max-width:none;height:auto}
body .app .guide-word-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
body .app .guide-word-card{border:1px solid #65513b;border-radius:19px;overflow:hidden;background:#2c251e}
body .app .guide-word-card img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;background:#e7d8bb}
body .app .guide-word-card>div{padding:20px}body .app .guide-word-card h3{font-size:24px;margin:0 0 8px}body .app .guide-word-card p{font-size:14px;margin:0}
body .app .guide-word-card svg{margin-top:14px;color:#ceb68e}
body .app .guide-lesson-points>h3{font-size:24px;margin:0 0 24px}
body .app .guide-lesson-points>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
body .app .guide-lesson-points article{padding:23px 0;border-top:1px solid #b8955f5c;min-width:0}
body .app .guide-lesson-points h4{font-size:18px;margin:15px 0}body .app .guide-lesson-points p{font-size:15px;line-height:1.9}
body .app .guide-lesson-points blockquote{margin:18px 0 0;padding:17px;border-radius:12px;background:#252523;line-height:1.9}
body .app .guide-lesson-points mark{color:#bed7e9;background:#33516580;border-radius:4px;padding:2px 4px}
@media(max-width:760px){body .app .unit-results{padding:20px 16px}body .app .unit-results header h2{font-size:28px}body .app .result-metric{min-width:80px;padding:16px 12px}body .app .result-metric strong{font-size:30px}body .app .result-row-top{gap:10px}body .app .result-answer-pair{grid-template-columns:1fr}body .app .practice-toolbar{gap:12px}body .app .practice-progress{max-width:80px}body .app .guide-word-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}body .app .guide-word-card>div{padding:14px}body .app .guide-word-card h3{font-size:20px}body .app .guide-lesson-points>div{grid-template-columns:1fr;gap:8px}body .app .guide-image-button{border-radius:13px}body .app .guide-image-button>span{font-size:11px;bottom:7px;right:7px;padding:7px}body .app .result-actions .button{width:100%;justify-content:center}}

/* Multilingual header: deliberate rows, never an orphaned sixth skill. */
body .app .header-inner{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;max-width:1560px;gap:16px;padding:16px 28px;direction:ltr}
body .app .header-inner .brand-link{grid-column:1;grid-row:1}
body .app .header-inner .course-nav{grid-column:2;grid-row:1;display:flex;flex-wrap:nowrap;justify-content:center;gap:2px;margin:0;width:auto;min-width:0;border:0;padding:0;direction:ltr}
body .app .header-inner .collection-trigger{grid-column:3;grid-row:1;white-space:nowrap;margin:0}
body .app .header-inner .language-select{grid-column:4;grid-row:1;margin:0}
body .app .header-inner .nav-dropdown{flex:0 1 auto;min-width:0}
body .app .header-inner .nav-dropdown summary{white-space:nowrap;gap:6px;font-size:13px;padding:12px 9px;line-height:1.5;min-height:46px}
body .app .header-inner .nav-dropdown summary svg{flex-shrink:0}
body .app .header-inner .nav-dropdown summary svg:first-child{transform:none}
body .app .header-inner .nav-menu{left:0;right:auto;min-width:215px;max-width:calc(100vw - 40px)}
body .app .header-inner .nav-dropdown:nth-last-child(-n+2) .nav-menu{left:auto;right:0}
@media(max-width:1400px){
 body .app .header-inner{grid-template-columns:minmax(0,1fr) auto auto;gap:10px 20px;padding:14px 28px 10px}
 body .app .header-inner .collection-trigger{grid-column:2}
 body .app .header-inner .language-select{grid-column:3}
 body .app .header-inner .brand-link{justify-self:start}
 body .app .header-inner .course-nav{grid-column:1/-1;grid-row:2;justify-content:space-between;border-top:1px solid var(--a-line);padding-top:8px}
 body .app .header-inner .nav-dropdown summary{font-size:14px;padding:11px 14px}
}
@media(max-width:760px){
 body .app .header-inner{gap:10px;padding:12px 18px}
 body .app .header-inner .collection-trigger{padding:10px;min-width:42px;min-height:42px;gap:4px}
 body .app .header-inner .collection-trigger>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 body .app .header-inner .brand-image{width:125px;height:40px}
 body .app .header-inner .language-select{padding:3px 7px;gap:4px}
 body .app .header-inner .language-select select{max-width:85px}
 body .app .header-inner .course-nav{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;overflow:visible}
 body .app .header-inner .nav-dropdown{position:static}
 body .app .header-inner .nav-dropdown summary{white-space:normal;justify-content:center;text-align:center;padding:10px 4px;font-size:13px;min-height:48px;border-radius:10px}
 body .app .header-inner .nav-dropdown .nav-menu{top:calc(100% + 8px);left:0;right:0;width:100%;max-width:100%;min-width:0;box-sizing:border-box;z-index:50}
}
@media(max-width:540px){
 body .app .header-inner{padding-inline:12px;gap:8px}
 body .app .header-inner .brand-image{width:111px;height:38px}
 body .app .header-inner .course-nav{grid-template-columns:repeat(2,minmax(0,1fr))}
 body .app .header-inner .nav-dropdown summary{justify-content:flex-start;padding-inline:12px;min-height:46px}
}
/* Arabic writing stays RTL; English exercises and the two-column workspace stay LTR. */
body .app[lang=ar]{font-family:Arial,Tahoma,sans-serif;letter-spacing:normal}
body .app[lang=ar] :is(button,select,input,textarea){font-family:inherit}
body .app[lang=ar] [lang=en]{font-family:Manrope,Arial,sans-serif;direction:ltr;text-align:left;unicode-bidi:isolate}
body .app[lang=ar] .header-inner :is(.nav-dropdown summary,.nav-menu,.collection-trigger,.language-select){direction:rtl}
body .app[lang=ar] .header-inner .nav-dropdown summary{font-size:16px}
body .app[lang=ar] :is(.unit-tabs,.practice-toolbar,.question-layout,.question-top,.result-answer-pair,.rove-player){direction:ltr}
body .app[lang=ar] :is(.question-input-side,.question-feedback-side,.unit-tabs>a,.result-answer-pair>div){direction:rtl}
body .app[lang=ar] :is(.question-feedback-side,.item-explanation,.rule-card-visible,.guide-lesson-points){text-align:right}
body .app[lang=ar] :is(.reason-block p,.item-explanation,.rule-card-visible>p,.guide-lesson-points p){font-size:17px;line-height:1.95}
body .app[lang=ar] :is(.unit-tabs>a,.answer-actions button,.question-bottom button){font-size:16px}
body .app[lang=ar] .option .answer-state{direction:rtl}
body .app[lang=ar] .question-card:not(.writing-question) .question-feedback-side{border-inline-start:0;border-left:1px solid #b89b7030;padding-inline-start:0;padding-left:32px}
body .app[lang=ar] .question-bottom{direction:ltr}
body .app[lang=ar] .question-bottom .lucide-arrow-right{transform:none}
@media(max-width:999px){body .app[lang=ar] .question-card:not(.writing-question) .question-feedback-side{border-left:0;padding-left:0}}

/* Shared ocean-ink examples: no inherited orange quotation rail or grey inset box. */
html[data-palette=coffee] .app :is(.guide-lesson-points blockquote,.rule-card-visible .example-sentence,.concept-map-node blockquote,.route-step blockquote,.node-detail blockquote){
 background:transparent;border:0;border-top:1px solid #c1aa852b;border-radius:0;box-shadow:none;
 padding:20px 0 0;margin:22px 0 0;color:#e9e1d5;font-size:18px;line-height:1.95;font-weight:450;text-align:left;direction:ltr;
}
html[data-palette=coffee] .app :is(.guide-lesson-points,.rule-card-visible,.concept-map-node,.route-step,.node-detail) mark{
 color:var(--token-ink);background:transparent;border:0;border-bottom:1px solid #89b5cf80;border-radius:0;
 padding:0 1px;box-shadow:none;font-weight:600;box-decoration-break:clone;-webkit-box-decoration-break:clone;
}
@media(max-width:760px){html[data-palette=coffee] .app :is(.guide-lesson-points blockquote,.rule-card-visible .example-sentence,.concept-map-node blockquote,.route-step blockquote,.node-detail blockquote){font-size:17px;padding-top:16px;margin-top:18px}}
/* Long Romance/German labels switch before their row becomes cramped. */
@media(min-width:761px) and (max-width:1050px){
 body .app .header-inner .course-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 body .app .header-inner .nav-dropdown summary{justify-content:center;white-space:normal;text-align:center}
 body .app .header-inner .nav-dropdown:nth-child(3n) .nav-menu{left:auto;right:0}
}
body .app .header-inner .nav-dropdown summary{height:100%;box-sizing:border-box}
@media(max-width:540px){body .app .header-inner .nav-dropdown summary{font-size:12px;gap:4px;overflow-wrap:anywhere}body .app[lang=ar] .header-inner .nav-dropdown summary{font-size:16px}}
body .app .header-inner .course-nav{align-items:stretch}

body .app .guide-lesson-points>div{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}
body .app[lang=ar] .unit-tabs>.unit-utility{margin-left:auto;margin-right:0}
/* Full-course audit: small-screen navigation and consistent utility states. */
body .app .unit-intro-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}
body .app .unit-intro-actions .lesson-print{display:none}
body .app .unit-intro-actions .lesson-save{margin:0}
body .app .writing-note{padding:12px 16px;font-size:13px;line-height:1.8;border-radius:12px}
body .app .writing-question .question-context h3{hyphens:none}
body .app .empty-notes{border:1px solid #b79b713b;border-radius:22px;padding:32px 24px;background:linear-gradient(135deg,#302820,#231f19);color:#d1c0a8;display:flex;flex-direction:column;align-items:center;text-align:center;gap:16px}
body .app .empty-notes>svg{color:#afcddd}
body .app .empty-notes p{font-size:16px;line-height:1.85;margin:0;max-width:52ch}
body .app .empty-notes .button{margin-top:4px}
body .app .writing-draft .draft-preview{white-space:pre-wrap;overflow-wrap:anywhere;font-size:17px;line-height:1.85;padding:20px;background:#1d1a16;border-radius:14px}
body .app :is(.collection-local,.collection-empty p){font-size:14px;line-height:1.8}
body .app .collection-filters button{min-height:44px}
body .app .compact-question-nav .question-dots{width:min(420px,calc(100vw - 48px));max-width:calc(100vw - 48px);grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;box-sizing:border-box;max-height:min(430px,65vh);overflow:auto}
body .app .compact-question-nav .question-dots button{min-width:0;width:100%;min-height:42px;aspect-ratio:1;padding:0;border-radius:10px;font-size:14px}
body .app .unit-tabs a:focus-visible,body .app .word-jump button:focus-visible,body .app .collection-filters button:focus-visible{outline:2px solid #abcfee;outline-offset:3px}
body .app .unit-tabs a[aria-current=location]{color:#302519;background:#e4d4b8;border:1px solid #f1e4cc;box-shadow:inset 0 1px #fff5}
@media(max-width:760px){
 body .app .unit-intro{align-items:flex-start;gap:16px}
 body .app .unit-intro-actions .lesson-print{display:flex;min-width:44px;min-height:44px}
 body .app .unit-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;overflow:visible;padding:0 0 18px;white-space:normal}
 body .app .unit-tabs>a{min-width:0;min-height:46px;padding:10px 8px;display:flex;align-items:center;justify-content:center;text-align:center;white-space:normal;line-height:1.45;font-size:13px;border-radius:12px;box-sizing:border-box;overflow-wrap:anywhere}
 body .app .unit-tabs>.unit-utility{display:none}
 body .app .practice-toolbar{gap:10px;flex-wrap:wrap}
 body .app .practice-toolbar>.text-link{font-size:13px}
 body .app .practice-progress{max-width:75px}
 body .app .compact-question-nav .question-dots{width:calc(100vw - 48px);max-width:calc(100vw - 48px);padding:14px;gap:6px}
 body .app .result-answer-pair{gap:12px}
 body .app .result-answer-pair>div{padding:16px}
 body .app .result-answer-pair .answer-result p{font-size:19px}
 body .app .print-choices{display:grid;grid-template-columns:1fr;gap:12px}
 body .app .print-choices>.button{width:100%;justify-content:center}
}
@media(prefers-reduced-motion:reduce){body .app *,body .app *::before,body .app *::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
body .app .word-audio-error{font-size:13px;line-height:1.65;color:#e5b9b0;display:block;flex-basis:100%;padding:8px 0}
body .app .word-pronunciation{flex-wrap:wrap}
body .app .writing-question .writing-note{background:transparent;padding:0;color:#b9ab97}
/* Beat the original five-column course-tab rule at its own specificity. */
@media(max-width:760px){
 body .app.page-unit .unit-tabs.game-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 body .app.page-unit .unit-tabs.game-tabs>a{font-size:13px;min-height:48px;line-height:1.5;padding:10px 8px;text-align:center}
}
body .app .vocab-study .unit-count{font-size:16px;line-height:1.4;padding:9px 14px;background:#332c23;border:1px solid #a88e6745;border-radius:999px;min-height:0;min-width:0;color:#ddc7a5;align-self:center;font-variant-numeric:tabular-nums}
body .app .word-art{position:relative}
body .app .word-art .word-level{position:absolute;top:18px;right:18px;left:auto;bottom:auto;background:#e4d4b8;color:#302519;padding:8px 10px;border-radius:10px;font-size:13px;line-height:1.2;box-shadow:0 2px 9px #0002}
body .app :is(.icon-button,.map-close,.map-zoom,.speak-button,.recall-toggle){min-height:44px;min-width:44px}
body .app :is(.map-close,.map-zoom){display:grid;place-items:center}
body .app .unit-intro-actions .lesson-save{min-height:44px;min-width:44px}
@media(max-width:760px){body .app .word-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px}body .app .word-controls>span{grid-column:1/-1;grid-row:2;text-align:center;font-size:13px}body .app .word-controls .button{min-width:0;justify-content:center;font-size:14px;padding:12px}}
body .app[lang=ar] .saved-dialog{direction:rtl;text-align:right}
body .app[lang=ar] .saved-dialog :is(.collection-local,.collection-empty p){font-size:16px}
body .app .word-example{border-bottom:0;margin-bottom:0}
body .app .storage-notice{background:#38282a;color:#efbfb5;border-block:1px solid #a1717259;padding:14px 24px;font-size:14px;line-height:1.8;text-align:center}
/* Always-visible teaching cards and explicit save guidance. */
body .app .permanent-guide{display:block;margin-top:24px;padding:24px}
body .app .permanent-guide .knowledge-branches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0}
body .app .permanent-guide .knowledge-node{padding:22px;background:var(--surface,#211d18);border:1px solid #b49a7338;border-radius:18px}
body .app .knowledge-node-title{display:flex;align-items:flex-start;gap:12px;font-size:16px;line-height:1.6;margin:0 0 16px}
body .app .knowledge-node-title .map-index{flex:none}
body .app .permanent-guide .node-detail{padding:0;font-size:15px;line-height:1.9}
body .app .permanent-guide .node-detail p{margin:0 0 16px}
body .app .permanent-guide .node-detail blockquote{margin:0;padding:14px 16px;border:1px solid #83b8d32b;border-inline-start:0;border-radius:12px;background:#79b3d00c;color:#d2e2ea;font-size:17px;line-height:1.8}
body .app .permanent-illustration{padding:24px;border:1px solid #b49a7338;border-radius:20px}
body .app .permanent-illustration>h3{font-size:16px;margin:0 0 20px}
body .app .unit-save-group{max-width:310px;text-align:end}
body .app .unit-intro-actions{justify-content:flex-end}
body .app .lesson-save span,body .app .save-word span{display:inline!important;font-size:14px;white-space:normal}
body .app .lesson-save,body .app .save-word,body .app .question-save{display:inline-flex;align-items:center;gap:9px;width:auto;min-height:44px;padding:10px 14px}
body .app .save-guidance,body .app .question-save-hint{display:block;font-size:13px;line-height:1.7;color:#c7b9a5;margin-top:9px}
body .app .question-top{display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center}
body .app .question-save{margin-inline-start:auto;font-size:14px;max-width:75%}
body .app .question-save-hint{flex-basis:100%;margin:0;text-align:end}
body .app .confirmed-help{max-width:760px;padding:16px 20px;border-inline-start:3px solid #8bbdd7;background:#83b8d30b;line-height:1.8;font-size:15px;border-radius:0 12px 12px 0}
@media(max-width:680px){body .app .permanent-guide{padding:16px 0;border:0;background:none}body .app .permanent-guide .knowledge-branches{grid-template-columns:1fr}body .app .permanent-guide .knowledge-node{padding:20px}body .app .unit-save-group{max-width:none;width:100%;text-align:start}body .app .unit-intro-actions{justify-content:flex-start}body .app .unit-intro{flex-wrap:wrap}body .app .save-word{max-width:78%;font-size:13px}body .app .permanent-illustration{padding:16px}}
body .app .question-save,body .app .lesson-save,body .app .save-word{background:#29231c!important;color:#dfc7a4!important;border:1px solid #b49a7355!important;border-radius:12px;box-shadow:none}
body .app .question-save[aria-pressed=true],body .app .lesson-save[aria-pressed=true],body .app .save-word[aria-pressed=true]{background:#e4d4b8!important;color:#302519!important;border-color:#e4d4b8!important}
body .app .question-save[aria-pressed=true]+.question-save-hint{display:none}
body .app .permanent-guide .knowledge-node:before,body .app .permanent-guide .knowledge-node:after{display:none}
/* Word families and original share-card studio. */
body .app .word-relations{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:26px;padding-top:24px;border-top:1px solid #bba4832b}
body .app .word-relations h4{font-size:14px;font-weight:600;color:#c7b9a5;margin:0 0 14px;line-height:1.6}
body .app .relation-words{display:flex;flex-wrap:wrap;gap:10px 18px;align-items:baseline}
body .app .relation-words>span{font-size:16px;line-height:1.7;color:#efe6d9}
body .app .relation-words>small{font-size:14px;line-height:1.8;color:#b8aa95}
body .app .word-relations>p{grid-column:1/-1;font-size:12px;line-height:1.8;color:#b8aa95;margin:0}
body .app .word-example .speak-button{border-radius:99px;padding:10px 15px;font-size:14px;background:#a8c9dc10;border:1px solid #a8c9dc44;color:#bfd8e6}
body .app .word-share-section{display:flex;align-items:center;gap:22px;padding:28px 30px;margin:28px 0;border:1px solid #b59b7438;border-radius:22px;background:linear-gradient(115deg,#d4b7870b,transparent 75%)}
body .app .share-glyph{display:grid;place-items:center;width:54px;height:54px;flex:none;border-radius:16px;background:#dcc39c12;color:#dcc39c}
body .app .word-share-section h3{margin:0 0 8px;font-size:20px}
body .app .word-share-section p{font-size:14px;line-height:1.8;color:#c7b9a5;margin:0}
body .app .word-share-section>.button{margin-inline-start:auto;white-space:nowrap;min-height:46px}
body .app .word-share-dialog{width:min(1040px,calc(100vw - 48px));max-width:none;max-height:calc(100dvh - 40px);padding:42px;border:1px solid #cbb69545;border-radius:28px;color:#f1eadf;background:#1d1914;box-shadow:0 30px 100px #0009;overflow:auto}
body .app .word-share-dialog::backdrop{background:#080907c9;backdrop-filter:blur(9px)}
body .app .share-close{position:absolute;inset-inline-end:12px;top:12px;display:grid;place-items:center;width:44px;height:44px;border:1px solid #b49a7333;border-radius:50%;color:#ded1bd;background:#2a241c;z-index:1}
body .app .word-share-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:38px;align-items:center}
body .app .share-preview{min-width:0;background:#12100d;border-radius:20px;padding:14px;display:grid;place-items:center}
body .app .share-preview img{width:100%;height:auto;max-height:660px;object-fit:contain;border-radius:8px;box-shadow:0 12px 32px #0004}
body .app .share-placeholder{min-height:400px;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:24px;text-align:center;color:#c7b9a5}
body .app .share-editor{min-width:0;padding:12px 0}
body .app .share-editor h2{font-size:clamp(27px,3vw,46px);line-height:1.2;margin:14px 0 18px;overflow-wrap:anywhere;letter-spacing:-.03em}
body .app .share-editor>p{font-size:14px;line-height:1.8;color:#c7b9a5}
body .app .share-editor fieldset{border:0;padding:0;margin:24px 0}
body .app .share-editor legend{font-size:13px;color:#c7b9a5;margin-bottom:12px;padding:0}
body .app .share-theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body .app .share-theme,body .app .share-size-options button{background:#29231c;border:1px solid #b49a7340;border-radius:13px;color:#e6d9c5;padding:12px;display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;font-size:14px;cursor:pointer}
body .app .share-theme i{width:15px;height:15px;border-radius:50%;background:#372d20;border:1px solid #c2a77a;flex:none}
body .app .theme-paper i{background:#e4d4b8}body .app .theme-ocean i{background:#699db6}
body .app .share-theme[aria-pressed=true],body .app .share-size-options button[aria-pressed=true]{border-color:#d8b786;background:#d8b78618;box-shadow:inset 0 0 0 1px #d8b78640}
body .app .share-size-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}
body .app .share-size-options button{flex-direction:column;align-items:flex-start;gap:5px;text-align:start}
body .app .share-size-options b{font-size:18px;color:#f1eadf}body .app .share-size-options span{font-size:12px}
body .app .share-translation{font-size:14px;display:flex;align-items:center;gap:10px;margin:18px 0;min-height:36px}
body .app .share-translation input{width:18px;height:18px;accent-color:#ddc29b}
body .app .share-download{display:flex;width:100%;min-height:52px;justify-content:center;background:#e4d4b8;color:#302519;gap:10px;border:0;margin-top:20px}
body .app .share-download small{font-size:11px;opacity:.75}
body .app .share-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
body .app .share-actions .button{font-size:14px;min-height:46px;white-space:normal;justify-content:center}
body .app .share-status{min-height:24px;font-size:13px!important;line-height:1.7}
body .app .share-local-note{display:block;font-size:11px;line-height:1.8;color:#a79881}
body .app .share-manual-text{width:100%;min-height:150px;background:#29231c;color:#eee4d4;padding:16px;border:1px solid #b49a7340;border-radius:12px;font:14px/1.8 sans-serif}
@media(max-width:680px){body .app .word-relations{grid-template-columns:1fr;gap:22px}body .app .word-share-section{flex-wrap:wrap;gap:16px;padding:22px}body .app .share-glyph{width:44px;height:44px}body .app .word-share-section>div{flex:1;min-width:180px}body .app .word-share-section>.button{width:100%;margin:0;justify-content:center}body .app .word-share-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 20px);padding:50px 20px 24px;border-radius:22px}body .app .word-share-layout{grid-template-columns:1fr;gap:20px}body .app .share-preview{padding:8px;max-width:280px;margin:auto}body .app .share-preview img{max-height:370px}body .app .share-placeholder{min-height:250px}body .app .share-editor h2{font-size:30px}body .app .share-theme{font-size:12px;padding:10px 5px}body .app .share-theme svg{display:none}body .app .share-download{flex-wrap:wrap}}
body .app .word-share-dialog{overscroll-behavior:contain}
body .app .word-share-dialog .share-close{position:sticky;top:0;inset-inline-end:auto;margin-inline-start:auto;margin-block-start:-26px;margin-block-end:-18px}
@media(max-width:680px){body .app .word-share-dialog .share-close{margin-block-start:-38px;margin-block-end:-6px}}

/* Save-first navigation: assessment never blocks moving between questions. */
.practice-mode{display:flex;gap:6px;flex-wrap:wrap;padding:6px;background:var(--a-panel);border:1px solid var(--a-line);border-radius:16px;width:fit-content;margin:20px 0}
.practice-mode button{padding:12px 18px;border-radius:11px;border:0;background:transparent;color:var(--a-muted);font:inherit;cursor:pointer}
.practice-mode button[aria-pressed="true"]{background:#e4d4b8;color:#302519;font-weight:700;box-shadow:0 2px 8px #0002}
.question-card.deferred-review .question-feedback-side{display:none}
body .app .question-card.deferred-review:not(.writing-question) .question-layout{grid-template-columns:minmax(0,1fr)}
.question-card .draft-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--a-line);padding-top:22px;margin-top:28px;grid-column:1/-1}
.question-card .draft-navigation .button{min-height:48px}
.question-card .draft-navigation button:disabled{opacity:.38;cursor:not-allowed}
.question-dots button.draft{border-color:#a9cbdc;background:#a9cbdc22;color:var(--a-text)}
@media(max-width:600px){.question-card .draft-navigation{flex-wrap:wrap;gap:8px}.question-card .draft-navigation .button{padding:12px;font-size:13px}.question-card .draft-navigation>span{font-size:12px}.practice-mode{width:100%;box-sizing:border-box}.practice-mode button{flex:1;padding:12px 8px;font-size:14px}.practice-toolbar{flex-wrap:wrap}.batch-finish{margin-inline-start:auto}}

/* Arabic catalogue readability: descendants must not inherit older micro-copy sizes. */
body .app[lang=ar] .grammar-page .level-inventory,body .app[lang=ar] .grammar-page .level-inventory>span{font-size:16px;line-height:1.95}
body .app[lang=ar] .catalogue-tools .filter-tabs .level-label{font-size:14px;line-height:1.6}
body .app[lang=ar] .catalogue-tools .filter-tabs a:first-child{font-size:14px}
