:root {
  --ink: #25394a;
  --muted: #677e8f;
  --line: #d9e7ef;
  --panel: #ffffff;
  --bg: #f4faff;
  --blue: #2189bd;
  --blue-dark: #17688f;
  --blue-soft: #e9f6fc;
  --cyan: #5cc6d0;
  --ice: #8ed9ee;
  --heat: #ef7c58;
  --heat-dark: #cb5d3d;
  --yellow: #f3c85c;
  --shadow: 0 18px 50px rgba(44, 91, 118, .11);
  font-family: "BIZ UDPGothic", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  min-width: 300px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 12%, rgba(92,198,208,.15), transparent 25rem),
    radial-gradient(circle at 94% 88%, rgba(243,200,92,.12), transparent 28rem),
    var(--bg);
}
button, input, select { font: inherit; }
button { color: inherit; }
button:not(:disabled), input[type="range"], input[type="checkbox"], select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(33,137,189,.28); outline-offset: 3px;
}
.screen { display: none; min-height: 100vh; }
.screen.is-active { display: block; }

.home-topbar {
  width: min(1180px, calc(100% - 48px)); min-height: 72px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.curriculum-tag { color: #537186; font-weight: 900; font-size: .9rem; letter-spacing: .05em; }
.curriculum-tag span { color: var(--cyan); font-size: .72rem; margin-right: 6px; }
.header-actions { display: flex; gap: 8px; }
.teacher-button {
  min-height: 43px; padding: 0 14px; border: 1px solid #cfe0e9; border-radius: 14px;
  background: rgba(255,255,255,.9); color: #41657a; font-weight: 900; font-size: .75rem;
}
.teacher-button:hover { background: #fff; }
.icon-button {
  width: 43px; height: 43px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.9);
  color: #486477; font-weight: 900; font-size: 1.05rem;
  transition: transform .15s ease, background .15s ease;
}
.icon-button:hover { transform: translateY(-1px); background: #fff; }

.home-layout {
  width: min(1120px, calc(100% - 56px)); min-height: calc(100vh - 88px); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(430px, 1.1fr); gap: clamp(44px, 7vw, 90px);
  align-items: center; padding: 24px 0 70px;
}
.home-hero { position: relative; padding-top: 280px; }
.lab-mark { position: absolute; top: -2px; left: 30px; width: 300px; height: 250px; }
.flask {
  position: absolute; left: 74px; bottom: 10px; width: 158px; height: 155px;
  border: 5px solid #6c9bb5; border-top: 0; border-radius: 20px 20px 72px 72px;
  background: rgba(255,255,255,.45); overflow: hidden; transform: rotate(-2deg);
  box-shadow: inset 12px 0 18px rgba(255,255,255,.6), 0 15px 30px rgba(52,102,127,.12);
}
.flask::before, .flask::after { content: ""; position: absolute; top: -52px; width: 38px; height: 61px; border: 5px solid #6c9bb5; background: rgba(255,255,255,.62); }
.flask::before { left: 57px; border-bottom: 0; }
.flask::after { display: none; }
.flask-water { position: absolute; left: 0; right: 0; bottom: 0; height: 72%; background: linear-gradient(#7bd5e6, #3da7d2); }
.flask-water::before { content: ""; position: absolute; left: -8%; top: -9px; width: 116%; height: 22px; border-radius: 50%; background: #9ee6ee; }
.flask-bubble { position: absolute; border: 3px solid rgba(255,255,255,.72); border-radius: 50%; }
.flask-bubble.b1 { width: 21px; height: 21px; left: 48px; bottom: 30px; }
.flask-bubble.b2 { width: 12px; height: 12px; left: 95px; bottom: 59px; }
.drop { position: absolute; width: 20px; height: 27px; border-radius: 65% 35% 60% 40%; background: #5cc6d0; transform: rotate(42deg); }
.drop-one { left: 44px; top: 35px; }
.drop-two { right: 35px; top: 78px; transform: rotate(42deg) scale(.7); background: #8bdce4; }
.drop-three { right: 68px; top: 20px; transform: rotate(42deg) scale(.45); background: #acdfe8; }

.eyebrow { margin: 0; color: #4a849f; font-size: .83rem; font-weight: 900; letter-spacing: .09em; }
.home-hero h1 { margin: 8px 0 0; font-size: clamp(3.5rem, 6vw, 5.4rem); line-height: 1; letter-spacing: -.06em; color: #26475c; }
.subtitle { margin: 18px 0 0; color: var(--blue); font-size: 1.08rem; font-weight: 900; }
.home-copy { margin: 22px 0 0; color: var(--muted); line-height: 1.85; font-size: .96rem; }

.mode-panel {
  padding: 30px; background: rgba(255,255,255,.93); border: 1px solid rgba(210,226,236,.95); border-radius: 26px;
  box-shadow: var(--shadow); backdrop-filter: blur(12px);
}
.panel-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.step-number { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: #eaf2f7; color: #5a7588; font-size: .8rem; font-weight: 900; }
.panel-heading strong, .panel-heading small { display: block; }
.panel-heading strong { font-size: 1rem; }
.panel-heading small { margin-top: 3px; color: var(--muted); font-size: .72rem; font-weight: 600; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-card {
  position: relative; min-height: 113px; padding: 15px; display: grid; grid-template-columns: 44px 1fr; gap: 11px;
  text-align: left; border: 2px solid #dfeaf1; border-radius: 17px; background: #fff;
}
.mode-card.is-selected { border-color: var(--blue); background: var(--blue-soft); }
.mode-card:hover { border-color: #bdd6e4; transform: translateY(-1px); }
.mode-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; font-size: 1.25rem; font-weight: 900; }
.mode-icon.heat { color: #b44e32; background: #fff0e9; }
.mode-icon.cool { color: #387ea7; background: #edf8ff; }
.mode-icon.daily { color: #477964; background: #edf8f1; }
.mode-icon.quiz { color: #8a6820; background: #fff7dd; }
.mode-text strong, .mode-text small { display: block; }
.mode-text strong { margin-top: 2px; font-size: .9rem; }
.mode-text small { margin-top: 6px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.selected-mark { position: absolute; top: 10px; right: 10px; width: 23px; height: 23px; display: none; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; font-size: .74rem; font-weight: 900; }
.mode-card.is-selected .selected-mark { display: grid; }
.phase-badge { position: absolute; right: 10px; bottom: 8px; padding: 3px 7px; border-radius: 999px; background: #edf1f4; color: #7c8d99; font-size: .6rem; font-weight: 900; }

.primary-button, .secondary-button, .small-button {
  border: 0; border-radius: 14px; font-weight: 900; transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.primary-button { min-height: 53px; padding: 0 20px; background: var(--blue); color: #fff; box-shadow: 0 8px 18px rgba(33,137,189,.2); }
.primary-button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.03); }
.primary-button:disabled { background: #b9c8d1; box-shadow: none; cursor: not-allowed; }
.secondary-button { min-height: 43px; padding: 0 13px; color: #526b7d; background: #edf3f6; }
.secondary-button:hover:not(:disabled), .small-button:hover:not(:disabled) { background: #e3edf2; }
.secondary-button:disabled, .small-button:disabled { opacity: .45; cursor: not-allowed; }
.small-button { min-height: 42px; padding: 0 12px; background: #edf3f6; color: #526b7d; }
.start-button { width: 100%; min-height: 58px; margin-top: 16px; font-size: 1rem; }
.phase-note { margin: 10px 0 0; text-align: center; color: #8a99a4; font-size: .68rem; }

/* Lab screen */
.lab-screen { padding-bottom: 28px; }
.lab-topbar {
  min-height: 70px; padding: 8px clamp(18px, 3vw, 42px); display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center;
  position: sticky; top: 0; z-index: 8; border-bottom: 1px solid rgba(211,225,234,.9); background: rgba(255,255,255,.88); backdrop-filter: blur(14px);
}
.topbar-left, .topbar-actions, .experiment-meta { display: flex; align-items: center; gap: 9px; }
.topbar-actions { justify-content: flex-end; }
.mini-brand { color: #35546a; }
.meta-pill, .state-badge { padding: 7px 12px; border-radius: 999px; font-size: .76rem; font-weight: 900; white-space: nowrap; }
.meta-pill { background: #eaf7fc; color: #277aa2; }
.state-badge { background: #edf8fb; color: #286f8a; }
.state-badge[data-phase="boiling"] { background: #fff0e9; color: #b55435; }
.state-badge[data-phase="melting"] { background: #eef7fa; color: #3a7791; }
.state-badge[data-phase="freezing"] { background: #edf7ff; color: #35739b; }
.state-badge[data-phase="condensing"] { background: #e8f8f5; color: #287d74; }
.temperature-badge { display: flex; align-items: baseline; gap: 5px; padding: 6px 11px; border-radius: 12px; background: #f4f7f9; color: #718492; }
.temperature-badge span { font-size: .62rem; font-weight: 800; }
.temperature-badge strong { color: #304e62; font-size: 1rem; }

.lab-layout {
  width: min(1240px, calc(100% - 42px)); margin: 0 auto; padding-top: 24px;
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(330px, .72fr); gap: clamp(20px, 3vw, 38px); align-items: start;
}
.experiment-heading { min-height: 76px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.experiment-heading h2 { margin: 6px 0 0; font-size: clamp(1.4rem, 2.1vw, 1.95rem); letter-spacing: -.025em; }
.view-switch { display: flex; flex: 0 0 auto; padding: 4px; border-radius: 12px; background: #eaf1f5; }
.view-switch button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: #687e8c; font-size: .72rem; font-weight: 900; }
.view-switch button.is-selected { background: #fff; color: var(--blue-dark); box-shadow: 0 2px 8px rgba(49,80,99,.1); }

.visual-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(235px, .72fr); gap: 12px; }
.canvas-card { overflow: hidden; border: 1px solid #d6e5ed; border-radius: 22px; background: #fff; box-shadow: 0 10px 30px rgba(55,93,115,.07); }
.canvas-card canvas { display: block; width: 100%; height: auto; }
.real-card { position: relative; }
.canvas-caption { padding: 8px 12px 10px; color: #6b8190; font-size: .66rem; text-align: center; line-height: 1.45; }
.legend-dot { display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 8px; border-radius: 50%; vertical-align: -1px; }
.legend-dot.visible { background: #fff; border: 1px solid #9db6c4; }
.legend-dot.vapor { background: transparent; border: 1px dashed #539dbd; }
.particle-card { position: relative; }
.particle-heading { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 0; }
.particle-heading strong { font-size: .85rem; }
.particle-heading span { padding: 3px 7px; border-radius: 999px; background: #eef5f8; color: #778d9b; font-size: .6rem; font-weight: 900; }
.particle-card canvas { margin-top: -4px; }
.particle-card p { margin: -18px 12px 12px; position: relative; z-index: 2; color: #82939e; font-size: .6rem; text-align: center; }
.visual-grid[data-view="real"] { grid-template-columns: 1fr; }
.visual-grid[data-view="real"] .particle-card { display: none; }
.visual-grid[data-view="particles"] { grid-template-columns: minmax(280px, 480px); justify-content: center; }
.visual-grid[data-view="particles"] .real-card { display: none; }

.graph-card { margin-top: 12px; overflow: hidden; border: 1px solid #d9e7ef; border-radius: 16px; background: #fff; }
.graph-card summary { padding: 12px 16px; cursor: pointer; color: #486477; font-size: .8rem; font-weight: 900; }
.graph-card summary span { margin-left: 8px; color: #8898a3; font-size: .67rem; font-weight: 600; }
.graph-card canvas { display: block; width: 100%; height: auto; border-top: 1px solid #edf2f5; }

.control-column { padding-top: 88px; display: grid; gap: 11px; }
.control-card, .observation-card { padding: 18px; border: 1px solid #d7e5ed; border-radius: 19px; background: rgba(255,255,255,.95); box-shadow: 0 9px 25px rgba(55,93,115,.06); }
.control-step { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; color: #466175; }
.control-step span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; background: #e9f3f8; color: #397a99; font-size: .73rem; font-weight: 900; }
.control-step strong { font-size: .88rem; }
.start-type { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 12px; background: #edf3f6; }
.start-type.is-three { grid-template-columns: repeat(3, 1fr); }
.start-type button { min-height: 36px; border: 0; border-radius: 9px; background: transparent; color: #607786; font-size: .74rem; font-weight: 900; }
.start-type button.is-selected { background: #fff; color: var(--blue-dark); box-shadow: 0 2px 8px rgba(49,80,99,.09); }
.start-type button:disabled { cursor: default; }
.prediction-question { margin: 14px 0 10px; color: #304d61; font-weight: 900; line-height: 1.55; font-size: .86rem; }
.prediction-options { display: grid; gap: 7px; }
.prediction-option { min-height: 44px; padding: 7px 10px; display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: center; text-align: left; border: 1px solid #dbe6ed; border-radius: 12px; background: #fff; }
.prediction-option span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: #edf4f8; color: #5b7687; font-size: .68rem; font-weight: 900; }
.prediction-option strong { font-size: .73rem; line-height: 1.35; }
.prediction-option.is-selected { border: 2px solid var(--blue); background: var(--blue-soft); }
.prediction-option.is-selected span { background: var(--blue); color: #fff; }
.prediction-option:disabled:not(.is-selected) { opacity: .45; }
.prediction-card .primary-button { width: 100%; min-height: 47px; margin-top: 11px; font-size: .78rem; }
.prediction-card.is-done { opacity: .68; }

.experiment-controls { transition: opacity .18s ease; }
.experiment-controls.is-locked { opacity: .46; }
.target-row { display: flex; justify-content: space-between; align-items: baseline; color: #6d8190; font-size: .72rem; }
.target-row strong { color: #294d63; font-size: 1.25rem; }
.temperature-slider { width: 100%; height: 30px; margin: 7px 0 0; accent-color: var(--heat); }
.temperature-scale { margin-top: -2px; display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; color: #8999a3; font-size: .58rem; }
.temperature-scale span:nth-child(2), .temperature-scale span:nth-child(3) { text-align: center; }
.temperature-scale span:last-child { text-align: right; }
.phase-point { color: #3c7793; font-weight: 900; }
.heat-button { width: 100%; margin-top: 13px; background: var(--heat); box-shadow: 0 8px 18px rgba(239,124,88,.18); font-size: .8rem; }
.experiment-controls[data-direction="cooling"] .temperature-slider { accent-color: var(--blue); }
.experiment-controls[data-direction="cooling"] .heat-button { background: var(--blue); box-shadow: 0 8px 18px rgba(33,137,189,.18); }
.heat-rate-buttons, .playback-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 7px; }
.heat-rate-buttons .secondary-button, .playback-buttons .small-button { font-size: .72rem; }

.observation-card { background: linear-gradient(145deg, #f1fafe, #fff); }
.observation-label { color: #5c7b8d; font-size: .69rem; font-weight: 900; letter-spacing: .05em; }
.state-line { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.state-line span { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 10px; background: #e8f6fb; color: #2f83a7; }
.state-line strong { font-size: 1.1rem; }
.observation-card > p { margin: 8px 0 10px; min-height: 48px; color: #536e7f; font-size: .75rem; line-height: 1.6; }
.amount-row { display: grid; grid-template-columns: auto 1fr auto; gap: 7px; align-items: center; color: #788b98; font-size: .58rem; }
.amount-track { height: 7px; overflow: hidden; border-radius: 999px; background: #dfe9ee; }
.amount-track span { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5bc2d0, #2e8ec0); transition: width .25s ease; }
.amount-row strong { color: #4f6a7b; font-size: .65rem; }
.concept-note { margin-top: 10px; padding: 9px 10px; border-left: 3px solid var(--yellow); border-radius: 4px 9px 9px 4px; background: #fff9e7; color: #6f623d; font-size: .68rem; line-height: 1.5; }

.event-toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 20; max-width: min(560px, calc(100% - 30px)); padding: 12px 18px;
  border: 1px solid #bcdce9; border-radius: 14px; background: rgba(255,255,255,.96); color: #315b72; box-shadow: 0 15px 40px rgba(39,80,103,.18);
  font-size: .84rem; font-weight: 900; text-align: center; transform: translate(-50%, 16px); opacity: 0; transition: .2s ease;
}
.event-toast.is-showing { transform: translate(-50%, 0); opacity: 1; }

.reflection-card { transition: opacity .18s ease; }
.reflection-card.is-locked { opacity: .45; pointer-events: none; }
.reflection-card > p { margin: 0 0 10px; color: #647b8b; font-size: .7rem; line-height: 1.5; }
.observation-checks { display: grid; gap: 6px; }
.observation-checks label { display: flex; gap: 8px; align-items: flex-start; color: #4f697a; font-size: .69rem; line-height: 1.4; }
.observation-checks input { width: 17px; height: 17px; margin: 0; flex: 0 0 auto; accent-color: var(--blue); }
.reflection-label { display: block; margin: 12px 0 5px; color: #4c6779; font-size: .68rem; font-weight: 900; }
.reflection-card textarea { width: 100%; resize: vertical; min-height: 68px; padding: 9px 10px; border: 1px solid #d5e3eb; border-radius: 11px; color: #345267; background: #fff; font: inherit; font-size: .72rem; line-height: 1.5; }
.reflection-card .primary-button { width: 100%; min-height: 42px; margin-top: 8px; font-size: .72rem; }
.saved-note { margin: 7px 0 0 !important; color: #287966 !important; text-align: center; font-weight: 900; }

.graph-card.is-expanded {
  position: fixed; inset: 82px 4vw 5vh; z-index: 7; margin: 0; padding: 10px; display: flex; flex-direction: column;
  background: #fff; box-shadow: 0 30px 90px rgba(27,59,78,.28);
}
.graph-card.is-expanded summary { font-size: 1rem; }
.graph-card.is-expanded canvas { flex: 1; min-height: 0; object-fit: contain; }

/* Question / quiz */
.question-screen { background: radial-gradient(circle at 12% 12%, rgba(92,198,208,.13), transparent 24rem), var(--bg); }
.question-topbar {
  width: min(1040px, calc(100% - 36px)); min-height: 72px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
}
.question-topbar .teacher-button { justify-self: end; }
.question-meta { display: flex; align-items: center; gap: 12px; color: #486477; }
.question-meta strong { font-size: .9rem; }
.question-meta span { padding: 5px 9px; border-radius: 999px; background: #e8f4f8; font-size: .68rem; font-weight: 900; }
.question-progress-track { width: min(1040px, calc(100% - 36px)); height: 5px; margin: 0 auto; overflow: hidden; border-radius: 999px; background: #dfeaf0; }
.question-progress-track span { display: block; width: 12.5%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #55bdc7, #2189bd); transition: width .25s ease; }
.question-layout { width: min(840px, calc(100% - 32px)); margin: 0 auto; padding: 45px 0 70px; }
.question-card { padding: clamp(26px, 5vw, 48px); border: 1px solid #d8e7ef; border-radius: 30px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.question-scene { width: 82px; height: 82px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 24px; background: linear-gradient(145deg, #e8f8fb, #f6fbfd); font-size: 2.7rem; }
.question-card h2 { margin: 8px 0 24px; color: #2b4b60; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.5; letter-spacing: -.02em; }
.answer-options { display: grid; gap: 9px; }
.answer-option { min-height: 60px; padding: 10px 14px; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 11px; text-align: left; border: 2px solid #dbe7ed; border-radius: 14px; background: #fff; }
.answer-option > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #edf5f8; color: #557184; font-size: .75rem; font-weight: 900; }
.answer-option strong { font-size: .88rem; line-height: 1.45; }
.answer-option.is-selected { border-color: var(--blue); background: var(--blue-soft); }
.answer-option.is-selected > span { color: #fff; background: var(--blue); }
.question-action { width: 100%; margin-top: 18px; }
.question-feedback { margin-top: 18px; padding: 18px; border-radius: 15px; border: 1px solid #cde5dc; background: #effaf6; color: #35665a; }
.question-feedback.is-wrong { border-color: #ead7bc; background: #fff8ea; color: #735f3c; }
.question-feedback strong { display: block; font-size: .92rem; }
.question-feedback p { margin: 7px 0 0; line-height: 1.7; font-size: .82rem; }
.question-feedback.is-held p { visibility: hidden; }
.question-feedback.is-held::after { content: "先生の合図を待ちましょう"; display: block; margin-top: 8px; font-weight: 900; }
.sequence-slots { min-height: 65px; display: grid; place-items: center; padding: 12px; border: 2px dashed #bfd4df; border-radius: 14px; background: #f7fbfd; color: #4d7084; font-weight: 900; }
.sequence-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sequence-chip, .sequence-reset { min-height: 43px; padding: 0 14px; border: 1px solid #d4e3ea; border-radius: 12px; background: #fff; color: #416579; font-weight: 900; }
.sequence-chip:disabled { opacity: .35; }
.sequence-reset { margin-left: auto; color: #7a6d62; background: #f8f4f0; }
.classify-items { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }
.classify-item { min-height: 44px; padding: 0 18px; border: 2px solid #cee0e8; border-radius: 999px; background: #fff; color: #365b71; font-weight: 900; }
.classify-item.is-selected { border-color: var(--blue); background: var(--blue-soft); }
.classify-item.is-assigned { opacity: .55; }
.classify-bins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.classify-bin { min-height: 86px; padding: 10px; border: 2px dashed #bdd5df; border-radius: 14px; background: #f6fbfd; color: #476b7f; }
.classify-bin strong, .classify-bin span { display: block; }
.classify-bin strong { font-size: .86rem; }
.classify-bin span { margin-top: 7px; color: #76909f; font-size: .67rem; line-height: 1.4; }

/* Result */
.result-screen { display: none; place-items: center; padding: 30px; }
.result-screen.is-active { display: grid; }
.result-card { width: min(560px, 100%); padding: 48px; text-align: center; border: 1px solid #d7e6ed; border-radius: 30px; background: #fff; box-shadow: var(--shadow); }
.result-icon { width: 88px; height: 88px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 28px; background: #e9f8fa; font-size: 2.7rem; }
.result-card .eyebrow { text-align: center; }
.result-card h2 { margin: 8px 0 12px; font-size: 2rem; }
.result-score { color: var(--blue); font-size: 3rem; font-weight: 900; letter-spacing: -.04em; }
.result-card > p:not(.eyebrow) { color: #647b8b; line-height: 1.7; }
.result-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 9px; margin-top: 24px; }

/* Teacher mode */
.teacher-status { padding: 9px 11px; border-radius: 10px; background: #eef6f9; color: #537183; font-size: .73rem; font-weight: 900; }
.teacher-tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin: 15px 0; }
.teacher-tool-grid button { min-height: 42px; padding: 6px 10px; border: 1px solid #d5e3ea; border-radius: 10px; background: #f8fbfc; color: #49697b; font-size: .7rem; font-weight: 900; }
.teacher-tool-grid button:disabled { opacity: .35; }
.teacher-jump { display: grid; gap: 6px; color: #526f81; font-size: .72rem; font-weight: 900; }
.teacher-jump select { min-height: 39px; border: 1px solid #d2e0e8; border-radius: 9px; background: #fff; padding: 0 8px; color: #4a6779; }
.teacher-jump-button { width: 100%; margin: 7px 0 13px; }
.teacher-mode .question-card h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.teacher-mode .prediction-question { font-size: 1rem; }
.teacher-hide-answers .answer-options, .teacher-hide-answers .prediction-options { visibility: hidden; }
.wait-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 30px; background: #f0f8fc; }
.wait-overlay[hidden] { display: none; }
.wait-card { width: min(680px, 100%); padding: 60px 30px; text-align: center; }
.wait-card > span { display: block; font-size: 3rem; }
.wait-card h2 { margin: 20px 0; color: #2e5268; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.4; }
.wait-card p { color: #6a8190; line-height: 1.7; }
.wait-card .primary-button { min-width: 220px; margin-top: 20px; }
.text-large { font-size: 112%; }

/* Settings */
.settings-dialog { width: min(500px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 24px; color: var(--ink); box-shadow: 0 26px 80px rgba(33,58,73,.24); }
.settings-dialog::backdrop { background: rgba(37,57,74,.34); backdrop-filter: blur(3px); }
.settings-dialog form { padding: 24px; }
.settings-dialog header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.settings-dialog h2 { margin: 4px 0 0; }
.setting-row { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #eaf0f4; }
.setting-row strong, .setting-row small { display: block; }
.setting-row small { margin-top: 4px; color: #7b8f9d; font-size: .7rem; }
.setting-row input { width: 22px; height: 22px; accent-color: var(--blue); }
.setting-row select { min-height: 36px; border: 1px solid #d2e0e8; border-radius: 9px; background: #fff; padding: 0 8px; color: #4a6779; }
.danger-link { margin: 18px 0; padding: 4px 0; border: 0; background: none; color: #a34f42; text-decoration: underline; }
.done-button { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
