:root {
  --ink: #183052;
  --muted: #60728c;
  --paper: #fffdf8;
  --cream: #fff6d9;
  --sun: #ffc94d;
  --sun-dark: #9a6510;
  --aqua: #35c7b1;
  --aqua-dark: #087b70;
  --blue: #5579e9;
  --blue-dark: #284bb1;
  --coral: #ff827a;
  --pink: #f5a8d0;
  --green: #2ca56f;
  --red: #c94d5b;
  --line: #dce6ee;
  --shadow: 0 18px 55px rgba(55, 85, 125, 0.15);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(255, 201, 77, .34), transparent 26rem),
    radial-gradient(circle at 92% 20%, rgba(53, 199, 177, .22), transparent 28rem),
    linear-gradient(145deg, #fffbed 0%, #f6fcff 54%, #fff3f8 100%);
  font-family: Tahoma, Arial, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.sky-dot {
  position: fixed;
  z-index: -1;
  width: 16rem;
  height: 16rem;
  border: 2px dashed rgba(85, 121, 233, .16);
  border-radius: 50%;
  pointer-events: none;
}

.dot-one { top: -7rem; right: -5rem; }
.dot-two { bottom: -9rem; left: -5rem; border-color: rgba(255, 130, 122, .2); }

.app-shell { width: min(1180px, calc(100% - 28px)); margin: 0 auto; }

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: right;
  cursor: pointer;
}

.brand-zero {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: white;
  background: var(--blue);
  border: 4px solid white;
  border-radius: 17px;
  box-shadow: 0 8px 22px rgba(85, 121, 233, .28);
  font-size: 1.6rem;
  font-weight: 900;
  transform: rotate(-5deg);
}

.brand small, .brand strong { display: block; }
.brand small { color: var(--muted); font-size: .76rem; }
.brand strong { font-size: 1.18rem; line-height: 1.2; }

.round-button {
  width: 45px;
  height: 45px;
  border: 1px solid rgba(24, 48, 82, .1);
  border-radius: 50%;
  color: var(--blue-dark);
  background: rgba(255,255,255,.78);
  box-shadow: 0 8px 24px rgba(55,85,125,.1);
  cursor: pointer;
}

.screen { animation: rise .45s ease both; }

.choose-screen {
  display: grid;
  grid-template-columns: minmax(260px, .78fr) minmax(520px, 1.6fr);
  gap: 24px;
  align-items: start;
  padding: 22px 0 32px;
}

