:root{color-scheme:light;--bg:#fcfcfa;--surface:#fff;--soft:#f2f5f8;--fg:#122d47;--muted:#627389;--line:#e4e9ed;--blue:#066be9;--pale:#eef6ff;--navy:#122d47;--stamp:#c7443c;--stampbg:#fff3f0;--stampline:#efc9c2;--ok:#167349;--okbg:#e8f5ed;--ng:#b73539;--ngbg:#fff0ee;--gold:#956b00;--goldbg:#fff7dc;--shadow:none;--control-height:48px;--control-compact:44px;--control-radius:10px;--control-weight:700;--action-bg:#066be9;--action-fg:#fff}

:root[data-theme=dark]{color-scheme:dark;--bg:#122131;--surface:#1b2d40;--soft:#213447;--stamp:#ff9b90;--stampbg:#392b2a;--stampline:#704641;--fg:#edf4ff;--muted:#b6c7d7;--line:#354d65;--blue:#93b9ff;--pale:#233e61;--navy:#d2e3ff;--ok:#83d7b0;--okbg:#183e33;--ng:#ffb1aa;--ngbg:#472e36;--gold:#ebc95d;--goldbg:#433c28;--shadow:none}

*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--fg);font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;font-size:16px;line-height:1.7;overflow-wrap:anywhere}
button,input,select{font:inherit}
button,a,input,select,summary{-webkit-tap-highlight-color:transparent}
button{color:inherit;cursor:pointer}
button:disabled{cursor:default;opacity:.5}
a{color:var(--blue);text-underline-offset:3px}
button,select,input{touch-action:manipulation}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
[hidden]{display:none!important}
h1,h2,h3,h4,p,figure{margin:0}
h2{font-size:26px;line-height:1.5;letter-spacing:-.025em}
h3{font-size:19px;line-height:1.55}
h4{font-size:16px}
small{font-size:13px}
.muted,.hintline{color:var(--muted);font-size:14px}
.shell{max-width:840px;margin:0 auto;padding:0 20px calc(106px + env(safe-area-inset-bottom))}
.header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:26px 0 28px}
.brand{display:flex;align-items:center;gap:12px}
.brand h1{font-size:20px;line-height:1.35;letter-spacing:-.025em}
.eyebrow{font-size:10px;font-weight:800;letter-spacing:.12em;color:var(--muted)}
#brandmark{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#163753;color:white}
.icon{height:23px;width:23px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
.iconbtn{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--line);border-radius:var(--control-radius);background:var(--surface)}
main:focus{outline:none}
.page-heading{margin-bottom:22px}
.page-heading p{margin-top:6px}
.inline{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:26px 0 12px}
.section-heading small{color:var(--muted)}
.card{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:22px;box-shadow:var(--shadow)}
.badge{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);padding:2px 10px;border-radius:999px;color:var(--muted);background:var(--bg);font-size:13px;font-weight:600;line-height:1.6;max-width:100%}
.badge.blue{background:var(--pale);border-color:transparent;color:var(--blue)}
.badge.success{background:var(--okbg);border-color:transparent;color:var(--ok)}
.badge.gold{color:var(--gold);background:var(--goldbg);border-color:transparent}
.badge.error{color:var(--ng);background:var(--ngbg);border-color:transparent}
.btn{display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:var(--control-height);min-width:44px;border:1px solid transparent;border-radius:var(--control-radius);padding:10px 16px;background:var(--action-bg);color:var(--action-fg);font-size:16px;font-weight:var(--control-weight);line-height:1.6;text-align:center}
.btn.compact{min-height:var(--control-compact);padding:8px 12px;font-size:14px}
.btn>.icon,.textbtn>.icon,.flag-btn>.icon{width:20px;height:20px}
.btn:hover:not(:disabled){filter:brightness(.95)}
.btn.secondary{color:var(--blue);background:var(--surface);border-color:var(--line)}
.textbtn{min-width:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:var(--control-compact);background:transparent;border:0;border-radius:var(--control-radius);color:var(--blue);padding:8px 4px;font-size:14px;font-weight:var(--control-weight)}
.textbtn.danger{color:var(--ng)}
.wide{width:100%}
.btnrow{display:flex;gap:10px;align-items:stretch;margin-top:16px}
.btnrow>*{flex:1;min-width:0}
.stack{display:grid;gap:10px;margin-top:18px}
.seg{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 14px}
.seg button{flex:0 1 auto;min-width:44px;min-height:var(--control-compact);padding:8px 16px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--muted);font-size:14px;font-weight:var(--control-weight);line-height:1.6}
.seg button[aria-pressed=true]{background:var(--pale);border-color:var(--blue);color:var(--blue)}
.progress{display:block;height:7px;background:var(--line);border-radius:8px;overflow:hidden}
.progress i{display:block;height:100%;background:var(--blue);border-radius:inherit;transition:width .2s}
.achievement-progress{margin:18px 0 22px}
.achievement-progress .inline{justify-content:space-between;margin-bottom:8px}
.achievement-progress b{font-size:25px;color:var(--navy)}
.achievement-progress small{font-size:14px}
.mock-grid,.category-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.set-card{position:relative;text-align:left;min-height:90px;padding:11px 13px;border:1px solid var(--line);border-radius:14px;background:var(--surface);display:flex;align-items:center;justify-content:space-between;gap:6px;transition:box-shadow .15s}
.set-card:hover,.category-card:hover{box-shadow:0 0 0 2px var(--pale)}
.set-card b{font-size:17px;display:block;line-height:1.5}
.set-card small{display:block;color:var(--muted);font-size:13px}
.set-card .badge{margin-top:7px}
.set-card .flower-stamp{width:48px;height:48px}
.card-chevron,.set-card .chevron{display:inline-flex;color:var(--muted);width:18px;height:18px;flex:none}
.card-chevron>.icon,.set-card .chevron>.icon{width:18px;height:18px}
.set-card.in-progress{background:var(--pale);border-color:var(--blue)}
.recommend-copy{flex:1;min-width:0}
.category-card{display:flex;gap:10px;align-items:flex-start;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:16px 12px;min-width:0}
.category-card>.icon{margin-top:3px;color:var(--navy)}
.category-copy{flex:1;min-width:0}
.category-copy strong{font-size:15px;line-height:1.45;display:block;min-height:40px}
.category-copy small{font-size:13px;color:var(--muted);display:block;margin:6px 0}
.category-copy .progress{height:4px}
.notes-entry{border:1px solid var(--line);border-radius:16px;background:var(--surface);padding:20px;width:100%;text-align:left;margin-top:26px}
.notes-entry>.inline{justify-content:space-between}
.notes-entry p{color:var(--muted);font-size:14px;margin:4px 0 15px}
.notes-samples{display:flex;gap:10px;height:70px;overflow:hidden}
.notes-samples>*{flex:1;width:0}
.review-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:22px 0 18px}
.review-stats>div{padding:18px;background:var(--surface);border-radius:14px;border:1px solid var(--line)}
.review-stats>div:first-child{background:var(--pale);color:var(--blue)}
.review-stats strong{font-size:38px;line-height:1.2;display:block;margin-top:8px}
.review-stats strong small{font-size:16px;margin-left:4px}
.review-row{display:flex;align-items:center;gap:12px;background:var(--surface);padding:16px;border:1px solid var(--line);border-radius:13px;width:100%;text-align:left;margin-top:10px;min-height:80px}
.review-row .row-copy{flex:1;min-width:0}
.review-row strong{font-size:15px;display:block}
.review-row small{color:var(--muted);display:block;font-size:13px}
.review-row .badge{font-size:13px;padding:3px 7px}
.info-strip{display:flex;align-items:flex-start;gap:12px;padding:18px;border-radius:14px;border:1px solid var(--line);margin:22px 0;background:var(--surface);font-size:14px;color:var(--muted)}
.info-strip .icon{margin-top:2px}
.empty{padding:30px 18px;text-align:center;border:1px dashed var(--line);border-radius:16px;margin:16px 0;color:var(--muted)}
.empty h3{color:var(--fg);margin-bottom:8px}
.playhead{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
.playhead h2{font-size:18px;min-width:0}
.playhead>.btn{flex-shrink:0}
.play-meta{display:flex;align-items:center;justify-content:space-between;margin:10px 0;font-size:15px}
.play-progress{margin-bottom:18px}
.timer{color:var(--blue);font-variant-numeric:tabular-nums;font-weight:700}
.timer.low{color:var(--ng)}
.tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:16px}
.question{font-size:21px;line-height:1.9;letter-spacing:.015em;font-weight:650;margin-bottom:18px}
.question:focus{outline:none}
.choose-label{font-size:13px;color:var(--muted);text-align:center;margin:18px 0 10px}
.choices{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.answer-btn{min-height:92px;border:2px solid var(--line);border-radius:14px;background:var(--surface);color:var(--fg);display:flex;flex-direction:column;align-items:center;justify-content:center}
.answer-btn span{font-size:36px;line-height:1.2;font-weight:650}
.answer-btn small{font-size:13px}
.answer-btn.selected{color:var(--blue);border-color:var(--blue);background:var(--pale)}
.answer-btn.right{color:var(--ok);border-color:var(--ok);background:var(--okbg);opacity:1}
.answer-btn.wrong{color:var(--ng);border-color:var(--ng);background:var(--ngbg);opacity:1}
.confidence-control{display:flex;align-items:center;gap:10px;min-height:44px;font-size:14px;margin-top:14px}
.confidence-control input{width:20px;height:20px;accent-color:#066be9}
.exam-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:14px}
.flag-btn{min-height:var(--control-compact);display:flex;align-items:center;gap:8px;border:1px solid var(--line);background:var(--surface);border-radius:var(--control-radius);padding:8px 12px;font-size:14px;font-weight:var(--control-weight);line-height:1.6}
.flag-btn[aria-pressed=true]{color:var(--gold);border-color:var(--gold);background:var(--goldbg)}
.exam-map{margin:18px 0;padding:4px 18px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
summary{cursor:pointer;min-height:44px;display:list-item;align-content:center;font-size:14px;font-weight:600;padding:10px 0}
summary::marker{color:var(--muted)}
.number-grid{display:grid;grid-template-columns:repeat(5,minmax(44px,1fr));gap:8px;margin:8px 0 14px}
.number-grid button{position:relative;min-height:var(--control-compact);border:1px solid var(--line);border-radius:var(--control-radius);background:var(--surface);font-size:15px;font-weight:var(--control-weight)}
.number-grid .done{background:var(--pale);color:var(--blue)}
.number-grid .ok{background:var(--okbg);color:var(--ok)}
.number-grid .ng{background:var(--ngbg);color:var(--ng)}
.number-grid .current{outline:2px solid var(--blue);outline-offset:1px}
.number-grid .flagged:after{content:"";position:absolute;right:5px;top:4px;width:6px;height:6px;border-radius:50%;background:var(--gold)}
.feedback{background:var(--okbg);border-left:3px solid var(--ok);border-radius:10px;padding:18px;margin:22px 0 14px}
.feedback h3{color:var(--ok);font-size:18px;margin-bottom:8px}
.feedback.incorrect{background:var(--ngbg);border-color:var(--ng)}
.feedback.incorrect h3{color:var(--ng)}
.feedback p{font-size:16px;line-height:1.9}
.feedback details{margin-top:8px}
.explanation{margin-top:14px}
.explanation .hintline{margin:14px 0}
.question-links{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:14px}
.source-link{font-size:13px;display:inline-flex;align-items:center;min-height:44px}
.replacement-note{padding:14px;border:1px solid var(--line);border-radius:10px;font-size:13px;color:var(--muted);margin:16px 0}
.replacement-note p{margin-top:5px}
.answer-next{margin-top:22px}
.review-schedule-note{padding:10px 0;color:var(--muted);font-size:13px}
.question-visual{border:1px solid var(--line);border-radius:13px;overflow:hidden;margin:16px 0;background:var(--surface)}
.question-visual-head,.fig-top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 14px;font-size:13px;font-weight:650;background:var(--bg)}
.question-visual-head .textbtn,.fig-top .textbtn{flex-shrink:0}
.sourced-pictures{display:flex;align-items:center;justify-content:center;gap:12px;padding:18px;background:#fff}
.sourced-pictures img{display:block;max-width:100%;max-height:300px;width:auto;height:auto;object-fit:contain}
.sourced-pictures.paired img{max-width:46%}
.sourced-pictures.stacked{flex-direction:column}
.sourced-pictures.stacked img+img{max-height:75px}
.question-visual>svg{display:block;width:100%;max-height:300px;background:white}
.visual-answer{padding:14px;font-size:14px;border-top:1px solid var(--line)}
.visual-answer p{margin-top:4px}
.image-credit{color:var(--muted);font-size:13px}
.image-credit a{display:inline-flex;align-items:center;min-height:44px}
.fig{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface);margin:12px 0}
.fig>svg{display:block;width:100%;height:auto;background:white;color:#243b53}
.figk{padding:12px 14px;font-size:13px;color:var(--muted)}
.figk b{display:block;color:var(--fg);margin-bottom:3px}
.fig[data-guide-figure]{scroll-margin-top:18px}
.fig[data-guide-figure]:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.fig-top>span{min-width:0}
.fig-top>.textbtn{flex-shrink:0;white-space:nowrap}
.guide-cards{display:grid}
.guide-card{display:grid;grid-template-columns:88px minmax(0,1fr);gap:14px;padding:18px 14px;align-items:start}
.guide-card+.guide-card{border-top:1px solid var(--line)}
.guide-card>img{display:block;width:88px;height:88px;object-fit:contain;background:#fff;border-radius:6px}
.guide-card-copy h4{margin:0 0 8px;font-size:15px;line-height:1.6}
.guide-card-copy p{margin:0;font-size:14px;line-height:1.8}
.guide-credit{font-size:12px;margin-top:6px}
.guide-card-wide{grid-template-columns:minmax(0,1fr)}
.guide-card-wide>img{width:100%;height:auto;max-height:340px;object-fit:contain}
.guide-source{padding:8px 14px;border-top:1px solid var(--line);font-size:12px}
.guide-table-wrap{width:100%;overflow-x:auto}
.guide-table{border-collapse:collapse;width:100%;table-layout:fixed;font-size:14px;line-height:1.8}
.guide-table th,.guide-table td{padding:12px;vertical-align:top;text-align:left;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.guide-table thead{background:var(--soft)}
.guide-table th:first-child{width:34%}
.guide-table tbody th{font-weight:600}
.guide-table tr:last-child>*{border-bottom:0}
.note-preview>img{width:100%;height:100%;object-fit:contain;padding:5px}
@media(max-width:380px){.guide-card{grid-template-columns:72px minmax(0,1fr);gap:10px;padding:16px 12px}.guide-card>img{width:72px;height:72px}.guide-card-wide{grid-template-columns:minmax(0,1fr)}.guide-card-wide>img{width:100%;height:auto}.guide-table th,.guide-table td{padding:10px}}
.inline-figure>summary{font-size:14px}
.result-label{font-size:18px}
.result-hero{display:flex;justify-content:space-between;align-items:center;gap:12px}
.result-character{width:100px;height:100px;object-fit:contain}
.score{font-size:64px;font-weight:800;line-height:1.25;letter-spacing:-.05em;color:var(--navy);margin:12px 0}
.score small{font-size:17px;letter-spacing:0;color:var(--muted);font-weight:500;margin-left:7px}
.result-achievement{position:relative;display:flex;align-items:center;gap:15px;margin:18px 0;padding:18px;background:var(--okbg);border:1px solid var(--line);border-radius:15px;overflow:hidden;color:var(--ok)}
.result-achievement.perfect{background:var(--stampbg);color:var(--stamp)}
.result-achievement.retry,.result-achievement.practice{background:var(--bg);color:var(--fg)}
.achievement-copy h3{font-size:19px}
.achievement-copy p{font-size:13px;margin-top:3px}
.achievement-copy small{display:block;font-size:13px;margin-top:6px;color:var(--muted)}
.flower-stamp{width:74px;height:74px;flex-shrink:0;color:var(--stamp);fill:none;stroke:currentColor;stroke-width:2.5}
.flower-stamp text{fill:currentColor;stroke:none;font-size:23px;font-weight:800}
.achievement-symbol{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:var(--surface);flex-shrink:0}
.achievement-symbol .icon{width:28px;height:28px}
.comparison{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}
.comparison>div{padding:14px;background:var(--bg);border-radius:12px}
.comparison span{display:block;color:var(--muted);font-size:13px}
.comparison b{font-size:21px;color:var(--navy)}
.comparison small{font-size:13px}
.result-actions{display:grid;gap:10px;margin:22px 0 4px}
.result-confetti{position:absolute;inset:0;pointer-events:none}
.result-confetti i{position:absolute;left:var(--x);top:-10px;width:5px;height:9px;background:var(--color);animation:confetti 1s var(--delay) both}
.celebrate>.flower-stamp{animation:stamp .55s both}
@keyframes confetti{from{opacity:1;transform:translateY(0) rotate(0)}
to{opacity:0;transform:translateY(160px) rotate(var(--spin))}
}
@keyframes stamp{0%{transform:rotate(-18deg) scale(1.6);opacity:0}
65%{transform:rotate(-7deg) scale(.96);opacity:1}
100%{transform:rotate(-9deg) scale(1);opacity:1}
}
.review-item{background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:4px 16px;margin-top:10px}
.review-item>summary{display:flex;align-items:flex-start;gap:12px;font-size:14px}
.answer-status{display:grid;place-items:center;min-width:28px;height:28px;border-radius:50%;background:var(--ngbg);color:var(--ng);font-weight:700;margin-top:3px}
.answer-status.ok{background:var(--okbg);color:var(--ok)}
.review-body{padding:10px 0 18px;font-size:15px}
.review-body p{margin:8px 0}
.note-grid{display:grid;gap:10px;margin-top:18px}
.note{border:1px solid var(--line);border-radius:14px;background:var(--surface);overflow:hidden}
.note>summary{display:flex;align-items:center;gap:14px;padding:15px}
.note-summary-copy{flex:1;min-width:0}
.note-summary-copy strong{font-size:16px;line-height:1.5;display:block}
.note-summary-copy small{font-size:13px;color:var(--muted);display:block;margin-top:3px}
.note-preview{display:flex;align-items:center;justify-content:center;width:80px;height:60px;flex-shrink:0;background:#fff;border:1px solid #e1e7ed;border-radius:8px;overflow:hidden}
.note-preview svg{width:100%;max-height:100%}
.note-preview>.icon{color:#163753;width:26px;height:26px}
.note-content{padding:0 18px 20px}
.note-keypoints{padding:16px;background:var(--pale);border-radius:12px}
.note-keypoints ul{padding-left:20px;margin:8px 0 0;font-size:15px}
.note-keypoints li+li{margin-top:6px}
.note-caution{border-left:3px solid var(--gold);padding:4px 14px;margin:22px 0}
.note-caution p{font-size:16px;margin-top:6px}
.note-bottom{display:grid;gap:6px}
.toolbar{display:flex;gap:8px;align-items:stretch;margin:18px 0}
.toolbar input,.toolbar select{min-height:48px;border:1px solid var(--line);background:var(--surface);color:var(--fg);border-radius:10px;padding:10px 12px;min-width:0;font-size:16px}
.toolbar input{flex:1;width:100px}
.toolbar select{max-width:45%;font-size:14px}
.history-row{border-bottom:1px solid var(--line);padding:12px 0;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:14px}
.history-row b{font-size:19px}
.history-row small{display:block;color:var(--muted)}
.legacy-label{font-size:13px;color:var(--muted);margin:12px 0}
.details-list{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0}
.details-list>div{background:var(--bg);border-radius:10px;padding:12px}
.details-list b{display:block;font-size:21px}
.details-list span{color:var(--muted);font-size:13px}
.bottom-tabs{position:fixed;z-index:20;left:50%;bottom:0;transform:translateX(-50%);width:100%;max-width:880px;background:var(--surface);border-top:1px solid var(--line);display:flex;padding:7px 20px calc(7px + env(safe-area-inset-bottom));box-shadow:0 -4px 20px #142d4310}
.bottom-tabs button{position:relative;flex:1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;min-height:54px;border:0;border-radius:10px;background:transparent;font-size:13px;font-weight:700;color:var(--muted)}
.bottom-tabs button[aria-selected=true]{color:var(--blue);background:var(--pale)}
.bottom-tabs button .icon{width:26px;height:26px}
.nav-dot{position:absolute;width:7px;height:7px;background:var(--blue);border-radius:50%;top:7px;left:calc(50% + 11px)}
.bottom-tabs button:disabled{opacity:.4}
.footer{color:var(--muted);font-size:12px;margin:26px 0 0;border-top:1px solid var(--line);padding-top:10px}
.footer p{margin:10px 0}
.footer summary{font-size:13px}
.modal,.figure-dialog{border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--fg);width:calc(100% - 28px);max-width:540px;max-height:calc(100dvh - 48px);padding:24px;overflow:auto;box-shadow:0 22px 100px #091e4245}
.modal::backdrop,.figure-dialog::backdrop{background:#0b213975;backdrop-filter:blur(3px)}
.modal h2{font-size:23px;margin-bottom:12px}
.modal h3{margin:20px 0 8px}
.modal p{margin:8px 0}
.modal .settings-group{border-top:1px solid var(--line);padding:14px 0}
.settings-group h3{margin:0 0 8px;font-size:16px}
.settings-group .seg{margin:10px 0}
.figure-dialog{max-width:800px;padding:18px}
.figure-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px}
.figure-toolbar label{display:flex;gap:6px;align-items:center;min-width:0;font-size:13px}
.figure-toolbar input{width:130px;max-width:36vw;min-height:44px}
.figure-scroll{overflow:auto;max-height:70dvh}
.figure-dialog .sourced-pictures img{width:auto;max-height:none}
.figure-dialog .sourced-pictures.single img{max-width:100%;width:100%}
.figure-dialog .question-visual .textbtn,.figure-dialog .fig-top .textbtn{display:none}
.toast{position:fixed;z-index:60;left:50%;bottom:calc(90px + env(safe-area-inset-bottom));transform:translateX(-50%);max-width:calc(100% - 32px);width:max-content;padding:12px 20px;border-radius:12px;background:#163753;color:#fff;font-size:14px;box-shadow:0 4px 20px #0003}
.storage-warning,.notice{padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--pale);font-size:14px;margin-bottom:18px}
.storage-warning{background:var(--ngbg);color:var(--ng)}
.notice p+p{margin-top:8px}
.skip-link{position:fixed;left:12px;top:-80px;background:var(--surface);padding:12px;z-index:100}
.skip-link:focus{top:12px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

@media(min-width:650px){.shell{padding-left:30px;padding-right:30px}
.header{padding-top:32px}
.category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.mock-grid{gap:14px}
.set-card{min-height:105px;padding:16px 20px}
.set-card b{font-size:20px}
.set-card small{font-size:14px}
.question-card{padding:30px}
.question{font-size:23px}
.note-grid{grid-template-columns:1fr}
.bottom-tabs{border-left:1px solid var(--line);border-right:1px solid var(--line);border-radius:18px 18px 0 0}
.result-character{width:135px;height:135px}
}

@media(max-width:374px){.shell{padding-left:14px;padding-right:14px}
.header{gap:8px}
.brand{gap:8px}
.brand h1{font-size:18px}
#brandmark{width:34px;height:34px}
.page-heading h2{font-size:24px}
.card{padding:18px}
.set-card{padding:11px 12px;min-height:90px}
.set-card .flower-stamp{width:44px;height:44px}
.category-card{gap:7px;padding:14px 10px}
.category-card>.icon{width:20px;height:20px}
.category-copy strong{font-size:13px}
.seg button{padding:8px 12px}
.question{font-size:20px}
.review-row{padding:13px;gap:8px}
.review-row>.icon:first-child{display:none}
.number-grid{gap:6px}
.result-character{width:80px;height:80px}
.achievement-copy h3{font-size:17px}
.flower-stamp{width:60px;height:60px}
}

@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
.result-confetti{display:none}
}

html[data-reduce-motion=true] *{animation:none!important;transition:none!important}
html[data-reduce-motion=true] .result-confetti{display:none}


/* Home keeps the adopted character beside real progress, clear of study controls. */
.home-overview{display:flex;align-items:center;gap:12px;margin:10px 0 18px}
.home-overview .achievement-progress{flex:1;min-width:0;margin:0}
.home-character{display:block;width:108px;height:68px;object-fit:contain;flex-shrink:0}
.exam-active .shell{padding-bottom:calc(28px + env(safe-area-inset-bottom))}
.set-card>span:first-child,.result-hero>div,.achievement-copy{min-width:0}
@media(max-width:649px){
 .header{padding:20px 0 22px}
 .home-character{width:92px;height:60px}
 .mock-grid,.category-grid{gap:10px}
 .achievement-progress .inline{gap:4px}
 .achievement-progress small{font-size:13px}
 .result-achievement{padding:16px 14px;gap:12px}
 .achievement-copy h3{font-size:18px}
}

.result-label{text-wrap:pretty}
.result-character{height:auto;aspect-ratio:175/99}
.result-achievement .flower-stamp{width:74px;height:74px}
@media(max-width:649px){.result-character{width:100px}.result-achievement .flower-stamp{width:68px;height:68px}}

/* Leave the long next-action label enough room on narrow question cards. */
.category-copy strong{text-wrap:balance}
.toolbar select{font-size:16px}
@media(max-width:649px){
 .question-card>.btnrow{display:grid;grid-template-columns:minmax(64px,.55fr) minmax(0,1.45fr)}
 .question-card>.btnrow>.btn{padding:10px 12px}
}

/* 2026-10-12: carry the approved visual treatment into the 500-question flow. */
body{-webkit-text-size-adjust:100%}
.header{padding:18px 0 22px}
#brandmark,.eyebrow{display:none}
.brand h1{font-size:21px;font-weight:800;letter-spacing:-.035em}
.card{border-radius:12px;box-shadow:none}
.home-intro{display:flex;align-items:center;justify-content:space-between;gap:4px;margin:0 0 26px}
.home-intro h2{font-size:32px;font-weight:800;line-height:1.4;letter-spacing:-.035em}
.home-intro p{font-size:13px;margin-top:10px}
.home-intro .home-character{width:160px;height:auto;aspect-ratio:175/99}
.mock-heading{margin-bottom:14px}
.mock-heading h3{font-size:20px}
.home-overview{margin:0 0 20px}
.achievement-progress b{font-size:23px}
.progress{height:5px}
.mock-grid{gap:10px}
.set-card{background:var(--soft);border-color:transparent;border-radius:12px;min-height:92px;padding:12px}
.set-card .badge{border:0;background:transparent;padding:0;font-weight:500}
.set-card:has(.flower-stamp){border-color:var(--stampline)}
.set-card.perfect{border-color:var(--stamp)}
.set-card .flower-stamp{width:52px;height:52px;transform:rotate(-9deg)}
.category-card{position:relative;display:flex;flex-direction:column;gap:10px;padding:15px 14px;background:var(--soft);border:1px solid transparent;border-radius:10px}
.category-card>.icon{margin:0;color:var(--muted);width:28px;height:28px}
.category-card>.card-chevron{position:absolute;right:14px;top:16px}
.category-copy{display:flex;flex-direction:column;width:100%}
.category-copy strong{font-size:15px;line-height:1.5;min-height:0;text-wrap:balance}
.category-copy small{margin:7px 0 10px;line-height:1.6}
.category-status{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:7px 0 10px}
.category-status small{margin:0}
.category-review-badge{display:inline-block;border-radius:5px;background:var(--ngbg);color:var(--ng);padding:2px 6px;font-size:12px;font-weight:650;line-height:1.5;white-space:nowrap}
.category-copy .progress{margin-top:auto;height:4px}
.notes-entry{background:var(--soft);border:0;border-radius:12px}
.review-stats{gap:0;border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:18px 0}
.review-stats>div{background:transparent!important;border:0;border-radius:0;padding:0 18px}
.review-stats>div+div{border-left:1px solid var(--line)}
.review-stats strong{font-size:34px}
.review-row{border:0;border-bottom:1px solid var(--line);border-radius:0;padding:16px 2px;margin:0;background:transparent}
.info-strip{border:0;border-radius:10px;background:var(--soft);padding:16px}
.focused-view .header{display:none}
.focused-view #main{padding-top:18px}
.play-active .shell{padding-bottom:calc(28px + env(safe-area-inset-bottom))}
.question-card{padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.playhead{margin-bottom:10px}
.playhead h2{font-size:16px;text-align:right}
.play-progress{margin-bottom:22px;height:4px}
.question{font-size:21px;font-weight:650;line-height:1.8;letter-spacing:0}
.answer-btn{border-radius:var(--control-radius);min-height:86px}
.answer-btn span{font-size:38px}
.answer-btn small{font-size:14px}
.exam-map{background:var(--soft);border:0;border-radius:10px;padding:4px 14px 14px}
.feedback{scroll-margin-top:18px;border-radius:9px}
.feedback:focus{outline:none}
.replacement-note{border:0;border-top:1px solid var(--line);border-radius:0;padding:14px 0}
.question-visual-head,.fig-top{background:var(--soft)}
.sourced-pictures{padding:12px}
.result-card{background:transparent}
.result-label{font-size:16px;font-weight:650;color:var(--muted)}
.result-greeting{font-size:23px;font-weight:750;margin:18px 0 4px;letter-spacing:-.02em}
.result-hero{gap:10px;min-height:120px}
.result-character{width:160px;height:auto}
.score{color:var(--blue);font-size:78px;font-weight:800;margin:0;line-height:1.18}
.score small{font-size:16px;margin-left:5px;letter-spacing:0}
.accuracy{display:inline-flex;gap:6px;align-items:center;background:var(--okbg);color:var(--ok);border-radius:20px;padding:2px 12px;font-size:13px;font-weight:650}
.accuracy strong{font-size:21px;line-height:1.5}
.accuracy small{font-size:13px}
.result-achievement{background:var(--stampbg);color:var(--stamp);border:1px solid var(--stampline);border-radius:12px;padding:14px;gap:12px;margin:20px 0 16px}
.result-achievement.perfect{border-color:var(--stamp)}
.result-achievement.retry,.result-achievement.practice,.result-achievement.complete{background:var(--soft);border-color:transparent;color:var(--fg)}
.result-achievement .flower-stamp{width:96px;height:96px;transform:rotate(-9deg)}
.achievement-copy h3{font-size:19px;line-height:1.55;color:var(--fg)}
.achievement-copy h3 span{display:inline-block;white-space:nowrap}
.achievement-copy p{color:var(--fg);font-size:13px}
.achievement-copy small{font-size:13px;line-height:1.6}
.comparison{gap:0;border-bottom:1px solid var(--line);border-top:1px solid var(--line);margin:18px 0;padding:12px 0}
.comparison>div{background:transparent;padding:0 12px;border-radius:0}
.comparison>div:first-child{padding-left:0}
.comparison>div+div{border-left:1px solid var(--line)}
.comparison b{font-size:20px}
.result-weak{margin:24px 0 18px}
.result-weak h3{font-size:21px;letter-spacing:-.03em}
.result-weak>p{margin:5px 0 12px}
.weak-topic{display:flex;align-items:center;gap:10px;min-height:55px;width:100%;text-align:left;background:transparent;border:0;border-top:1px solid var(--line);padding:10px 2px}
.weak-topic>span{flex:1;min-width:0;font-size:15px;font-weight:650}
.weak-topic>strong{font-size:19px;white-space:nowrap}
.weak-topic small{font-size:13px;font-weight:500;margin-left:3px}
.weak-topic>.icon:last-child{width:17px;color:var(--muted)}
.guided-record{display:flex;gap:12px;align-items:center;margin:12px 0}
.guided-record .flower-stamp{width:56px;height:56px}
.note-group{margin-top:26px}
.note-group-title{display:flex;align-items:center;gap:8px;font-size:17px;margin-bottom:12px}
.note-group-title small{margin-left:auto;color:var(--muted);font-size:13px;font-weight:400}
.note-group-title>.icon{width:24px;height:24px;color:var(--muted)}
.notes-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.notes-heading>div{min-width:0}
.section-character{display:block;width:65px;height:78px;object-fit:contain;flex:none}
.note-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;margin-top:0;gap:10px}
.note{border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.note>summary{padding:12px;gap:13px;min-height:102px}
.note>summary::after{content:'＋';flex:none;color:var(--muted);font-size:20px;line-height:1}
.note[open]{grid-column:1/-1}
.note[open]>summary{background:var(--soft);border-bottom:1px solid var(--line)}
.note[open]>summary::after{content:'−'}
.note-preview{width:92px;height:70px}
.note-summary-copy strong{font-size:15px}
.note-content{padding:20px}
.note-keypoints{padding:0 0 10px;background:transparent;border-radius:0}
.note-keypoints h3,.note-caution h3{font-size:17px}
.note-keypoints ul{font-size:16px;line-height:1.8}
.note-caution{border-left:3px solid var(--blue);background:var(--pale);padding:15px 17px;border-radius:8px}
.note-empty .textbtn{display:flex;margin:10px auto 0}
.character-credit{margin-top:8px}
.character-credit a{display:inline-flex;align-items:center;min-height:44px;color:var(--blue)}
.character-credit p{overflow-wrap:anywhere}
.bottom-tabs{box-shadow:none;border-radius:0;padding-top:5px;padding-bottom:calc(5px + env(safe-area-inset-bottom))}
.bottom-tabs button{border-radius:0;background:transparent;min-height:54px;padding-bottom:6px}
.bottom-tabs button[aria-selected=true]{background:transparent;color:var(--blue)}
.bottom-tabs button[aria-selected=true]:after{content:'';position:absolute;bottom:0;width:26px;height:3px;border-radius:3px;background:var(--blue)}
@media(min-width:650px){
 .home-intro{justify-content:flex-start;gap:44px;margin-bottom:30px}
 .home-intro h2{font-size:37px}
 .home-intro .home-character{width:220px}
 .home-intro p{font-size:15px}
 .category-card{padding:20px;gap:12px}
 .category-copy strong{font-size:16px}
 .question{font-size:23px}
 .question-card{padding:0}
 .focused-view .shell{max-width:760px}
 .result-character{width:220px}
 .score{font-size:90px}
 .result-greeting{font-size:26px}
 .result-hero{min-height:150px;max-width:600px}
}
@media(max-width:649px){
 .note-grid{grid-template-columns:1fr}
 .note>summary{min-height:92px;gap:10px}
 .note-preview{width:86px;height:64px}
 .note-content{padding:16px}
 .result-achievement .flower-stamp{width:76px;height:76px}
}
@media(max-width:374px){
 .brand h1{font-size:19px}
 .home-intro h2{font-size:29px}
 .home-intro .home-character{width:140px}
 .home-intro p{font-size:13px}
 .category-card{padding:14px 12px}
 .category-copy strong{font-size:15px}
 .question{font-size:20px}
 .result-character{width:140px}
 .score{font-size:70px}
 .achievement-copy h3{font-size:18px}
 .result-achievement{padding:12px;gap:10px}
}

/* Approved character placements; keep teaching diagrams and answer controls clear. */
.placement-character{display:block;object-fit:contain;flex:none;pointer-events:none}
.character-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.character-heading>div{min-width:0;flex:1}
.character-heading h2{text-wrap:balance}
.learn-guide{width:62px;height:85px}
.review-guide{width:76px;height:80px}
.review-empty{display:flex;align-items:center;gap:12px;text-align:left}
.empty-message{min-width:0;flex:1}
.empty-guide{width:82px;height:90px}
.caution-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.caution-heading h3{min-width:0;margin:0}
.caution-guide{width:46px;height:56px}
.result-character.placement-character{aspect-ratio:175/99}
.result-character.placement-character.result-character-solo{width:88px;height:100px;aspect-ratio:auto}
@media(min-width:650px){.result-character.placement-character.result-character-solo{width:96px;height:110px}}
@media(max-width:380px){.result-character.placement-character.result-character-solo{width:80px;height:92px}}
@media(min-width:650px){.learn-guide{width:70px;height:96px}.review-guide{width:85px;height:92px}}
@media(max-width:380px){.character-heading{gap:8px}.character-heading h2{font-size:23px}.empty-guide{width:66px;height:80px}.review-empty{gap:8px}}

.heading-phrase{display:inline-block}

/* Final layout polish: quiet surfaces, shared card rhythm and focused actions. */
#learn .character-heading{margin-bottom:16px}
.recommend{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:76px;border:0;background:var(--soft);color:var(--fg);border-radius:12px;padding:12px 16px 12px 20px;margin:0 0 14px;text-align:left;overflow:hidden}
.recommend:before{content:'';position:absolute;inset:0 auto 0 0;width:4px;background:var(--blue)}
.recommend strong{display:block;font-size:18px;font-weight:var(--control-weight);line-height:1.5}
.recommend small{display:block;color:var(--muted);font-size:12px;font-weight:400;line-height:1.6;margin-top:3px}
.recommend>.icon:first-child{width:26px;height:26px;color:var(--blue)}
.recommend>.icon:last-child{width:18px;height:18px;color:var(--muted)}
.learning-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;padding:12px 0;border-block:1px solid var(--line)}
.learning-overview>div{min-width:0;text-align:center;padding:0 6px}
.learning-overview>div+div{border-left:1px solid var(--line)}
.learning-overview dt{font-size:11px;color:var(--muted)}
.learning-overview dd{margin:3px 0 0;font-size:24px;font-weight:750;line-height:1.3;font-variant-numeric:tabular-nums}
.learning-overview small{font-size:11px;font-weight:500;margin-left:2px;white-space:nowrap;color:var(--muted)}
.category-card{border-radius:12px;gap:12px}
.category-copy{flex:1}
.category-copy>strong{min-height:3em;display:flex;align-items:center;text-wrap:pretty}
.category-status{justify-content:space-between;gap:4px;margin:6px 0 2px;min-height:29px}
.category-status small{font-size:12px;white-space:nowrap}
.category-accuracy{font-size:12px;color:var(--muted);white-space:nowrap}
.category-accuracy b{font-size:22px;font-weight:750;line-height:1.3;color:var(--fg);font-variant-numeric:tabular-nums}
.category-accuracy b span{font-size:12px;margin-left:1px}
.category-copy .category-answer-count{font-size:11px;margin:0 0 10px}
.learn-metric-note{font-size:12px;line-height:1.6;margin:0 0 12px}
.learning-metric-help{font-size:12px;line-height:1.6;margin:10px 0 6px}
.learning-cumulative{font-size:12px;color:var(--muted);margin:0 0 16px}
.learning-cumulative summary{cursor:pointer;padding:8px 0}
.recent-mock{font-size:11px!important;line-height:1.6;overflow-wrap:anywhere}
.category-sort{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 12px;font-size:12px}
.category-sort .seg{margin:0}
.note-recommendations{background:var(--soft);padding:14px;border-radius:12px;margin:0 0 18px}
.note-recommendations h3{font-size:15px;margin:0 0 8px}
.note-recommendation{display:flex;align-items:center;gap:8px;width:100%;min-height:48px;text-align:left;background:transparent;border:0;border-bottom:1px solid var(--line);color:var(--fg);padding:10px 0}
.note-recommendation:last-child{border-bottom:0}
.note-recommendation span{flex:1;font-size:14px}
.note-recommendation small{font-size:11px;white-space:nowrap;color:var(--muted)}
.note-recommendation .icon{width:16px;height:16px;flex:none}
.category-copy .category-coverage{font-size:11px;margin:8px 0 0}
.category-copy .category-sample-note{font-size:11px;margin:3px 0 0;color:var(--muted)}
.result-review-count{font-size:14px;line-height:1.7;margin:0 0 10px}
#result-review-plan{width:100%}
.weak-topic>.topic-answer-count,.weak-topic>.topic-sample-note,.weak-topic>.topic-review-count,.weak-topic>.textbtn{grid-column:1/-1}
.weak-topic>.topic-answer-count,.weak-topic>.topic-sample-note,.weak-topic>.topic-review-count{font-size:11px;color:var(--muted);line-height:1.6}
.weak-topic>.textbtn{justify-content:flex-start;text-align:left;white-space:normal}
article.weak-topic>strong{font-size:18px}
.category-review-badge{font-size:11px;padding:2px 5px}
.category-copy .progress{height:4px}
.weak-topics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}
.weak-topic{position:relative;display:grid;grid-template-columns:1fr auto;gap:8px;align-content:start;min-height:138px;border:1px solid transparent;border-radius:12px;background:var(--soft);padding:14px;text-align:left}
.weak-topic>.icon:first-child{grid-column:1;grid-row:1;color:var(--muted);width:28px;height:28px}
.weak-topic>.icon:last-child{position:absolute;right:14px;top:16px;width:18px;height:18px;color:var(--muted)}
.review-row>.icon:last-child{width:18px;height:18px;color:var(--muted)}
.weak-topic>span{grid-column:1/-1;min-height:3em;display:flex;align-items:center;font-size:15px;line-height:1.5;text-wrap:pretty}
.weak-topic>strong{grid-column:1/-1;font-size:21px;line-height:1.3;color:var(--blue)}
.weak-topic small{font-size:12px}
.weak-topic:hover{box-shadow:0 0 0 2px var(--pale)}
.learning-next-bar{position:sticky;bottom:0;z-index:5;background:var(--bg);border-top:1px solid var(--line);padding:12px 0 calc(12px + env(safe-area-inset-bottom));margin-top:20px}
.learning-next-bar>.secondary{flex:0 0 28%}
#play .feedback,#play .explanation{scroll-margin-bottom:100px}
/* Answered learning/review: outcome, key point, then the original question. */
.answer-layout{scroll-margin-top:18px}
.answer-layout .tags{margin-bottom:14px}
.feedback.answer-result{border:0;border-radius:0;background:transparent;padding:0;margin:0 0 22px;scroll-margin-top:18px}
.answer-result .answer-state{display:inline-flex;align-items:center;gap:7px;padding:5px 10px;border-radius:7px;background:var(--okbg);color:var(--ok);font-size:14px;font-weight:700;line-height:1.6}
.answer-state .icon{width:18px;height:18px}
.answer-result.incorrect .answer-state{background:var(--ngbg);color:var(--ng)}
.answer-result-title{display:flex;align-items:baseline;gap:12px;margin:12px 0 8px;font-size:30px;line-height:1.25;letter-spacing:0;font-weight:750}
.answer-result-title strong{font-size:44px;font-weight:700}
.answer-result .answer-choice{display:inline-flex;align-items:center;gap:14px;padding:4px 11px;border-radius:6px;color:var(--muted);background:var(--soft);font-size:13px;line-height:1.5}
.answer-choice strong{font-size:23px;line-height:1.35;color:var(--ok)}
.answer-result.incorrect .answer-choice{background:var(--ngbg)}
.answer-result.incorrect .answer-choice strong{color:var(--ng)}
.answer-result .answer-uncertain{color:var(--muted);font-size:13px;line-height:1.7;margin-top:10px}
.learning-points,.answered-question{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:18px;margin:0 0 16px}
.learning-points>h3{display:flex;align-items:center;gap:9px;font-size:17px;color:var(--blue);margin:0 0 14px;letter-spacing:0}
.learning-points>h3 .icon{width:21px;height:21px}
.point-main{font-size:18px;font-weight:650;line-height:1.8}
.point-rules{display:grid;gap:10px;margin:0}
.point-rules>div{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:start;padding:13px 12px;background:var(--soft);border-radius:8px}
.point-rules dt{font-size:12px;line-height:1.6;font-weight:650;color:var(--muted);padding-top:3px;white-space:nowrap}
.point-rules dd{font-size:16px;font-weight:650;line-height:1.75;margin:0}
.point-rules>.point-exception{background:var(--pale)}
.point-exception dt,.point-exception dd{color:var(--blue)}
.point-detail{border-top:1px solid var(--line);padding-top:14px;margin-top:16px}
.point-detail h4{color:var(--muted);font-size:13px;margin-bottom:6px;font-weight:600}
.point-detail p{font-size:15px;line-height:1.85}
.point-detail p+p{margin-top:8px}
.answered-question{padding:0;overflow:hidden}
.answered-question>summary{list-style:none;display:flex;align-items:center;gap:9px;min-height:52px;padding:13px 18px;font-size:15px}
.answered-question>summary::-webkit-details-marker{display:none}
.answered-question>summary>.icon{width:19px;height:19px;color:var(--blue)}
.question-chevron{margin-left:auto;font-size:22px;line-height:1;color:var(--muted);transform:rotate(-90deg)}
.answered-question[open] .question-chevron{transform:none}
.answered-question-body{padding:0 18px 18px}
.answered-question .question{font-size:15px;font-weight:450;line-height:1.85;letter-spacing:0;margin:0}
.answered-question .question-visual{margin:16px 0 0}
.answer-layout>.explanation{margin-top:0}
.answer-layout .question-links{gap:4px 12px}
.review-schedule-note{display:flex;align-items:flex-start;gap:7px;line-height:1.8}
.review-schedule-note>.icon{height:16px;width:16px;margin-top:4px;color:var(--muted)}
.review-remaining{display:inline-block;margin-left:10px}
.answer-layout>.learning-next-bar{margin-top:12px;gap:10px}
@media(max-width:374px){.learning-points{padding:15px}.answered-question>summary{padding:12px 15px}.answered-question-body{padding:0 15px 15px}.point-rules>div{gap:8px;padding:11px 10px}.point-rules dd{font-size:15px}.review-remaining{display:block;margin-left:0}}
@media(min-width:650px){.answer-layout .learning-points,.answer-layout .answered-question{max-width:100%}.answer-result-title{font-size:34px}.answer-result-title strong{font-size:48px}.point-rules dd{font-size:18px}.answered-question .question{font-size:17px}}
@media(min-width:650px){.recommend strong{font-size:20px}.learning-overview{padding:16px 0}.learning-overview dt{font-size:13px}.learning-overview dd{font-size:28px}.learning-overview small{font-size:13px}.category-copy>strong{min-height:1.5em}.weak-topics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:374px){.recommend{padding:13px 12px 13px 16px;gap:10px}.recommend strong{font-size:16px}.category-status small{font-size:11px}.category-review-badge{font-size:10px;padding:2px 4px}.weak-topic{padding:12px}.weak-topic>span{font-size:14px}}

/* Immediate review and recommended timing are separate. */
.review-now-card{padding:24px;border:1px solid var(--line);border-radius:18px;margin-bottom:18px}
.review-now-card h3{margin:0;font-size:18px}
.review-now-count{font-size:56px;line-height:1.2;font-weight:800;color:var(--blue);margin:12px 0 20px}
.review-now-count small{font-size:22px;margin-left:8px}
.review-timing,.review-again-card{padding:20px;border-radius:16px;background:var(--pale);margin:18px 0}
.review-timing h3{display:flex;align-items:center;gap:8px;font-size:17px;margin:0 0 12px}
.review-timing .review-stats{margin:0}
.review-graduation{margin:24px 0}
.review-again-card.review-schedule-note{display:block}
.review-again-card h3{font-size:17px;margin:0 0 16px}
.review-again-card p{display:flex;align-items:center;gap:8px;margin:16px 0 8px;font-size:14px}
.review-again-card small{display:block;line-height:1.7}
#practice-dialog .question{font-size:20px;line-height:1.8}
#practice-feedback:not(:empty){padding:16px 0}
#practice-dialog>.btn{margin-top:20px}
@media(max-width:374px){.review-now-card,.review-timing,.review-again-card{padding:16px}.review-again-card h3{font-size:16px}}

.review-row:disabled{opacity:1;cursor:default;color:var(--muted);background:var(--soft)}
.review-row .review-progress{margin-top:4px;color:var(--fg)}
.review-row .review-row-status{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;white-space:nowrap}
.review-row-status .icon{width:16px;height:16px}
.review-again-card p{margin:0 0 8px;line-height:1.7}

/* Keep recent performance primary; achievement stamps represent the best score. */
#mock .set-card{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:8px;padding:14px 12px}
.mock-card-heading{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:34px}
#mock .mock-card-heading b{font-size:18px}
#mock .mock-card-heading .flower-stamp{width:34px;height:34px;flex:none}
.mock-latest{display:flex;align-items:baseline;gap:5px;flex-wrap:wrap}
#mock .mock-latest strong{font-size:28px;line-height:1.2;font-weight:700;font-variant-numeric:tabular-nums}
.mock-latest strong span{font-size:13px;margin-left:2px;font-weight:500}
#mock .mock-outcome{font-size:12px}
#mock .mock-outcome.is-pass{color:var(--ok)}
#mock .mock-best{font-size:12px}
.mock-unanswered{font-size:14px;color:var(--muted);padding:8px 0}
#mock .in-progress .mock-best,#mock .in-progress .mock-unanswered{color:var(--blue)}
#detail-content .recent-mock{font-size:14px!important;color:var(--muted)}

/* Learning methods share one prominent entry point. */
.learn-switch{display:grid;grid-template-columns:1fr 1fr;gap:0;border-bottom:1px solid var(--line);background:transparent;margin:16px 0 12px}
.learn-switch button{min-height:var(--control-height);border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;color:var(--muted);font-size:16px;font-weight:var(--control-weight);line-height:1.6;padding:10px 8px}
.learn-switch button[aria-selected=true]{color:var(--blue);border-bottom-color:var(--blue)}
.learn-count{font-size:13px;margin:0 0 12px;text-align:right}
.learn-notes-intro{font-size:14px;margin:0 0 16px}

/* Keep primary actions and learning content within easy reach. */
.header{padding:14px 0 16px}
.home-intro{margin-bottom:20px}
.home-intro p{margin-top:6px}
.mock-heading{margin-bottom:10px}
.home-overview{margin-bottom:14px}
#learn .character-heading,#review .character-heading{margin-bottom:14px}
.learn-guide{width:54px;height:72px}
.review-guide{width:68px;height:72px}
.learn-actions{display:grid;gap:10px;margin-bottom:14px}
#learn .learn-actions .recommend{margin:0;min-width:0}
.learning-overview{padding:10px 0}
.learning-overview dt,.learning-overview small{font-size:12px}
.learn-count{margin-bottom:6px}
#learn-categories>.seg{margin-top:8px;margin-bottom:12px}
.learn-notes-intro{margin-bottom:12px}

#detail .details-list{margin:14px 0 10px}
#detail .detail-pass{margin:0;font-size:14px}
#detail .detail-timer{display:flex;align-items:center;gap:6px;margin:8px 0 16px}
.detail-timer>.icon{width:17px;height:17px}
.detail-rules{margin-top:16px;border-block:1px solid var(--line)}
.detail-rules>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:10px 0;list-style:none;color:var(--muted);font-size:14px;font-weight:600;cursor:pointer}
.detail-rules>summary::-webkit-details-marker{display:none}
.detail-rules>summary:after{content:'＋';font-size:19px;font-weight:400;flex:none}
.detail-rules[open]>summary:after{content:'−'}
.detail-rules-body{padding-bottom:14px}
#detail .detail-rules-body h3{font-size:14px;margin:12px 0 4px}
#detail .detail-rules-body h3:first-child{margin-top:0}
#detail .detail-rules-body p{font-size:14px;color:var(--muted);margin:0}

.review-now-card{padding:20px;border-radius:12px;margin-bottom:14px}
.review-now-count{font-size:48px;margin:10px 0 16px}
.review-timing{padding:16px 18px;border-radius:12px;background:var(--soft);margin:14px 0}
.review-timing-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.review-timing h3{margin:0;font-size:15px;line-height:1.5}
.review-timing h3>.icon{width:20px;height:20px;color:var(--muted)}
.review-wait-count{font-size:25px;font-weight:750;line-height:1.3;white-space:nowrap;font-variant-numeric:tabular-nums}
.review-wait-count small{font-size:13px;font-weight:500;margin-left:4px}
.review-timing .review-next-time{font-size:15px;font-weight:650;margin-top:8px}
.review-timing .hintline{font-size:13px;margin-top:6px}
.review-timing.is-empty{padding:12px 16px;background:transparent;border:1px solid var(--line);color:var(--muted)}
.review-timing.is-empty .review-wait-count{font-size:18px;font-weight:650}
@media(min-width:650px){
 .home-intro{margin-bottom:22px}
 .learn-actions.has-resume{grid-template-columns:repeat(2,minmax(0,1fr))}
 .learn-guide{width:62px;height:82px}
 .review-guide{width:76px;height:82px}
 .learning-overview{padding:12px 0}
 .learning-overview dt,.learning-overview small{font-size:13px}
}

/* Compact study overview: keep explanatory detail available without delaying categories. */
#learn .character-heading{margin-bottom:10px;min-height:48px}
#learn .character-heading h2{font-size:23px;line-height:1.35}
#learn .learn-guide{width:40px;height:50px}
#learn .learn-actions{margin-bottom:10px}
#learn .recommend[data-action="quick-study"]{background:var(--action-bg);color:var(--action-fg);border-color:transparent;border-left:0;min-height:64px;padding:10px 14px}
#learn .recommend[data-action="quick-study"] .icon,#learn .recommend[data-action="quick-study"] small{color:inherit}
#learn .learning-cumulative{margin:0;font-size:13px}
#learn .learning-cumulative>summary{min-height:44px;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:6px 0;color:var(--blue);font-weight:650;list-style:none}
#learn .learning-cumulative>summary::-webkit-details-marker{display:none}
#learn .learning-cumulative>summary:after{content:'＋'}
#learn .learning-cumulative[open]>summary:after{content:'−'}
#learn .learning-cumulative p{margin:0 0 10px}
#learn .learn-switch{margin:0 0 10px}
.learn-controls{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:0 0 12px}
.learn-controls>.seg{margin:0;gap:4px;flex-wrap:nowrap;min-width:0}
.learn-controls .seg button{padding:8px 10px;font-size:13px;white-space:nowrap}
.category-sort-control{flex:none}
.category-sort-control select{min-height:44px;max-width:94px;font-size:13px;padding:8px 6px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--fg)}
#learn .category-card{gap:8px;padding:14px 12px}
#learn .category-copy>strong{min-height:0}
#learn .category-copy small{margin:4px 0}
@media(max-width:359px){.learn-controls{flex-wrap:wrap}.learn-controls .seg button{padding-inline:9px}#learn .character-heading h2{font-size:21px}}
@media(min-width:650px){#learn .character-heading h2{font-size:26px}.learn-controls{justify-content:flex-start;gap:16px}.learn-controls .seg button{padding-inline:16px}}

/* A single optional invitation; learning controls remain available. */
.shell{padding-top:env(safe-area-inset-top)}
.install-icon{flex:none;object-fit:cover;background:#066be9;border-radius:14px}
.install-prompt{position:fixed;z-index:25;left:50%;bottom:calc(76px + env(safe-area-inset-bottom));transform:translateX(-50%);width:calc(100% - 24px);max-width:440px;padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 36px #122d4726}
.install-prompt-heading,.install-guide-heading{display:flex;align-items:center;gap:12px}
.install-prompt-heading>div,.install-guide-heading>div{min-width:0}
.install-prompt h2{font-size:16px;line-height:1.5;letter-spacing:-.025em}
.install-prompt p{margin-top:3px;color:var(--muted);font-size:12px;line-height:1.65}
.install-prompt-actions{display:flex;align-items:center;gap:12px;margin-top:12px}
.install-prompt-actions>.btn:first-child{flex:1}
.install-prompt-actions>.secondary{flex:none}
.install-guide{padding:22px;max-width:440px;overflow:hidden}
.install-guide[open]{display:flex;flex-direction:column}
.install-guide-heading{margin-bottom:16px;flex-shrink:0}
#home-install-guide-body{overflow-y:auto;min-height:0}
.install-guide .install-app-name{font-size:12px;color:var(--muted);margin:0 0 2px}
.install-guide h2{margin:0;font-size:21px}
.install-guide h2:focus{outline:none}
.install-guide .install-platforms{display:flex;flex-wrap:nowrap;gap:8px;margin:0 0 12px}
.install-platforms button{flex:1}
.install-steps{list-style:none;counter-reset:install;margin:18px 0;padding:0;display:grid;gap:18px}
.install-steps li{counter-increment:install;display:flex;align-items:flex-start;gap:12px;line-height:1.55}
.install-steps li:before{content:counter(install);display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:var(--pale);color:var(--blue);font-size:14px;font-weight:750}
.install-steps li>span{min-width:0;flex:1}
.install-steps strong{font-size:16px;line-height:1.6}
.install-steps small{display:block;margin-top:3px;font-size:12px;color:var(--muted);line-height:1.7}
.install-share{width:21px;height:21px;margin-right:4px;color:var(--blue)}
.install-help{border-top:1px solid var(--line);margin-top:16px}
.install-help summary{display:flex;align-items:center;min-height:48px;padding:8px 0;color:var(--muted);font-size:12px;cursor:pointer;list-style:none;gap:8px}
.install-help summary::-webkit-details-marker{display:none}
.install-help summary:before{content:'+';color:var(--blue);font-size:18px}
.install-help[open] summary:before{content:'−'}
.install-help p{font-size:12px}
.install-records{padding:14px;background:var(--soft);border-radius:12px;margin:14px 0 16px}
.install-records strong{font-size:14px}
.install-records p{font-size:12px}
.install-native{margin:10px 0 0}
.install-safari-tip{margin:12px 0;padding:12px 14px;border-radius:12px;background:var(--pale);font-size:13px}
.install-safari-tip strong{color:var(--blue);font-size:13px}
.install-guide .install-safari-tip p{margin:4px 0 0;font-size:12px;line-height:1.7}
#home-install-close{margin-top:14px;flex-shrink:0}
body.play-active .install-prompt,body.focused-view .install-prompt{display:none!important}
@media(max-width:374px){.install-prompt{padding:14px}.install-prompt-heading{gap:10px}.install-prompt h2{font-size:15px}.install-prompt .install-icon{width:48px;height:48px}.install-guide{padding:18px}.install-guide h2{font-size:20px}}
@media(display-mode:standalone),(display-mode:fullscreen),(display-mode:minimal-ui){.install-prompt{display:none!important}}

.modal>[data-action="close-detail"],.modal>[data-action="close-settings"],.modal>[data-action="close-preview"]{margin-top:14px}
