@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;600;700&display=swap');
:root{font-family:'Be Vietnam Pro',sans-serif;color:#243d4b;background:#eaf3f2;font-synthesis:none;--green:#299f84;--muted:#7e929a;--border:#e8eff1}*{box-sizing:border-box}body{margin:0;padding:22px 28px;background:radial-gradient(ellipse at 0 0,#d8ebe4,transparent 50%),radial-gradient(ellipse at 100% 100%,#e0e8f5,transparent 60%);min-height:100vh}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:focus-visible,a:focus-visible{outline:3px solid #339bce;outline-offset:4px}button{transition:transform .18s,background .18s,box-shadow .18s}button:hover{transform:translateY(-2px)}button:disabled{cursor:default;transform:none}a{text-decoration:none;color:inherit}.shell{max-width:1440px;margin:auto;background:#f4f9fc;border:1px solid #fff;outline:1px solid #dae8e8;border-radius:28px;box-shadow:0 15px 70px #244e4520;overflow:hidden}.header{padding:21px 30px;display:flex;justify-content:space-between;align-items:center;background:#f7fbfd;border-bottom:1px solid #e7eff2;gap:20px}.brand{display:flex;align-items:center;gap:9px;font-size:25px;font-weight:800;letter-spacing:-1px;flex-shrink:0}.brand-icon{font-size:38px;letter-spacing:0}.brand-biz{color:var(--green);margin-left:5px}.brand small{display:block;font-size:9px;letter-spacing:1.6px;color:#91a4aa;font-weight:600;margin-top:5px}nav{display:flex;gap:12px}.nav-item{display:flex;flex-direction:column;align-items:center;gap:8px;border:0;background:transparent;border-radius:14px;padding:9px 15px;font-size:12px;font-weight:600;color:#6f838e;white-space:nowrap}.nav-item>span{font-size:24px;line-height:1.1}.nav-item.active{background:#e4f3ef;color:#238971;box-shadow:inset 0 0 0 1px #d3eae3}.user{display:flex;align-items:center;gap:10px;flex-shrink:0}.streak{font-size:16px;border-right:1px solid #dce7ea;padding-right:17px;margin-right:5px}.avatar{width:38px;height:38px;border-radius:50%;background:#fae8d9;color:#a9714f;display:grid;place-items:center;font-weight:700;border:3px solid white}.user-name{font-size:13px;font-weight:600}.user-name small{display:block;font-size:10px;font-weight:400;color:var(--muted);margin-top:5px}main{padding:22px 26px 0}.hero{height:228px;border-radius:20px;position:relative;overflow:hidden;background:#183a55;container-type:inline-size}.hero-art{position:absolute;width:100%;min-width:1150px;max-width:none;left:0;top:-9cqw}.hero-shade{position:absolute;inset:0;background:linear-gradient(90deg,#112e49 0%,#173b53f7 31%,#18375344 58%,#0d30483b 75%,#102f50f7 100%)}.hero-copy{position:relative;padding:24px 32px;color:white}.hello{font-size:14px;color:#c7e7e9;font-weight:500}.hello span{margin-left:8px}h1{font-size:29px;line-height:1.45;letter-spacing:-.7px;margin:10px 0 7px;font-weight:700}.hero-copy p{font-size:12px;color:#c2d9df;margin:0}.hero-button{margin-top:15px;background:#fff;border:0;border-radius:9px;padding:10px 16px;font-size:12px;font-weight:700;color:#2d7268;box-shadow:0 3px 12px #10253440}.hero-button{display:inline-flex;align-items:center;justify-content:center;gap:18px}.hero-note{position:absolute;right:26px;top:29px;font-family:'Noto Sans JP',sans-serif;color:#e8f1e5;font-size:13px;text-align:right}.hero-note>span{color:#efce78}.hero-note small{display:block;font:10px 'Be Vietnam Pro',sans-serif;opacity:.8;margin-top:7px}.categories{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin:18px 0 22px}.category{border:1px solid #fff9;border-radius:15px;padding:19px 13px;display:flex;align-items:center;gap:10px;text-align:left;box-shadow:0 4px 9px #223a491f}.pink{background:#fdebf0}.blue{background:#e4f0fd}.purple{background:#eeebfc}.mint{background:#e1f3eb}.tile-icon{font-size:25px;background:#ffffff7a;border-radius:10px;width:42px;height:44px;display:grid;place-items:center;flex-shrink:0}.category b{font-size:13px;font-weight:700;white-space:nowrap}.category small{display:block;font-size:10px;color:#748a93;margin-top:7px;line-height:1.5}.category-count{font-size:10px;margin-left:auto;color:#677d86;white-space:nowrap;background:#fff7;border-radius:7px;padding:5px;align-self:start}.content-grid{display:grid;grid-template-columns:1.43fr 1fr;gap:20px}.main-column,aside{display:flex;flex-direction:column;gap:16px}.panel{background:#ffffffcf;border:1px solid white;box-shadow:0 3px 12px #334e601f;border-radius:19px;padding:20px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px}h2{font-size:17px;margin:0;font-weight:700;letter-spacing:-.4px}h2>span:first-child{margin-right:5px}.subtle{font-size:10px;color:#8799a3;white-space:nowrap}.lesson{background:#edf4fb;display:flex;align-items:center;gap:15px;padding:17px 15px;border-radius:13px;margin-bottom:11px}.lesson:last-child{margin-bottom:0}.lesson-icon{width:46px;height:48px;display:grid;place-items:center;background:#fff9;border:1px solid white;border-radius:12px;font-size:27px;flex-shrink:0}.lesson-info{flex:1;min-width:0}.lesson-title{font-size:14px;font-weight:600;margin:0 0 7px;line-height:1.5}.lesson-meta{font-size:10px;color:#82939e}.lesson-status{font-size:10px;color:#ae9256;margin-top:7px}.lesson-status.completed{color:#279478}.lesson-button{border:0;border-radius:18px;background:#36aa8c;color:#fff;font-size:11px;padding:10px 16px;white-space:nowrap;box-shadow:0 3px 6px #28917518}.lesson-button.review{background:white;color:#35957f;box-shadow:0 0 0 1px #dbece7}.tiny-bar{height:4px;margin-top:10px;border-radius:3px;background:#d7e5f0;max-width:88%}.tiny-bar i{display:block;background:#76b1df;height:100%;border-radius:3px;width:0}.encouragement{display:flex;align-items:center;gap:15px;background:linear-gradient(110deg,#fff8e8,#eaf6ea);border:1px solid #e8eddb;border-radius:16px;padding:17px 20px}.encouragement-icon{font-size:35px}.encouragement b{font-size:13px;color:#3b8d79}.encouragement p{font-size:10px;color:#839489;line-height:1.6;margin:7px 0 0}.sparkle{color:#d4b053;margin-left:auto;font-size:37px}.word-panel{padding:18px 20px}.pill{font-size:8px;letter-spacing:1px;background:#edf6ee;color:#729483;border-radius:5px;padding:6px 7px}.daily-word{display:flex;align-items:center;justify-content:space-between}.japanese{font-family:'Noto Sans JP',sans-serif;font-size:24px;font-weight:600;letter-spacing:1px}.pronunciation{font-size:11px;color:#8799a3;margin-left:15px}.sound{border:1px solid #dbece7;background:#eaf6f0;border-radius:50%;height:36px;width:36px;display:grid;place-items:center;font-size:17px}.word-panel>p{font-size:12px;color:#718792;line-height:1.7}.word-example{background:#f2f7f9;border-radius:9px;padding:11px 14px;font-family:'Noto Sans JP',sans-serif;font-size:12px;display:flex;justify-content:space-between;gap:12px;color:#547485}.word-example>span{font-family:'Be Vietnam Pro',sans-serif;font-size:10px;color:#8d9aa1}.progress-summary{display:flex;align-items:center;gap:21px;margin:3px 0 23px}.ring{--p:0;width:105px;height:105px;flex-shrink:0;background:conic-gradient(#39b798 calc(var(--p)*1%),#e2f2ed 0);padding:9px;border-radius:50%;transform:rotate(-90deg)}.ring>div{height:100%;background:#fff;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;transform:rotate(90deg)}.ring b{font-size:26px;color:#253d55}.ring small{font-size:8px;color:#889d9f;margin-top:5px}.progress-summary h3{font-size:16px;color:#369d85;margin:0 0 8px}.progress-summary p{font-size:10px;color:#81949d;line-height:1.9;margin:0}.progress-bars>div{display:flex;align-items:center;gap:12px;margin-top:12px;font-size:11px;color:#748691}.progress-bars>div>span{width:76px;flex-shrink:0}.bar{flex:1;height:6px;background:#e6edf3;border-radius:5px;overflow:hidden}.bar i{height:100%;display:block;background:#69a9e8;width:0;border-radius:5px;transition:width .3s}#bar-grammar{background:#54b69b}#bar-listening{background:#a292dc}.progress-bars b{font-size:10px;color:#55717d;font-weight:500}.week{border-top:1px solid #edf2f4;margin-top:23px;padding-top:16px;display:flex;justify-content:space-between}.week>span{display:flex;flex-direction:column;align-items:center;gap:7px;font-size:9px;color:#95a4aa}.week b{font-size:15px;height:25px;width:25px;border-radius:50%;display:grid;place-items:center;background:#f0f5f7;color:#afbdc5}.week .today{color:#2c9a7e}.week .today b{background:#ddf2e9;color:#2f9d7d;font-size:10px}.achievements{flex:1}.empty-result{text-align:center;padding:12px 0 17px}.empty-result>span{display:block;font-size:30px;margin-bottom:12px}.empty-result b{font-size:12px;font-weight:500;color:#758c97}.empty-result p{font-size:10px;color:#9aaab1;line-height:1.7}.result-row{display:flex;align-items:center;gap:10px;padding:10px 0}.result-row>span{font-size:22px}.result-row div{flex:1}.result-row b{font-size:11px;font-weight:600;display:block}.result-row small{display:block;font-size:9px;color:#869ca2;margin-top:5px}.result-row time{font-size:9px;color:#899ba2}.goal-card{background:#f1ede0;border:1px solid #ede7d9;padding:17px 20px;border-radius:15px}.goal-card>div:first-child{display:grid;grid-template-columns:33px 1fr;column-gap:8px}.goal-card div>span:first-child{grid-row:span 2;font-size:25px}.goal-card b{font-size:13px;color:#817650}.goal-card small{font-size:10px;color:#9b927a;margin-top:6px}.goal-bottom{display:flex;justify-content:space-between;border-top:1px solid #e6dfce;margin-top:14px;padding-top:11px}.goal-bottom>span:first-child{font-size:10px!important;color:#8e8769}.goal-bottom>span:last-child{font-size:11px;color:#a6976b}footer{display:flex;justify-content:space-between;gap:15px;padding:21px 2px 17px;font-size:9px;color:#8ea4af}footer i{font-style:normal;margin:0 8px}dialog{width:min(570px,calc(100% - 32px));border:1px solid #e4ecec;border-radius:24px;padding:25px;box-shadow:0 25px 100px #193a4740;color:#243d4b}dialog::backdrop{background:#17364080;backdrop-filter:blur(5px)}.modal-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.modal-top>span{font-size:11px;font-weight:600;color:#299f84;letter-spacing:1px}.modal-top button{border:0;background:#f1f6f6;border-radius:50%;width:31px;height:31px}dialog h2{font-size:22px;line-height:1.5}.study-card{text-align:center;border-radius:15px;background:#edf6f4;margin-top:22px;padding:25px}.study-card .japanese{font-size:30px;display:block}.study-card p{font-size:14px;line-height:1.8}.study-card small{color:#7c9798;font-size:12px}.modal-actions{display:flex;justify-content:space-between;align-items:center;margin-top:20px;gap:12px}.primary{background:#299f84;color:#fff;border:0;border-radius:10px;padding:12px 20px;font-size:14px}.secondary{background:#edf4f3;color:#368d7b;border:0;border-radius:10px;padding:12px 18px;font-size:14px}.question{font-size:14px;line-height:1.8;margin-top:20px}.answers{display:grid;gap:9px;margin-top:15px}.answer{background:#f3f7fa;border:1px solid #e2ecef;border-radius:11px;padding:14px;text-align:left;font-size:14px;font-family:'Noto Sans JP','Be Vietnam Pro',sans-serif}.answer.correct{border-color:#2ba385;background:#e2f6ed}.answer.incorrect{border-color:#d37a78;background:#fff0ef}.feedback{font-size:13px;line-height:1.7;color:#398e7c;margin-top:14px}.toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%,30px);opacity:0;pointer-events:none;background:#244b46;color:white;padding:13px 20px;border-radius:12px;font-size:13px;transition:.2s;z-index:20}.toast.show{opacity:1;transform:translate(-50%,0)}.study-progress{font-size:12px;color:#82969c}.transcript{font-family:'Noto Sans JP',sans-serif;line-height:1.9;font-size:14px;background:#f1f7fa;padding:15px;border-radius:12px}.listen-controls{display:flex;align-items:center;gap:12px;margin:20px 0}.listen-controls small{font-size:11px;color:#87999e}.completion{text-align:center;padding:25px 0}.completion>span{font-size:60px}.completion p{font-size:14px;color:#789098;line-height:1.9}.completed-count{font-size:12px;color:#299f84}.list-description{font-size:12px;line-height:1.8;color:#7d929c;margin:0 0 16px}
@media(min-width:1350px){.hero{height:250px}.hero-copy{padding-top:30px}h1{font-size:32px}.hero-copy p{font-size:14px}.hero-button{font-size:13px}.category b{font-size:14px}.category small{font-size:11px}.nav-item{font-size:13px}}
@media(max-width:1150px){body{padding:16px}.header{padding:15px 20px;gap:12px}.brand{font-size:22px}.brand-icon{font-size:30px}.brand small{font-size:7px}nav{gap:3px}.nav-item{padding:8px 10px}.user-name{display:none}.hero-art{top:-104px}.hero-note{display:none}.category-count{display:none}.categories{gap:10px}.category{padding:16px 12px;gap:7px}.category b{font-size:11px}.category small{font-size:9px}.tile-icon{width:36px;height:40px;font-size:23px}.pronunciation{display:block;margin:7px 0}.progress-summary{gap:14px}.ring{width:91px;height:91px}.word-example{flex-direction:column;gap:6px}}
@media(max-width:800px){body{padding:10px}.shell{border-radius:22px}.header{flex-wrap:wrap;padding:15px 16px}.brand{font-size:23px}.brand small{font-size:8px}.user-name{display:block}.streak{padding-right:10px}nav{order:3;width:100%;justify-content:space-between;margin-top:7px}.nav-item{flex:1;font-size:11px;gap:6px}.nav-item>span{font-size:22px}main{padding:15px}.hero{height:232px}.hero-art{left:-190px;top:-103px}.hero-shade{background:linear-gradient(90deg,#133752f7 0%,#17364ad9 42%,#17364a22 85%)}.hero-copy{padding:25px 23px}h1{font-size:26px}.categories{grid-template-columns:repeat(2,1fr);gap:10px;margin:14px 0}.category b{font-size:13px}.category small{font-size:10px}.category-count{display:block}.content-grid{grid-template-columns:1fr}.progress-summary{gap:24px}.ring{width:105px;height:105px}aside{display:grid;grid-template-columns:1fr 1fr}.progress-panel{grid-column:span 2}.goal-card{display:flex;flex-direction:column;justify-content:center}.goal-bottom{gap:20px}footer{font-size:9px}.word-example{flex-direction:row}.hero-copy p{max-width:260px;line-height:1.7}}
@media(max-width:480px){body{padding:0}.shell{border-radius:0;border:0;outline:0}.header{gap:7px}.user-name{display:none}.brand{font-size:22px}.nav-item{font-size:10px;padding:8px 5px}.hero{height:236px}.hero-copy{padding:24px 18px}h1{font-size:24px}.hero-art{left:-355px;opacity:.8}.hero-shade{background:linear-gradient(90deg,#153b54fa,#153b54b0 70%,#153b5430)}.categories{gap:9px}.category{padding:14px 10px}.category b{font-size:11px}.category small{font-size:9px}.category-count{display:none}.tile-icon{width:32px;font-size:21px}.panel{padding:17px 14px;border-radius:16px}.section-heading h2{font-size:15px}.subtle{font-size:9px}.lesson{padding:15px 10px;gap:9px}.lesson-icon{width:37px;height:40px;font-size:23px}.lesson-title{font-size:12px}.lesson-button{padding:9px 11px;font-size:10px}.lesson-meta{font-size:9px;line-height:1.7}.encouragement{padding:15px 13px;gap:10px}.encouragement b{font-size:11px}.encouragement p{font-size:9px}.sparkle{font-size:27px}.japanese{font-size:23px}.word-example{flex-direction:column}aside{display:flex}.progress-summary p{font-size:11px}.progress-bars>div{font-size:12px}.empty-result p{font-size:11px}.goal-card small{font-size:11px}footer{flex-direction:column;align-items:center;gap:8px}.hero-note{display:none}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Keep the reference artwork inside the banner and maintain readable labels. */
.hero-art{clip-path:inset(11.8% 0 66.4% 0);transform:scaleY(1.3);transform-origin:top;top:-11.7cqw}
.nav-item,.category b,.lesson-button,.user-name{font-size:14px}
.category b{white-space:normal;line-height:1.5}
.category small,.category-count,.lesson-meta,.lesson-status,.subtle,.pronunciation,.progress-summary p,.progress-bars>div,.progress-bars b,.empty-result p,.empty-result b,.goal-card small,.goal-bottom>span:first-child,.word-example>span,.encouragement p,.user-name small,.result-row b,.result-row small,.result-row time,footer{font-size:12px!important}
.lesson-title,.word-panel>p,.encouragement b{font-size:16px}
.progress-summary p{line-height:1.7}.ring small,.week>span,.pill{font-size:12px}.hero-copy p{font-size:14px}.hero-button{font-size:14px}.hero-note small{font-size:12px}
.category-count{padding:4px}.category{align-items:center}.category small{line-height:1.6}
.progress-bars>div>span{width:85px}.word-example{flex-direction:column}.pronunciation{display:block;margin:5px 0}
@media(max-width:1150px){.hero-art{top:-135px}.category-count{display:none}}
@media(max-width:800px){.category b{font-size:14px}.category small{font-size:12px}.hero-copy{padding:21px}.hero-copy p{font-size:12px}.nav-item{font-size:12px}.hero-button{margin-top:12px}}
@media(max-width:480px){.lesson{flex-wrap:wrap}.lesson-info{flex-basis:calc(100% - 55px)}.lesson-button{margin-left:46px}.lesson-title{font-size:14px}.hero-copy{padding:20px 18px}.hero-copy p{max-width:260px}.encouragement b{font-size:14px}.category{gap:6px}.category b{font-size:13px}.category small{font-size:12px}.nav-item{font-size:11px}.brand small{font-size:9px}.progress-summary{gap:15px}}
[hidden]{display:none!important}.breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:12px;color:#7e959e;margin:4px 0 20px;line-height:1.7}.breadcrumbs a{color:#26876f}.library-heading{display:flex;justify-content:space-between;align-items:center;border-radius:20px;padding:28px 32px;border:1px solid white;box-shadow:0 3px 12px #334e6015}.library-heading h1{color:#244b56;font-size:30px;margin:9px 0}.library-heading p{font-size:16px;line-height:1.7;color:#67848c;margin:0}.library-eyebrow{font:12px 'Noto Sans JP',sans-serif;letter-spacing:2px;color:#73938c}.library-symbol{font-size:65px;background:#fff8;border-radius:22px;padding:18px;line-height:1.2}.library-toolbar{display:flex;gap:14px;align-items:end;margin:25px 0 17px}.library-toolbar label{display:flex;flex-direction:column;gap:8px;font-size:12px;color:#718990}.library-toolbar .search-label{flex:1;position:relative}.search-label>span{position:absolute;left:15px;bottom:12px;font-size:25px;color:#8a9da4;line-height:1}.library-toolbar input,.library-toolbar select{font:14px 'Be Vietnam Pro',sans-serif;border:1px solid #dbe8ea;background:white;border-radius:11px;min-height:48px;padding:12px 15px;color:#37555f;width:100%;outline-offset:3px}.library-toolbar input{padding-left:43px}.library-toolbar select{min-width:170px}.topic-list{display:flex;flex-wrap:wrap;gap:9px}.topic-chip{background:white;border:1px solid #dfeaec;border-radius:22px;padding:10px 17px;font-size:14px;color:#789198}.topic-chip.selected{color:#25866f;background:#e2f3ec;border-color:#a4d3c2}.catalog-summary{display:flex;justify-content:space-between;align-items:center;margin:25px 0 16px;font-size:14px;color:#748c95;min-height:30px}.clear-filters{border:0;background:transparent;font-size:13px;color:#2d937c;text-decoration:underline}.catalog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.catalog-card{border:1px solid white;background:#fff;border-radius:19px;padding:22px;box-shadow:0 5px 16px #334e6012;display:flex;flex-direction:column;transition:box-shadow .2s,transform .2s}.catalog-card:hover{box-shadow:0 8px 22px #334e6020;transform:translateY(-3px)}.catalog-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.catalog-icon{font-size:31px;width:60px;height:60px;border-radius:15px;display:grid;place-items:center}.level-tag{background:#eff5f6;border-radius:7px;font-size:12px;font-weight:600;padding:6px 10px;color:#6e8895}.catalog-topic{font-size:12px;color:#92a5ac;margin-bottom:8px}.catalog-card h2{font-size:18px;line-height:1.6;font-weight:600}.catalog-card h2 a:hover{color:#299f84}.catalog-card p{font-size:16px;line-height:1.75;color:#7d929b;margin:11px 0 20px;flex:1}.catalog-meta{font-size:12px;color:#8ca0a9;border-bottom:1px solid #edf3f4;padding-bottom:18px;line-height:1.7}.catalog-card-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px;padding-top:17px}.status-tag{font-size:12px;color:#8d9ba5;background:#f3f6f8;border-radius:6px;padding:6px 8px}.status-tag.started{background:#fff4db;color:#a28442}.status-tag.completed{background:#e5f6ee;color:#2e9378}.catalog-start{font-size:14px;font-weight:600;color:#fff;background:#32a68a;border-radius:9px;padding:11px 14px;white-space:nowrap}.catalog-start:hover{background:#268e75}.pagination{display:flex;justify-content:center;gap:8px;margin:30px 0 20px}.pagination button{border:1px solid #dce9eb;background:white;border-radius:9px;min-width:42px;padding:10px 13px;font-size:14px}.pagination button[aria-current]{background:#2f9f85;border-color:#2f9f85;color:white}.pagination button:disabled{opacity:.45}.catalog-empty{grid-column:1/-1;text-align:center;background:white;border:1px solid #e6eff0;border-radius:18px;padding:40px 20px}.catalog-empty>span{font-size:40px}.catalog-empty h2{margin:16px 0;font-size:20px}.catalog-empty p{font-size:16px;line-height:1.8;color:#79919a}.study-heading{display:flex;align-items:center;gap:15px;flex-wrap:wrap;color:#8499a1;font-size:14px;margin-bottom:20px}.study-page{position:static;width:min(850px,100%);max-width:none;margin:0 auto 28px;padding:30px;box-shadow:0 5px 20px #244b4712;border-radius:20px;background:white}.study-page #close-dialog{width:auto;min-width:100px;border-radius:8px;font-size:13px}.study-page #close-dialog::before{content:'Về danh sách ';}.study-page h2{font-size:28px}.study-page .study-card{padding:35px}.study-page .study-card small{font-size:14px}.study-page .study-card p{font-size:18px}.study-page .question,.study-page .transcript{font-size:16px}.study-page .answers{gap:12px}.study-page .answer{padding:18px;font-size:16px}.study-page .completion{padding:40px 0}.study-page .study-card .japanese{font-size:32px}.library{min-height:650px}
@media(max-width:1150px){.catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.library-toolbar select{min-width:145px}}
@media(max-width:700px){.library-toolbar{flex-wrap:wrap}.library-toolbar .search-label{flex-basis:100%}.library-toolbar label:not(.search-label){flex:1}.library-heading{padding:24px}.library-symbol{font-size:45px;padding:13px}.library-heading h1{font-size:26px}.library-heading p{font-size:14px}.catalog-card{padding:18px}.catalog-card h2{font-size:16px}.catalog-card p{font-size:14px}.catalog-card-bottom{flex-wrap:wrap}.study-page{padding:22px}.study-page h2{font-size:24px}}
@media(max-width:480px){.library-heading{padding:20px;gap:10px}.library-heading h1{font-size:24px}.library-heading p{font-size:14px}.library-symbol{font-size:32px;padding:10px}.library-eyebrow{font-size:11px;letter-spacing:1px}.library-toolbar{gap:10px}.library-toolbar select{min-width:0;font-size:13px}.topic-chip{font-size:13px;padding:9px 13px}.catalog-grid{grid-template-columns:1fr}.catalog-card{padding:22px}.catalog-card h2{font-size:18px}.catalog-card p{font-size:16px}.catalog-card-top{margin-bottom:15px}.catalog-card-bottom{flex-wrap:nowrap}.study-page{padding:20px 15px}.study-page .study-card{padding:24px 15px}.study-page .study-card .japanese{font-size:25px}.study-page .modal-actions{flex-wrap:wrap}.study-page .primary,.study-page .secondary{padding:12px 15px}}
/* Original Japanese anime artwork and matching illustrated icon atlas. */
.jp-icon{display:inline-block;width:1.35em;height:1.35em;background-image:url('autumn-icons.png');background-size:300% 300%;background-repeat:no-repeat;vertical-align:-.22em;flex-shrink:0;line-height:1}
.jp-cat{background-position:0% 0%}.jp-home{background-position:50% 0%}.jp-book{background-position:100% 0%}.jp-pen{background-position:0% 50%}.jp-headphones{background-position:50% 50%}.jp-trophy{background-position:100% 50%}.jp-daruma{background-position:0% 100%}.jp-sakura{background-position:50% 100%}.jp-calendar{background-position:100% 100%}
.brand-icon{display:flex;align-items:center;font-size:38px}.brand-icon .jp-icon{width:49px;height:49px}.nav-item>span{display:flex;align-items:center;justify-content:center}.nav-item .jp-icon{width:34px;height:34px}.tile-icon{background:#ffffff65}.tile-icon .jp-icon{width:40px;height:40px}.lesson-icon .jp-icon{width:42px;height:42px}.catalog-icon .jp-icon{width:55px;height:55px}.library-symbol{background:#fff5}.library-symbol .jp-icon{width:90px;height:90px}.encouragement-icon .jp-icon{width:55px;height:55px}.streak{display:flex;align-items:center;gap:5px}.streak .jp-icon{width:24px;height:24px}.hello .jp-icon{width:24px;height:24px}.completion>.jp-icon{width:90px;height:90px}.sound .jp-icon{width:27px;height:27px}.empty-result>.jp-icon{width:52px;height:52px}.hero-art{inset:0;width:100%;height:100%;min-width:0;object-fit:cover;object-position:center;clip-path:none;transform:none}.hero-shade{background:linear-gradient(90deg,#102d46e8 0%,#173b53c2 35%,#173b5315 65%,#133c4e45 100%)}.hero-note{font-weight:500;text-shadow:0 1px 8px #123}.hero{background:#183e51}.hero-copy{z-index:1}.jp-icon[aria-hidden]{pointer-events:none}.section-heading h2 .jp-icon{width:28px;height:28px}.hero-copy .hello>span{display:inline-flex;vertical-align:middle}.result-row>span .jp-icon{width:33px;height:33px}.goal-card>div:first-child>span .jp-icon{width:35px;height:35px}.goal-bottom>span:first-child{display:inline}
@media(max-width:800px){.hero-art{left:0;top:0;width:100%;min-width:0;object-position:65% center}.hero-shade{background:linear-gradient(90deg,#12364dec 0%,#12364dc7 42%,#12364d20 100%)}.library-symbol .jp-icon{width:66px;height:66px}}
@media(max-width:480px){.hero-art{opacity:1;left:0;top:0;object-position:72% center}.hero-shade{background:linear-gradient(90deg,#16374deb 0%,#16374dc4 52%,#16374d30)}.brand-icon .jp-icon{width:38px;height:38px}.nav-item .jp-icon{width:28px;height:28px}.tile-icon .jp-icon{width:32px;height:32px}.lesson-icon .jp-icon{width:36px;height:36px}.library-symbol .jp-icon{width:48px;height:48px}.encouragement-icon .jp-icon{width:42px;height:42px}}
/* Autumn in Japan: maple red, amber, cream and warm brown. */
:root{color:#513b31;background:#eee1cf;--green:#b76538;--muted:#95816f;--border:#eadbca}
body{background:radial-gradient(ellipse at 0 0,#f2ddba,transparent 55%),radial-gradient(ellipse at 100% 100%,#e8cbb5,transparent 60%);background-color:#f1e5d4}
.shell{background:#fbf6ee;outline-color:#e3cfb7;box-shadow:0 15px 70px #6b3c2520}.header{background:#fdf9f1;border-bottom-color:#ebdfcf}.brand-biz{color:#b76538}.brand small,.user-name small{color:#9a8774}.nav-item{color:#937c65}.nav-item.active{background:#f5e6cf;color:#a75a32;box-shadow:inset 0 0 0 1px #e9d0ad}.avatar{background:#f6dec5;color:#9c5f3c}.streak{border-color:#e7d6bf}.pink{background:#f8e2d7}.blue{background:#f6e9ce}.purple{background:#f0dedb}.mint{background:#ede9d2}.category small,.category-count{color:#937c68}.category{box-shadow:0 4px 9px #6b3c2510}.hero{background:#492d25}.hero-shade{background:linear-gradient(90deg,#38231deb 0%,#4a2c22c2 35%,#54312215 65%,#492c2445 100%)}.hello{color:#f6ddbe}.hero-copy p{color:#f1d8bb}.hero-button{background:#fff4df;color:#9a572e}.hero-note{color:#ffe6bd}.panel{background:#fffdf8e8;box-shadow:0 3px 12px #70432110}.subtle{color:#a48c77}.lesson{background:#f6eee1}.lesson-meta{color:#a08c77}.lesson-status{color:#b38841}.lesson-status.completed{color:#a56535}.lesson-button,.primary,.catalog-start{background:#b9693e;color:#fff9ed}.lesson-button.review{background:#fffaf0;color:#a7633b;box-shadow:0 0 0 1px #ecd9bf}.tiny-bar{background:#e9dcca}.tiny-bar i{background:#d4a85b}.encouragement{background:linear-gradient(110deg,#fff1d3,#f3e0ce);border-color:#eaddc1}.encouragement b{color:#9f673b}.encouragement p{color:#9a8168}.sparkle{color:#c88c33}.pill{background:#f4e9d4;color:#a38351}.pronunciation,.word-panel>p{color:#977d67}.sound,.secondary{background:#f8ecd7;color:#a1663e;border-color:#e8d1b4}.word-example,.transcript{background:#f5ecdf;color:#8c694b}.word-example>span{color:#a38c78}.progress-summary h3{color:#b26d3c}.progress-summary p{color:#99816c}.ring{background:conic-gradient(#c48244 calc(var(--p)*1%),#f0e2cf 0)}.ring>div{background:#fffcf6}.ring b{color:#66452e}.ring small{color:#a28a70}.bar{background:#eddfcb}.bar i{background:#d6a854}#bar-grammar{background:#c6854e}#bar-listening{background:#b87368}.progress-bars>div,.progress-bars b{color:#947d64}.week{border-color:#f1e5d3}.week>span{color:#a6907a}.week b{background:#f4eadc;color:#b5a08a}.week .today{color:#a66038}.week .today b{background:#f1d9ba;color:#a66038}.empty-result b,.empty-result p,.result-row small,.result-row time{color:#9d826b}.goal-card{background:#f3e6c9;border-color:#ebd8b6}.goal-card b{color:#976b35}.goal-card small,.goal-bottom>span{color:#aa8654!important}.goal-bottom{border-color:#e8d5ae}footer{color:#a38c77}.breadcrumbs{color:#a28c77}.breadcrumbs a{color:#ac673d}.library-heading h1{color:#68432e}.library-heading p{color:#9b785c}.library-eyebrow{color:#a77c59}.library-toolbar label{color:#9b816c}.library-toolbar input,.library-toolbar select{border-color:#e6d8c6;background:#fffdf8;color:#76543c}.search-label>span{color:#af9781}.topic-chip{background:#fffaf1;border-color:#e6d7c3;color:#9f8369}.topic-chip.selected{background:#f3dfc0;border-color:#d8b17e;color:#a46035}.catalog-summary,.catalog-topic{color:#a18a72}.clear-filters{color:#b16a3e}.catalog-card{background:#fffdf8;box-shadow:0 5px 16px #70432110}.catalog-card h2 a:hover{color:#b9693e}.catalog-card p{color:#977d67}.catalog-meta{color:#a9917b;border-color:#f0e4d4}.catalog-start:hover{background:#a25832}.status-tag{background:#f4ecdf;color:#aa9277}.status-tag.started{background:#fae8be;color:#a87c33}.status-tag.completed{background:#f1dfc8;color:#a46a39}.pagination button{border-color:#e6d6c1;background:#fffaf1}.pagination button[aria-current]{background:#b9693e;border-color:#b9693e}.catalog-empty{background:#fffdf8;border-color:#e8d9c6}.catalog-empty p{color:#9b816b}.level-tag{background:#f4eadb;color:#9f815f}.study-page,dialog{background:#fffdf8;color:#684632;border-color:#e8d9c6}.study-card{background:#f6ebd8}.study-card small,.study-progress,.listen-controls small{color:#a18a70}.answer{background:#f8f0e4;border-color:#e9d9c2}.answer.correct{background:#f0e6ca;border-color:#bb8c4a}.answer.incorrect{background:#f9e4dc;border-color:#c0785d}.feedback,.completed-count{color:#a26a38}.modal-top>span{color:#b9693e}.modal-top button{background:#f6e9d7}.completion p{color:#9c8168}.toast{background:#68432e;color:#fff4e2}
@media(max-width:800px){.hero-shade{background:linear-gradient(90deg,#38231ded 0%,#4a2c22c7 42%,#54312220 100%)}}
@media(max-width:480px){.hero-shade{background:linear-gradient(90deg,#38231deb 0%,#4a2c22c4 52%,#54312230)}}

/* Vocabulary scenes correspond to each lesson, in an original anime atlas. */
.topic-art{background-image:url('vocab-autumn-scenes.png');background-size:200% 300%;background-repeat:no-repeat;aspect-ratio:9/4;margin:-22px -22px 20px;border-radius:18px 18px 0 0;position:relative;overflow:hidden}
.topic-art .level-tag{position:absolute;right:13px;top:13px;background:#fff7eaeF;box-shadow:0 2px 8px #50332125;color:#875634}
.topic-art-v1{background-position:0% 0%}.topic-art-v2{background-position:100% 0%}.topic-art-v3{background-position:0% 50%}.topic-art-v4{background-position:100% 50%}.topic-art-v5{background-position:0% 100%}.topic-art-v6{background-position:100% 100%}
@media(max-width:700px){.topic-art{margin:-18px -18px 20px}}
@media(max-width:480px){.topic-art{margin:-22px -22px 20px}}

/* Shared subject illustrations on all lesson libraries and the dashboard. */
[class*="topic-art-g"]{background-image:url('grammar-autumn-scenes.png')}
[class*="topic-art-l"]{background-image:url('listening-autumn-scenes.png')}
.topic-art-g1,.topic-art-l1{background-position:0% 0%}.topic-art-g2,.topic-art-l2{background-position:100% 0%}.topic-art-g3,.topic-art-l3{background-position:0% 50%}.topic-art-g4,.topic-art-l4{background-position:100% 50%}.topic-art-g5,.topic-art-l5{background-position:0% 100%}.topic-art-g6,.topic-art-l6{background-position:100% 100%}
.lesson-thumbnail{display:block;align-self:center;width:144px;height:auto;aspect-ratio:4/3;border-radius:10px;background-size:200% 300%;background-repeat:no-repeat;flex-shrink:0;border:0;outline:1px solid #eed9bd}
.lesson-thumbnail[class*="topic-art-v"]{background-image:url('vocab-autumn-scenes.png')}
@media(max-width:480px){.lesson-thumbnail{width:108px;height:auto;aspect-ratio:4/3}.lesson-info{flex-basis:calc(100% - 122px)}.lesson-button{margin-left:117px}}

@media(min-width:481px) and (max-width:1000px){.lesson-thumbnail{width:126px}}

.independent-art{background-image:none}.independent-art img{display:block;width:100%;height:100%;object-fit:cover}
.lesson-thumbnail.topic-art-g1{background-image:url("images/grammar/nho-va-lich-su.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-g2{background-image:url("images/grammar/xin-phep-cong-viec.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-g3{background-image:url("images/grammar/de-xuat-xac-nhan.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-g4{background-image:url("images/grammar/giai-thich-ly-do.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-g5{background-image:url("images/grammar/thong-bao-truyen-dat.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-g6{background-image:url("images/grammar/xin-loi-phuong-an.png");background-size:cover;background-position:center}

.lesson-thumbnail.topic-art-v1{background-image:url("images/vocab/chao-hoi-cong-so.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-v2{background-image:url("images/vocab/lich-hop-cong-viec.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-v3{background-image:url("images/vocab/trao-doi-khach-hang.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-v4{background-image:url("images/vocab/email-thuong-mai.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-v5{background-image:url("images/vocab/goi-dien-loi-nhan.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-v6{background-image:url("images/vocab/bao-gia-thanh-toan.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-l1{background-image:url("images/listening/hen-lich-hop.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-l2{background-image:url("images/listening/goi-dien-doi-tac.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-l3{background-image:url("images/listening/don-tiep-khach-hang.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-l4{background-image:url("images/listening/xac-nhan-don-hang.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-l5{background-image:url("images/listening/doi-lich-hen.png");background-size:cover;background-position:center}
.lesson-thumbnail.topic-art-l6{background-image:url("images/listening/bao-cao-tien-do.png");background-size:cover;background-position:center}
.progress-title{display:flex;justify-content:space-between;align-items:center;margin:8px 0 26px}.progress-title h1{font-size:32px;color:#68432e;margin:7px 0}.progress-title p{font-size:16px;color:#a08166;margin:0;line-height:1.7}.progress-title>.jp-icon{width:88px;height:88px}.learning-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}.learning-stats article{display:flex;gap:15px;align-items:center;padding:23px 19px;border:1px solid #fff;background:#fffaf1;border-radius:18px;box-shadow:0 4px 15px #7043210e}.learning-stats article:nth-child(2){background:#f9ecd7}.learning-stats article:nth-child(3){background:#f4e4d8}.learning-stats article:nth-child(4){background:#f5eadb}.learning-stats .jp-icon{width:48px;height:48px}.learning-stats b{font-size:28px;color:#815332}.learning-stats b small{font-size:13px;font-weight:400;color:#ab8b6c}.learning-stats p{font-size:12px;color:#a18369;margin:6px 0 0;line-height:1.6}.learning-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:22px}.learning-main,.learning-side{display:flex;flex-direction:column;gap:20px}.learning-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.calendar-weekday{font-size:12px;text-align:center;color:#a0856b;padding:8px 0}.calendar-day{border:1px solid #f0e5d7;border-radius:11px;background:#fbf6ee;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:64px;font-size:14px;padding:8px 4px}.calendar-day small{font-size:10px;color:#c0aa8f}.calendar-day.learned{background:#efd4ac;border-color:#e4c394;color:#925931}.calendar-day.learned small{color:#a46d3c}.calendar-day.today{box-shadow:inset 0 0 0 1px #bf7441;border-color:#bf7441}.calendar-day.selected{background:#b96e40;color:white}.calendar-day.selected small{color:#ffe5ca}.calendar-controls{display:flex;align-items:center;gap:12px}.calendar-controls b{font-size:13px;font-weight:500;text-transform:capitalize}.calendar-controls button{background:#f7ecd9;border:0;border-radius:7px;width:30px;height:30px;font-size:21px;color:#9b6b42}.calendar-legend{display:flex;gap:16px;flex-wrap:wrap;margin-top:18px;font-size:11px;color:#a28a70}.calendar-legend span{display:flex;align-items:center;gap:6px}.calendar-legend i{height:10px;width:10px;border-radius:3px;background:#fbf6ee;border:1px solid #eee0cd}.calendar-legend .learned{background:#efd4ac}.calendar-legend .current{border-color:#bf7441}.calendar-help{font-size:12px;line-height:1.8;color:#af967b;margin:15px 0 0}.learning-empty{text-align:center;padding:26px 12px}.learning-empty>.jp-icon{width:55px;height:55px;display:block;margin:0 auto 15px}.learning-empty b{font-size:16px;font-weight:500;color:#a57b52}.learning-empty p{font-size:14px;line-height:1.8;color:#b19a80;margin:10px 0 0}.learning-empty.compact{padding:8px 0 12px}.learning-empty.compact .catalog-start{display:inline-block;margin-top:18px}.overall-progress{display:flex;align-items:baseline;gap:12px;background:#faf0df;padding:20px;border-radius:13px;margin-bottom:22px}.overall-progress b{font-size:37px;color:#b56d3e}.overall-progress span{font-size:12px;color:#ac8b66}.learning-skill{padding:14px 0;border-bottom:1px solid #f0e4d3}.learning-skill:last-child{border-bottom:0}.learning-skill>div{display:flex;justify-content:space-between;gap:10px}.learning-skill b{font-size:14px;font-weight:500}.learning-skill span{font-size:12px;color:#b29677}.learning-skill a{font-size:12px;color:#b57043;display:inline-block;margin-top:10px}.learning-layout progress{display:block;width:100%;height:8px;border:0;border-radius:5px;margin-top:12px;overflow:hidden;background:#eee1ce;accent-color:#bd8047}.learning-layout progress::-webkit-progress-bar{background:#eee1ce;border-radius:5px}.learning-layout progress::-webkit-progress-value{background:#bd8047;border-radius:5px}.learning-layout progress::-moz-progress-bar{background:#bd8047;border-radius:5px}.learning-goals label{display:flex;align-items:center;justify-content:space-between;font-size:14px;color:#916b49;margin-top:22px;gap:15px}.learning-goals select{border:1px solid #e9d8bf;border-radius:8px;padding:9px 12px;background:#fffaf2;font:13px 'Be Vietnam Pro',sans-serif;color:#9e744e}.goal-measure{display:flex;justify-content:space-between;margin-top:17px;font-size:12px;color:#b19576}.goal-measure b{font-weight:500;color:#a47346}.local-save-note{display:flex;align-items:center;gap:12px;background:#f6e9d4;padding:15px;border-radius:14px}.local-save-note .jp-icon{height:35px;width:35px}.local-save-note p{font-size:12px;line-height:1.8;color:#a0805f;margin:0}.progress-lesson-row,.learning-history article{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid #f1e5d5}.progress-lesson-row:last-child,.learning-history article:last-child{border-bottom:0}.progress-lesson-row img,.learning-history img{width:88px;height:40px;object-fit:cover;border-radius:8px;flex-shrink:0}.progress-lesson-row div,.learning-history article div{flex:1;min-width:0}.progress-lesson-row div a,.learning-history article div a{font-size:14px;font-weight:500;line-height:1.6;display:block}.progress-lesson-row small,.learning-history small{display:block;font-size:11px;color:#b1997d;margin-top:6px;line-height:1.6}.progress-lesson-link{color:#ac6a3b;font-size:12px;white-space:nowrap}.history-score{font-size:11px;background:#f4e6ce;color:#a37a4b;padding:7px 9px;border-radius:7px;white-space:nowrap}
@media(max-width:1000px){.learning-stats{grid-template-columns:repeat(2,1fr)}.learning-layout{grid-template-columns:minmax(0,1fr)}.learning-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.local-save-note{grid-column:span 2}}
@media(max-width:600px){.progress-title h1{font-size:25px}.progress-title p{font-size:14px}.progress-title>.jp-icon{height:60px;width:60px}.learning-stats{gap:10px}.learning-stats article{padding:16px 12px;gap:10px}.learning-stats .jp-icon{width:36px;height:36px}.learning-stats b{font-size:24px}.learning-layout{gap:16px}.learning-side{display:flex}.learning-calendar{gap:5px}.calendar-day{min-height:48px;border-radius:8px}.calendar-controls{gap:6px}.calendar-controls b{font-size:11px}.calendar-controls button{width:25px;height:25px}.calendar-legend{gap:10px;font-size:10px}.learning-history article{flex-wrap:wrap}.history-score{margin-left:100px}.learning-history img{width:76px}.learning-history small{font-size:12px}.progress-lesson-row img{width:70px}.learning-empty p{font-size:13px}.learning-stats p{font-size:12px}}

/* Learner account controls */
.account-trigger{display:flex;align-items:center;gap:10px;background:none;border:0;text-align:left;color:inherit;cursor:pointer;font:inherit;padding:0}.account-dialog{width:min(460px,calc(100vw - 32px));border:0;border-radius:24px;padding:28px;background:#fffaf1;color:#493728;box-shadow:0 24px 90px #38231744}.account-dialog::backdrop{background:#38231766}.account-dialog h2{font-size:20px;margin:0}.account-dialog p{line-height:1.6}.account-tabs{display:flex;gap:10px;margin:16px 0}.account-tabs button{border:1px solid #dccbb7;background:#f4e7d4;border-radius:12px;padding:10px;cursor:pointer}.account-dialog label{display:block;margin:14px 0;font-weight:600}.account-dialog input{display:block;width:100%;box-sizing:border-box;border:1px solid #dccbb7;border-radius:12px;padding:12px;margin-top:6px;font:inherit}.account-dialog [hidden]{display:none!important}.account-dialog button:disabled{opacity:.5;cursor:wait}#account-message{font-size:13px;color:#a14932;min-height:20px}.account-dialog .secondary{white-space:normal}.account-dialog .primary{width:100%;margin-top:10px}#sync-status{max-width:190px;white-space:normal}

.quiz-hint{color:#7a6f68;font-size:13px;margin:6px 0}
.quiz-check{margin-top:14px}
.answer[aria-pressed="true"]{border-color:#b76538;background:#fff4ec}
.order-answer{min-height:58px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px;margin-top:12px;border:1px dashed #d9c8bb;border-radius:11px}
.order-bank{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.order-piece,.match-item{min-height:44px;padding:10px 14px;border:1px solid #e2ecef;border-radius:11px;background:#f3f7fa;font-family:'Noto Sans JP','Be Vietnam Pro',sans-serif;font-size:15px;text-align:left}
.match-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.match-grid>div{display:grid;gap:8px;align-content:start}
.match-item.selected{border-color:#b76538;background:#fff4ec}
.match-item.correct{border-color:#2ba385;background:#e2f6ed}
.match-item.incorrect{border-color:#d37a78;background:#fff0ef}
.dialogue-line{margin:6px 0}
.dialogue-line b{margin-right:6px}
.dialogue-line small{display:block;color:#7a6f68}
.transcript span{display:block;margin-top:4px;font-size:13px;color:#7a6f68}
.study-note{font-size:13px;color:#7a6f68}
.quiz-result ul{padding-left:18px}
.quiz-result li{margin:8px 0}
.quiz-result small{display:block;color:#7a6f68}
audio{width:100%;margin:10px 0}
.review-panel h3{font-size:14px;margin:16px 0 8px}
.review-numbers{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:10px}
.review-numbers div{background:#fff8f1;border:1px solid #f0e2d6;border-radius:12px;padding:12px;text-align:center}
.review-numbers b{display:block;font-size:22px;color:#b76538}
.review-numbers small,.review-cards{color:#7a6f68;font-size:13px}
.review-forecast{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;align-items:end}
.review-forecast div{display:grid;justify-items:center;gap:4px;font-size:12px}
.review-forecast span{display:flex;align-items:flex-end;width:100%;height:70px;background:#f6efe8;border-radius:8px;overflow:hidden}
.review-forecast i{display:block;width:100%;background:#d98b5f;border-radius:8px 8px 0 0;min-height:2px}
.review-forecast small{color:#7a6f68}
.review-weakest{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.review-weakest li{display:flex;justify-content:space-between;gap:10px;border-bottom:1px dashed #eadbd0;padding-bottom:6px}
.review-weakest small{color:#b5534f;white-space:nowrap}
.review-lesson{color:#b76538}
.review-due{display:block;margin-top:6px;color:#2b8a6e}

/* Keep category descriptions flexible beside compact count badges. */
.category{min-width:0}.category>span:nth-child(2){flex:1;min-width:0}.category small{overflow-wrap:anywhere}.category-count{flex-shrink:0}

.library-toolbar{flex-wrap:wrap}.library-toolbar .search-label{min-width:220px}.library-toolbar label:not(.search-label){min-width:140px}
@media(max-width:480px){.library-toolbar label:not(.search-label){flex-basis:calc(50% - 10px);min-width:0}}
.vocab-library .catalog-card .topic-art,.grammar-library .catalog-card .topic-art{height:auto;aspect-ratio:16/9}
.flashcard-viewport{overflow:hidden;padding:4px;margin:-4px}
.flashcard{touch-action:pan-y pinch-zoom;cursor:grab;outline-offset:2px;overflow-wrap:anywhere}
.flashcard:focus-visible{outline:2px solid #b9693e}
.flashcard.is-dragging{cursor:grabbing;user-select:none;-webkit-user-select:none}
.flashcard-hint{text-align:center;font-size:12px;line-height:1.7;color:#a18a70;margin:12px 0 0}
@media(prefers-reduced-motion:reduce){.flashcard{transform:none!important}}
.profile-hero{display:flex;align-items:center;gap:24px;margin:8px 0 26px;padding:26px 28px;background:linear-gradient(120deg,#fbefdc,#fffaf1 60%);border:1px solid #fff;border-radius:22px;box-shadow:0 4px 15px #7043210e}
.profile-avatar{width:92px;height:92px;flex-shrink:0;border-radius:50%;display:grid;place-items:center;background:#f6dec5;color:#9c5f3c;font-size:40px;font-weight:800;border:5px solid #fff;box-shadow:0 6px 18px #9c5f3c26}
.profile-hero>div{flex:1;min-width:0}
.profile-hero h1{font-size:30px;color:#68432e;margin:6px 0;overflow-wrap:anywhere}
.profile-hero p{margin:0;color:#a08166;font-size:15px;overflow-wrap:anywhere}
.profile-hero small{display:block;margin-top:8px;color:#b19a80;font-size:13px}
.profile-more{align-self:flex-start;color:#a1663e;font-weight:600;font-size:14px;white-space:nowrap}
.profile-more:hover{text-decoration:underline}
.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.profile-sync{grid-column:span 2}
.profile-sync>p{color:#8a7461;font-size:14px;line-height:1.7;margin:0 0 14px}
.profile-form label{display:block;margin:0 0 14px;font-weight:600;font-size:14px;color:#68432e}
.profile-form input{display:block;width:100%;border:1px solid #dccbb7;border-radius:12px;padding:12px;margin-top:6px;font:inherit;font-weight:400;background:#fff;color:#493728}
.profile-form input:disabled{background:#f5eee5;color:#9b8670}
.profile-form input:focus-visible{outline:3px solid #339bce;outline-offset:1px}
.profile-hint{display:block;margin:-6px 0 16px;color:#b19a80;font-size:12px}
.profile-form .primary,.profile-guest .primary{margin-top:4px}
.profile-page button:disabled{opacity:.5;cursor:wait}
.profile-message{min-height:1.4em;margin:12px 0 0;font-size:14px;color:#299f84}
.profile-message.error{color:#c0462f}
.profile-actions{display:flex;flex-wrap:wrap;gap:10px}
.profile-actions .secondary{white-space:normal;text-align:left}
.profile-logout{margin-left:auto}
.profile-guest{max-width:520px;margin:30px auto}
@media(max-width:800px){.profile-grid{grid-template-columns:1fr}.profile-sync{grid-column:auto}}
@media(max-width:600px){.profile-hero{flex-wrap:wrap;gap:16px;padding:20px}.profile-avatar{width:68px;height:68px;font-size:30px}.profile-hero h1{font-size:24px}.profile-more{flex-basis:100%}.profile-actions button,.profile-logout{flex-basis:100%;margin-left:0}}

.audio-pending{display:flex;flex-direction:column;gap:6px;padding:16px 18px;margin:16px 0;background:#fff6e8;border:1px solid #e9d2ae;border-radius:12px;color:#79522e}.audio-pending span{font-size:14px;line-height:1.6}.audio-pending-tag{display:block;width:max-content;margin-top:8px;padding:3px 9px;border-radius:20px;background:#fff2df;color:#89552c;font-size:12px}


/* Listening study workspace: warm autumn palette, separate audio and transcript. */
.study-page.listening-page{width:100%;padding:28px;background:transparent;border:0;box-shadow:none}
.listening-page #modal-title{margin:18px 0 28px;color:#583c2c;font-size:30px;line-height:1.4}
.listening-workspace{display:grid;grid-template-columns:minmax(280px,340px) minmax(0,1fr);gap:24px;align-items:start}
.listening-sidebar{display:grid;gap:18px;position:sticky;top:20px;min-width:0}
.listening-player,.listening-practice,.listening-transcript-panel{border:1px solid #e5d8c6;border-radius:20px;background:#fffdf8;overflow:hidden;box-shadow:0 4px 16px #70432108}
.listening-player{padding:24px;background:linear-gradient(160deg,#fffaf0,#f5e7d4)}
.listening-player-label{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:9px;letter-spacing:1.2px;font-weight:700;color:#997454}
.listening-state{letter-spacing:0;font-size:11px;background:#fffdf6;border:1px solid #e6d3b7;padding:5px 8px;border-radius:20px;white-space:nowrap}
.listening-player-art{width:110px;height:110px;margin:26px auto 20px;display:grid;place-items:center;border-radius:50%;background:#ebd6b7;box-shadow:0 0 0 10px #f3e4cc,0 0 0 11px #e6d4b9}
.listening-player-art .jp-icon{width:74px;height:74px}
.listening-player h3{font-size:20px;margin:20px 0 8px;letter-spacing:-.4px;color:#644330}
.listening-player-caption,.listening-practice p{font-size:13px;line-height:1.8;color:#8b705a;margin:0 0 20px}
.listening-player .audio-pending{background:#fffcf6;border-color:#e1ccb0;padding:14px;margin:0 0 20px;font-size:13px;border-radius:12px}
.listening-player .audio-pending span{font-size:12px}
.listening-stats{display:grid;grid-template-columns:repeat(3,1fr);padding-top:18px;border-top:1px solid #e4d1b8;text-align:center}
.listening-stats div+div{border-left:1px solid #e4d1b8}.listening-stats strong{display:block;font-size:22px;color:#775135}.listening-stats span{display:block;font-size:10px;margin-top:6px;color:#94765e}
.listening-practice{padding:22px}.listening-eyebrow{font-size:10px;letter-spacing:1.1px;font-weight:700;color:#a87b56}.listening-practice h3{font-size:17px;margin:12px 0 8px}.listening-practice p{margin-bottom:16px}.listening-practice .primary{display:flex;width:100%;justify-content:space-between;align-items:center;padding:14px 18px;border-radius:12px}
.listening-transcript-heading{padding:24px 24px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px}.listening-transcript-heading h3{font-size:22px;margin:8px 0 0;color:#644330}.listening-language{font-size:12px;color:#94775f}.listening-language span{font-size:11px;color:#aa9380}
.listening-transcript-toolbar{display:flex;gap:10px;padding:0 24px 18px;border-bottom:1px solid #eee3d5}.listening-transcript-toolbar button{padding:9px 13px;font-size:12px;border-radius:9px;border:1px solid #e7d8c3;background:#fffaf1}.listening-transcript-toolbar button[aria-pressed=true]{background:#b9693e;color:#fff;border-color:#b9693e}
.listening-transcript{max-height:560px;overflow:auto;overscroll-behavior:contain;scrollbar-color:#d6b593 transparent;scrollbar-width:thin;padding:8px 22px}
.listening-turn{display:flex;gap:14px;padding:20px 0;border-bottom:1px solid #eee5d9}.listening-turn:last-child{border:0}.listening-line-number{font-size:11px;color:#b59b83;padding-top:5px;font-variant-numeric:tabular-nums;min-width:20px}.listening-turn-content{min-width:0;flex:1}.listening-speaker{display:inline-block;font-size:11px;line-height:1.5;padding:4px 10px;background:#f3e3cc;border-radius:6px;color:#92603d}.listening-turn.alternate .listening-speaker{background:#efe6df;color:#826350}.listening-jp{font-family:'Noto Sans JP',sans-serif;font-size:17px;line-height:2;color:#4d4138;margin:10px 0 0;overflow-wrap:anywhere}.listening-turn .dialogue-vi{font-size:13px;line-height:1.9;color:#967a65;margin:8px 0 0}
.listening-transcript-footer{padding:16px 24px;border-top:1px solid #eee3d5;font-size:10px;color:#a18973;display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;background:#fbf7ef}
.listening-transcript-placeholder{padding:65px 30px;text-align:center;color:#94775f}.listening-transcript-placeholder .jp-icon{width:48px;height:48px;opacity:.7}.listening-transcript-placeholder h4{font-size:18px;color:#74533d}.listening-transcript-placeholder p{font-size:13px;line-height:1.9;max-width:320px;margin:auto}
.listening-audio audio{width:100%;max-width:100%;margin:0}.listening-audio-settings{display:flex;justify-content:space-between;gap:10px;align-items:center;margin:12px 0 20px;font-size:11px;color:#937254}.listening-audio-settings label{display:flex;align-items:center;gap:8px}.listening-audio-settings select{font:inherit;padding:7px;border:1px solid #dfcab0;border-radius:8px;background:#fffaf1;color:#77553c}.listening-audio-settings button{font-size:11px;padding:8px 10px;border:1px solid #dfcab0}.listening-audio-settings button[aria-pressed=true]{background:#b9693e;color:#fff}.listening-device-note{font-size:11px;line-height:1.7;color:#93745b;margin:14px 0 0}
.listening-page [hidden]{display:none!important}
@media(max-width:950px){.study-page.listening-page{padding:16px 0}.listening-workspace{grid-template-columns:280px minmax(0,1fr);gap:16px}.listening-player,.listening-practice{padding:18px}.listening-transcript-heading{padding:20px 18px 16px}.listening-transcript-toolbar{padding:0 18px 16px}.listening-transcript{padding:6px 16px}.listening-language span{display:none}}
@media(max-width:700px){.listening-workspace{grid-template-columns:1fr}.listening-sidebar{position:static;grid-template-columns:1fr}.listening-player-art{width:80px;height:80px;margin:20px auto}.listening-player-art .jp-icon{width:58px;height:58px}.listening-player h3,.listening-player-caption{text-align:center}.listening-transcript{max-height:520px}.listening-page #modal-title{font-size:24px;margin-bottom:20px}.listening-jp{font-size:16px}.listening-transcript-footer{padding:14px 18px}.listening-practice{order:2}.listening-language span{display:inline}.listening-practice .primary{min-height:48px}.listening-transcript-toolbar button{min-height:44px}.listening-turn{gap:10px}}

.listening-quiz-navigation{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:14px;background:#f7eee2;border:1px solid #e5d8c6;border-radius:14px;margin-bottom:20px}.listening-quiz-navigation>span{font-size:12px;color:#80644f}.listening-quiz-back{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:14px;padding:12px 18px;min-height:44px}.listening-quiz-back .jp-icon{width:20px;height:20px}
.avatar{overflow:hidden}
.avatar img,.profile-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.profile-avatar{overflow:hidden}
.profile-avatar-wrap{display:flex;flex-direction:column;align-items:center;gap:10px;flex-shrink:0}
.profile-avatar-actions{display:flex;flex-direction:column;align-items:center;gap:4px}
.profile-avatar-actions .secondary{padding:7px 14px;font-size:13px}
.profile-avatar-remove{background:none;border:0;color:#b0745a;font-size:12px;padding:4px;text-decoration:underline}
.profile-hero .profile-message{margin-top:8px}
@media(max-width:600px){.profile-avatar-wrap{flex-direction:row}.profile-avatar-actions{align-items:flex-start}}
.profile-hero>.profile-avatar-wrap{flex:none}
@media(max-width:600px){.profile-hero>.profile-avatar-wrap{flex-basis:100%;justify-content:flex-start}}

/* Google renders its own accessible sign-in button. */
#google-account [data-google-button],#profile-google-button{display:flex;justify-content:center;margin:16px 0}
.google-divider{text-align:center;color:var(--muted);font-size:13px;margin:12px 0}

.listening-group-tag{display:block;margin-top:6px;color:#85512f;font-weight:600}
.listening-related{margin-top:24px;padding:24px;border:1px solid #ead9c6;border-radius:20px;background:#fffaf3}
.listening-related-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.listening-related-heading h3{margin:5px 0;font-size:21px}
.listening-related-heading>span{font-size:13px;color:#856c56;white-space:nowrap}
.listening-related-groups{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:20px}
.listening-related-groups h4{margin:0 0 5px;font-size:17px}
.listening-related-groups p{margin:0 0 12px;color:#856c56;font-size:13px}
.listening-related-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;margin-top:9px;border:1px solid #eadfce;border-radius:12px;background:#fff;text-decoration:none;color:inherit;transition:background .15s,border-color .15s}
.listening-related-row:hover,.listening-related-row:focus-visible{background:#fff2df;border-color:#b77646}
.listening-related-row.current{border-color:#ba7744;background:#fff0da}
.listening-related-row>span:first-child{display:grid;gap:4px;min-width:0}
.listening-related-row small{color:#9b623b;font-size:12px}
.listening-related-row b{font-size:15px}
.listening-related-row>span:first-child>span{color:#856c56;font-size:12px}
.status-tag{white-space:nowrap;flex-shrink:0}
.listening-related-row .status-tag{flex:0 0 auto;width:max-content;max-width:none;white-space:nowrap;font-size:11px}
@media(max-width:700px){.listening-related{padding:16px}.listening-related-heading{align-items:flex-start;flex-direction:column;gap:5px}.listening-related-groups{grid-template-columns:1fr}.listening-related-row{align-items:flex-start}}
.listening-main-back{display:inline-block;color:#a7653b;font-weight:600;font-size:14px;margin:0 0 16px;text-decoration:none}.listening-main-back:hover{text-decoration:underline}

.js #seo-content{display:none}.seo-content{margin-bottom:24px}.seo-content nav{display:flex;flex-wrap:wrap;gap:12px}.seo-content nav a{color:#a7653b;text-decoration:underline}.seo-content article{margin:18px 0}

/* Mobile flashcards keep navigation in the viewport; long cards scroll above it. */
@media(max-width:700px){
  #lesson-dialog.study-page.flashcard-page{position:fixed;inset:0;z-index:15;box-sizing:border-box;width:100%;height:100vh;height:100dvh;max-height:none;margin:0;border:0;border-radius:0;padding:max(12px,env(safe-area-inset-top)) 16px 0;display:flex;flex-direction:column;overflow:hidden}
  .flashcard-page .modal-top{flex-shrink:0;margin-bottom:4px}
  #lesson-dialog.flashcard-page #modal-title{flex-shrink:0;font-size:20px;line-height:1.35;margin:8px 0 12px}
  .flashcard-page #modal-content{flex:1;min-height:0;display:flex;flex-direction:column}
  .flashcard-page .flashcard-viewport{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;margin:0;padding:0;touch-action:pan-y pinch-zoom}
  #lesson-dialog.flashcard-page .study-card{box-sizing:border-box;min-height:100%;margin:0;padding:20px 16px;display:flex;flex-direction:column;justify-content:center;user-select:none;-webkit-user-select:none}
  #lesson-dialog.flashcard-page .study-card .japanese{font-size:clamp(24px,7vw,32px);line-height:1.5;margin:10px 0}
  #lesson-dialog.flashcard-page .study-card small{font-size:13px}
  #lesson-dialog.flashcard-page .study-card p{font-size:16px;line-height:1.6;margin:10px 0}
  #lesson-dialog.flashcard-page .study-card .transcript{font-size:14px;line-height:1.7;padding:12px}
  #lesson-dialog.flashcard-page .study-card .study-note{font-size:13px}
  .flashcard-page .flashcard-hint{flex-shrink:0;font-size:11px;margin:8px 0}
  #lesson-dialog.flashcard-page .flashcard-actions{flex-shrink:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.25fr);align-items:stretch;gap:6px;margin:0 -16px;padding:12px 16px max(12px,env(safe-area-inset-bottom));border-top:1px solid #e8d9c6;background:#fffdf8}
  #lesson-dialog.flashcard-page .flashcard-actions button{width:100%;min-width:0;min-height:48px;margin:0;padding:10px 4px;font-size:12px;line-height:1.4;white-space:nowrap;display:flex;align-items:center;justify-content:center;gap:4px}
  #lesson-dialog.flashcard-page .flashcard-actions [data-action="prev"]{grid-column:1;grid-row:1}
  #lesson-dialog.flashcard-page .flashcard-actions [data-action="sound"]{grid-column:2;grid-row:1}
  #lesson-dialog.flashcard-page .flashcard-actions button:last-child{grid-column:3;grid-row:1}
  #lesson-dialog.flashcard-page .flashcard-actions .jp-icon{width:16px;height:16px;flex-shrink:0}
  .flashcard-actions button:disabled{opacity:.4;cursor:default}
  #lesson-dialog.flashcard-page .flashcard-actions [data-action="listen-resume"]:first-child:not(:last-child){grid-column:1/-1;grid-row:1}
  #lesson-dialog.flashcard-page .flashcard-actions.has-marks{grid-template-columns:repeat(2,minmax(0,1fr))}
  #lesson-dialog.flashcard-page .flashcard-actions.has-marks button{grid-column:auto;grid-row:auto}
}
@media(max-width:700px) and (max-height:650px){
  #lesson-dialog.flashcard-page .study-card{padding:12px}
  #lesson-dialog.flashcard-page .study-card .japanese{margin:6px 0}
  #lesson-dialog.flashcard-page #modal-title{font-size:18px;margin:4px 0 8px}
}

@media(max-width:700px){
  .listening-quiz-navigation:has([data-action="lesson-restart"]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px}
  .listening-quiz-navigation:has([data-action="lesson-restart"]) button{min-width:0;padding:10px 6px;font-size:12px;min-height:44px}
  .quiz-result .modal-actions:has([data-action="lesson-restart"]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .quiz-result .modal-actions:has([data-action="lesson-restart"]) button{min-width:0;padding:10px 6px;font-size:12px;min-height:44px}
  .quiz-result .modal-actions:has([data-action="lesson-restart"]) [data-action="finish"]:nth-child(odd){grid-column:1/-1}
}

@media(max-width:700px){
  #lesson-dialog [data-action="listen-resume"]{display:none}
}

/* Compact vocabulary and grammar cards without cropping examples or notes. */
@media(max-width:700px){
  #lesson-dialog.compact-study-page #modal-title{font-size:18px;margin:4px 0 8px}
  #lesson-dialog.compact-study-page .study-card{padding:12px 14px;gap:6px}
  #lesson-dialog.compact-study-page .study-card>*{flex-shrink:0}
  #lesson-dialog.compact-study-page .study-card .japanese{font-size:clamp(24px,4dvh,30px);line-height:1.35;margin:2px 0}
  #lesson-dialog.compact-study-page .study-card small{font-size:12px;line-height:1.45}
  #lesson-dialog.compact-study-page .study-card p{font-size:15px;line-height:1.5;margin:2px 0}
  #lesson-dialog.compact-study-page .study-card .transcript{padding:10px;font-size:14px;line-height:1.5}
  #lesson-dialog.compact-study-page .transcript span{font-size:12px;line-height:1.5}
  #lesson-dialog.compact-study-page .study-card .study-note{font-size:12px;line-height:1.45}
}

@media(max-width:700px){.library-toolbar .page-size-label{display:none}}

.support-contact{position:fixed;right:24px;bottom:max(24px,env(safe-area-inset-bottom));z-index:25;display:flex;flex-direction:column;align-items:flex-end;gap:12px}
.support-toggle{width:54px;height:54px;padding:0;border:1px solid #ffffff66;border-radius:18px;display:grid;place-items:center;background:linear-gradient(145deg,#c98555,#a65a35);color:#fff9ed;box-shadow:0 6px 20px #68432e30,inset 0 1px 0 #ffffff40}
.support-toggle svg{grid-area:1/1;width:28px;height:28px}
.support-toggle .support-dismiss-icon{display:none}
.support-toggle[aria-expanded="true"] .support-chat-icon{display:none}
.support-toggle[aria-expanded="true"] .support-dismiss-icon{display:block}
.support-menu{width:245px;padding:14px;background:#fffdf8;border:1px solid #e8d9c6;border-radius:16px;box-shadow:0 10px 36px #68432e26}
.support-menu strong{display:block;font-size:14px;margin:2px 4px 12px}
.support-menu a,.support-menu button{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px;border:0;border-radius:10px;font-size:14px;text-align:left;background:#f8ecd7;color:#805236}
.support-menu button{margin-top:8px}
.support-action-icon{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:11px}
.support-action-icon svg{width:23px;height:23px}
.support-telegram-icon{background:#e1f0f7;color:#287fa6}
.support-donate-icon{background:#f5dccb;color:#ad603b}
.support-action-label{flex:1;line-height:1.4;font-weight:600}
.support-action-arrow{flex:0 0 16px;width:16px;height:16px;color:#977d67}
.support-menu a:hover,.support-menu button:hover{background:#f1e1c8}
.support-menu a:focus-visible,.support-menu button:focus-visible{outline:2px solid #b76538;outline-offset:3px}
.support-dialog{width:min(420px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow-y:auto;text-align:center;padding:28px 24px}
.support-dialog::backdrop{background:#38231780}
.support-close{position:absolute;right:12px;top:12px;width:36px;height:36px;border:0;border-radius:50%;background:#f8ecd7}
.support-heart{display:block;font-size:48px;color:#b9693e;margin:8px 0}
.support-dialog h2{font-size:22px}.support-dialog p{font-size:14px;line-height:1.7;color:#977d67}
.support-paypal{display:block;margin:20px 0;text-align:center}.support-qr{display:block;width:min(240px,100%);height:auto;margin:12px auto;border-radius:12px}
@media(max-width:700px){
  body:not(.is-home) .support-contact{display:none}
  .support-contact{right:12px;bottom:max(12px,env(safe-area-inset-bottom))}
  .support-toggle{width:48px;height:48px;border-radius:16px}.support-toggle svg{width:26px;height:26px}
  body:has(#lesson-dialog.study-page.flashcard-page[open]) .support-contact{bottom:calc(84px + env(safe-area-inset-bottom))}
}

/* Fit the donation panel into the visible mobile viewport. */
@media(max-width:700px){
  body:has(#support-dialog[open]){overflow:hidden}
  .support-dialog[open]{display:flex;flex-direction:column;align-items:center;gap:8px;width:calc(100% - 24px);height:min(640px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);padding:20px 18px 16px;overflow:hidden}
  .support-dialog .support-heart{flex-shrink:0;font-size:32px;line-height:1;margin:0}
  .support-dialog h2{flex-shrink:0;font-size:20px;line-height:1.3;margin:0}
  .support-dialog p{flex-shrink:0;font-size:12px;line-height:1.45;margin:0}
  .support-dialog .support-paypal{flex-shrink:0;width:100%;min-height:44px;margin:4px 0;padding:12px;font-size:13px}
  .support-dialog .support-qr{flex:1;min-height:0;width:100%;height:0;max-height:350px;object-fit:contain;margin:0;border-radius:8px}
}
@media(max-width:700px) and (max-height:500px){
  .support-dialog[open]{gap:4px;padding:12px 16px}
  .support-dialog .support-heart{display:none}
  .support-dialog h2{font-size:18px}
  .support-dialog .support-paypal{margin:0;padding:8px;min-height:40px}
}

.quiz-study-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:20px;padding-top:16px;border-top:1px solid #eadfce}
#lesson-dialog .quiz-study-actions .secondary{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:44px;padding:10px 12px;border:1px solid #e5d5bf;background:#fffaf3;color:#956441;font-size:13px;line-height:1.4;border-radius:10px}
.quiz-study-actions button:hover{background:#f8ecd7}
.quiz-study-actions button span{font-size:18px;line-height:1}
@media(max-width:700px){
  .quiz-study-actions{gap:8px;margin-top:16px;padding-top:12px}
  #lesson-dialog .quiz-study-actions .secondary{padding:10px 6px;gap:5px;font-size:12px}
}

#quiz-host .question{font-weight:700;color:#68432e}

/* Keep progress sections separated, including the standalone review panel. */
#progress-page{display:grid;gap:24px}
#progress-page>.breadcrumbs,#progress-page>.progress-title,#progress-page>.learning-stats{margin:0}
#progress-page .learning-layout{align-items:start}
#progress-page .learning-main,#progress-page .learning-side{min-width:0;align-content:start}
#progress-page .panel,#progress-page .learning-stats article,#progress-page .learning-stats article>div{min-width:0}
#progress-page .section-heading{flex-wrap:wrap;row-gap:12px}
#progress-page .section-heading h2{margin:0;line-height:1.5}
#progress-page .review-weakest a{min-width:0;overflow-wrap:anywhere;line-height:1.6}
#progress-page .review-panel>p{line-height:1.7}
#progress-page .learning-skill>div{flex-wrap:wrap}
@media(max-width:600px){
  #progress-page{gap:18px}
  #progress-page .learning-main,#progress-page .learning-side{gap:18px}
  #progress-page .progress-title{gap:12px}
  #progress-page .progress-title>div{min-width:0}
  #progress-page .learning-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  #progress-page .learning-stats article{padding:14px 10px;gap:8px}
  #progress-page .learning-stats b{font-size:22px;overflow-wrap:anywhere}
  #progress-page .review-numbers{gap:6px;grid-template-columns:repeat(3,minmax(0,1fr))}
  #progress-page .review-numbers>div{padding:10px 6px}
  #progress-page .review-numbers small{font-size:11px;line-height:1.5;display:block}
  #progress-page .calendar-controls{min-height:32px;gap:10px;flex-wrap:wrap}
  #progress-page .calendar-controls button{width:32px;height:32px}
  #progress-page .calendar-controls b{font-size:12px}
  #progress-page .learning-history article,#progress-page .progress-lesson-row{display:grid;grid-template-columns:70px minmax(0,1fr);gap:8px 12px}
  #progress-page .learning-history img,#progress-page .progress-lesson-row img{width:70px}
  #progress-page .history-score,#progress-page .progress-lesson-link{grid-column:2;justify-self:start;margin:0;white-space:normal;line-height:1.5}
  #progress-page .overall-progress{padding:16px;gap:10px;flex-wrap:wrap}
  #progress-page .local-save-note{align-items:flex-start}
}

/* A small CSS-only autumn layer, kept outside the document flow. */
.autumn-leaves{position:fixed;inset:0;overflow:hidden;pointer-events:none;user-select:none;z-index:5;contain:strict}
.autumn-leaf{position:absolute;top:-50px;left:var(--left);width:var(--size,22px);height:32px;color:#dba641;opacity:.48;animation:autumn-fall var(--duration,18s) var(--delay,0s) linear infinite;pointer-events:none}
.autumn-leaf svg{display:block;width:100%;height:100%;animation:autumn-flutter 4s ease-in-out infinite alternate}
.autumn-leaf:nth-child(1){--left:5%;--duration:19s;--delay:-8s;--drift:55px}
.autumn-leaf:nth-child(2){--left:17%;--duration:24s;--delay:-19s;--drift:-35px;--size:16px;color:#c98c33}
.autumn-leaf:nth-child(3){--left:28%;--duration:21s;--delay:-3s;--drift:70px}
.autumn-leaf:nth-child(4){--left:39%;--duration:27s;--delay:-14s;--drift:-60px;--size:18px}
.autumn-leaf:nth-child(5){--left:53%;--duration:23s;--delay:-22s;--drift:45px;color:#e6b851}
.autumn-leaf:nth-child(6){--left:66%;--duration:20s;--delay:-11s;--drift:-55px;--size:17px}
.autumn-leaf:nth-child(7){--left:77%;--duration:26s;--delay:-6s;--drift:40px}
.autumn-leaf:nth-child(8){--left:91%;--duration:22s;--delay:-17s;--drift:-65px;--size:19px;color:#cb9038}
.autumn-leaf:nth-child(9){--left:11%;--duration:29s;--delay:-24s;--drift:90px;--size:14px}
.autumn-leaf:nth-child(10){--left:46%;--duration:25s;--delay:-9s;--drift:-80px;--size:15px}
.autumn-leaf:nth-child(11){--left:72%;--duration:30s;--delay:-21s;--drift:60px;--size:16px}
.autumn-leaf:nth-child(12){--left:96%;--duration:28s;--delay:-2s;--drift:-90px;--size:14px}
.autumn-leaf:nth-child(even) svg{animation-duration:5.5s;animation-delay:-2s}
@keyframes autumn-fall{from{transform:translate3d(0,0,0) rotate(-25deg)}to{transform:translate3d(var(--drift,50px),calc(100vh + 100px),0) rotate(240deg)}}
@keyframes autumn-flutter{from{transform:translateX(-10px) rotate(-20deg) scaleX(.75)}to{transform:translateX(10px) rotate(25deg) scaleX(1)}}
@media(max-width:700px){.autumn-leaf{opacity:.35}.autumn-leaf:nth-child(n+7){display:none}}
@media(prefers-reduced-motion:reduce){.autumn-leaves{display:none}.autumn-leaf,.autumn-leaf svg{animation:none}}

.quiz-study-actions.quiz-listening-actions{grid-template-columns:minmax(0,1fr)}

/* Self-rating on flashcards and relearning what is not yet known. */
.card-mark[data-action="mark-unknown"]{background:#fff0ef;color:#b45c58}
.card-mark[aria-pressed="true"]{box-shadow:inset 0 0 0 2px currentColor}
.card-mark.primary[aria-pressed="true"]{box-shadow:inset 0 0 0 2px #ffffffb0}
.quiz-result .modal-actions{flex-wrap:wrap}
@media(max-width:700px){
  .quiz-result .modal-actions:has([data-action="listen-study"]){display:grid;grid-template-columns:minmax(0,1fr);gap:10px;align-items:stretch}
  .quiz-result .modal-actions:has([data-action="listen-study"]) button{width:100%;min-width:0;min-height:44px;margin:0;white-space:normal}
}
.card-sort li b{font-family:'Noto Sans JP',sans-serif}

/* "Từ chưa thuộc" page. */
.words-page{display:grid;gap:18px;min-height:500px;padding-bottom:24px}
.words-page>.breadcrumbs,.words-page>.progress-title,.words-page>.library-toolbar,.words-page>.catalog-summary{margin:0}
.words-summary{gap:12px;flex-wrap:wrap}
.word-list{list-style:none;margin:0;padding:0}
.word-list li{display:flex;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--border)}
.word-list li:last-child{border-bottom:0}
.word-list b{font-family:'Noto Sans JP',sans-serif;font-size:18px}
.word-list small{display:block;color:#7c9798;font-size:12px;margin-top:2px}
.word-list p{margin:6px 0 0;font-size:14px;line-height:1.6}
.word-meta{display:flex;flex-direction:column;align-items:flex-end;gap:4px;font-size:12px;color:#7a6f68;text-align:right;flex-shrink:0;max-width:40%}
.word-meta a{color:#a7653b;text-decoration:underline}
@media(max-width:600px){.word-list li{flex-direction:column;gap:8px}.word-meta{align-items:flex-start;text-align:left;max-width:none}.words-summary .primary{width:100%}}
.categories{grid-template-columns:repeat(4,1fr)}
@media(max-width:800px){.categories{grid-template-columns:repeat(2,1fr)}}

/* Keep the resume icon consistent across system fonts and emoji renderers. */
.hero-button .hero-play-icon{display:block;width:16px;height:16px;flex-shrink:0}

.review-hub{min-height:500px;padding-bottom:24px}
.review-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.review-option{display:flex;flex-direction:column;align-items:flex-start;gap:12px}
.review-option>.jp-icon{width:48px;height:48px}
.review-option h2,.review-option p{margin:0}
.review-option h2{font-size:20px}.review-option p{color:#977d67;line-height:1.7}
.review-option-count{color:#a7653b;font-size:14px;margin-top:auto}
.review-option .primary{display:inline-flex;align-items:center;justify-content:center;text-align:center}
.category[data-view="review"] small{white-space:normal;line-height:1.5}
@media(max-width:600px){.review-options{grid-template-columns:1fr}.review-option .primary{width:100%}}
/* Luyện đề BJT */
@media(max-width:480px){
  .header nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:2px;min-width:0}
  .header .nav-item{min-width:0;padding:8px 2px;font-size:10px;gap:6px;border-radius:10px}
  .header .nav-item .jp-icon{width:26px;height:26px}
}
/* Keep navigation labels and selected filters readable on narrow phones. */
@media(max-width:360px){
  .header nav{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
  .library-toolbar label:not(.search-label){flex-basis:100%;min-width:0}
}
.gold{background:#f6e3c4}
.exams-page{display:flex;flex-direction:column;gap:16px}
.exam-login{display:flex;align-items:center;justify-content:space-between;gap:12px}
.exam-login p{margin:0}
.exam-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
.exam-card{display:flex;flex-direction:column;gap:10px}
.exam-card h2{margin:0;font-size:20px}
.exam-card h2 a{color:inherit;text-decoration:none}
.exam-card-head{display:flex;gap:8px;align-items:center}
.exam-card-meta{margin:0;color:var(--muted);font-size:14px}
.exam-card-score{display:flex;flex-direction:column;gap:2px;font-size:13px;color:var(--muted)}
.exam-card-score b{font-size:18px;color:var(--green)}
.exam-card-actions{display:flex;gap:8px;flex-wrap:wrap}
.exam-card-practice{border-top:1px solid var(--border);padding-top:10px;display:flex;flex-direction:column;gap:8px}
.exam-card-practice small{color:var(--muted)}
.exam-card-practice div{display:flex;gap:6px;flex-wrap:wrap}
.exam-chooser{max-width:520px}
.exam-room{display:flex;flex-direction:column;gap:12px}
.exam-bar{display:flex;align-items:center;gap:12px;position:sticky;top:8px;z-index:5;padding:12px 16px}
.exam-back{font-size:20px;text-decoration:none;color:inherit;padding:4px 8px}
.exam-bar-title{display:flex;flex-direction:column;flex:1;min-width:0}
.exam-bar-title b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.exam-bar-title small,.exam-count{color:var(--muted);font-size:13px}
.exam-timer{font-variant-numeric:tabular-nums;font-weight:700;font-size:18px;padding:6px 10px;border-radius:10px;background:#f4ecdf}
.exam-timer.warn{background:#fde3dc;color:#b3412b}
.exam-parts{display:flex;gap:8px;overflow-x:auto}
.exam-parts button{border:1px solid var(--border);background:#fff;border-radius:20px;padding:8px 14px;font-size:13px;white-space:nowrap;color:var(--muted)}
.exam-parts button.active{background:var(--green);border-color:var(--green);color:#fff}
.exam-body{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start}
.exam-question{display:flex;flex-direction:column;gap:14px}
.exam-q-head{display:flex;justify-content:space-between;align-items:center}
.exam-flag{border:1px solid var(--border);background:#fff;border-radius:10px;padding:6px 10px;font-size:13px}
.exam-flag[aria-pressed="true"]{background:#fff4db;border-color:#e9c77d}
.exam-group span{font-size:12px;font-weight:700;color:var(--green);text-transform:uppercase}
.exam-group h2{margin:4px 0 0;font-size:16px}
.exam-image{max-width:100%;border-radius:12px;border:1px solid var(--border)}
.exam-passage,.exam-prompt,.exam-explain p,.exam-script p{white-space:pre-line;line-height:1.7}
.exam-passage{background:#fffaf2;border:1px solid var(--border);border-radius:12px;padding:14px;max-height:420px;overflow:auto}
.exam-prompt{font-size:18px;margin:0}
.exam-audio{width:100%}
.exam-options{display:flex;flex-direction:column;gap:8px}
.exam-option{display:flex;gap:12px;align-items:center;text-align:left;border:1px solid var(--border);background:#fff;border-radius:12px;padding:12px 14px;font-size:16px}
.exam-option>span:first-child{flex:0 0 28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#f4ecdf;font-weight:700;font-size:13px}
.exam-option.chosen{border-color:var(--green);box-shadow:0 0 0 2px #b7653833}
.exam-option.chosen>span:first-child{background:var(--green);color:#fff}
.exam-option.right{border-color:#2e9378;background:#e5f6ee}
.exam-option.wrong{border-color:#c4553d;background:#fde8e2}
.exam-verdict{font-weight:700;margin:0}
.exam-verdict.right{color:#2e9378}.exam-verdict.wrong{color:#c4553d}
.exam-explain h4{margin:0 0 4px}
.exam-script summary{cursor:pointer;color:var(--green)}
.exam-q-foot{display:flex;justify-content:space-between;align-items:center;gap:8px;border-top:1px solid var(--border);padding-top:12px}
.exam-q-foot small{color:var(--muted);text-align:center}
.exam-nav{position:sticky;top:84px;max-height:calc(100vh - 100px);overflow:auto}
.exam-nav-head{display:flex;justify-content:space-between;align-items:center}
.exam-nav-close,.exam-nav-toggle{display:none}
.exam-nav h3{font-size:13px;margin:12px 0 6px;color:var(--muted)}
.exam-legend{display:flex;gap:10px;font-size:12px;color:var(--muted);margin-top:8px}
.exam-legend span::before{content:'';display:inline-block;width:10px;height:10px;border-radius:3px;border:1px solid var(--border);margin-right:4px;vertical-align:-1px}
.exam-legend .done::before{background:var(--green);border-color:var(--green)}
.exam-legend .flag::before{background:#f2c14e;border-color:#f2c14e}
.exam-cells{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}
.exam-cells button{border:1px solid var(--border);background:#fff;border-radius:8px;padding:7px 0;font-size:13px}
.exam-cells button.done{background:var(--green);border-color:var(--green);color:#fff}
.exam-cells button.right{background:#2e9378;border-color:#2e9378;color:#fff}
.exam-cells button.wrong{background:#c4553d;border-color:#c4553d;color:#fff}
.exam-cells button.flag{box-shadow:inset 0 -4px 0 #f2c14e}
.exam-cells button.current{outline:2px solid #243d4b;outline-offset:1px}
@media(max-width:900px){
  .exam-body{grid-template-columns:1fr}
  .exam-nav{position:fixed;inset:auto 0 0 0;top:auto;max-height:70vh;border-radius:18px 18px 0 0;z-index:20;transform:translateY(105%);transition:transform .2s}
  .exam-nav.open{transform:none}
  .exam-nav-close{display:block;border:0;background:none;font-size:24px}
  .exam-nav-toggle{display:block;position:fixed;right:16px;bottom:16px;z-index:15;box-shadow:0 4px 12px #0002}
  .exam-bar{flex-wrap:wrap;gap:8px}
  .exam-bar-title{flex-basis:calc(100% - 60px)}
  .exam-q-foot small{display:none}
}
.exam-result-card{display:grid;grid-template-columns:1fr auto;gap:12px 24px;align-items:center}
.exam-result-card h1{margin:4px 0}
.exam-result-card p{margin:0;color:var(--muted)}
.exam-score{display:flex;align-items:baseline;gap:6px}
.exam-score b{font-size:44px;color:var(--green);line-height:1}
.exam-score em{font-style:normal;font-weight:700;background:#f4ecdf;border-radius:8px;padding:4px 8px;margin-left:6px}
.exam-score-note{grid-column:1/-1;font-size:13px}
.exam-part-scores{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}
.exam-part-scores div{display:grid;grid-template-columns:1fr auto;gap:4px;font-size:14px}
.exam-part-scores i{grid-column:1/-1;height:6px;border-radius:4px;background:linear-gradient(90deg,var(--green) var(--p),var(--border) var(--p))}
.exam-result-actions{grid-column:1/-1;display:flex;gap:8px}
.exam-result-actions a{text-decoration:none;display:inline-block}
.exam-review-list{display:flex;flex-direction:column;gap:8px}
.exam-review{border:1px solid var(--border);border-radius:12px;background:#fff}
.exam-review summary{display:flex;gap:10px;align-items:center;padding:12px 14px;cursor:pointer}
.exam-review summary span[lang]{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}
.exam-review-body{display:flex;flex-direction:column;gap:12px;padding:0 14px 14px}
.exam-mark{flex:0 0 26px;height:26px;border-radius:50%;display:grid;place-items:center;font-weight:700;background:#f3f6f8}
.exam-review.right .exam-mark{background:#e5f6ee;color:#2e9378}
.exam-review.wrong .exam-mark{background:#fde8e2;color:#c4553d}
.exam-history ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.exam-history li{display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px solid var(--border);padding-bottom:8px}
.exam-history li a{display:flex;flex-direction:column;color:inherit;text-decoration:none}
.exam-history li small{color:var(--muted)}
.exam-history-score{font-weight:700;color:var(--green);white-space:nowrap}
@media(max-width:700px){.exam-result-card{grid-template-columns:1fr}.exam-score b{font-size:36px}}
/* Luyện đề: ảnh banner và ảnh thẻ đề (một ảnh chung cho mỗi loại đề) */
.exam-hero{position:relative;height:220px;border-radius:20px;overflow:hidden;background:#3b2418}
.exam-hero img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:right 40%}
.exam-hero::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#3b2418f2 0%,#3b2418c7 38%,#3b241800 75%)}
.exam-hero-copy{position:relative;z-index:1;padding:30px 32px;max-width:460px;color:#fff}
.exam-hero-copy .library-eyebrow{color:#f3cfa8}
.exam-hero-copy h1{margin:8px 0;font-size:30px;color:#fff}
.exam-hero-copy p{margin:0;line-height:1.7;color:#f4e6d8}
.exam-card-art{position:relative;aspect-ratio:9/4;border-radius:14px;overflow:hidden;background:#f4ecdf}
.exam-card-art img{display:block;width:100%;height:100%;object-fit:cover}
.exam-card-art .exam-card-head{position:absolute;right:10px;bottom:10px;display:flex;gap:6px;justify-content:flex-end}
.exam-card-art .level-tag{background:#fff7eaef;box-shadow:0 2px 8px #50332125;color:#875634}
@media(max-width:700px){.exam-hero{height:200px}.exam-hero-copy{padding:22px 18px}.exam-hero-copy h1{font-size:24px}.exam-hero-copy p{font-size:14px}.exam-hero::after{background:linear-gradient(90deg,#3b2418f2 0%,#3b2418cc 60%,#3b241866 100%)}}
/* Luyện đề: hộp xác nhận (làm lại, nộp bài, kết thúc luyện tập) */
.exam-confirm{width:min(440px,calc(100vw - 32px));border:0;border-radius:24px;padding:24px;background:#fffaf1;color:#493728;box-shadow:0 24px 90px #38231744}
.exam-confirm::backdrop{background:#38231766;backdrop-filter:blur(4px)}
.exam-confirm-head{display:flex;align-items:center;gap:12px}
.exam-confirm-icon{flex:0 0 42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#f4ecdf;color:var(--green);font-size:24px;font-weight:700;line-height:1}
.exam-confirm.is-danger .exam-confirm-icon{background:#fde8e2;color:#b3412b}
.exam-confirm h2{flex:1;margin:0;font-size:19px;line-height:1.4}
.exam-confirm-close{border:0;background:none;font-size:18px;color:var(--muted);padding:6px;cursor:pointer;align-self:flex-start}
.exam-confirm-body{margin:14px 0 22px;line-height:1.65;color:#6b5546}
.exam-confirm-body p{margin:0 0 8px}
.exam-confirm-body b{color:#493728}
.exam-confirm-actions{display:flex;justify-content:flex-end;gap:10px}
.exam-confirm.is-danger [data-result="confirm"]{background:#b3412b}
@media(max-width:480px){.exam-confirm{padding:20px}.exam-confirm-actions{flex-direction:column-reverse}.exam-confirm-actions button{width:100%}}

/* Exam overview and mode selection. */
.exam-detail{display:flex;flex-direction:column;gap:24px;padding-bottom:24px}
.exam-detail-hero{display:grid;grid-template-columns:1fr 1fr;overflow:hidden;border-radius:22px;background:#f2e4cf;border:1px solid #ead7bc;height:300px}
.exam-detail-intro{padding:34px 36px;position:relative;z-index:1}
.exam-detail-intro h1{font-size:38px;color:#68432e;margin:14px 0 10px}
.exam-detail-intro p{color:#937457;font-size:15px;line-height:1.8;margin:0}
.exam-detail-hero>img{width:100%;height:100%;min-height:0;object-fit:cover;object-position:65% center}
.exam-detail-stats{display:flex;gap:24px;margin-top:24px;color:#937457;font-size:12px}
.exam-detail-stats b{display:block;font-size:25px;color:#68432e;margin-bottom:4px}
.exam-detail-modes{display:grid;grid-template-columns:1fr 1.15fr;gap:22px}
.exam-detail-modes>.panel{padding:28px;min-width:0;display:flex;flex-direction:column;align-items:stretch}
.exam-detail-modes h2{font-size:23px;color:#68432e;margin:12px 0}
.exam-detail-modes p{font-size:14px;line-height:1.8;color:#937d68;margin:0 0 20px}
.exam-mock-choice{background:linear-gradient(145deg,#fff9eb,#f6ead6);border-color:#ead7bc}
.exam-mock-notes{display:grid;gap:12px;color:#88664a;font-size:13px;margin-bottom:24px}
.exam-detail-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:auto}
.exam-detail-actions .primary{display:flex;justify-content:space-between;align-items:center;gap:24px;flex:1;padding:15px 20px;font-size:14px;border-radius:12px}
.exam-detail-actions .secondary{font-size:13px}
.exam-detail-note{display:block;font-size:11px;line-height:1.7;color:#a18a73;margin-top:14px}
.exam-part-choices{display:grid;gap:10px}
.exam-part-choice{display:flex;align-items:center;gap:16px;padding:14px 16px;text-align:left;border:1px solid #ebdfcf;border-radius:14px;background:#fbf6ed;min-width:0}
.exam-part-choice:hover{background:#f5e8d4;border-color:#d3af85}
.exam-choice-icon{width:40px;height:40px;flex-shrink:0}
.exam-part-copy{display:flex;flex-direction:column;gap:5px;flex:1;min-width:0}
.exam-part-copy small{font-family:'Noto Sans JP',sans-serif;color:#a18365;font-size:11px}
.exam-part-copy b{color:#68432e;font-size:15px}
.exam-part-copy>span{font-size:12px;color:#9a826b}
.exam-choice-arrow{color:#b9693e;font-size:22px}
.exam-detail-best{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #e8d6bd;padding:16px 0;color:#937457;font-size:13px}
.exam-detail-best b{font-size:26px;color:#a46035}.exam-detail-best small{font-size:13px;font-weight:400}
.exam-detail-modes .exam-resume-note{font-size:12px;background:#f0dfc5;border-radius:10px;padding:12px;margin-bottom:16px}
.exam-detail-back{font-size:13px;color:#a7653b;align-self:flex-start;padding:6px 0}
@media(max-width:800px){.exam-detail-hero{grid-template-columns:1.1fr 1fr}.exam-detail-intro{padding:26px}.exam-detail-modes{grid-template-columns:1fr}.exam-detail-modes>.panel{padding:24px}}
@media(max-width:480px){.exam-detail{gap:16px}.exam-detail-hero{grid-template-columns:1fr;height:auto;min-height:0;border-radius:18px}.exam-detail-intro{padding:24px}.exam-detail-intro h1{font-size:30px}.exam-detail-intro p{font-size:13px}.exam-detail-hero>img{height:150px;min-height:0;object-position:65% 48%}.exam-detail-stats{justify-content:space-between;gap:12px;margin-top:20px}.exam-detail-stats b{font-size:23px}.exam-detail-modes{gap:16px}.exam-detail-modes>.panel{padding:22px 18px}.exam-detail-modes h2{font-size:20px}.exam-detail-modes p{font-size:13px}.exam-part-choice{padding:13px 12px;gap:12px}.exam-part-copy b{font-size:14px}.exam-detail-actions .primary{width:100%;flex-basis:100%}}

/* A focused, compact exam workspace. */
.exam-room{gap:18px;padding-bottom:30px;--border:#eadfce;--muted:#95816e;--green:#b9693e}
.exam-room .exam-bar{background:#fffaf1;border:1px solid #e6d3b9;border-radius:16px;box-shadow:0 5px 18px #7043210c;padding:16px 20px;z-index:10}
.exam-room .exam-back{background:#f3e7d4;border-radius:10px;width:40px;height:40px;display:grid;place-items:center;padding:0;color:#a7653b;flex-shrink:0}
.exam-room .exam-bar-title b{font-size:18px;color:#68432e}.exam-room .exam-bar-title small{font-size:12px;margin-top:5px}
.exam-room .exam-timer{background:#f1e2cb;color:#75492e;font-size:22px;padding:10px 16px;border:1px solid #e6cfad}
.exam-room .exam-timer.warn{background:#fde3dc;color:#b3412b;border-color:#e8b4a7}
.exam-room .exam-count{font-size:13px;padding:0 8px}.exam-room .exam-bar .primary{padding:12px 18px;font-size:13px;border-radius:10px}
.exam-room .exam-parts{order:0;width:100%;margin:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.exam-room.is-practice .exam-parts{grid-template-columns:1fr}
.exam-room .exam-parts button{border-radius:12px;padding:14px 12px;font-size:13px;background:#fffaf3;color:#92785e}
.exam-room .exam-parts button.active{background:#b9693e;color:#fff8ed;border-color:#b9693e;box-shadow:0 4px 10px #b9693e20}
.exam-room .exam-body{grid-template-columns:minmax(0,1fr) 280px;gap:20px;align-items:start}
.exam-room .exam-question{padding:24px;gap:18px;border-radius:18px;min-width:0}
.exam-room .exam-q-head{color:#68432e}.exam-room .exam-flag{font-size:12px;color:#9a7959;background:#fffaf2}
.exam-room .exam-group{padding-bottom:14px;border-bottom:1px solid #eee2d1}.exam-room .exam-group h2{line-height:1.7;color:#68432e}
.exam-room .exam-image{display:block;width:auto;height:auto;max-width:100%;max-height:360px;object-fit:contain;align-self:center;border-radius:12px;border:1px solid #eadfce}
.exam-room .exam-audio{margin:0;border-radius:12px;background:#f6eee1}
.exam-room .exam-prompt{font-size:17px;line-height:1.9;color:#553d2b}
.exam-room .exam-option{padding:15px 16px;background:#fffdf9;border-color:#e9dfd1;font-size:15px;line-height:1.7;min-height:58px}
.exam-room .exam-option.chosen{background:#f8ecd9;border-color:#b9693e}.exam-room .exam-option.right{background:#e5f6ee;border-color:#2e9378}.exam-room .exam-option.wrong{background:#fde8e2;border-color:#c4553d}
.exam-room .exam-q-foot{padding-top:18px;gap:12px}.exam-room .exam-q-foot button{font-size:13px;padding:12px 16px}.exam-room .exam-q-foot small{font-size:10px;line-height:1.6}
.exam-room .exam-nav{top:100px;padding:20px;border-radius:18px;background:#fffdf8}.exam-room .exam-nav-head{font-size:15px;color:#68432e}
.exam-room .exam-legend{font-size:10px;gap:8px;margin:16px 0}.exam-room .exam-nav h3{margin:20px 0 12px;font-size:12px;letter-spacing:.5px}
.exam-room .exam-cells{gap:7px}.exam-room .exam-cells button{min-height:34px;font-size:12px}.exam-room .exam-cells button.current{outline-color:#a7653b}
@media(max-width:900px){.exam-room .exam-body{grid-template-columns:1fr}.exam-room .exam-nav{top:auto;padding-bottom:calc(24px + env(safe-area-inset-bottom))}.exam-room .exam-nav-toggle{left:16px;right:auto;bottom:calc(16px + env(safe-area-inset-bottom));background:#fff9ef;border-color:#d9bc95;color:#8c5936;padding:12px 16px;font-size:12px}.exam-room .exam-nav .exam-cells button{min-height:40px}}
@media(max-width:480px){.exam-room{gap:12px;padding-bottom:80px}.exam-room .exam-bar{padding:12px;gap:8px}.exam-room .exam-bar-title{flex-basis:calc(100% - 52px)}.exam-room .exam-bar-title b{font-size:16px}.exam-room .exam-bar-title small{font-size:11px}.exam-room .exam-timer{font-size:18px;padding:8px 12px}.exam-room .exam-count{font-size:11px;margin-left:auto;padding:0}.exam-room .exam-bar .primary{padding:10px 12px;font-size:12px}.exam-room .exam-parts{gap:6px}.exam-room .exam-parts button{font-size:11px;padding:12px 4px;border-radius:10px}.exam-room .exam-question{padding:18px 14px;gap:16px}.exam-room .exam-image{max-height:240px}.exam-room .exam-prompt{font-size:16px}.exam-room .exam-option{padding:12px;gap:10px;font-size:14px}.exam-room .exam-q-foot button{font-size:12px;padding:12px}.exam-room .exam-group h2{font-size:15px}}

/* Results: score, skill breakdown and answer review. */
.exam-results{display:flex;flex-direction:column;gap:22px;padding-bottom:28px;--muted:#95816e;--border:#eadfce;--green:#b9693e}
.result-overview{display:grid;grid-template-columns:1.4fr 1fr;border:1px solid #e6d3b9;border-radius:22px;overflow:hidden;background:#f6ead7}
.result-intro{padding:32px}.result-intro h1{font-size:36px;color:#68432e;margin:14px 0 10px}.result-intro>p{font-size:14px;color:#94765a;line-height:1.8;margin:0}
.result-meta{display:flex;flex-wrap:wrap;gap:8px 22px;margin:22px 0;color:#9a8065;font-size:12px}.result-meta b{font-weight:600;color:#765238}
.result-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.result-actions .primary,.result-actions .secondary{display:inline-flex;align-items:center;justify-content:center;gap:24px;padding:13px 18px;font-size:13px;border-radius:11px}
.result-score-panel{background:#fff9ee;border-left:1px solid #e6d3b9;padding:32px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.result-score-panel .exam-score{margin:20px 0 16px;flex-wrap:wrap;justify-content:center;gap:8px}.result-score-panel .exam-score b{font-size:64px;color:#a86035;font-weight:800;letter-spacing:-2px}.result-score-panel .exam-score>span{font-size:15px;color:#a38a70}.result-score-panel .exam-score em{padding:7px 12px;border:1px solid #e5cba7;color:#936034;background:#f3e2c9;font-size:15px}
.result-score-panel .exam-score-note{font-size:11px;line-height:1.8;color:#a08971;margin:0;max-width:320px}
.result-counts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.result-counts>div{background:#fffdf8;border:1px solid #eadfce;border-radius:15px;padding:18px 22px}.result-counts span{display:block;font-size:12px;color:#927b64;margin-bottom:10px}.result-counts b{font-size:29px;font-weight:700;color:#765238}.result-counts small{font-size:12px;font-weight:400;letter-spacing:0}.result-counts .is-right{background:#edf4e9;border-color:#d8e5d1}.result-counts .is-right b{color:#548160}.result-counts .is-wrong{background:#fcf0e8;border-color:#f0d9cc}.result-counts .is-wrong b{color:#b36b50}.result-counts .is-blank b{color:#9a8975}
.result-skills,.result-review-section{padding:26px}.result-section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}.result-section-heading h2{font-size:22px;color:#68432e;margin:9px 0 0}.result-section-heading>span{font-size:12px;color:#9a826b;white-space:nowrap}
.result-skills-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}.result-skill{padding:20px;border:1px solid #eadfce;background:#fbf6ed;border-radius:14px;min-width:0}.result-skill>small{font-size:11px;font-family:'Noto Sans JP',sans-serif;color:#a18a72}.result-skill h3{font-size:16px;color:#775238;margin:8px 0 22px}.result-skill-number{display:flex;justify-content:space-between;align-items:baseline;gap:10px}.result-skill-number b{font-size:27px;color:#a86035}.result-skill-number span{font-size:12px;color:#9a826b}.result-skill-bar{height:7px;background:#eadcc8;border-radius:8px;overflow:hidden;margin-top:12px}.result-skill-bar i{display:block;height:100%;background:#c18a54;border-radius:8px}
.result-review-hint{font-size:13px;color:#9a826b;line-height:1.7;margin:-6px 0 20px}.result-filters{gap:8px;margin-bottom:20px}.result-filters .topic-chip{padding:10px 15px;display:inline-flex;align-items:center;gap:10px;font-size:12px}.result-filters .topic-chip span{font-size:10px;border-radius:5px;background:#e8d8c04d;padding:3px 5px}
.exam-results .exam-review{background:#fffdf9;border-color:#eadfce}.exam-results .exam-review summary{padding:16px;font-size:13px;gap:12px;list-style:none}.exam-results .exam-review summary::-webkit-details-marker{display:none}.exam-results .exam-review summary::after{content:'+';font-size:20px;color:#b38a61;margin-left:auto}.exam-results .exam-review[open]>summary::after{content:'−'}.exam-results .exam-review[open]{border-color:#d0ad83}.exam-results .exam-review[open]>summary{background:#f7eddf;border-radius:12px 12px 0 0}.exam-results .exam-review summary b{white-space:nowrap;color:#775238}.exam-results .exam-review summary span[lang]{color:#99816b;font-size:13px}
.exam-results .exam-review-body{padding:22px;gap:16px;min-width:0}.exam-results .exam-image{max-height:320px;width:auto;max-width:100%;align-self:center;object-fit:contain}.exam-results .exam-prompt{font-size:16px;color:#68432e}.exam-results .exam-option{font-size:14px;line-height:1.7;padding:14px}.exam-results .exam-explain{padding:18px;background:#f5eedf;border-radius:12px;color:#8e7053;line-height:1.8;font-size:14px}.exam-results .exam-explain h4{color:#775238}.exam-results .exam-script{padding:14px;border:1px solid #eadfce;border-radius:12px;font-size:13px;line-height:1.8}.exam-results .exam-mark{background:#f1ece3;color:#9d8b75}
@media(max-width:800px){.result-overview{grid-template-columns:1fr 1fr}.result-intro,.result-score-panel{padding:24px}.result-actions{align-items:stretch;flex-direction:column}.result-counts>div{padding:16px}.result-skills-grid{grid-template-columns:1fr}.result-skill h3{margin-bottom:14px}}
@media(max-width:480px){.exam-results{gap:16px}.result-overview{grid-template-columns:1fr;border-radius:18px}.result-intro{padding:24px 20px}.result-intro h1{font-size:30px}.result-intro>p{font-size:13px}.result-meta{font-size:11px;gap:8px;margin:16px 0;flex-direction:column}.result-score-panel{border-left:0;border-top:1px solid #e6d3b9;padding:24px 20px}.result-score-panel .exam-score b{font-size:56px}.result-counts{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.result-counts b{font-size:26px}.result-skills,.result-review-section{padding:20px 14px}.result-section-heading{gap:10px}.result-section-heading h2{font-size:19px}.result-section-heading>span{font-size:10px}.result-section-heading .library-eyebrow{font-size:9px}.result-skill{padding:16px}.result-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.result-filters .topic-chip{justify-content:space-between;margin:0;padding:10px 12px}.exam-results .exam-review summary{padding:12px;gap:8px;font-size:12px;flex-wrap:wrap}.exam-results .exam-review summary span[lang]{order:2;flex-basis:100%;white-space:normal;font-size:12px;line-height:1.7;padding-left:34px}.exam-results .exam-review-body{padding:14px;gap:14px}.exam-results .exam-image{max-height:240px}.exam-results .exam-option{font-size:13px;padding:12px;gap:9px}.exam-results .exam-explain{padding:14px;font-size:13px}}

/* Panoramic BJT practice artwork with space reserved for the page title. */
.exam-hero{height:280px}
.exam-hero img{object-position:center 25%}
.exam-hero::after{background:linear-gradient(90deg,#3b24184d 0%,#3b241826 40%,transparent 65%)}
.exam-hero-copy{padding:58px 36px;max-width:470px}
@media(max-width:700px){.exam-hero{height:230px}.exam-hero img{object-position:76% center}.exam-hero::after{background:linear-gradient(90deg,#3b2418f2 0%,#3b2418c7 50%,#3b24184d 100%)}.exam-hero-copy{padding:32px 22px;max-width:340px}.exam-hero-copy p{font-size:13px;line-height:1.8}}

/* Review accuracy and spaced repetition on the progress page. */
#progress-page .review-panel{padding:28px;background:#fffdf9;overflow:hidden}
.review-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;padding-bottom:24px;border-bottom:1px solid #eee2d4}
.review-heading h2{margin:6px 0 8px;font-size:23px;color:#603d29}
.review-heading p{margin:0;font-size:13px;color:#887565;line-height:1.7}
.review-heading>.jp-icon{width:54px;height:54px;flex-shrink:0}
.review-dashboard{display:grid;grid-template-columns:1fr 1fr;gap:28px;padding-top:24px}
.review-performance,.review-schedule{min-width:0}
#progress-page .review-numbers{grid-template-columns:repeat(2,minmax(0,1fr));margin:0;gap:12px}
#progress-page .review-numbers>div{padding:18px;text-align:left;background:#f9f0e5;border:1px solid #ecdcc8;border-radius:16px}
#progress-page .review-numbers small{font-size:12px;display:block;color:#806b5c;line-height:1.6}
#progress-page .review-numbers b{font-size:34px;line-height:1.3;margin:10px 0 5px;color:#a35e36}
.review-numbers div>span{font-size:11px;color:#9b8572}
.review-mastery{padding:20px 0}
.review-mastery>div:first-child{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap}
#progress-page .review-mastery h3{margin:0;font-size:13px}
.review-mastery>div>span{font-size:12px;color:#897564}
.review-mastery-track{height:9px;border-radius:10px;background:#eadfce;margin-top:12px;overflow:hidden}
.review-mastery-track i{display:block;height:100%;background:#79947b;border-radius:10px}
.review-mastery p{display:flex;gap:18px;font-size:12px;color:#897564;margin:12px 0 0;flex-wrap:wrap}
.review-mastery p i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#79947b;margin-right:6px}
.review-mastery p span+span i{background:#dfbf91}
.review-word-link{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;background:#f2f5ee;border:1px solid #e0e7d9;border-radius:14px;text-decoration:none;color:#53664c}
.review-word-link b{font-size:13px}.review-word-link small{display:block;font-size:11px;margin-top:6px;color:#849078}.review-word-link strong{font-size:23px;white-space:nowrap}.review-word-link strong span{font-size:17px;margin-left:5px}
.review-schedule{background:#fff8ef;border:1px solid #eedfcb;border-radius:18px;padding:20px}
.review-schedule-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}
#progress-page .review-schedule-heading h3{margin:5px 0 0;font-size:17px;color:#69482e}
.review-schedule-heading .library-eyebrow{font-size:9px;letter-spacing:1.5px}
.review-period{font-size:10px;white-space:nowrap;background:#efe2cf;color:#92724c;border-radius:20px;padding:6px 9px}
.review-due{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:18px 0 20px}
.review-due>div{display:flex;align-items:center;gap:9px}.review-due b{font-size:32px;color:#af6c37}.review-due>div>span{font-size:11px;color:#8c745e;max-width:85px;line-height:1.6}
.review-due .primary{font-size:11px;padding:10px 12px;text-decoration:none;white-space:nowrap}
#progress-page .review-forecast{gap:7px}
#progress-page .review-forecast .review-day{gap:7px;min-width:0}
#progress-page .review-forecast b{font-size:12px;color:#927459}
#progress-page .review-forecast span{height:86px;background:#efe5d6;border-radius:7px;width:100%}
#progress-page .review-forecast i{background:#d7ae7d;min-height:0}
#progress-page .review-forecast small{font-size:10px;white-space:nowrap;color:#8d7864}
.review-forecast em{font-size:9px;font-style:normal;color:#af9981}
#progress-page .review-forecast .is-today i{background:#b66e3f}.review-forecast .is-today small{font-weight:700;color:#a45f35!important}
.review-schedule-note{font-size:11px;line-height:1.6;color:#9b846e;margin:18px 0 0}
.review-forgotten{margin-top:24px;padding-top:20px;border-top:1px solid #eee2d4}
#progress-page .review-forgotten h3{margin:0 0 14px;font-size:15px}
#progress-page .review-weakest li{padding:12px 14px;border:1px solid #efdfd3;background:#fff9f4;border-radius:10px;align-items:center}
.review-weakest a{font-size:13px;text-decoration:none;color:#77543b}.review-weakest small{font-size:10px;padding:5px 8px;background:#f5e7dd;border-radius:20px}
.review-signin{display:flex;align-items:center;justify-content:space-between;gap:24px;background:#f8efe2;padding:24px;border-radius:16px;margin-top:24px}.review-signin p{font-size:13px;line-height:1.8;color:#8a7562}.review-signin .primary{flex-shrink:0}
@media(max-width:700px){
 #progress-page .review-panel{padding:20px 16px}.review-heading{gap:12px;padding-bottom:18px}.review-heading h2{font-size:19px}.review-heading>.jp-icon{width:40px;height:40px}.review-heading .library-eyebrow{font-size:9px}.review-heading p{font-size:12px}
 .review-dashboard{grid-template-columns:minmax(0,1fr);gap:20px;padding-top:18px}#progress-page .review-numbers>div{padding:15px 12px}#progress-page .review-numbers b{font-size:30px}.review-schedule{padding:18px 14px}.review-signin{display:block;padding:18px}.review-signin .primary{margin-top:8px}#progress-page .review-weakest li{align-items:flex-start}.review-forgotten{margin-top:20px}
}
@media(max-width:700px){#progress-page .review-numbers small{min-height:36px}}

/* Compact answer review: illustration beside listening and answer choices. */
.result-answer-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;align-items:start}
.result-answer-layout.has-image{grid-template-columns:minmax(0,0.9fr) minmax(0,1.1fr)}
.result-answer-image{display:flex;justify-content:center;align-items:flex-start;min-width:0;padding:12px;background:#f7f3ec;border:1px solid #eee3d5;border-radius:14px}
.exam-results .result-answer-image .exam-image{display:block;width:100%;height:auto;max-height:520px;border:0;border-radius:8px;object-fit:contain}
.result-answer-content,.result-answer-explanation{display:flex;flex-direction:column;gap:14px;min-width:0}
.result-answer-content .exam-group{margin:0}.result-answer-content .exam-group h2{font-size:15px;line-height:1.6;margin:0}
.exam-results .result-answer-content .exam-prompt{margin:0;line-height:1.8;font-size:15px}
.exam-results .result-answer-content .exam-option{padding:11px 13px;font-size:13px}
.result-answer-content .exam-audio{max-width:100%;min-width:0;height:42px}
.result-answer-content .exam-passage{font-size:14px;line-height:1.8;margin:0}
.result-answer-explanation:empty{display:none}
.result-answer-explanation .exam-explain{margin:0}.result-answer-explanation .exam-explain h4{margin:0 0 8px}.result-answer-explanation .exam-explain p{margin:0;white-space:pre-line}
@media(max-width:700px){.result-answer-layout.has-image{grid-template-columns:minmax(0,1fr);gap:16px}.result-answer-image{padding:8px}.exam-results .result-answer-image .exam-image{max-height:360px}.result-answer-content{gap:12px}}

/* Transcript and translation, shared by practice and answer review. */
.exam-script{border:1px solid #e7dac8;border-radius:14px;background:#fffdf8;overflow:hidden}
.exam-results .exam-script{padding:0;border-radius:14px}
.exam-script>summary,.exam-results .exam-script>summary{display:flex;align-items:center;gap:12px;padding:16px;cursor:pointer;list-style:none;background:#f6efe3;margin:0;border-radius:0;line-height:1.5}
.exam-script>summary::-webkit-details-marker{display:none}
.exam-script>summary::after,.exam-results .exam-script>summary::after{content:none}
.exam-script-icon{display:flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;background:#e8dbc5;color:#946540;border-radius:10px;font-size:20px}
.exam-script>summary>span:nth-child(2){min-width:0}
.exam-script>summary b{display:block;font-size:14px;color:#735137}
.exam-script>summary small{display:block;font-size:11px;font-weight:400;color:#a0876f;margin-top:3px}
.exam-script-toggle{margin-left:auto;width:26px;height:26px;flex-shrink:0;border:1px solid #dfccb2;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#9d754e}
.exam-script-toggle::before{content:'+';font-size:18px}.exam-script[open] .exam-script-toggle::before{content:'−'}
.exam-script[open]>summary{border-bottom:1px solid #e7dac8}
.exam-script-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding:20px}
.exam-script-grid>section{min-width:0;padding:20px;border-radius:12px;border:1px solid #e9e0d2;background:#fffdf9}
.exam-script-grid>section:only-child{grid-column:1/-1}
.exam-script-grid>.exam-script-translation{background:#f2f5ee;border-color:#e0e6d8}
.exam-script-label{display:flex;align-items:center;gap:10px;padding-bottom:14px;border-bottom:1px solid #e9e0d2}
.exam-script-label>span{font-size:10px;font-weight:700;letter-spacing:.5px;background:#f0e5d4;color:#9a704b;padding:5px 8px;border-radius:6px;white-space:nowrap}
.exam-script-translation .exam-script-label>span{background:#e0e8d8;color:#627553}
.exam-script-label h4{margin:0;font-size:13px;color:#846143}.exam-script-translation .exam-script-label h4{color:#66765b}
.exam-script-grid p{margin:16px 0 0;white-space:pre-line;overflow-wrap:anywhere;font-size:14px;line-height:2;color:#765c47}
.exam-script-grid p[lang=ja]{font-size:15px;line-height:2.1;color:#604c3c}
@media(max-width:700px){.exam-script-grid{grid-template-columns:minmax(0,1fr);padding:12px;gap:12px}.exam-script-grid>section{padding:16px}.exam-script>summary,.exam-results .exam-script>summary{padding:13px;gap:10px}.exam-script>summary b{font-size:13px}.exam-script>summary small{font-size:10px}.exam-script-icon{width:32px;height:32px}.exam-script-grid p,.exam-script-grid p[lang=ja]{font-size:13px;line-height:2}}

/* Exam catalog: two compact cards per desktop row. */
.exam-list{padding:28px 0 32px}
.exam-list-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.exam-list-heading h2{font-size:23px;color:#68432e;margin-top:7px}
.exam-list-count{font-size:12px;color:#937457;background:#f3e8d7;border:1px solid #e7d6bf;border-radius:999px;padding:8px 14px;white-space:nowrap}
.exam-list .exam-card{background:#fffdf8;border:1px solid #e9ddcc;box-shadow:0 4px 16px #70432108;min-width:0}
.exam-list .exam-card h2{line-height:1.5;overflow-wrap:anywhere;color:#68432e}
.exam-list .exam-card h2 a:hover{color:#b9693e}
.exam-list .exam-card-meta,.exam-list .exam-card-score,.exam-list .exam-card-practice small{color:#947b65}
.exam-list .exam-card-actions button{min-height:42px}
@media(min-width:901px){
  .exam-list .exam-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
  .exam-list .exam-card{display:grid;grid-template-columns:160px minmax(0,1fr) 145px;grid-template-rows:auto auto 1fr auto;column-gap:16px;row-gap:8px;padding:20px;align-items:start;border-radius:20px}
  .exam-list .exam-card-art{grid-column:1;grid-row:1/5;aspect-ratio:auto;height:100%;min-height:166px;border-radius:13px}
  .exam-list .exam-card-art img{object-position:center}
  .exam-list .exam-card-art .exam-card-head{left:10px;right:10px;bottom:10px;flex-wrap:wrap;justify-content:flex-start}
  .exam-list .exam-card h2{grid-column:2;grid-row:1;font-size:22px;margin:0}
  .exam-list .exam-card-meta{grid-column:2;grid-row:2;font-size:13px;line-height:1.7}
  .exam-list .exam-card-score{grid-column:2;grid-row:3;font-size:12px;gap:4px}
  .exam-list .exam-card-actions{grid-column:2;grid-row:4;margin-top:8px}
  .exam-list .exam-card-actions .primary{min-width:110px}
  .exam-list .exam-card-practice{grid-column:3;grid-row:1/5;align-self:stretch;justify-content:center;border-top:0;border-left:1px solid #eadfce;padding:0 0 0 16px;gap:12px}
  .exam-list .exam-card-practice small{font-size:12px;font-weight:600}
  .exam-list .exam-card-practice div{display:grid;grid-template-columns:1fr;gap:8px}
  .exam-list .exam-card-practice .topic-chip{margin:0;text-align:left;justify-content:space-between;padding:10px 14px;border-radius:10px;font-size:12px;background:#faf3e8;border-color:#eadbc6}
  .exam-list .exam-card-practice .topic-chip::after{content:'↗';color:#b9693e}
  .exam-list .exam-card-practice .topic-chip:hover{background:#f2e3cd}
}
@media(min-width:901px) and (max-width:1100px){
  .exam-list .exam-card{grid-template-columns:120px minmax(0,1fr) 115px;column-gap:12px;padding:14px}
  .exam-list .exam-card h2{font-size:20px}
  .exam-list .exam-card-meta{font-size:12px}
  .exam-list .exam-card-practice{padding-left:12px}
  .exam-list .exam-card-practice .topic-chip{padding:10px;font-size:11px}
}
@media(max-width:700px){.exam-list{padding-top:20px}.exam-list-heading h2{font-size:20px}}

/* Keep the illustration beside the listening question and its choices. */
.exam-room .exam-question-layout{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:24px;align-items:start}
.exam-room .exam-question-visual{min-width:0;padding:10px;background:#f7f0e5;border:1px solid #eadfce;border-radius:16px}
.exam-room .exam-question-visual .exam-image{display:block;width:100%;max-height:520px;height:auto;object-fit:contain;border:0;border-radius:10px}
.exam-room .exam-question-content{display:flex;flex-direction:column;gap:18px;min-width:0}
.exam-room .exam-question-content .exam-audio{display:block;width:100%;min-width:0;height:44px}
.exam-room .exam-question-content .exam-prompt{margin:0;font-size:16px;line-height:1.8}
.exam-room .exam-question-content .exam-passage{overflow-wrap:anywhere;line-height:1.9}
.exam-room .exam-question-content .exam-option{align-items:flex-start;font-size:14px;padding:12px;min-height:52px}
.exam-room .exam-question-content .exam-option>span:first-child{flex-shrink:0}
.exam-room .exam-question-content .exam-option>span:last-child{min-width:0;overflow-wrap:anywhere}
@media(max-width:700px){
  .exam-room .exam-question-layout{grid-template-columns:minmax(0,1fr);gap:18px}
  .exam-room .exam-question-visual .exam-image{max-height:340px}
  .exam-room .exam-question-content{gap:14px}
}

/* Compact question navigation, with more space for the question. */
.exam-room .exam-body{grid-template-columns:minmax(0,1fr) 232px}
.exam-room .exam-nav{padding:16px;gap:0;max-height:calc(100dvh - 120px)}
.exam-room .exam-nav-head{font-size:13px}
.exam-room .exam-legend{flex-wrap:wrap;gap:8px 10px;margin:14px 0 18px}
.exam-room .exam-nav-part{border-top:1px solid #eadfce;padding:12px 0}
.exam-room .exam-nav-part:last-child{padding-bottom:0}
.exam-room .exam-nav-part summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;font-size:12px;color:#95816e}
.exam-room .exam-nav-part summary::-webkit-details-marker{display:none}
.exam-room .exam-nav-part summary span{margin-left:auto;font-size:11px;font-variant-numeric:tabular-nums}
.exam-room .exam-nav-part summary::after{content:'⌄';transition:transform .2s}
.exam-room .exam-nav-part[open] summary::after{transform:rotate(180deg)}
.exam-room .exam-nav-part.active summary{color:#8c5936}
.exam-room .exam-cells{grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin-top:12px;padding:3px}
.exam-room .exam-cells button{aspect-ratio:1;padding:0;min-height:0;border-radius:9px;font-size:12px;position:relative}
.exam-room .exam-cells button.done{background:#f0e3d1;border-color:#e2ceb1;color:#805630}
.exam-room .exam-cells button.current{background:#b9693e;border-color:#b9693e;color:#fff;outline:2px solid #b9693e;outline-offset:2px}
.exam-room .exam-cells button.flag{box-shadow:none}
.exam-room .exam-cells button.flag::after{content:'';position:absolute;top:3px;right:3px;width:6px;height:6px;border-radius:50%;background:#f2c14e}
.exam-room .exam-legend .done::before{background:#f0e3d1;border-color:#e2ceb1}
.exam-room .exam-nav-desktop-toggle{font-size:12px;padding:10px 12px;white-space:nowrap}
@media(min-width:901px){.exam-room.nav-collapsed .exam-body{grid-template-columns:minmax(0,1fr)}.exam-room.nav-collapsed .exam-nav{display:none}}
@media(max-width:900px){.exam-room .exam-body{grid-template-columns:minmax(0,1fr)}.exam-room .exam-nav-desktop-toggle{display:none}.exam-room .exam-nav{max-height:70dvh;border-radius:18px 18px 0 0}.exam-room .exam-cells{grid-template-columns:repeat(5,minmax(0,1fr))}.exam-room .exam-nav .exam-cells button{aspect-ratio:auto;min-height:40px}}

.exam-room .exam-cells button.right{background:#2e9378;border-color:#2e9378;color:#fff}
.exam-room .exam-cells button.wrong{background:#c4553d;border-color:#c4553d;color:#fff}