.welcome-card, .problem-library, .lesson-card, .branch-map, .result-screen {
  border: 1px solid rgba(24, 48, 82, .08);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.welcome-card {
  position: sticky;
  top: 18px;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 32px 12px 32px 32px;
  overflow: hidden;
}

.welcome-card::after {
  content: "0";
  position: absolute;
  left: -10px;
  bottom: -68px;
  color: rgba(85, 121, 233, .07);
  font-size: 13rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.tiny-chip, .result-chip {
  display: inline-flex;
  padding: 6px 12px;
  color: var(--aqua-dark);
  background: #e8fbf7;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
}

.welcome-card h1 {
  margin: 18px 0 12px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.22;
  letter-spacing: -.03em;
}

.welcome-card h1 em { color: var(--blue); font-style: normal; }
.welcome-card > p { margin: 0 0 28px; color: var(--muted); font-size: 1rem; }
.welcome-card label { display: block; margin-bottom: 7px; font-size: .9rem; font-weight: 800; }

.name-row { position: relative; }
.name-row input {
  width: 100%;
  min-height: 52px;
  padding: 10px 16px 10px 45px;
  border: 2px solid var(--line);
  border-radius: 16px;
  outline: 0;
  background: white;
  font-size: 1rem;
  transition: .2s ease;
}
.name-row input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(85,121,233,.1); }
.name-row span { position: absolute; left: 15px; top: 50%; color: var(--sun-dark); transform: translateY(-50%); }
.field-error { min-height: 24px; margin: 5px 0 0; color: var(--red); font-size: .86rem; }

.problem-library { padding: clamp(22px, 3vw, 34px); border-radius: 18px 34px 34px 34px; }
.library-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.library-head span { color: var(--coral); font-size: .82rem; font-weight: 900; }
.library-head h2 { margin: 3px 0 0; font-size: clamp(1.35rem, 3vw, 2rem); }
.library-head p { max-width: 230px; margin: 0; color: var(--muted); font-size: .88rem; }

.problem-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.problem-card {
  position: relative;
  min-height: 126px;
  padding: 18px;
  border: 2px solid transparent;
  border-radius: 22px;
  text-align: right;
  background: #f8fbff;
  cursor: pointer;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.problem-card:hover, .problem-card:focus-visible { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 12px 28px rgba(85,121,233,.14); outline: 0; }
.problem-card.absolute { background: #fff9e9; }
.problem-card.done { border-color: rgba(44,165,111,.45); }
.problem-type { display: block; margin-bottom: 13px; color: var(--muted); font-size: .78rem; font-weight: 800; }
.problem-card .math { display: block; color: var(--ink); font-family: Arial, sans-serif; font-size: clamp(1.22rem, 2.4vw, 1.6rem); font-weight: 900; direction: ltr; text-align: center; }
.problem-card .card-arrow { position: absolute; bottom: 12px; left: 14px; color: var(--blue); font-weight: 900; }
.problem-card.absolute .card-arrow { color: var(--sun-dark); }
.done-mark { position: absolute; top: 12px; left: 12px; display: grid; width: 25px; height: 25px; place-items: center; color: white; background: var(--green); border-radius: 50%; }

.lesson-screen { max-width: 960px; margin: 0 auto; padding: 10px 0 34px; }
.lesson-hud { margin-bottom: 17px; }
.text-button { padding: 5px 0; border: 0; color: var(--blue-dark); background: transparent; font-weight: 800; cursor: pointer; }
.progress-copy { display: flex; justify-content: space-between; margin: 6px 0; color: var(--muted); font-size: .84rem; font-weight: 800; }
.progress-track { height: 10px; border-radius: 999px; background: rgba(85,121,233,.1); overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--aqua), var(--blue)); transition: width .4s ease; }

.branch-map { padding: 20px clamp(16px, 4vw, 34px); border-radius: 25px; }
.branch-root { width: fit-content; min-width: 240px; margin: 0 auto; padding: 10px 22px; text-align: center; border: 2px solid rgba(85,121,233,.2); border-radius: 17px; background: #f7f9ff; }
.branch-root small, .branch-root strong { display: block; }
.branch-root small { color: var(--muted); font-size: .74rem; }
.branch-root strong { margin-top: 2px; font-family: Arial, sans-serif; font-size: 1.25rem; }
.branch-lines { display: flex; justify-content: center; height: 29px; gap: 198px; overflow: hidden; }
.branch-lines span { width: 2px; height: 32px; background: var(--line); transform-origin: top; }
.branch-lines span:first-child { transform: rotate(58deg); }
.branch-lines span:last-child { transform: rotate(-58deg); }
.branch-nodes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.branch-node { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 87px; padding: 12px; border: 2px solid var(--line); border-radius: 18px; opacity: .58; transition: .25s ease; }
.branch-node.active { border-color: var(--blue); background: #f3f6ff; opacity: 1; box-shadow: 0 8px 24px rgba(85,121,233,.12); }
.branch-node.complete { border-color: var(--green); background: #effbf5; opacity: .8; }
.branch-icon { display: grid; width: 44px; height: 44px; place-items: center; color: var(--blue-dark); background: white; border-radius: 14px; font-size: 1.5rem; font-weight: 900; box-shadow: 0 5px 14px rgba(55,85,125,.12); }
.branch-node small, .branch-node strong, .branch-node p { display: block; margin: 0; }
.branch-node small { color: var(--muted); font-size: .7rem; }
.branch-node strong { font-size: 1rem; }
.branch-node p { color: var(--muted); font-size: .76rem; }

.lesson-card { margin-top: 18px; padding: clamp(20px, 4vw, 38px); border-radius: 32px 14px 32px 32px; }
.lesson-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; padding-bottom: 23px; border-bottom: 1px solid var(--line); }
.stage-kicker { color: var(--coral); font-size: .8rem; font-weight: 900; }
.lesson-head h2 { margin: 4px 0 4px; font-size: clamp(1.45rem, 3vw, 2.15rem); line-height: 1.3; }
.lesson-head p { max-width: 670px; margin: 0; color: var(--muted); }
.stage-badge { display: grid; flex: 0 0 auto; width: 58px; height: 58px; place-items: center; border-radius: 19px; color: var(--blue-dark); background: #edf1ff; font-size: 1.55rem; font-weight: 900; transform: rotate(-3deg); }
.stage-body { padding-top: 26px; }

.equation-strip {
  display: flex;
  direction: ltr;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 92px;
  padding: 18px;
  border: 2px dashed rgba(85,121,233,.24);
  border-radius: 22px;
  background: #fafbff;
  font-family: Arial, sans-serif;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  font-weight: 800;
}
.blank-symbol { display: grid; min-width: 62px; min-height: 52px; place-items: center; border: 3px solid var(--sun); border-radius: 15px; color: var(--sun-dark); background: #fff8dd; }
.symbol-picker { display: flex; direction: ltr; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 22px 0; }
.symbol-choice { min-width: 62px; min-height: 55px; border: 2px solid var(--line); border-radius: 15px; background: white; font-family: Arial, sans-serif; font-size: 1.45rem; font-weight: 900; cursor: pointer; transition: .16s ease; }
.symbol-choice:hover, .symbol-choice:focus-visible { border-color: var(--blue); transform: translateY(-2px); outline: 0; }
.symbol-choice.correct { color: white; border-color: var(--green); background: var(--green); }
.symbol-choice.wrong { color: white; border-color: var(--red); background: var(--red); animation: shake .28s ease; }

.vertex-alert { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border: 1px solid #f3d47b; border-radius: 18px; background: #fff9e5; }
.vertex-alert span { font-size: 1.7rem; }
.vertex-alert strong, .vertex-alert p { display: block; margin: 0; }
.vertex-alert p { color: var(--muted); font-size: .9rem; }
.token-question { margin: 22px 0 10px; text-align: center; font-weight: 800; }
.token-row { display: flex; direction: ltr; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.math-token { min-height: 55px; padding: 8px 16px; border: 2px solid var(--line); border-radius: 15px; background: white; font-family: Arial, sans-serif; font-size: 1.35rem; font-weight: 800; cursor: pointer; }
.math-token:hover, .math-token:focus-visible { border-color: var(--sun); outline: 0; }
.math-token.selected { border-color: var(--aqua); background: #eafbf8; box-shadow: 0 0 0 4px rgba(53,199,177,.12); }
.math-token.wrong { border-color: var(--red); animation: shake .28s ease; }
.vertex-solve { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; max-width: 600px; margin: 22px auto 0; padding: 18px; border-radius: 19px; background: #f5f8ff; }
.vertex-solve label { display: block; margin-bottom: 7px; font-weight: 800; }
.inline-math { direction: ltr; font-family: Arial, sans-serif; }

.point-table-wrap { overflow-x: auto; padding: 3px; }
.point-table { width: 100%; min-width: 610px; border-collapse: separate; border-spacing: 0 9px; }
.point-table th { padding: 4px 12px; color: var(--muted); font-size: .86rem; }
.point-table td { padding: 12px; text-align: center; background: #f8fbff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.point-table td:first-child { border-radius: 0 15px 15px 0; border-right: 1px solid var(--line); }
.point-table td:last-child { border-radius: 15px 0 0 15px; border-left: 1px solid var(--line); }
.point-table tr.break-row td { background: #fff8df; border-color: #f0d990; }
.math-cell { direction: ltr; font-family: Arial, sans-serif; font-size: 1.05rem; font-weight: 700; }
.answer-input, .zero-input {
  width: 78px;
  min-height: 46px;
  border: 2px solid #cfdbea;
  border-radius: 13px;
  text-align: center;
  direction: ltr;
  outline: 0;
  background: white;
  font-weight: 900;
}
.answer-input:focus, .zero-input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(85,121,233,.1); }
.answer-input.invalid { border-color: var(--red); background: #fff3f4; animation: shake .28s ease; }
.lamp-button { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: 7px; padding: 7px 10px; border: 1px solid #f0d47b; border-radius: 12px; color: #78520c; background: #fff7d7; font-size: .78rem; font-weight: 800; cursor: pointer; }
.lamp-button .bulb { display: inline-block; animation: lampPulse 1.4s ease-in-out infinite; }
.help-box { margin: 10px 0 18px; padding: 15px 18px; border-right: 5px solid var(--sun); border-radius: 14px; color: #5a4a28; background: #fff9e7; font-size: .92rem; }
.help-box ol { margin: 5px 0 0; padding-right: 20px; }
.help-box li + li { margin-top: 5px; }
.pulse-term { display: inline-block; padding: 0 5px; border-radius: 7px; color: #773f00; background: #ffe18a; animation: termGlow 1.05s ease-in-out infinite; }

.action-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.primary-button, .secondary-button {
  min-height: 50px;
  padding: 11px 22px;
  border-radius: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}
.primary-button { border: 0; color: white; background: linear-gradient(135deg, var(--blue), #6e5edb); box-shadow: 0 10px 24px rgba(85,121,233,.25); }
.secondary-button { border: 2px solid var(--line); background: white; }
.secondary-button.invalid { color: var(--red); border-color: var(--red); background: #fff3f4; animation: shake .28s ease; }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.primary-button:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }

.feedback { margin-top: 18px; padding: 13px 16px; border-radius: 14px; font-weight: 700; }
.feedback.success { color: #176744; background: #eaf8f1; border: 1px solid #b6e5cd; }
.feedback.error { color: #973d49; background: #fff0f2; border: 1px solid #f2c5cb; }
.feedback.info { color: #3d579e; background: #eef2ff; border: 1px solid #cad5fb; }

.graph-layout { display: grid; grid-template-columns: minmax(310px, 1.35fr) minmax(190px, .65fr); gap: 20px; align-items: start; }
.coordinate-wrap { position: relative; max-width: 590px; margin: 0 auto; padding: 10px; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: inset 0 0 0 6px #f6f9fc; }
.coordinate-svg { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 17px; touch-action: manipulation; cursor: crosshair; }
.graph-side { display: grid; gap: 12px; }
.graph-note, .draw-task { padding: 16px; border-radius: 17px; background: #f5f8ff; }
.graph-note strong, .draw-task strong { display: block; margin-bottom: 5px; }
.graph-note p, .draw-task p { margin: 0; color: var(--muted); font-size: .9rem; }
.point-list { display: flex; flex-wrap: wrap; gap: 7px; min-height: 40px; }
.point-pill { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border-radius: 999px; color: var(--blue-dark); background: #edf1ff; direction: ltr; font-family: Arial, sans-serif; font-weight: 800; }
.point-pill button { border: 0; color: var(--red); background: transparent; cursor: pointer; }
.grid-line { stroke: #dfe7ee; stroke-width: 1; }
.axis-line { stroke: #385374; stroke-width: 2.6; }
.axis-arrow { fill: #385374; }
.tick-label, .axis-label { fill: #526a84; font-family: Arial, sans-serif; font-size: 12px; pointer-events: none; }
.axis-label { font-size: 17px; font-weight: 900; }
.selected-dot { fill: var(--coral); stroke: white; stroke-width: 4; filter: drop-shadow(0 4px 4px rgba(201,77,91,.25)); }
.guide-dot { fill: white; stroke: var(--blue); stroke-width: 4; }
.draw-dot { fill: var(--aqua); stroke: white; stroke-width: 4; }
.boundary-line { fill: none; stroke: var(--blue-dark); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.boundary-line.dashed { stroke-dasharray: 12 10; }
.shade-region { fill: rgba(53, 199, 177, .23); stroke: none; }

.draw-steps { display: grid; gap: 10px; counter-reset: draw; }
.draw-task { position: relative; padding-right: 53px; }
.draw-task::before { counter-increment: draw; content: counter(draw); position: absolute; right: 13px; top: 14px; display: grid; width: 30px; height: 30px; place-items: center; color: white; background: var(--blue); border-radius: 10px; font-weight: 900; }
.draw-task.done { background: #ecfaf4; }
.draw-task.done::before { content: "✓"; background: var(--green); }

.zero-workspace { max-width: 760px; margin: 0 auto; }
.zero-card { padding: 22px; border: 2px dashed rgba(85,121,233,.26); border-radius: 22px; background: #fafbff; }
.zero-card h3 { margin: 0 0 13px; text-align: center; }
.zero-expression { display: flex; direction: ltr; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; min-height: 75px; font-family: Arial, sans-serif; font-size: clamp(1.25rem, 4vw, 1.75rem); font-weight: 800; }
.truth-question { margin-top: 18px; padding: 18px; border-radius: 18px; text-align: center; background: #fff8e3; }
.truth-question h3 { margin: 0 0 12px; }
.truth-options { display: flex; justify-content: center; gap: 10px; }
.truth-options button { min-width: 125px; }
.origin-conclusion { margin-top: 16px; padding: 17px; border-radius: 17px; text-align: center; color: #176744; background: #eaf8f1; font-weight: 900; }

.decision-dialog {
  width: min(520px, calc(100% - 26px));
  padding: clamp(24px, 5vw, 38px);
  border: 0;
  border-radius: 29px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 28px 90px rgba(24,48,82,.28);
  text-align: center;
}
.decision-dialog::backdrop { background: rgba(34, 50, 78, .5); backdrop-filter: blur(5px); }
.decision-dialog[open] { animation: dialogIn .28s ease both; }
.dialog-icon { display: grid; width: 66px; height: 66px; margin: 0 auto 12px; place-items: center; border-radius: 22px; color: var(--blue-dark); background: #edf1ff; font-size: 2rem; font-weight: 900; }
.decision-dialog h2 { margin: 5px 0; font-size: 1.7rem; }
.decision-dialog > p { margin: 0 auto 18px; color: var(--muted); }
.dialog-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-option { min-height: 70px; padding: 10px; border: 2px solid var(--line); border-radius: 17px; background: white; font-weight: 900; cursor: pointer; }
.dialog-option:hover, .dialog-option:focus-visible { border-color: var(--blue); outline: 0; }
.dialog-option.correct { color: white; border-color: var(--green); background: var(--green); }
.dialog-option.wrong { border-color: var(--red); color: var(--red); background: #fff3f4; }
.decision-dialog .primary-button { width: 100%; margin-top: 14px; }

.result-screen { position: relative; max-width: 720px; margin: 34px auto; padding: clamp(30px, 6vw, 58px); border-radius: 38px 16px 38px 38px; text-align: center; overflow: hidden; }
.result-burst { display: grid; width: 84px; height: 84px; margin: 0 auto 16px; place-items: center; color: #7a5400; background: var(--sun); border: 7px solid #fff5cd; border-radius: 28px; font-size: 2.1rem; transform: rotate(-7deg); animation: celebrate .7s ease both; }
.result-screen h2 { margin: 12px 0 4px; font-size: clamp(1.8rem, 5vw, 2.8rem); }
.result-screen > p { color: var(--muted); }
.result-equation { width: fit-content; margin: 22px auto; padding: 14px 25px; border-radius: 17px; color: var(--blue-dark); background: #edf1ff; font-size: 1.45rem; font-weight: 900; }
.result-checks { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.result-checks span { padding: 8px 12px; border-radius: 999px; color: #176744; background: #eaf8f1; font-size: .86rem; font-weight: 800; }
.screenshot-note { margin-bottom: 0 !important; font-size: .86rem; }

footer { padding: 17px 0 26px; text-align: center; color: var(--muted); font-size: .8rem; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dialogIn { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes shake { 25% { transform: translateX(5px); } 50% { transform: translateX(-5px); } 75% { transform: translateX(3px); } }
@keyframes lampPulse { 0%,100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); } 50% { transform: scale(1.16); filter: drop-shadow(0 0 7px #ffc94d); } }
@keyframes termGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(255,201,77,.15); } 50% { box-shadow: 0 0 0 7px rgba(255,201,77,.28); } }
@keyframes celebrate { from { opacity: 0; transform: scale(.4) rotate(-35deg); } 70% { transform: scale(1.12) rotate(4deg); } to { opacity: 1; transform: scale(1) rotate(-7deg); } }

@media (max-width: 860px) {
  .choose-screen { grid-template-columns: 1fr; }
  .welcome-card { position: static; }
  .graph-layout { grid-template-columns: 1fr; }
  .graph-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .app-shell { width: min(100% - 18px, 1180px); }
  .topbar { min-height: 72px; }
  .brand-zero { width: 42px; height: 42px; border-radius: 14px; }
  .problem-grid { grid-template-columns: 1fr; }
  .library-head { display: block; }
  .library-head p { margin-top: 8px; }
  .branch-root { min-width: 0; width: 100%; }
  .branch-lines { gap: 92px; height: 24px; }
  .branch-node { display: block; text-align: center; }
  .branch-icon { margin: 0 auto 6px; }
  .branch-node p { display: none; }
  .lesson-head { gap: 10px; }
  .stage-badge { width: 48px; height: 48px; border-radius: 15px; }
  .vertex-solve { grid-template-columns: 1fr; }
  .graph-side { grid-template-columns: 1fr; }
  .dialog-options { grid-template-columns: 1fr; }
}

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