:root {
  color-scheme: light;
  --ink:#292436;
  --muted:#60586d;
  --accent:#633f9d;
  --accent-dark:#4d2e7d;
  --surface:#fff;
  --page:#faf8f5;
  --line:#e9e3ed;
  --lavender:#ebe4fa;
  --plum-bg:#efe8fb; --plum-fg:#613d9a;
  --peach-bg:#fbe9e5; --peach-fg:#a64d46;
  --sage-bg:#e7f0e3; --sage-fg:#3b6849;
  --sand-bg:#f8edda; --sand-fg:#875a25;
  font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN",Meiryo,system-ui,sans-serif;
  font-size:16px;
  line-height:1.65;
  background:var(--page);
  color:var(--ink);
  font-synthesis:none;
}
* {box-sizing:border-box}
body {margin:0}
button,input {font:inherit}
button {cursor:pointer}
a {color:inherit}
:focus-visible {outline:3px solid #794bb8;outline-offset:4px}
[hidden] {display:none!important}
.skip {position:fixed;left:1rem;top:1rem;transform:translateY(-200%);z-index:5;padding:.65rem 1rem;background:#fff}
.skip:focus {transform:none}
.shell {min-height:100vh;display:grid;grid-template-columns:224px minmax(0,1fr)}
.sidebar {height:100vh;position:sticky;top:0;display:flex;flex-direction:column;padding:2rem 1.2rem 1.3rem;background:#fff;border-right:1px solid var(--line)}
.brand {display:flex;align-items:center;gap:.6rem;text-decoration:none;font-size:1.12rem;font-weight:800;white-space:nowrap;letter-spacing:.015em}
.brand-mark,.group-icon {display:grid;place-items:center;flex:none;color:var(--accent);background:var(--plum-bg);border-radius:13px;width:42px;height:42px}
.brand-mark {color:white;background:#724eaa}
.icon {width:21px;height:21px;flex:none;vertical-align:middle}
.sidebar nav {display:grid;gap:.28rem;margin-top:2.8rem}
.nav-link {display:flex;align-items:center;gap:.7rem;padding:.68rem .72rem;min-height:44px;text-decoration:none;border-radius:11px;font-size:.92rem;font-weight:650;color:var(--muted)}
.nav-link:hover {background:#f7f3fb;color:var(--accent-dark)}
.nav-link.active {background:#eee7f9;color:var(--accent-dark)}
.sidebar .aside-progress {margin-top:auto;border:1px solid var(--line);border-radius:16px;padding:1rem .85rem;background:#fbf9fd}
.aside-progress p {margin:0 0 .38rem;font-size:.86rem;font-weight:700}
.aside-progress small {display:block;color:var(--muted);font-size:.81rem;margin-top:.4rem}
.workspace {min-width:0;display:flex;flex-direction:column}
.topbar {border-bottom:1px solid var(--line);background:rgba(255,255,255,.76)}
.top-inner {min-height:69px;max-width:1230px;margin:auto;padding:0 clamp(1.25rem,4vw,3.6rem);display:flex;align-items:center;justify-content:space-between;gap:.7rem}
.crumb {color:var(--muted);font-size:.9rem;display:flex;align-items:center;gap:.6rem;min-width:0}
.crumb a {text-decoration:none}
.crumb a:hover {text-decoration:underline}
.crumb strong {color:var(--ink)}
.top-progress {display:flex;gap:.48rem;align-items:center;color:var(--accent-dark);font-size:.85rem;font-weight:750;white-space:nowrap;text-decoration:none}
.top-progress .icon {width:18px;height:18px}
.mobile-brand,.mobile-nav {display:none}
main {width:100%;max-width:1230px;margin:0 auto;padding:clamp(1.3rem,3.25vw,3rem) clamp(1.25rem,4vw,3.6rem) 3rem;flex:1;outline:none}
.footer {width:100%;max-width:1230px;margin:auto;padding:1rem clamp(1.25rem,4vw,3.6rem) 1.65rem;color:var(--muted);font-size:.83rem}
.footer span {margin-left:1rem}
.hero {position:relative;overflow:hidden;min-height:310px;display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);align-items:center;background:#ebe3f8;border:1px solid #e5dcf2;border-radius:25px;isolation:isolate}
.hero-copy {padding:clamp(1.35rem,3vw,2.8rem);padding-right:.55rem;z-index:1}
.eyebrow {display:flex;align-items:center;gap:.52rem;color:var(--accent-dark);font-weight:750;font-size:.87rem;margin:0 0 .72rem}
.eyebrow .icon {width:19px;height:19px}
h1,h2,h3,p {overflow-wrap:anywhere}
h1,h2,h3 {line-height:1.35}
.hero h1 {font-size:clamp(2rem,4vw,3.25rem);line-height:1.21;letter-spacing:.025em;margin:0 0 1rem;word-break:keep-all}
.hero-copy > p:not(.eyebrow) {max-width:32ch;margin:0 0 1.3rem;color:#514361;font-size:1rem}
.hero-art {align-self:stretch;min-height:205px;position:relative;background:url('./hero.webp') center center / cover no-repeat}
.hero-art::after {content:"";position:absolute;inset:0;background:linear-gradient(90deg,#ebe3f8 0%,transparent 18%);pointer-events:none}
.button {display:inline-flex;align-items:center;justify-content:center;gap:.46rem;min-height:46px;padding:.65rem 1.14rem;border-radius:10px;border:1px solid transparent;font-size:.9rem;font-weight:750;text-decoration:none;text-align:center;line-height:1.4}
.primary {background:var(--accent);color:#fff;box-shadow:0 3px 6px #3d28601c}
.primary:hover {background:var(--accent-dark)}
.ghost {background:#fff;border-color:#dcd1e9;color:var(--accent-dark)}
.ghost:hover {background:#f8f3ff}
button:disabled {opacity:.57;cursor:default}
.button .icon {width:18px;height:18px}
.section-title {display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;margin:2rem 0 1rem}
.section-title h2 {margin:0 0 .25rem;font-size:1.46rem}
.section-title p {margin:0;color:var(--muted)}
.section-title .count {font-size:.85rem;font-weight:700;white-space:nowrap}
.group-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.group,.panel {border:1px solid var(--line);background:#fff;border-radius:17px}
.group {padding:1.12rem 1.1rem .62rem}
.plum {--tint:var(--plum-bg);--tone:var(--plum-fg)}
.peach {--tint:var(--peach-bg);--tone:var(--peach-fg)}
.sage {--tint:var(--sage-bg);--tone:var(--sage-fg)}
.sand {--tint:var(--sand-bg);--tone:var(--sand-fg)}
.group-head {display:flex;align-items:center;gap:.8rem;margin-bottom:.7rem}
.group-icon {color:var(--tone);background:var(--tint)}
.group-head h3 {margin:0;font-size:1.12rem}
.group-head p {font-size:.84rem;color:var(--muted);margin:.15rem 0 0}
.topic-list {margin:0;padding:0;list-style:none}
.topic-list li+li {border-top:1px solid #f0ecf2}
.topic {display:flex;align-items:center;gap:.55rem;justify-content:space-between;padding:.61rem .16rem;min-height:42px;text-decoration:none;font-size:.92rem;font-weight:670}
.topic:hover,.text-link:hover {color:var(--accent-dark);text-decoration:underline;text-underline-offset:3px}
.topic .icon {width:16px;height:16px;color:#796c85}
.topic-end {display:flex;align-items:center;gap:.4rem;flex:none}
.tick {color:#3f694e!important}
.progress-track {height:7px;background:#e9e0f4;border-radius:99px;overflow:hidden}
.progress-track > span {display:block;background:#7953b3;border-radius:inherit;height:100%;transition:width .2s ease}
.home-foot {margin-top:1.35rem;display:flex;align-items:center;gap:.7rem;color:var(--muted);font-size:.9rem}
.home-foot .icon {color:var(--accent)}
.page-heading {margin:0 0 1.3rem}
.page-heading h1 {font-size:clamp(1.7rem,3.4vw,2.55rem);margin:0 0 .58rem;letter-spacing:.018em}
.page-heading p {margin:0;color:var(--muted)}
.detail-layout {display:grid;grid-template-columns:minmax(0,1fr) minmax(185px,236px);align-items:start;gap:1.1rem}
.detail-column {min-width:0;display:grid;gap:1rem}
.panel {padding:clamp(1.1rem,2.7vw,1.8rem)}
.panel h2,.panel h3 {margin:0 0 .8rem}
.panel h2 {font-size:1.25rem}
.panel h3 {font-size:1.02rem}
.panel p {margin:.7rem 0 0}
.key-point {border-left:4px solid #8967ba;border-radius:4px 12px 12px 4px;background:#f4eefb;padding:.7rem .9rem;margin:0 0 1rem;font-weight:750}
.lesson-nav {padding:.85rem;position:sticky;top:1rem}
.lesson-nav h2 {margin:.1rem .3rem .35rem;font-size:.99rem}
.lesson-nav .topic {font-size:.84rem;padding:.5rem .28rem}
.lesson-nav .current {color:var(--accent-dark);background:#f3ecfa;border-radius:8px}
.chart {margin:1.15rem 0 0;border:1px solid #eae2f0;background:#fdfbff;border-radius:13px;padding:clamp(.68rem,2vw,1rem)}
.chart figcaption {font-weight:750;margin-bottom:.75rem}
.chart-note {font-size:.86rem;color:var(--muted)}
.bar-row {display:grid;grid-template-columns:minmax(80px,1fr) minmax(65px,2.4fr) minmax(50px,auto);gap:.55rem;align-items:center;padding:.31rem 0;font-size:.88rem}
.bar-row strong {text-align:right}
.bar {border-radius:99px;background:#ede4f6;height:12px;overflow:hidden}
.bar span {height:100%;display:block;background:#8056b5;border-radius:inherit}
.stacked {height:18px;display:flex;overflow:hidden;border-radius:100px;margin:.9rem 0}
.stacked span:nth-child(1),.dot.one {background:#7752a7}
.stacked span:nth-child(2),.dot.two {background:#bb9adf}
.stacked span:nth-child(3),.dot.three {background:#e9e2f0}
.legend {display:grid;gap:.2rem;margin:0;padding:0;list-style:none;font-size:.9rem}
.dot {display:inline-block;vertical-align:middle;width:.7rem;height:.7rem;margin:0 .42rem 0 .05rem;border-radius:3px}
.measurements,.concepts {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr));gap:.6rem}
.measure,.concept {border-radius:11px;background:#f4edf9;padding:.65rem .75rem}
.measure strong {display:block;color:var(--accent-dark);font-size:1.25rem}
.measure small {color:var(--muted);font-size:.85rem}
.concept strong {display:block}
.concept span {font-size:.88rem;color:var(--muted)}
.wave-figure {width:100%;height:auto;display:block;max-height:165px}
.chart-table {width:100%;border-collapse:collapse;text-align:left;font-size:.93rem}
.chart-table th,.chart-table td {padding:.48rem .42rem;border-bottom:1px solid #eadff1;vertical-align:top}
.chart-table th {width:41%}
.examples {display:grid;gap:.65rem}
.example {background:#f6f0fa;border-radius:11px;padding:.7rem .75rem}
.example header {display:flex;justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:.4rem}
.example p {margin:0 0 .45rem;font-size:.92rem}
.example audio {display:block;width:100%;max-width:430px;height:40px}
.example[data-playing] {box-shadow:inset 0 0 0 2px #a184c8}
details > summary {cursor:pointer;font-weight:750;color:var(--accent-dark)}
details > summary:hover {text-decoration:underline}
.refs {padding-left:1.15rem;margin:.65rem 0 0}
.refs li {margin:.6rem 0}
.refs small {display:block;color:var(--muted);font-size:.83rem}
.text-link {color:var(--accent-dark);font-weight:670;text-underline-offset:3px}
.quiz .answer-form fieldset {border:0;padding:0;margin:0}
.quiz .answer-form legend {font-size:1.12rem;font-weight:750;margin-bottom:.7rem}
.quiz .instruction {color:var(--muted);margin:0 0 .5rem;font-size:.88rem}
.options {display:grid;gap:.5rem;margin:0 0 .9rem}
.option {display:flex;align-items:flex-start;gap:.65rem;border:1px solid var(--line);border-radius:10px;padding:.67rem .7rem;background:#fff}
.option:has(input:checked) {background:#f3ebfa;border-color:#a487c8}
.option:has(input:focus-visible) {outline:2px solid var(--accent);outline-offset:2px}
.option input {margin:.28rem 0 0;accent-color:var(--accent);width:18px;height:18px;flex:none}
.quiz-result {margin-top:1rem;border-radius:12px;padding:.85rem .95rem;background:#f5f0fa}
.quiz-result h3 {margin:0}
.quiz-result ul {padding-left:1.2rem;margin:.55rem 0 .9rem}
.quiz-result li+li {margin-top:.42rem}
.actions {display:flex;align-items:center;flex-wrap:wrap;gap:.6rem;margin-top:1rem}
.actions.split {justify-content:space-between}
.lesson-side-note {font-size:.85rem;color:var(--muted);margin:.65rem .25rem .1rem}
.review-list {list-style:none;margin:.4rem 0 0;padding:0}
.review-list li+li {border-top:1px solid var(--line)}
.review-list li {padding:.74rem 0}
.review-row {display:flex;align-items:center;justify-content:space-between;gap:.6rem}
.review-list p {color:var(--muted);margin:.22rem 0 0;font-size:.9rem}
.status-pill {font-size:.8rem;padding:.15rem .45rem;border-radius:100px;background:#eee7f8;color:var(--accent-dark);white-space:nowrap;font-weight:700}
.status-pill.good {background:#e6f1e6;color:#315c3e}
.status-pill.waiting {background:#f3eff4;color:#635970}
.completion {max-width:750px;margin-inline:auto}
.completion .page-heading {text-align:center}
.completion .group-icon {margin:0 auto .8rem;color:#3b6849;background:#e7f0e3}
.reference-list {display:grid;gap:1rem}
.reference-list .panel p {color:var(--muted)}
@media(max-width:1030px) {
  .shell {grid-template-columns:185px minmax(0,1fr)}
  .sidebar {padding-inline:.78rem}
  .sidebar .brand {font-size:1rem}
  .detail-layout {grid-template-columns:minmax(0,1fr) minmax(155px,185px)}
}
@media(max-width:780px) {
  .shell {display:block}
  .sidebar {display:none}
  .top-inner {min-height:61px}
  .mobile-brand {display:flex}
  .mobile-brand .brand-mark {width:36px;height:36px;border-radius:10px}
  .crumb {display:none}
  .mobile-nav {display:flex;flex-wrap:wrap;gap:.2rem;padding:0 1rem .48rem}
  .mobile-nav .nav-link {font-size:.86rem;padding:.45rem .55rem;min-height:40px}
  .mobile-nav .icon {height:17px;width:17px}
  .lesson-nav {position:static}
}
@media(max-width:620px) {
  .hero {grid-template-columns:1fr;min-height:0}
  .hero-copy {padding:1.35rem 1.2rem .72rem}
  .hero h1 {font-size:clamp(1.65rem,7vw,2.55rem)}
  .hero-art {min-height:clamp(145px,47vw,235px);background-position:center 46%}
  .hero-art::after {background:linear-gradient(180deg,#ebe3f8 0%,transparent 21%)}
  .group-grid,.detail-layout {grid-template-columns:1fr}
  .section-title {align-items:flex-start}
  .section-title p {font-size:.91rem}
  .footer span {display:block;margin:0}
  .review-row {align-items:flex-start}
}
@media(prefers-reduced-motion:reduce) {* {transition:none!important}}
.sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

.study-settings {display:grid;grid-template-columns:minmax(0,1.65fr) minmax(185px,1fr);gap:1.15rem;margin-top:1rem}
.study-settings h2 {margin:0;font-size:1.15rem}
.study-settings p {margin:.3rem 0 .75rem;font-size:.9rem;color:var(--muted)}
.study-settings .difficulty {margin-bottom:0}
.home-test {display:flex;align-items:flex-start;align-self:center;gap:.7rem;padding-left:1.15rem;border-left:1px solid var(--line)}
.home-test h3 {margin:0;font-size:1.04rem}
.home-test .button {min-height:42px}
.practice-heading {display:flex;align-items:flex-start;justify-content:space-between;gap:.6rem}
.level-progress-list {display:grid;gap:.7rem}
.level-progress-row {padding:.75rem .85rem;background:#faf7fd;border:1px solid var(--line);border-radius:11px}
.level-progress-header {display:flex;align-items:center;gap:.47rem;flex-wrap:wrap;margin-bottom:.5rem}
.level-progress-header h3 {margin:0;font-size:.96rem}
.level-count {margin-left:auto;color:var(--muted);font-size:.89rem;white-space:nowrap}
.level-count strong {color:var(--ink)}
.test-progress-actions {display:flex;flex-wrap:wrap;gap:.2rem 1rem;margin-top:.52rem;font-size:.87rem}
.review-group {border-top:1px solid var(--line);margin-top:.7rem;padding-top:.62rem}
.reset-actions {justify-content:flex-end;margin-top:0}

.difficulty {border:0;margin:0 0 1.1rem;padding:0}
.difficulty legend {padding:0;margin:0 0 .38rem;font-size:.94rem;font-weight:750}
.difficulty-options {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.45rem}
.difficulty-options label {position:relative;cursor:pointer;display:grid}
.difficulty-options input {position:absolute;opacity:0;width:1px;height:1px}
.difficulty-options span {display:grid;align-content:center;gap:.15rem;min-height:46px;padding:.54rem .36rem;text-align:center;border:1px solid var(--line);border-radius:10px;color:var(--ink);background:#fff}
.difficulty-options input:checked + span {border-color:#8f6cbd;color:var(--accent-dark);background:#f2eaf9;box-shadow:inset 0 0 0 1px #8f6cbd}
.difficulty-options input:focus-visible + span {outline:3px solid var(--accent);outline-offset:3px}
.difficulty-options strong {font-size:.9rem}
.difficulty-options small {font-size:.82rem;color:var(--muted)}
.previous-answer {margin:0 0 .55rem!important;font-size:.87rem;color:var(--muted)}
.is-correct {--result-fg:#24553a;--result-bg:#eaf4eb;--result-line:#c8dfcf}
.is-incorrect {--result-fg:#872a3b;--result-bg:#fdf0f1;--result-line:#edc9d0}
.quiz-result {background:var(--result-bg);border:1px solid var(--result-line)}
.quiz-result .result-heading {display:flex;gap:.5rem;align-items:center;color:var(--result-fg);font-size:1.25rem}
.result-heading .icon {width:25px;height:25px}
.quiz-result .choice-feedback {list-style:none;padding:0;margin:.7rem 0 0}
.choice-feedback li {padding:.75rem .8rem;border-radius:9px;background:#fff}
.choice-feedback li p {margin:.42rem 0 0}
.answer-tag,.chosen-tag {display:inline-flex;align-items:center;gap:.25rem;padding:.1rem .52rem;border-radius:7px;font-weight:750;font-size:.83rem;white-space:nowrap}
.answer-tag {background:var(--result-bg);color:var(--result-fg)}
.answer-tag .icon {width:16px;height:16px}
.chosen-tag {margin-left:.35rem;color:var(--accent-dark);background:var(--plum-bg)}

.test-layout {max-width:790px;margin-inline:auto}
.test-layout .panel+.panel {margin-top:1rem}
.test-score h2 strong {color:var(--accent-dark);font-size:2.4rem}
.test-results {margin:0;padding-left:1.55rem}
.test-results li {padding:.65rem 0}
.test-results li+li {border-top:1px solid var(--line)}
.test-result-title {display:flex;align-items:flex-start;justify-content:space-between;gap:.65rem}
.test-results dl {display:grid;grid-template-columns:auto 1fr;gap:.22rem .75rem;margin:.55rem 0;font-size:.9rem}
.test-results dt {color:var(--muted)}
.test-results dd {margin:0}
.test-results .text-link {font-size:.9rem}

#reset-dialog {width:min(460px,calc(100% - 2rem));max-height:calc(100% - 2rem);padding:1.25rem;border:1px solid var(--line);border-radius:17px;color:var(--ink)}
#reset-dialog h2 {margin:.05rem 0 .5rem;font-size:1.24rem}
#reset-dialog p {margin:.5rem 0 0}
#reset-dialog::backdrop {background:#32264172}
#reset-dialog .actions {justify-content:flex-end}
.danger-outline {color:#872a3b;background:#fff;border-color:#edc9d0}
.danger-outline:hover:not(:disabled) {background:#fdf0f1}
.danger {color:#fff;background:#872a3b}
.danger:hover {background:#6b1d2c}
.reset-notice {color:#24553a;font-weight:750}

@media(max-width:620px) {
  .study-settings {grid-template-columns:1fr}
  .home-test {padding:1rem 0 0;border-left:0;border-top:1px solid var(--line)}
  .test-result-title {flex-wrap:wrap}
}

.lesson-difficulty {display:flex;align-items:center;flex-wrap:wrap;gap:.4rem .8rem;margin-top:.75rem;font-size:.88rem;color:var(--muted)}
.practice-format {color:var(--muted);font-size:.88rem;margin:0 0 .75rem!important}
.archived-test {margin:.48rem 0 0!important;font-size:.84rem;color:var(--muted)}
