/* JLPT N2 — a calm, consistent study workspace. */
:root[data-theme=modern]{--paper:#f7f5f0;--surface:#fffefa;--surface-soft:#eeece5;--ink:#233b3c;--muted:#5e6e6e;--blue:#244d4d;--blue-hover:#183c3c;--blue-soft:#e8f0ec;--vermilion:#a74332;--line:#dce1da;--control:#83938c;--green:#286448;--green-soft:#e7f2e9;--red:#a52e3e;--pink:#fbecee;--focus:#a74332;--radius-sm:12px;--radius:20px;--radius-lg:24px;--shadow:0 8px 28px #203d3a07;--accent-wash:#f6eae1}
:root[data-theme=cute]{--paper:#f8f5fc;--surface:#fffdfd;--surface-soft:#f0ebf6;--ink:#403954;--muted:#6b617e;--blue:#675084;--blue-hover:#503969;--blue-soft:#f0eaf6;--vermilion:#9f4867;--line:#e3dcec;--control:#9988ac;--green:#376849;--green-soft:#e9f3eb;--red:#a12e4c;--pink:#fff0f3;--focus:#805098;--radius-sm:14px;--radius:24px;--radius-lg:28px;--shadow:0 8px 28px #4e376c08;--accent-wash:#faeaf0}
html{background:var(--paper)}body{isolation:isolate;min-height:100dvh;background:none;display:flex;flex-direction:column}body::before{content:"";position:fixed;z-index:-1;pointer-events:none;inset:0;background:url("assets/fuji-header.webp") right -2vw bottom 3vh / min(58vw,760px) auto no-repeat;opacity:.13}[data-theme=cute] body::before{background-image:url("assets/study-fox.webp");background-size:min(42vw,520px);opacity:.1}
button,input,select,summary{transition:background 180ms ease,border-color 180ms ease,box-shadow 180ms ease,color 180ms ease}button,input,select,summary{min-height:44px}button{cursor:pointer}.button{border-radius:var(--radius-sm);font-size:14px;padding:13px 22px;min-height:48px}.primary{background:var(--blue);color:var(--surface)}.primary:hover:not(:disabled){background:var(--blue-hover);box-shadow:none}.secondary{border-color:var(--control);background:var(--surface)}.secondary:hover:not(:disabled){background:var(--blue-soft)}:focus-visible{outline:3px solid var(--focus);outline-offset:4px}h1,h2,h3{letter-spacing:-.035em}h1{font-size:clamp(30px,3.4vw,44px);line-height:1.2}p{line-height:1.75}.eyebrow{color:var(--vermilion);font-size:12px;letter-spacing:.08em}
/* Navigation */
.topbar{width:calc(100% - 64px);max-width:1120px;height:96px;padding:0;gap:24px;border-bottom:1px solid var(--line)}.brand{gap:14px;font-size:21px;letter-spacing:-.025em;flex-shrink:0}.brand .brand-mark{width:46px;height:46px;background:var(--blue);border:0;border-radius:14px;transform:none;color:var(--surface)}.brand-mark svg{width:26px;height:26px}.brand-sub{font-family:inherit;font-size:12px;letter-spacing:.04em;font-weight:500;margin-top:4px}.library-link{margin-left:auto;min-height:44px;border:0;background:var(--blue-soft);color:var(--blue);border-radius:12px;padding:12px 18px;font-weight:600;font-size:13px}.library-link:hover{background:var(--surface-soft)}.theme-control{display:flex;align-items:center;gap:12px}.theme-label{color:var(--muted);font-size:12px}.theme-options{display:flex;gap:4px;padding:4px;border:1px solid var(--line);background:var(--surface-soft);border-radius:14px}.theme-options button{display:flex;align-items:center;justify-content:center;gap:8px;padding:9px 12px;border:1px solid transparent;border-radius:10px;font-size:12px;font-weight:600;color:var(--muted);background:transparent;white-space:nowrap}.theme-options button[aria-pressed=true]{background:var(--surface);border-color:var(--control);color:var(--ink);box-shadow:0 2px 4px #283b5006}.theme-dot{display:block;width:8px;height:8px;border-radius:50%;flex-shrink:0}.modern-dot{background:#244d4d}.cute-dot{background:#805098}.theme-warning{max-width:1120px;margin:12px auto 0;padding:12px 24px;color:var(--red);font-size:13px}.theme-art-cute,.fox-greeting{display:none}
main{width:100%;max-width:1120px;margin:0 auto;padding:40px 0 64px;flex:1;min-width:0}.catalog-screen,.overview-screen{max-width:1040px;padding-top:56px}.catalog-heading{margin-bottom:36px}.catalog-heading h1{margin:0 0 16px}.catalog-heading h1:last-child{margin-bottom:0}.catalog-heading p:last-child{font-size:15px;color:var(--muted);margin-bottom:0}.practice-breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 32px;font-size:13px;color:var(--muted)}.practice-breadcrumb button{min-height:44px;padding:8px 12px;border:0;border-radius:8px;background:transparent;color:var(--muted);text-decoration:none}.practice-breadcrumb button:hover{background:var(--blue-soft);color:var(--blue)}.practice-breadcrumb strong{color:var(--ink);font-weight:600}.practice-breadcrumb>span{opacity:.6}
/* Library and exam selection */
.exam-catalog{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.exam-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);transition:border-color 180ms ease}.exam-card:hover{border-color:var(--control)}.exam-card-content{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:32px}.exam-card h2{font-size:28px;margin:0}.exam-card .button{width:auto;min-width:120px}.exam-card h2::before{content:"";display:block;width:32px;height:3px;border-radius:4px;background:var(--vermilion);margin-bottom:16px}
.combined-card{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:32px 36px;background:var(--blue);color:var(--surface);border:0;border-radius:var(--radius);margin:0 0 36px;box-shadow:none}.combined-card h2{font-size:26px;color:inherit;margin:0 0 8px}.combined-card p{color:inherit;opacity:.9;font-size:15px;margin:0 0 20px}.combined-stats{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.combined-stats strong{font-size:14px;font-weight:600;display:inline-flex;align-items:center;gap:8px}.combined-stats strong::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.7}.combined-card>.button{flex-shrink:0;background:var(--surface);color:var(--blue);min-width:160px}.combined-card>.button:hover:not(:disabled){background:var(--blue-soft)}.practice-section-title{font-size:20px;margin:0 0 20px}.section-catalog{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.section-card{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:28px;min-width:0;box-shadow:none}.section-ready{border-top:1px solid var(--line)}.section-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.section-order{font-size:13px;font-weight:600;color:var(--muted);font-variant-numeric:tabular-nums;display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:var(--surface-soft)}.availability{font-size:12px;font-weight:500;color:var(--muted);background:var(--surface-soft);padding:6px 10px;border-radius:8px;line-height:1.5}.availability.ready{background:var(--green-soft);color:var(--green)}.section-ja{font-family:'Noto Serif JP',serif;color:var(--vermilion);font-size:19px;letter-spacing:.03em}.section-card h2{font-size:25px;margin:8px 0 12px}.section-card>p{font-size:14px;color:var(--muted);margin-bottom:20px}.section-source{font-size:13px;color:var(--muted);margin-bottom:24px}.section-card-bottom{border-top:1px solid var(--line);padding-top:20px;margin-top:auto}.section-card-bottom small{font-size:12px;color:var(--green);margin-bottom:14px;line-height:1.6}.section-card-bottom .button{width:100%}.section-unavailable{background:var(--surface-soft);border:1px dashed var(--control)}.section-unavailable .section-order{background:var(--surface)}.availability-note{font-size:13px;color:var(--muted);margin:0}.active-draft{background:var(--blue-soft);border:1px solid var(--control);border-radius:var(--radius);padding:20px 24px;margin-bottom:24px}.active-draft p{font-size:13px}.active-draft .button{font-size:13px}
/* Preparation */
.setup-screen{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:32px 48px;padding-top:32px;max-width:1120px}.setup-screen .practice-breadcrumb{grid-column:1/-1;margin-bottom:0}.intro{margin-bottom:24px}.setup-screen .intro{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:24px;margin:0;padding:24px 0}.setup-screen .intro h1{font-size:clamp(30px,3vw,40px);line-height:1.3;max-width:450px}.notebook-title{gap:16px}.notebook-seal{border:0;border-radius:12px;transform:none;padding:12px 8px;background:var(--accent-wash);color:var(--vermilion);font-size:20px}.japanese-title{font-size:13px;letter-spacing:.08em;color:var(--muted)}.notebook-title h1{margin:8px 0 0}.notebook-title h1 em{font-style:normal;color:var(--vermilion)}.setup-screen .intro>div:first-child>p:last-child{max-width:440px;font-size:15px;line-height:1.9;margin:0;color:var(--muted)}.intro-number{display:flex;gap:12px;color:var(--blue)}.intro-number .japan-landscape{display:none}.intro-count{display:flex;gap:12px;align-items:baseline;padding:12px 16px;border-radius:12px;background:var(--blue-soft);white-space:nowrap}.intro-count strong{font-size:20px}.intro-count>span{font-size:13px;font-weight:500}.setup{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);padding:32px;box-shadow:var(--shadow)}.setup-step{color:var(--vermilion);font-size:12px;letter-spacing:.08em}.setup h2{font-size:24px}.setup p{font-size:14px}.setup-controls{gap:24px;margin-top:28px}.control-label b{display:grid;place-items:center;background:var(--blue-soft);color:var(--blue);width:28px;height:28px;border-radius:8px;font-size:12px}.feedback-label small,.time-setting>p,.setup-assurance{font-size:12px;line-height:1.8}.setup #start{background:var(--blue);min-height:52px}.setup #start:hover{background:var(--blue-hover)}.setup-outline{padding-top:28px;border-top:1px solid var(--line)}.setup-outline h2{font-size:18px}.section-menu{gap:16px 24px}.section-menu>span{padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:12px;font-size:13px}.section-menu b{color:var(--vermilion);font-size:13px}.section-menu small{font-size:12px}.source-note{font-size:12px;line-height:1.8;color:var(--muted)}.save-status{font-size:12px;line-height:1.7}.save-error{color:var(--red)}
/* Active attempt */
.active-attempt .practice-breadcrumb{margin-bottom:24px}.active-attempt .intro h1{font-size:24px}.active-attempt .intro .notebook-seal{font-size:16px;padding:8px 6px;border:0}.active-attempt .intro .eyebrow{font-size:12px}.active-attempt .japanese-title{font-size:12px}.active-attempt .intro p:not(.eyebrow){font-size:14px}.timer-control{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:24px;gap:20px 28px;box-shadow:none}.status{font-size:14px}.timer-control small{font-size:12px}.timer{color:var(--blue);font-size:28px}.attempt-actions #restart{font-size:13px;font-weight:600;min-height:48px;padding:12px 18px;border:1px solid var(--control);border-radius:var(--radius-sm);background:var(--surface);color:var(--ink)}.attempt-actions #restart:hover{border-color:var(--blue);background:var(--blue-soft);color:var(--blue)}.session-settings{border-top:1px solid var(--line);margin-top:0;padding-top:12px}.session-settings>summary{font-size:13px;line-height:44px}.session-settings>summary span{font-size:12px}.session-settings-body{padding-top:12px}.exam-panel{border:1px solid var(--line);border-radius:var(--radius);box-shadow:none}.panel-top{background:var(--surface-soft);padding:20px 28px;border-bottom:1px solid var(--line)}.section-chip{background:var(--blue-soft);color:var(--blue);border-radius:8px;font-size:12px}.section-name{font-size:14px}.source-label{font-size:12px}.stem{font-size:21px;line-height:2.1}.options{gap:12px}.option{border-radius:12px;min-height:60px;border-color:var(--control);background:var(--surface);font-size:17px}.option:hover:not(:disabled){border-color:var(--blue);background:var(--blue-soft)}.option.selected{border-color:var(--blue);background:var(--blue-soft)}.side-card{border:1px solid var(--line);border-radius:var(--radius);box-shadow:none;background:var(--surface);padding:20px}.side-card h3{font-size:16px}.jump{border-radius:8px;min-height:40px}.jump.current{outline-color:var(--blue)}.panel-bottom{border-top:1px solid var(--line)}.meter{background:var(--surface-soft)}.meter>span{background:var(--blue)}.mobile-nav{border:1px solid var(--line);background:var(--surface);border-radius:12px}.mobile-dock{background:var(--surface);border-color:var(--line)}.passage-panel{border:1px solid var(--line);background:var(--paper);border-radius:16px;padding:24px}.passage-heading{font-size:14px}.passage-help,.passage-heading span{font-size:13px}.passage-evidence{background:var(--blue-soft);border-color:var(--blue)}.passage-panel mark{background:#ffe7a8;color:#302618;border-radius:3px;padding:.1rem .2rem}.explanation{background:var(--paper);border-color:var(--line);padding:28px}.word-profile{background:var(--green-soft);border-color:var(--line);border-radius:16px}.correct-summary{background:var(--green-soft);color:var(--green);border-color:var(--green)}.recall-check summary{font-size:13px}.results{border:1px solid var(--line);border-radius:var(--radius-lg);padding:32px;background:var(--surface);box-shadow:none}.results h2{font-size:28px}.result-metrics span{font-size:13px}.result-metrics strong{font-size:26px}.score{background:var(--green-soft);border-color:var(--line);color:var(--green)}.retry-button{background:var(--blue);color:var(--surface)}.filter{border-radius:10px}.restore-notice{border-radius:16px}.retry-context{border-radius:16px}.choice-note{border-radius:12px}.reading{line-height:1.8}dialog{border:1px solid var(--line);border-radius:24px;background:var(--surface);color:var(--ink);padding:32px;box-shadow:0 24px 80px #1d353333}dialog::backdrop{background:#1d353355}footer{width:calc(100% - 64px);max-width:1120px;margin:auto;padding:24px 0 28px;border-top:1px solid var(--line);font-size:12px;line-height:1.8;color:var(--muted);text-align:center;background:transparent}.restart-icon{width:18px;height:18px}
/* Responsive */
@media(max-width:1190px){main{padding-left:32px;padding-right:32px}.catalog-screen,.overview-screen{max-width:1104px}.layout{grid-template-columns:minmax(0,1fr) 248px}.setup-screen{gap:28px}}
@media(max-width:900px){.topbar{gap:12px}.theme-label{display:none}.theme-options button{padding:9px 10px}.brand{font-size:19px}.exam-card-content{padding:28px;gap:20px}.setup-screen .intro h1{font-size:32px}.setup{padding:28px}.section-menu{grid-template-columns:repeat(2,minmax(0,1fr))}.session-settings-body{gap:20px}}
@media(max-width:768px){.topbar{width:calc(100% - 32px);display:grid;grid-template-columns:1fr auto;gap:16px 12px;height:auto;min-height:136px;padding:16px 0}.topbar .brand{grid-column:1;grid-row:1}.brand .brand-mark{width:42px;height:42px;border-radius:12px}.brand-sub{font-size:12px}.library-link{grid-column:2;grid-row:1;margin:0;padding:10px 14px}.theme-control{grid-column:1/-1;width:100%}.theme-options{width:100%}.theme-options button{flex:1;font-size:12px}.theme-label{display:none}main,.catalog-screen,.overview-screen,.setup-screen{padding:28px 20px 40px}.catalog-heading{margin-bottom:28px}.catalog-heading h1{font-size:30px}.catalog-heading p:last-child{font-size:14px}.exam-catalog,.section-catalog{grid-template-columns:1fr;gap:20px}.exam-card-content{padding:28px;gap:20px}.exam-card h2{font-size:26px}.exam-card .button{min-width:112px;padding:12px 16px}.combined-card{display:block;padding:28px;margin-bottom:28px}.combined-card h2{font-size:24px}.combined-card p{font-size:14px}.combined-card>.button{width:100%;margin-top:24px}.section-card{padding:24px}.section-card h2{font-size:24px}.section-card>p{font-size:14px}.practice-breadcrumb{margin-bottom:24px;gap:4px;font-size:12px}.practice-breadcrumb button{padding:8px}.setup-screen{display:block}.setup-screen .intro{padding:16px 0 28px;gap:20px}.setup-screen .intro h1{font-size:32px;max-width:100%}.setup-screen .intro>div:first-child>p:last-child{font-size:15px}.setup-screen .intro-number{display:flex}.setup{padding:24px}.setup h2{font-size:23px}.setup-outline{margin-top:28px}.section-menu{grid-template-columns:1fr;gap:12px}.section-menu>span{font-size:14px}.setup-screen>.source-note{margin-top:28px}.active-attempt .intro p:not(.eyebrow){font-size:13px}.active-attempt .intro h1{font-size:22px}.active-attempt .intro .eyebrow{font-size:11px}.timer-control{padding:20px;gap:16px;grid-template-columns:1fr auto}.timer-line{text-align:right}.attempt-actions{grid-column:1/-1;justify-content:space-between}.attempt-actions #submit{min-width:124px}.timer{font-size:27px}.session-settings>summary span{display:block;line-height:1.7;margin:0}.session-settings-body{display:flex;flex-direction:column;align-items:stretch;gap:16px}.live-feedback-control select{width:100%;min-width:0}.setting-timer{align-self:flex-start}.layout{display:block}.panel-top{padding:20px}.stem{font-size:19px;line-height:2}.option{font-size:16px;min-height:60px}.explanation{padding:24px 20px}.passage-panel{padding:20px 16px}.results{padding:24px 20px;gap:24px}.results h2{font-size:25px}.result-actions .button{width:100%}.result-metrics{gap:24px}.result-metrics span{font-size:12px}.active-draft{padding:20px}.active-draft .button{width:100%}.active-draft strong{line-height:1.7}.mobile-dock{padding:12px 16px calc(12px + env(safe-area-inset-bottom))}.source-note,.save-status{font-size:12px}footer{width:calc(100% - 40px);font-size:12px;padding:20px 0 24px}body::before{background-size:100vw;background-position:right -15vw bottom 10vh;opacity:.1}[data-theme=cute] body::before{background-size:85vw}.section-card-top{margin-bottom:20px}}
@media(max-width:380px){main,.catalog-screen,.overview-screen,.setup-screen{padding-left:16px;padding-right:16px}.exam-card-content{padding:24px;gap:16px}.brand{font-size:18px;gap:10px}.notebook-title{gap:12px}.setup-screen .intro h1{font-size:28px}.notebook-seal{font-size:18px}.section-card{padding:22px}.combined-card{padding:24px}.results .score{width:124px;font-size:44px}.question-grid{gap:6px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.switch-label input{min-height:26px;height:26px}.jump{min-height:44px}
@media(max-width:380px){.attempt-actions{display:grid;grid-template-columns:1fr;gap:10px}.attempt-actions #restart,.attempt-actions #submit{width:100%;min-height:48px}}
