:root {
  color-scheme: light dark;
  --red: #d7141a;
  --blue: #11457e;
  --gold: #f4b400;
  --green: #1b7f5a;
  --bg: #f4f7fc;
  --card: #ffffff;
  --ink: #1c2433;
  --mut: #5b667a;
  --line: #dfe5f0;
  --ok: #1b8a4b;
  --okbg: #e5f6ec;
  --no: #c0262d;
  --nobg: #fdeaea;
  --sh: 0 2px 10px rgba(17,69,126,.08);
  --link: #11457e;
  --hook-bg-1: #fff7df;
  --hook-bg-2: #ffeaa6;
  --hook-ink: #4b3600;
  --opt-border: #dfe5f0;
  --opt-shadow: 0 3px 0 var(--line), 0 3px 8px rgba(0, 0, 0, 0.05);
  --opt-hover-border: #3b82f6;
  --opt-hover-bg: rgba(59, 130, 246, 0.1);
  --opt-hover-shadow: 0 5px 0 #3b82f6, 0 6px 14px rgba(59, 130, 246, 0.2);
  --opt-badge-bg: rgba(59, 130, 246, 0.12);
  --opt-badge-ink: #3b82f6;
  --story-bg: rgba(59, 130, 246, 0.08);
  --story-border: rgba(59, 130, 246, 0.2);
  --weak-bg: #fff7ed;
  --weak-border: #fdba74;
  --weak-ink: #9a3412;
  --pressed-bg: #eef1ff;
  --pressed-ink: #1e4599;
  --uk-badge-bg: rgba(27, 127, 90, 0.12);
  --uk-badge-ink: #1b7f5a;
  --glossary-desc-bg: rgba(0, 0, 0, 0.02);
  --sched-bg: rgba(17, 69, 126, .12);
  --sched-ink: #11457e;
  --spiral-ink: #7c5600;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151f;
    --card: #1a2230;
    --ink: #eaeef7;
    --mut: #a5afc2;
    --line: #2c3649;
    --okbg: #14301f;
    --nobg: #3a1b1d;
    --sh: none;
    --link: #8fb8ff;
    --hook-bg-1: #3b3010;
    --hook-bg-2: #3b3010;
    --hook-ink: #ffe9a3;
    --opt-border: #334155;
    --opt-shadow: 0 3px 0 #1e293b, 0 4px 10px rgba(0, 0, 0, 0.3);
    --opt-hover-border: #60a5fa;
    --opt-hover-bg: rgba(96, 165, 250, 0.16);
    --opt-hover-shadow: 0 5px 0 #60a5fa, 0 6px 16px rgba(96, 165, 250, 0.25);
    --opt-badge-bg: rgba(96, 165, 250, 0.22);
    --opt-badge-ink: #93c5fd;
    --story-bg: rgba(96, 165, 250, 0.1);
    --story-border: rgba(96, 165, 250, 0.25);
    --weak-bg: #381f14;
    --weak-border: #9a3412;
    --weak-ink: #fdba74;
    --pressed-bg: #1b2842;
    --pressed-ink: #8fb8ff;
    --uk-badge-bg: rgba(52, 211, 153, 0.18);
    --uk-badge-ink: #6ee7b7;
    --glossary-desc-bg: rgba(255, 255, 255, 0.04);
    --sched-bg: rgba(143, 184, 255, .18);
    --sched-ink: #8fb8ff;
    --spiral-ink: #ffd666;
  }
}
@supports (color: light-dark(white, black)) {
  :root {
    --bg: light-dark(#f4f7fc, #10151f);
    --card: light-dark(#ffffff, #1a2230);
    --ink: light-dark(#1c2433, #eaeef7);
    --mut: light-dark(#5b667a, #a5afc2);
    --line: light-dark(#dfe5f0, #2c3649);
    --okbg: light-dark(#e5f6ec, #14301f);
    --nobg: light-dark(#fdeaea, #3a1b1d);
    --link: light-dark(#11457e, #8fb8ff);
    --hook-bg-1: light-dark(#fff7df, #3b3010);
    --hook-bg-2: light-dark(#ffeaa6, #3b3010);
    --hook-ink: light-dark(#4b3600, #ffe9a3);
    --opt-border: light-dark(#dfe5f0, #334155);
    --opt-hover-border: light-dark(#3b82f6, #60a5fa);
    --opt-hover-bg: light-dark(rgba(59, 130, 246, 0.1), rgba(96, 165, 250, 0.16));
    --opt-badge-bg: light-dark(rgba(59, 130, 246, 0.12), rgba(96, 165, 250, 0.22));
    --opt-badge-ink: light-dark(#3b82f6, #93c5fd);
    --story-bg: light-dark(rgba(59, 130, 246, 0.08), rgba(96, 165, 250, 0.1));
    --story-border: light-dark(rgba(59, 130, 246, 0.2), rgba(96, 165, 250, 0.25));
    --weak-bg: light-dark(#fff7ed, #381f14);
    --weak-border: light-dark(#fdba74, #9a3412);
    --weak-ink: light-dark(#9a3412, #fdba74);
    --pressed-bg: light-dark(#eef1ff, #1b2842);
    --pressed-ink: light-dark(#1e4599, #8fb8ff);
    --uk-badge-bg: light-dark(rgba(27, 127, 90, 0.12), rgba(52, 211, 153, 0.18));
    --uk-badge-ink: light-dark(#1b7f5a, #6ee7b7);
    --glossary-desc-bg: light-dark(rgba(0, 0, 0, 0.02), rgba(255, 255, 255, 0.04));
    --sched-bg: light-dark(rgba(17, 69, 126, .12), rgba(143, 184, 255, .18));
    --sched-ink: light-dark(#11457e, #8fb8ff);
    --spiral-ink: light-dark(#7c5600, #ffd666);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--link); }

/* Sticky Header */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--blue);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  padding: 8px 14px;
}
.top .logo {
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  color: #fff;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a {
  color: #fff;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .92rem;
}
.top nav a.on, .top nav a:hover { background: rgba(255,255,255,.2); }
.pill {
  background: rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .85rem;
  white-space: nowrap;
}
.dot {
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  font-size: .72rem;
  padding: 0 6px;
  margin-left: 4px;
}

/* Layout */
main {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 14px 60px;
}
h1 { font-size: 1.7rem; margin: .2em 0; }
h2 { font-size: 1.3rem; margin: 1.4em 0 .5em; }
h3 { font-size: 1.1rem; margin: .2em 0 .5em; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--sh);
  margin: 12px 0;
}
.center { text-align: center; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--blue), #1e6fb8);
  color: #fff;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.hero .mascot { font-size: 3.2rem; }
.hero p { margin: .2em 0; opacity: .95; }
.xpbar {
  height: 10px;
  background: rgba(255,255,255,.25);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
  min-width: 200px;
}
.xpbar i { display: block; height: 100%; background: var(--gold); }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--link); border: 2px solid var(--link); }
.btn.blue { background: var(--blue); }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn:focus-visible, .opt:focus-visible, .node:focus-visible, .tile:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Today's Mission Block */
.mission .step { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.mission .chk {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-size: .9rem;
  flex: none;
}
.mission .done .chk { background: var(--ok); border-color: var(--ok); color: #fff; }
.mission .done a { color: var(--mut); text-decoration: none; }

/* Worlds & Nodes */
.world { margin-top: 22px; }
.world h2 { display: flex; align-items: center; gap: 8px; }
.wbar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 4px 0 10px; }
.wbar i { display: block; height: 100%; background: var(--green); }
.nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.node {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--sh);
}
.node:hover { border-color: var(--blue); }
.node .ic { font-size: 1.8rem; }
.node b { display: block; line-height: 1.25; margin-top: 4px; }
.node .st { color: var(--gold); letter-spacing: 2px; font-size: 1.05rem; }
.node.done { border-color: var(--ok); }
.node.next { border-color: var(--red); box-shadow: 0 0 0 3px rgba(215,20,26,.15); }

/* Badges */
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 10px;
  font-size: .88rem;
}
.badge.off { opacity: .4; filter: grayscale(1); }

/* Lesson flow components */
.crumbs { font-size: .9rem; color: var(--mut); }
.hook {
  background: linear-gradient(135deg, var(--hook-bg-1), var(--hook-bg-2));
  color: var(--hook-ink);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 1.05rem;
}
.step-h { display: flex; align-items: center; gap: 10px; margin: 22px 0 4px; }
.step-h .n {
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: none;
}
.learn { list-style: none; padding: 0; margin: 0; }
.learn li {
  background: var(--card);
  border-left: 5px solid var(--blue);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 8px 0;
  box-shadow: var(--sh);
}
.mnemo { background: var(--okbg); border-radius: 12px; padding: 10px 14px; margin: 10px 0; }
.words { display: flex; flex-wrap: wrap; gap: 8px; }
.word { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; }
.word small { display: none; color: var(--mut); }
body.uk .word small { display: block; }

/* Spaced Repetition Flashcards */
.flash { perspective: 900px; max-width: 460px; margin: 8px auto; }
.flash .fc {
  min-height: 150px;
  border-radius: 16px;
  border: 2px solid var(--blue);
  background: var(--card);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  cursor: pointer;
  font-size: 1.15rem;
  user-select: none;
}
.flash .fc.back { background: var(--blue); color: #fff; }
.row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 8px 0; }
.qbar { display: flex; justify-content: space-between; color: var(--mut); font-size: .9rem; }
.prog { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 4px 0 6px; }
.prog i { display: block; height: 100%; background: var(--red); }
/* Question Options & Choices Buttons */
.opts {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}
.opts.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.choice-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
  counter-reset: choice-counter;
}

.opt, .choice-button {
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--opt-border);
  border-radius: 14px;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--opt-shadow);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.45;
  outline: none;
  min-height: 54px;
  box-sizing: border-box;
}

/* Numeric or 2-column choices */
.opts.two .choice-button, .opts.two .opt {
  font-size: 1.35rem;
  font-weight: 800;
  padding: 16px 20px;
}

/* Word problems stacked options (full sentences) */
.choice-grid .choice-button, .choice-grid .opt {
  justify-content: flex-start;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 14px 18px;
  width: 100%;
}
.choice-grid .choice-button::before, .choice-grid .opt::before {
  counter-increment: choice-counter;
  content: counter(choice-counter, upper-alpha);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: var(--opt-badge-bg);
  color: var(--opt-badge-ink);
  font-weight: 800;
  font-size: .95rem;
  margin-right: 14px;
  flex-shrink: 0;
}

.opt:hover:not(:disabled), .choice-button:hover:not(:disabled) {
  border-color: var(--opt-hover-border);
  background: var(--opt-hover-bg);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--opt-hover-shadow);
}

.opt:active:not(:disabled), .choice-button:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #3b82f6;
}

.opt:disabled, .choice-button:disabled {
  cursor: default;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}

.opt.right, .choice-button.right {
  background: var(--okbg) !important;
  border-color: var(--ok) !important;
  color: var(--ok) !important;
  box-shadow: 0 3px 0 var(--ok) !important;
}

.opt.wrong, .choice-button.wrong {
  background: var(--nobg) !important;
  border-color: var(--no) !important;
  color: var(--no) !important;
  box-shadow: 0 3px 0 var(--no) !important;
}

/* Word Problem (Detektiv slovních úloh) multi-step structure */
.word-box { margin: 14px 0; }
.word-story {
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--story-bg);
  border: 1px solid var(--story-border);
  font-size: 1.15rem;
  line-height: 1.6;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--ink);
}
.word-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.word-step {
  padding: 10px 6px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--mut);
  font-size: .84rem;
  font-weight: 800;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.word-step.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}
.word-step.done {
  border-color: var(--ok);
  background: var(--okbg);
  color: var(--ok);
}
.word-stage-title {
  margin: 14px 0 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}

/* Feedback messages */
.feedback { margin-top: 12px; font-weight: 700; font-size: 1.05rem; }
.feedback.good { color: var(--ok); }
.feedback.try { color: #d97706; }

.hint { color: var(--mut); font-size: .9rem; margin: .2em 0; }
.weak a {
  display: inline-block;
  margin: 3px 6px 3px 0;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--weak-bg);
  border: 1px solid var(--weak-border);
  color: var(--weak-ink);
  text-decoration: none;
  font-weight: 600;
}

/* Games Hub */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.games .card { margin: 0; text-align: center; }
.games .big { font-size: 2.2rem; }

/* Tables and inputs */
table { border-collapse: collapse; width: 100%; }
td, th { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
th { background: var(--card); }
input[type=search], input[type=text], input[type=number], select, textarea {
  width: 100%;
  font: inherit;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
}
.timer { font-size: 2rem; font-weight: 800; color: var(--red); text-align: center; }
#toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  border-radius: 12px;
  padding: 10px 16px;
  opacity: 0;
  pointer-events: none;
  transition: .3s;
  z-index: 50;
  max-width: 90%;
  font-weight: 600;
}
#toast.on { opacity: 1; }

/* Match / Tiles (used in games) */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match .opt { width: 100%; }
.match .sel { border-color: var(--gold); background: #fff8dd; color: #000; }
.match .solved { background: var(--okbg); border-color: var(--ok); opacity: .8; }
.tilewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0; }
.tiles {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(3, 76px);
  gap: 6px;
  max-width: 780px;
  min-width: 600px;
  margin: 0 auto;
}
.tile {
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: .8rem;
  padding: 4px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 0;
  font-weight: 700;
  line-height: 1.15;
}
.tile:nth-child(3n) { background: #1e6fb8; }
.tile:nth-child(3n+1) { background: #2a5aa0; }
.tile.sel { outline: 4px solid var(--gold); }
.tile.right { background: var(--ok) !important; }
.tile.wrong { background: var(--no) !important; }
.chip {
  position: absolute;
  right: 4px;
  bottom: 4px;
  background: var(--gold);
  color: #222;
  border-radius: 8px;
  padding: 1px 6px;
  font-size: .72rem;
}
.info {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  min-height: 56px;
}

/* Math-specific components */
.levels { display: flex; gap: 8px; margin: 12px 0 16px; }
.level {
  flex: 1;
  padding: 9px 5px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.level[aria-pressed="true"] { border-color: var(--blue); background: var(--pressed-bg); color: var(--pressed-ink); }
.question-box { margin: 12px 0 16px; }
.question-text { font-size: clamp(1.3rem, 4vw, 1.85rem); font-weight: 800; line-height: 1.35; margin-bottom: 12px; }
.visual-wrap { text-align: center; margin: 12px 0; }
.visual-wrap svg { max-width: 100%; height: auto; border-radius: 12px; }
.answer-row { display: flex; gap: 8px; align-items: center; margin: 14px 0; }
.answer-row input { max-width: 220px; font-size: 1.25rem; font-weight: 700; text-align: center; }

/* Geometry Lab */
.geometry-board { display: flex; flex-direction: column; gap: 8px; }
.geometry-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.geometry-tool {
  padding: 6px 10px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
}
.geometry-tool[aria-pressed="true"] { border-color: var(--blue); background: var(--pressed-bg); color: var(--pressed-ink); }
.geometry-canvas-wrap {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}
.geometry-canvas-wrap canvas { display: block; width: 100%; height: 380px; touch-action: none; }
.geometry-toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.geometry-side { margin-top: 14px; }

/* Word problem detective */
.word-step {
  border-left: 4px solid var(--blue);
  padding: 10px 14px;
  margin: 10px 0;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left-width: 5px;
}
.hidden { display: none !important; }

@media (max-width: 560px) {
  .opts.two { grid-template-columns: 1fr; }
  .match { grid-template-columns: 1fr; }
  .tiles { grid-template-rows: repeat(3, 64px); }
  .levels { flex-direction: column; }
}
@media print { .top, #toast, .btn, .levels { display: none; } }


/* Glossary styling - always visible translations & clear descriptions */
.glossary-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.glossary-card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--sh);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all .2s;
}
.glossary-card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 14px rgba(17,69,126,.12);
}
.glossary-card .glossary-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}
.glossary-card .cz-term {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}
.glossary-card .uk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--uk-badge-bg);
  color: var(--uk-badge-ink);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.92rem;
  white-space: nowrap;
}
.glossary-card .glossary-desc {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink);
  background: var(--glossary-desc-bg);
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid var(--blue);
}
.glossary-card .glossary-meta {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--mut);
}
.glossary-card .topic-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}
.glossary-card .topic-link:hover { text-decoration: underline; }
.glossary-card .topic-tag {
  color: var(--mut);
}
#g-list small, .words small, #gl small { display: inline !important; }

/* Interactive Quiz Widgets (Order, Open, Match, Animations) */
.slots { padding-left: 24px; min-height: 40px; margin: 12px 0; }
.slots li { background: var(--okbg); border-radius: 8px; margin: 6px 0; padding: 8px 12px; font-weight: 600; list-style-position: inside; }
.slots.bad li { background: var(--nobg); }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.shake { animation: shake .25s ease-in-out; }
.oi { width: 100%; box-sizing: border-box; font: inherit; font-size: 1.1rem; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; margin: 10px 0; background: var(--card); color: var(--ink); }
.oi:focus { border-color: var(--blue); outline: none; }
.oi.right { border-color: var(--ok); background: var(--okbg); }
.oi.wrong { border-color: var(--no); background: var(--nobg); }

/* School schedule & spiral review badges */
.sched-badge {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--sched-bg);
  color: var(--sched-ink);
  vertical-align: middle;
}
.node .month-tag {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  color: var(--mut);
  margin-top: 4px;
}
.spiral-card {
  border-left: 5px solid var(--gold);
  background: linear-gradient(135deg, rgba(244,180,0,.09), transparent);
}
.spiral-badge {
  display: inline-block;
  font-size: .76rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(244,180,0,.22);
  color: var(--spiral-ink);
  margin-bottom: 6px;
}
.opt.picked {
  border-color: var(--blue);
  background: rgba(17, 69, 126, .12);
  font-weight: 700;
}
.match-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.match-col { display: grid; gap: 8px; align-content: start; }
.opt.matched { background: var(--okbg); border-color: var(--ok); opacity: .75; }

