:root {
  color-scheme: light;
  --paper: #f4f6f9;
  --white: #fff;
  --ink: #162332;
  --muted: #506173;
  --soft: #6a7888;
  --border: #dfe6ed;
  --sidebar: #101c2c;
  --teal: #087a6b;
  --teal-dark: #07675a;
  --mint: #79edd0;
  --radius: 15px;
  --shadow: 0 2px 4px #11263e05;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; text-rendering: optimizeLegibility; }
h1,h2,h3,p,figure,blockquote { margin: 0; }
h1,h2,h3 { line-height: 1.19; }
p { overflow-wrap: anywhere; }
a { text-decoration: none; color: inherit; }
button,input,select,textarea { font: inherit; color: inherit; }
button,select { cursor: pointer; }
button:disabled { opacity: .62; cursor: wait; }
input,textarea,select { width: 100%; min-width: 0; }
button,a,input,select,textarea,summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #199d8d; outline-offset: 3px; }
::selection { color: #092f2b; background: #bdf4e8; }
[lang="ja"] { font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Noto Sans CJK JP", system-ui, sans-serif; line-break: strict; }
.icon { width: 20px; height: 20px; display: inline-block; flex: none; vertical-align: -4px; }
.muted { color: var(--muted); }
.preserve { white-space: pre-wrap; }
.skip { position: fixed; top: 8px; left: 10px; padding: 10px 15px; background: var(--white); border: 1px solid var(--border); border-radius: 8px; z-index: 50; transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }
#studio { min-height: 100vh; }
.loading-screen { min-height: 100vh; display: grid; align-content: center; justify-items: center; gap: 12px; }
.loading-screen p { color: var(--muted); }
.loading-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--mint); color: var(--sidebar); font-weight: 850; }
.sidebar { position: fixed; z-index: 5; inset: 0 auto 0 0; width: 242px; min-height: 100dvh; overflow: auto; display: flex; flex-direction: column; padding: 25px 17px 16px; background: var(--sidebar); color: #c4cfdb; }
.wordmark { display: flex; gap: 11px; align-items: center; padding: 2px 8px 22px; margin-bottom: 13px; border-bottom: 1px solid #ffffff15; color: #f1f9fc; }
.wordmark img { border-radius: 10px; flex: none; }
.wordmark strong { display: block; font-size: 1.16rem; font-weight: 740; letter-spacing: -.028em; line-height: 1.18; }
.wordmark span { font-size: .83rem; color: #a6b6c8; letter-spacing: .01em; }
.nav-heading { color: #91a3b7; font-weight: 750; letter-spacing: .11em; font-size: .75rem; padding: 0 11px; margin: 9px 0 8px; }
.main-nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 9px 11px; font-weight: 560; color: #c1cedb; font-size: .925rem; border-radius: 9px; transition: background .15s, color .15s; }
.nav-item .icon { width: 18px; height: 18px; color: #a1b3c7; }
.nav-item:hover,.nav-course:hover { background: #ffffff0e; color: #f3faff; }
.nav-item.active { background: #1b3c42; color: #a1f3de; font-weight: 680; box-shadow: inset 2px 0 #5fdbc2; }
.nav-item.active .icon { color: #80ebd2; }
.course-nav { display: grid; gap: 2px; margin-top: 21px; }
.nav-course { display: flex; align-items: center; min-height: 32px; gap: 10px; padding: 5px 10px 5px 11px; font-size: .84rem; border-radius: 7px; }
.course-dot { width: 8px; height: 8px; background: var(--dot); border-radius: 50%; box-shadow: 0 0 0 2px #fff1; flex: none; }
.course-nav .course-dot { filter: brightness(1.3) saturate(.9); }
.sidebar-footer { margin-top: auto; padding-top: 25px; }
.sidebar-footer .nav-item { border-top: 1px solid #ffffff13; border-radius: 0 0 8px 8px; padding-top: 13px; }
.sync-note { display: flex; gap: 8px; align-items: center; min-height: 26px; padding: 3px 11px; color: #a9bacb; font-size: .75rem; }
.sync-note > span { width: 6px; height: 6px; background: #62d6bc; border-radius: 100%; flex: none; }
.sync-note strong { font-weight: 550; }
.shell-main { margin-left: 242px; min-width: 0; }
.topbar { height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 clamp(20px,3.5vw,46px); background: #fff; border-bottom: 1px solid #e6ebf0; }
.topbar-left,.topbar-actions,.today { display: flex; align-items: center; gap: 12px; }
.topbar-actions { gap: 20px; }
.crumb-root,.crumb-slash { color: var(--soft); font-size: .88rem; }
.crumb-slash { color: #8091a3; }
.crumb-current { font-size: .9rem; font-weight: 700; }
.today { gap: 7px; color: var(--muted); font-size: .835rem; white-space: nowrap; }
.today .icon { width: 17px; height: 17px; }
.mobile-menu { display: none !important; }
.page { max-width: 1600px; margin: 0 auto; padding: 28px clamp(20px,3.5vw,46px) 62px; }
.page:focus { outline: none; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 0 0 23px; }
.page-heading h1 { font-size: clamp(2rem,3.55vw,2.85rem); font-weight: 770; letter-spacing: -.048em; }
.page-heading p { margin-top: 6px; color: var(--muted); font-size: .99rem; }
.page-kicker { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 11px; font-size: .85rem; color: var(--soft); }
.page-kicker .text-link { font-size: .87rem; }

.btn,.icon-btn { border: 1px solid transparent; border-radius: 9px; font-size: .875rem; font-weight: 670; line-height: 1.25; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 10px 15px; min-height: 43px; white-space: nowrap; }
.btn .icon { width: 17px; height: 17px; }
.btn.small { min-height: 37px; padding: 8px 12px; font-size: .835rem; }
.btn.primary { color: #fff; background: #087d6d; border-color: #087d6d; }
.btn.primary:hover { background: #076459; border-color: #076459; }
.btn.btn-outline { background: #fff; color: #24374b; border-color: #d7e0e8; }
.btn.btn-outline:hover { background: #f5f9fa; border-color: #87acac; }
.btn.subtle { background: #e7f6f2; border-color: #d2ece5; color: #086a5c; }
.btn.subtle:hover { background: #d2f0e7; }
.btn.quiet { background: transparent; color: #8d3732; }
.btn.quiet:hover { background: #fceceb; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; background: #fff; border-color: var(--border); padding: 0; }
.icon-btn:hover { background: #f0f7f7; }
.text-link { color: #087667; display: inline-flex; align-items: center; gap: 7px; font-weight: 675; font-size: .875rem; line-height: 1.25; }
.text-link .icon { width: 17px; height: 17px; }
.text-link:hover { text-decoration: underline; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.chip { border-radius: 999px; display: inline-flex; justify-content: center; align-items: center; padding: 4px 8px; font-size: .75rem; color: #526372; background: #edf1f5; font-weight: 690; line-height: 1.2; width: max-content; max-width: 100%; }
.chip.mint { background: #e1f6ef; color: #0c6b5c; }
.chip.amber { background: #fff0d7; color: #8f581e; }
.hero { min-height: 250px; position: relative; display: grid; align-items: center; isolation: isolate; overflow: hidden; background: radial-gradient(ellipse at 86% 45%,#155457 0%,#153a43 24%,#142d3b 56%,#132737 100%); border: 1px solid #1a3744; border-radius: 18px; box-shadow: 0 4px 10px #10263812; color: #f8fffd; }
.hero canvas { position: absolute; inset: 0 0 0 auto; width: 46%; height: 100%; pointer-events: none; opacity: .88; z-index: -1; }
.hero-content { max-width: 72%; padding: 24px 31px 29px; }
.hero-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 720; color: #abeedc; border: 1px solid #86d7c045; border-radius: 999px; padding: 5px 10px; background: #1b4850; font-size: .8rem; }
.hero-pill .icon { width: 15px; height: 15px; }
.hero h2 { font-weight: 740; font-size: clamp(1.7rem,3.2vw,2.55rem); letter-spacing: -.038em; margin-top: 13px; text-wrap: balance; }
.hero p { font-size: .94rem; margin-top: 8px; color: #c0d7df; max-width: 540px; }
.hero .actions { margin-top: 20px; }
.hero-primary { color: #0e3333; background: #7de9cf; border-color: #7de9cf; }
.hero-primary:hover { background: #a2f4e0; }
.hero-secondary { color: #dcf7f3; background: #d7fffc0b; border-color: #c3fff84c; }
.hero-secondary:hover { background: #d7fffc21; }

.card,.stat-card,.course-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin: 17px 0 25px; }
.stat-card { padding: 13px 15px 14px; min-width: 0; }
.stat-card header { display: flex; align-items: center; justify-content: space-between; gap: 3px; min-height: 33px; }
.stat-card header > span:first-child { color: #486071; font-size: .84rem; font-weight: 680; line-height: 1.24; }
.stat-icon,.focus-icon,.course-icon,.topic-status,.empty-icon { display: inline-grid; place-items: center; border-radius: 10px; flex: none; }
.stat-icon { width: 33px; height: 33px; }
.stat-icon .icon { width: 17px; height: 17px; }
.stat-icon.teal,.focus-icon.good { background: #e4f6f0; color: #0d7868; }
.stat-icon.blue { background: #e8f1fc; color: #2269ad; }
.stat-icon.amber,.focus-icon.warm { background: #fff0dd; color: #976027; }
.stat-icon.purple { background: #eeeafd; color: #6550ad; }
.stat-card > strong { display: block; color: #1d2e41; font-size: 1.64rem; line-height: 1.13; letter-spacing: -.032em; margin-top: 5px; }
.stat-card p { font-size: .775rem; color: var(--soft); line-height: 1.32; margin-top: 4px; }
.dashboard-bottom { display: grid; grid-template-columns: minmax(0,2.15fr) minmax(288px,1fr); gap: 17px; align-items: start; }
.dashboard-aside,.lesson-column { min-width: 0; display: grid; align-content: start; gap: 13px; }
.panel-head { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin-bottom: 13px; }
.panel-head > * { min-width: 0; }
.panel-head h2,.card h2 { font-size: 1.245rem; font-weight: 740; letter-spacing: -.023em; }
.dashboard-bottom > section > .panel-head h2 { font-size: 1.48rem; }
.panel-head p { font-size: .9rem; margin-top: 4px; }
.panel-head > .text-link { align-self: center; white-space: nowrap; }
.course-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.course-grid.wide { margin-top: 17px; }
.course-card { min-height: 153px; padding: 13px 14px 15px; transition: transform .15s,border .15s,box-shadow .15s; }
.course-card:hover { border-color: #99c6c0; transform: translateY(-2px); box-shadow: 0 6px 15px #11263e0d; }
.course-card-top { display: flex; align-items: center; gap: 5px; justify-content: space-between; margin-bottom: 11px; }
.course-icon { color: var(--course); background: var(--course-tint); width: 40px; height: 40px; border-radius: 11px; }
.course-icon .icon { width: 23px; height: 23px; }
.course-icon.large { width: 45px; height: 45px; }
.course-icon.tiny { width: 27px; height: 27px; border-radius: 7px; }
.course-icon.tiny .icon { width: 17px; height: 17px; }
.course-card h3 { font-size: .96rem; font-weight: 730; line-height: 1.22; letter-spacing: -.017em; }
.course-card p { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.progress { height: 5px; border-radius: 12px; overflow: hidden; background: #e7edf2; margin-top: 9px; }
.progress span { display: block; height: 100%; border-radius: inherit; background: #0d927d; }
.focus-card { padding: 15px; }
.focus-card .panel-head { margin-bottom: 8px; }
.focus-card .empty { padding: 22px 8px 10px; }
.focus-card .empty p { font-size: .87rem; }
.empty { min-height: 155px; display: grid; justify-items: center; align-content: center; gap: 7px; text-align: center; padding: 26px 19px; }
.empty-icon { width: 38px; height: 38px; background: #e8f5f2; color: var(--teal); margin-bottom: 3px; }
.empty h3 { font-size: 1rem; font-weight: 735; }
.empty p { font-size: .92rem; color: var(--muted); max-width: 37ch; }
.empty .btn { margin-top: 5px; }
.focus-icon { height: 35px; width: 35px; background: #e6edf5; color: #415b76; }
.focus-icon .icon { width: 18px; height: 18px; }
.focus-row,.target-card { display: flex; align-items: center; gap: 10px; }
.focus-row { min-height: 59px; padding: 7px 1px; border-top: 1px solid #ebeff3; }
.focus-row strong,.target-card strong { display: block; font-size: .875rem; line-height: 1.22; }
.focus-row small,.target-card span,.target-card p { color: var(--muted); font-size: .785rem; }
.focus-row .btn,.target-card > a { margin-left: auto; }
.target-card { padding: 13px 15px; }
.target-card strong { margin-block: 2px; }
.target-card p { line-height: 1.25; }

.brief-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.plan-card,.strategy-card { display: flex; align-items: start; gap: 13px; padding: 19px 20px; }
.plan-card > .icon,.strategy-card > .icon { color: var(--teal); margin-top: 1px; }
.plan-card h2,.strategy-card h2 { font-size: 1.035rem; }
.plan-card p,.strategy-card p { margin-top: 5px; font-size: .91rem; color: var(--muted); }
.plan-card a,.strategy-card a { margin-left: auto; align-self: center; flex: none; }
.subject-switch { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 14px; }
.subject-switch a { display: flex; gap: 6px; align-items: center; min-height: 37px; padding: 4px 9px; border: 1px solid #dce6ee; border-radius: 9px; background: #fff; color: #485b6c; font-size: .855rem; font-weight: 650; }
.subject-switch a:hover,.subject-switch a.active { color: #075f54; background: #e8f6f2; border-color: #b4dbd1; }
.tool-card,.lesson-card { padding: 21px 22px; }
.tool-card { margin-bottom: 14px; }
.tool-card:last-child { margin-bottom: 0; }
.tool-card .panel-head p { margin-top: 6px; }
.topic-groups { display: grid; gap: 13px; margin: 14px 0; }
.topic-group > header { padding: 15px 19px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.topic-group > header > div { display: flex; align-items: center; gap: 9px; }
.topic-group > header > span { color: var(--muted); font-size: .81rem; white-space: nowrap; }
.topic-group h2 { font-size: 1.07rem; }
.topic-row { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 11px; border-top: 1px solid #e8edf2; padding: 11px 18px; }
.topic-row:hover { background: #f4faf8; }
.topic-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.topic-status { width: 30px; height: 30px; background: #eef2f6; color: #60768c; }
.topic-status .icon { width: 16px; height: 16px; }
.topic-status.complete { background: #e0f5ee; color: var(--teal); }
.topic-copy strong,.topic-copy small { display: block; }
.topic-copy strong { font-size: .93rem; line-height: 1.25; }
.topic-copy small { font-size: .805rem; color: var(--muted); margin-top: 2px; }
.topic-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.notice { display: flex; align-items: start; gap: 10px; padding: 13px 14px; border-radius: 10px; border: 1px solid #dcece8; background: #f0f8f6; color: #27464a; font-size: .88rem; line-height: 1.46; }
.notice > .icon,.notice > span > .icon { color: #117769; width: 18px; height: 18px; margin-top: 1px; }
.notice strong { font-size: .9rem; }
.notice p { margin-top: 3px; font-size: .875rem; }
.notice.dictionary { background: #fdf4f9; border-color: #f0d8e7; color: #653351; margin-bottom: 13px; }
.notice.dictionary .icon { color: #a64c78; }
.notice.dictionary:last-child { margin-bottom: 0; }
.reference-notice { margin-bottom: 14px; }
.reference-notice > a { margin-left: auto; flex: none; align-self: center; }
.lesson-layout { display: grid; grid-template-columns: minmax(0,2.2fr) minmax(235px,1fr); gap: 15px; align-items: start; }
.lesson-card { min-width: 0; }
.lesson-card p { margin-top: 8px; }
.lesson-card .panel-head p { margin-top: 4px; }
.lesson-idea { font-size: 1.04rem; line-height: 1.67; }
.lesson-idea + .notice,.lesson-card .actions { margin-top: 13px; }
.lesson-reference .course-icon,.lesson-card > .focus-icon { margin-bottom: 10px; }
.lesson-card > .text-link { display: flex; margin-top: 12px; width: fit-content; }
.worked-steps { list-style: none; counter-reset: step; display: grid; gap: 8px; margin: 13px 0 15px; padding: 0; }
.worked-steps li { counter-increment: step; position: relative; padding: 11px 13px 11px 45px; background: #f5f8fa; border: 1px solid #e6edf2; border-radius: 9px; font-size: .955rem; }
.worked-steps li::before { content: counter(step); position: absolute; left: 12px; top: 11px; width: 23px; height: 23px; border-radius: 6px; background: #def2ed; color: #076d60; display: grid; place-items: center; font-size: .8rem; font-weight: 750; }
.evidence-metrics strong { display: block; margin-top: 9px; font-size: 1.65rem; letter-spacing: -.035em; }
.evidence-metrics p { margin-top: 0; color: var(--muted); font-size: .86rem; }
.kanji-card { text-align: center; min-height: 150px; padding: 18px; border: 1px solid #efdbe6; border-radius: 10px; background: #fcf5f9; display: grid; align-content: center; justify-items: center; gap: 4px; }
.kanji-card strong { font-size: 2rem; }
.kanji-card span { color: #93355e; }
.lab-inputs { display: flex; flex-wrap: wrap; gap: 15px; margin: 13px 0; }
.lab-inputs .field { flex: 1 1 170px; }
.lab-inputs input { padding: 0; min-height: 25px; accent-color: var(--teal); }
.lab-values { color: var(--teal-dark); font-weight: 730; font-variant-numeric: tabular-nums; }
.lab-chart { display: block; width: 100%; height: 210px; margin-top: 6px; }

.tabs { display: flex; align-items: stretch; flex-wrap: wrap; gap: 3px 6px; width: max-content; max-width: 100%; padding: 4px; margin: 0 0 15px; background: #e8edf2; border-radius: 10px; }
.tabs a { display: flex; gap: 7px; justify-content: center; align-items: center; min-height: 36px; padding: 7px 11px; border-radius: 7px; color: #526375; font-size: .88rem; font-weight: 680; }
.tabs a .icon { width: 17px; height: 17px; }
.tabs a:hover { background: #f4f8fa; }
.tabs a.selected { background: #fff; color: #126b5e; box-shadow: 0 1px 4px #10283b12; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.filters .field { flex: 1 1 190px; }
.field { display: grid; gap: 6px; text-align: left; align-content: start; min-width: 0; }
.field > span:first-child { font-weight: 700; font-size: .865rem; color: #33495d; }
.field > small { font-size: .8rem; color: var(--muted); }
.fields-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 13px; }
.stack-form { display: grid; justify-items: stretch; gap: 13px; }
.stack-form > .btn { justify-self: start; }
input,select,textarea { display: block; border: 1px solid #ccd7e2; border-radius: 8px; background: #fff; color: var(--ink); min-height: 43px; padding: 9px 11px; font-size: .94rem; }
input::placeholder,textarea::placeholder { color: #687b8b; }
input:focus,select:focus,textarea:focus { border-color: #379d8d; box-shadow: 0 0 0 3px #219a7f18; outline: none; }
select { appearance: none; padding-right: 32px; }
.select-wrap { position: relative; display: block; }
.select-wrap .icon { position: absolute; right: 10px; top: 50%; color: #4c6471; transform: translateY(-50%); pointer-events: none; width: 16px; height: 16px; }
input[type="file"] { padding: 7px; }
input::file-selector-button { border: 1px solid #d3e3e3; border-radius: 6px; padding: 5px 9px; background: #eaf5f3; color: #20564f; font: inherit; font-weight: 650; margin-right: 8px; cursor: pointer; }
textarea { resize: vertical; }
.mistake-grid,.resource-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.mistake-card,.resource-card { padding: 16px 18px; }
.mistake-card header,.resource-card header { display: flex; gap: 9px; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.mistake-card > p { margin: 7px 0 10px; color: var(--muted); }
.mistake-card .notice { display: block; }
.mistake-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 6px; }
.mistake-foot > span { font-size: .82rem; color: var(--muted); }
.subject-tag { display: inline-flex; align-items: center; gap: 6px; color: #475b70; font-weight: 710; font-size: .82rem; white-space: nowrap; }
.subject-tag > span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--course); }
.resource-card header { justify-content: start; }
.resource-card h2 { font-size: 1.1rem; }
.resource-card ul { list-style: none; margin: 0; padding: 0; }
.resource-card li { display: flex; justify-content: space-between; gap: 8px; align-items: center; border-top: 1px solid #eaf0f2; padding-block: 10px; }
.resource-card li:last-child { padding-bottom: 2px; }
.session-list-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid #e5ebf1; }
.session-list-row > div:nth-child(2) { flex: 1; min-width: 0; }
.session-list-row h3 { font-size: .96rem; overflow-wrap: anywhere; }
.session-list-row p { font-size: .83rem; color: var(--muted); margin-top: 3px; }
.session-list-row.compact { justify-content: space-between; }
.session-list-row.compact p { margin-top: 3px; }
.active-sessions { margin-top: 13px; }
.attachment { margin: 9px 0; }
.attachment-bar { display: flex; align-items: center; gap: 7px; padding: 8px; border-radius: 8px 8px 0 0; background: #eef5f5; color: var(--teal); }
.attachment-bar .icon { width: 17px; height: 17px; }
.attachment img,.attachment iframe { display: block; width: 100%; max-width: 100%; border: 1px solid var(--border); border-radius: 0 0 9px 9px; object-fit: contain; }
.attachment iframe { height: min(560px,72vh); }
.attachment img { max-height: 540px; background: #f1f4f7; }
.attachment pre { font: inherit; font-size: .9rem; white-space: pre-wrap; max-height: 420px; overflow: auto; background: #f4f7f8; border-radius: 8px; padding: 9px; overflow-wrap: anywhere; }

.chart-bars { display: flex; align-items: stretch; gap: 10px; overflow-x: auto; margin-top: 14px; }
.bar-column { width: 8%; min-width: 47px; max-width: 72px; display: grid; justify-items: center; gap: 3px; font-size: .8rem; color: var(--muted); }
.bar-column strong { font-variant-numeric: tabular-nums; color: #1b5b55; }
.bar-column > div { width: 72%; height: 95px; display: flex; align-items: end; overflow: hidden; border-radius: 7px; background: #edf3f4; }
.bar-column > div span { width: 100%; display: block; background: #319c8a; border-radius: 6px 6px 0 0; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; min-width: 660px; width: 100%; text-align: left; font-size: .88rem; }
thead { color: #4e6173; background: #f2f6f8; font-size: .8rem; }
th,td { padding: 9px 10px; border-bottom: 1px solid #e6edf1; }
td small { display: block; color: var(--muted); font-size: .755rem; }
td.positive { color: #06765e; font-weight: 710; }
td.negative { color: #a54139; font-weight: 710; }

.run-layout { grid-template-columns: minmax(0,2.25fr) minmax(218px, .93fr); }
.time-badge { display: inline-flex; gap: 7px; align-items: center; padding: 8px 12px; color: #146c60; background: #e3f5f0; border: 1px solid #bfe5db; border-radius: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.time-badge.urgent { color: #983d26; background: #fff1e4; border-color: #efc7a9; }
.time-badge.urgent .icon { color: #ae522d; }
.question-card { padding: 20px 22px 16px; min-width: 0; }
.question-card h2 { margin: 12px 0 7px; font-size: 1.47rem; }
.question-top,.question-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; }
.question-top > div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.question-prompt { line-height: 1.7; }
.answer-part { margin-top: 15px; padding-top: 14px; border-top: 1px solid #e8edf1; }
.part-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; margin: 0 0 6px; }
.part-head strong { font-size: .945rem; }
.part-head > .chip { flex: none; }
.answer-part > input { max-width: 400px; }
.answer-part > small { display: inline-block; margin-top: 3px; font-size: .8rem; }
.field-hint { margin: 1px 0 7px; font-size: .825rem; color: var(--muted); }
.choices { display: grid; gap: 6px; }
.choice { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: .9rem; }
.choice input { appearance: auto; margin: 0 0 0 3px; min-height: 15px; width: 15px; accent-color: var(--teal); flex: none; }
.choice:has(:checked) { border-color: #8bc8ba; background: #ecf8f4; }
.choice-letter { display: grid; place-items: center; width: 22px; height: 22px; color: #546b7e; background: #edf1f5; font-size: .76rem; border-radius: 6px; font-weight: 750; flex: none; }
.plan-details { border: 1px solid #e4ebef; border-radius: 8px; background: #f6f9fa; margin: 9px 0; }
.plan-details summary { display: flex; gap: 8px; align-items: center; padding: 9px 10px; cursor: pointer; font-size: .88rem; font-weight: 700; color: #3a5c65; }
.plan-details summary .icon { width: 17px; height: 17px; }
.plan-details summary .summary-icon { margin-left: auto; }
.plan-details[open] summary .summary-icon { transform: rotate(180deg); }
.planning-grid,.scratch-pad { padding: 4px 10px 10px; }
.planning-grid { display: grid; gap: 8px; }
.part-correction { display: flex; align-items: start; gap: 6px; color: #88551f; background: #fff6e8; border-radius: 7px; font-size: .875rem; padding: 7px 8px; margin-top: 5px; }
.part-correction .icon { width: 17px; height: 17px; }
.part-correction.good-mark { background: #ecf8f3; color: #177260; }
.answer-readback { color: #31465a; overflow-wrap: anywhere; }
.quick-feedback { padding-left: 18px; color: #465e6f; font-size: .86rem; margin-block: 8px; }
.question-footer { padding-top: 13px; margin-top: 12px; border-top: 1px solid #e6ecef; }
.question-nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; }
.question-nav a { min-width: 0; min-height: 37px; border: 1px solid #dce6eb; background: #f6f9fb; border-radius: 8px; display: grid; place-items: center; color: #496176; font-weight: 730; font-size: .85rem; }
.question-nav a.answered,.question-nav a.checked { background: #e6f4ed; color: #1c6e5e; border-color: #c9e9db; }
.question-nav a.current { box-shadow: inset 0 0 0 2px #40887b; }
.question-nav a.flagged { border-top: 3px solid #ba813d; }
.run-sidebar > p { font-size: .85rem; }
.run-actions { display: grid; gap: 7px; margin-top: 13px; }
.run-actions .btn { width: 100%; }
.run-sidebar .btn { white-space: normal; }
.rubric-group h3 { font-size: .98rem; padding-bottom: 8px; }
.rubric-row { display: flex; align-items: start; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid #e8eef2; }
.rubric-row strong { font-size: .91rem; }
.rubric-row p { font-size: .875rem; margin-top: 2px; }
.rubric-row .repair { display: inline-block; margin-top: 5px; font-size: .83rem; color: #087568; }
.rubric-score { width: 100px; flex: none; }
.audio-notice { flex-wrap: wrap; margin-block: 10px; }
.audio-notice .btn { margin-left: auto; }
.audio-transcript { width: 100%; border-top: 1px solid #d7e8e3; padding-top: 8px; }
.record-row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin: 9px 0; }
.record-time { color: #9b4835; font-size: .87rem; font-variant-numeric: tabular-nums; }
.audio-mount { padding-block: 4px; flex: 1 1 260px; }
.audio-mount audio { width: min(100%,380px); display: block; }
.stimulus-figure { margin-block: 12px; }
.stimulus-figure blockquote { padding: 12px 15px; border-left: 3px solid #95bcb5; background: #f5f8fa; font-family: Georgia,"Times New Roman",serif; }
.stimulus-figure blockquote p { margin-top: 4px; }
.stimulus-figure figcaption { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.poster { background: #163445; color: #fff; padding: 15px 19px; border-left: 8px solid #77d4bd; }
.poster small { color: #a8dcd0; font-weight: 750; font-size: .71rem; letter-spacing: .1em; }
.poster-line { font-size: .9rem; }
.poster-0 { font-size: clamp(1.4rem,3.6vw,2.2rem); font-weight: 870; letter-spacing: -.02em; color: #93efd9; }
.poster-1 { font-weight: 690; }
.poster-2,.poster-3 { margin-top: 7px; }
.poster-3 { font-weight: 720; }
#studio-dialog { color: var(--ink); border: 1px solid #d1e0e6; border-radius: 15px; padding: 0; width: min(590px,calc(100% - 28px)); max-height: calc(100dvh - 28px); box-shadow: 0 30px 80px #0e243a40; }
#studio-dialog::backdrop { background: #071a2b8f; }
#studio-dialog > header { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 17px; background: #fff; border-bottom: 1px solid var(--border); z-index: 1; }
#studio-dialog h2 { font-size: 1.25rem; letter-spacing: -.02em; }
.dialog-body { padding: 17px 19px 19px; }
.form-error { color: #a13d30; font-size: .875rem; }
.form-error:empty { display: none; }
.toast-region { position: fixed; bottom: 18px; right: 18px; z-index: 18; }
.toast { display: flex; align-items: center; gap: 9px; padding: 10px 12px; max-width: min(92vw,420px); background: #163342; color: #f3fffc; border: 1px solid #496165; border-radius: 10px; box-shadow: 0 7px 20px #102a3c2b; font-size: .9rem; }
.toast .icon { color: #78e4cb; }

@media (max-width: 1200px) {
  .sidebar { width: 215px; padding-inline: 13px; }
  .shell-main { margin-left: 215px; }
  .dashboard-bottom { grid-template-columns: minmax(0,1.85fr) minmax(240px,1fr); }
  .course-card { padding-inline: 12px; }
  .topic-meta .chip { font-size: .73rem; }
}
@media (max-width: 1020px) {
  .course-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .course-grid.wide { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dashboard-bottom { grid-template-columns: minmax(0,1.5fr) minmax(220px,1fr); }
  .page,.topbar { padding-inline: 22px; }
  .stat-card { padding-inline: 10px; }
  .lesson-layout { grid-template-columns: minmax(0,1.7fr) minmax(180px,1fr); }
  .lesson-card,.tool-card,.question-card { padding-inline: 15px; }
  .topic-meta .chip:first-child:not(:last-child) { display: none; }
}
@media (max-width: 825px) {
  .sidebar { transform: translateX(-100%); visibility: hidden; width: 242px; transition: transform .15s; box-shadow: 0 0 30px #10203022; }
  .menu-open .sidebar { transform: translateX(0); visibility: visible; }
  .menu-open .mobile-menu { position: sticky; z-index: 7; margin-left: 223px; }
  .shell-main { margin-left: 0; }
  .mobile-menu { display: inline-grid !important; }
  .crumb-root,.crumb-slash { display: none; }
  .page-heading h1 { font-size: clamp(1.7rem,4.95vw,2.35rem); }
  .hero-content { padding-inline: 24px; }
  .course-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 565px) {
  .page { padding: 17px 13px 38px; }
  .topbar { padding-inline: 13px; height: 57px; }
  .topbar-actions,.topbar-left { gap: 8px; }
  .today,.desktop-action { display: none; }
  .topbar-actions .btn { padding-inline: 8px; font-size: .78rem; }
  .page-heading { align-items: start; flex-wrap: wrap; margin-bottom: 14px; }
  .page-heading p { font-size: .9rem; }
  .hero { min-height: 222px; }
  .hero-content { max-width: 100%; padding: 18px 15px; }
  .hero canvas { width: 60%; opacity: .35; }
  .hero h2 { max-width: 94%; font-size: 1.85rem; }
  .hero p { max-width: 92%; font-size: .865rem; }
  .hero .actions { margin-top: 14px; }
  .hero .btn { padding-inline: 9px; font-size: .81rem; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-block: 10px 17px; }
  .stat-card { padding: 9px 10px; }
  .stat-card header > span:first-child { font-size: .79rem; }
  .stat-card strong { font-size: 1.37rem; }
  .stat-card p { font-size: .735rem; }
  .stat-icon { width: 26px; height: 26px; border-radius: 7px; }
  .stat-icon .icon { width: 15px; height: 15px; }
  .course-grid,.course-grid.wide { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .dashboard-bottom,.lesson-layout,.brief-grid,.resource-grid,.mistake-grid { grid-template-columns: minmax(0,1fr); }
  .course-card { min-height: 133px; }
  .dashboard-aside { gap: 8px; }
  .lesson-layout.run-layout > aside { grid-row: 1; gap: 7px; }
  .run-sidebar .run-actions { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
  .run-sidebar .run-actions .btn { padding-inline: 3px; font-size: .76rem; }
  .run-sidebar .run-actions .icon { display: none; }
  .run-layout > aside .lesson-card:not(.run-sidebar):not(.summary-result) { padding-block: 12px; }
  .question-nav { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .question-footer .actions .btn { padding-inline: 8px; }
  .fields-grid { grid-template-columns: minmax(0,1fr); }
  .panel-head { flex-wrap: wrap; gap: 6px; }
  .strategy-card,.plan-card { flex-wrap: wrap; gap: 8px; padding: 13px; }
  .plan-card a,.strategy-card a { flex-basis: 100%; margin-left: 28px; }
  .reference-notice { flex-wrap: wrap; }
  .reference-notice > a { margin-left: 28px; }
  .topic-row { padding-inline: 11px; }
  .topic-group > header { padding-inline: 11px; }
  .topic-group > header > div { flex-wrap: wrap; }
  .topic-meta .chip { max-width: 70px; text-align: center; }
  .session-list-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; }
}
