:root {
  color-scheme: dark;
  --page: #101114;
  --surface: #191b20;
  --input: #24262e;
  --text: #f4f4f5;
  --muted: #a5a9b3;
  --border: #3b3e48;
  --focus: #d0c3ff;
  --action: #b8a5ff;
  --action-text: #201a35;
  --achievement: #f6c86a;
  --success: #9fdfb2;
  --warning: #f6c86a;
  --subtle: #858a95;
  --bg: var(--page);
  --ink: var(--text);
  --line: var(--border);
  --card: var(--surface);
  --locked: var(--subtle);
  --tap: 3rem;
  --nav: 3.25rem;
  --pad: 1rem;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
[data-theme="light"] {
  color-scheme: light;
  --page: #f7f5f0;
  --surface: #fffdfa;
  --input: #fffdfa;
  --text: #242129;
  --muted: #5c5863;
  --border: #ccc7d0;
  --focus: #5838a3;
  --action: #4e337f;
  --action-text: #fff;
  --achievement: #955d04;
  --success: #17673d;
  --warning: #87520c;
  --subtle: #6d6874;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
*:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
a { color: var(--action); }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.4;
  min-height: 100dvh;
}
body.drill {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding-top: var(--safe-t);
}
.site-nav-inner {
  height: var(--nav);
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 0.5rem;
  max-width: 36rem;
  margin: 0 auto;
}
.back-spacer { width: 2.5rem; height: 2.5rem; }
.brand {
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  justify-self: start;
}
.nav-end {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-self: end;
  min-width: 0;
}
.nav-handle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  max-width: 6.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-form { margin: 0; }
.theme-form {
  margin: 0;
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--page);
}
.theme-choice {
  min-height: 2rem;
  padding: 0.25rem 0.45rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
}
.theme-choice.is-on {
  background: var(--action);
  color: var(--action-text);
}
.form-ok {
  color: var(--success);
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}
.form-error {
  color: var(--warning);
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}
textarea, select, input[type="password"], input[type="number"] {
  width: 100%;
  font-size: 1rem;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--text);
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  font: inherit;
}
textarea { min-height: 6rem; resize: vertical; }
.coverage-result { margin-top: 0.75rem; }
.verdict {
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  margin: 0 0 0.35rem;
}
.verdict-in_band { color: var(--success); }
.verdict-below, .verdict-underpowered { color: var(--warning); }
.verdict-uncertain { color: var(--warning); }
.verdict-above { color: var(--muted); }
.report {
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
  background: var(--bg);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin: 0.5rem 0 0;
  overflow-x: auto;
}
.card + .card { margin-top: 0.75rem; }
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  border-radius: 999px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}
a.nav-btn { color: var(--muted); }
a.nav-btn.is-on { color: var(--action-text); }
.nav-btn.is-on {
  background: var(--action);
  color: var(--action-text);
  border-color: var(--action);
}

.wrap {
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  padding: 1.25rem var(--pad) calc(1.5rem + var(--safe-b));
}
body.drill .wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}
header { margin-bottom: 1.25rem; }
h1 {
  font-size: 1.5rem;
  font-weight: 650;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
h2 { font-size: 1.05rem; font-weight: 650; margin: 0 0 0.35rem; }
.lede, .meta, .progress-line {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}

.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1rem 1.1rem;
}
a.card { color: inherit; text-decoration: none; }
.tap:active { opacity: 0.72; }

.bar {
  height: 3px;
  background: var(--line);
  margin: 0.65rem 0 0;
  border-radius: 99px;
  overflow: hidden;
}
.bar > span { display: block; height: 100%; background: var(--ink); }

.tasks {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tile-wrap { position: relative; }
.tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--tap);
  height: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 2.15rem 0.85rem 1rem;
  text-decoration: none;
  color: inherit;
}
.tile strong { font-size: 1.05rem; font-weight: 650; }
.tile span { color: var(--muted); font-size: 0.8rem; }
.tile.locked { color: var(--locked); }
.help-btn {
  position: absolute;
  top: 0.22rem;
  right: 0.22rem;
  z-index: 2;
  width: 1.65rem;
  height: 1.65rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1;
  display: grid;
  place-items: center;
}
.help-btn:hover,
.help-btn:focus-visible {
  background: var(--bg);
  color: var(--ink);
}
.tile-wrap:has(.locked) .help-btn { color: var(--locked); }
.help-pop {
  width: min(22rem, calc(100vw - 2rem));
  padding: 1rem 1.05rem 1.1rem;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(28, 25, 23, 0.14);
}
.help-pop::backdrop { background: rgba(28, 25, 23, 0.2); }
.help-pop p { margin: 0; font-size: 0.9rem; line-height: 1.45; }
.help-pop .help-pop-kicker {
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.prefs-line { margin: 0.5rem 0 0; }
.section-head {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.5rem 0 0.5rem;
}
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin: 0 0 1rem;
  font-size: 0.85rem;
}
.subnav a { color: var(--muted); }
.subnav-here { font-weight: 650; }

label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.7rem 0 0.3rem;
}
input[type="text"], input[type="file"], select { width: 100%; font-size: 1rem; }
select {
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
}
input[type="text"] {
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--text);
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  font: inherit;
}
input[type="file"] { padding: 0.4rem 0; }

.progress-line { margin: 0; }

.drill {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.5rem 0 1rem;
}
.cue {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-weight: 650;
}
.greek {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "kern" 1, "liga" 1;
}
.prompt.greek {
  font-size: clamp(2.1rem, 11vw, 2.85rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}
.prompt:not(.greek) {
  font-size: 1.35rem;
  margin: 0 0 1rem;
}
.passage.greek {
  font-size: 1.45rem;
  line-height: 1.45;
  margin: 0 0 1rem;
  text-align: left;
  width: 100%;
}
.meaning { font-size: 1.05rem; margin: 0 0 0.6rem; }
.answer.greek { font-size: 1.5rem; margin: 0 0 0.4rem; }
.example.greek {
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--muted);
  font-style: italic;
  margin: 0;
}
.cases { color: var(--muted); margin: 0 0 0.75rem; font-size: 0.95rem; }
.done { font-size: 1.15rem; margin: 2rem 0; }

.listen-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 1.25rem;
}
.play {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 999px;
  border: 0;
  background: var(--action);
  color: var(--action-text);
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  margin: 0;
}
.play-slow {
  min-height: var(--tap);
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 650;
}
.play:disabled,
.play-slow:disabled { opacity: 0.45; }
.tts-status {
  color: var(--warning);
  font-size: 0.85rem;
  margin: 0;
  max-width: 22rem;
}
.image-frame {
  width: min(100%, 16rem);
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: var(--input);
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
}
.image-frame .greek { font-size: 2rem; color: var(--ink); }
.is-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.dock {
  position: sticky;
  bottom: 0;
  margin: auto -1rem 0;
  padding: 0.75rem var(--pad) calc(0.75rem + var(--safe-b));
  background: var(--bg);
}
.rate {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
button, .btn {
  min-height: var(--tap);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid var(--action);
  background: var(--action);
  color: var(--action-text);
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-block { width: 100%; margin-top: 0.85rem; }
button.ghost, a.ghost, .btn.ghost {
  background: var(--card);
  color: var(--ink);
}
.rate button:nth-child(3) { grid-column: 1; }
.rate button:nth-child(4) { grid-column: 2; }
.rate:has(button:nth-child(2):last-child) {
  grid-template-columns: 1fr 1fr;
}
.rate:has(button:nth-child(3):last-child) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.rate:has(button:nth-child(3):last-child) button:nth-child(3) {
  grid-column: auto;
}
.rate--keys button,
.btn--keys {
  gap: 0.35rem;
}
.rate--keys kbd,
.btn--keys kbd {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
  opacity: 0.55;
  padding: 0.15rem 0.35rem;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: transparent;
}

body.drill--flash .site-nav .nav-end .nav-btn,
body.drill--flash .site-nav .nav-end .nav-handle,
body.drill--flash .site-nav .nav-end .nav-form:not(:first-of-type) {
  display: none;
}

.deck-counts {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.flash-card {
  width: 100%;
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  border-radius: 12px;
  padding: 0.5rem;
}
.flash-card:focus-visible {
  box-shadow: 0 0 0 3px var(--focus);
}
.flash-card.is-flipped {
  cursor: default;
}
.nojs-flash { width: 100%; text-align: left; }
.nojs-flash details { margin: 0 0 0.75rem; padding: 0.75rem; border: 1px solid var(--border); border-radius: 12px; }
.nojs-flash summary { cursor: pointer; font-weight: 650; }
.nojs-flash .rate { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.no-js body.drill--flash .flash-card,
.no-js body.drill--flash .dock { display: none; }

.rate[hidden],
.dock-flash[hidden] {
  display: none !important;
}

.rate--flash {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  width: 100%;
}
.rate--flash button:nth-child(3) {
  grid-column: auto;
}
.rate--flash .rate-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 3.75rem;
  padding: 0.5rem 0.2rem;
  font-size: 0.78rem;
  position: relative;
  width: 100%;
}
.rate--flash .rate-label {
  font-weight: 650;
  font-size: 0.82rem;
}
.rate--flash .rate-ivl {
  font-size: 0.68rem;
  opacity: 0.85;
  font-weight: 500;
}
.rate--flash kbd {
  position: absolute;
  top: 0.2rem;
  right: 0.25rem;
  font-size: 0.62rem;
  opacity: 0.45;
  border: none;
  padding: 0;
}
.rate-btn--again { background: var(--input); color: var(--text); border-color: var(--warning); }
.rate-btn--good { background: var(--input); color: var(--text); border-color: var(--success); }
.rate-btn--easy { background: var(--input); color: var(--text); border-color: var(--focus); }

.dock-flash .dock-rate {
  margin-top: 0.5rem;
}
.dock-flash .dock-rate .rate-btn {
  min-height: 3.25rem;
}

.dock-flash .dock-tools {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.tool-form { margin: 0; }
.tool-btn {
  min-height: 2rem;
  padding: 0.25rem 0.55rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  cursor: pointer;
}
.tool-btn kbd {
  font-size: 0.65rem;
  opacity: 0.6;
}

.forecast-list,
.button-stats,
.held-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}
.forecast-list li,
.button-stats li {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.88rem;
}
.held-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.5rem;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.held-gloss { color: var(--muted); grid-column: 1; }
.inline-form { margin: 0; grid-column: 2; grid-row: 1 / span 2; }

.heatmap {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 0.5rem;
}
.heat-cell {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--line);
}
.heat-1 { background: #d6d3d1; }
.heat-2 { background: #a8a29e; }
.heat-3 { background: #78716c; }
.heat-4 { background: #57534e; }
.heat-5, .heat-6, .heat-7, .heat-8, .heat-9, .heat-10 { background: var(--ink); }

.chart {
  margin-top: 0.5rem;
}
.chart-row {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}
@media (min-width: 32rem) {
  .chart-row {
    grid-template-columns: 1fr 1fr;
  }
}
.chart-block {
  min-width: 0;
}
.chart-title {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chart-pie-wrap {
  display: grid;
  gap: 0.75rem;
  align-items: center;
}
@media (min-width: 28rem) {
  .chart-pie-wrap {
    grid-template-columns: minmax(7rem, 9rem) 1fr;
  }
}
.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}
.chart-svg--pie {
  max-width: 9rem;
  margin: 0 auto;
}
.chart-svg--bar,
.chart-svg--line {
  max-height: 10rem;
}
.chart-axis {
  fill: var(--muted);
  font-size: 8px;
  font-family: inherit;
}
.chart-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
}
.chart-legend li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0;
}
.chart-swatch {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  flex-shrink: 0;
}
.chart-empty {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.level-due {
  font-variant-numeric: tabular-nums;
}
.eyebrow { margin: 0 0 0.4rem; color: var(--muted); text-transform: uppercase; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; }
.level-meta-links { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.6rem; font-size: 0.85rem; }
.milestone-section { margin: 0 0 1.4rem; }
.milestone-section > h2 { font-size: 1.2rem; }
.constellation-group { margin-top: 1.1rem; }
.constellation-group h3 { margin: 0 0 0.25rem; font-size: 0.9rem; }
.constellation {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.7rem 0 0;
  padding: 0;
}
.constellation-node {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.7rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow-wrap: anywhere;
}
.constellation-node:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.3rem;
  left: 100%;
  width: 0.55rem;
  height: 2px;
  background: var(--border);
}
.constellation-node[data-state="ready"] { border-color: var(--action); }
.constellation-node[data-earned="true"] { border-color: var(--achievement); }
.constellation-symbol { font-size: 1.2rem; line-height: 1; color: var(--muted); }
.constellation-node[data-state="ready"] .constellation-symbol { color: var(--action); }
.constellation-node[data-earned="true"] .constellation-symbol { color: var(--achievement); }
.constellation-node strong { font-size: 0.8rem; }
.node-threshold, .node-state, .constellation-node small { font-size: 0.7rem; color: var(--muted); line-height: 1.3; }
.node-state { color: var(--text); font-weight: 650; }
.primary-study { margin: 1.25rem 0; }
.primary-study h2 { margin-bottom: 0.55rem; }
.tile--primary { background: var(--action); border-color: var(--action); color: var(--action-text); }
.tile--primary span { color: var(--action-text); }
.tile-wrap:has(.tile--primary) .help-btn { color: var(--action-text); }
.practice-note { margin: 0 0 0.6rem; }
.continuation { margin-bottom: 1.25rem; border-color: var(--achievement); }
.continuation strong { color: var(--achievement); }
.continuation-next, .continuation-current { margin-bottom: 1.25rem; }
.achievement {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--achievement);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: var(--surface);
  color: var(--text);
}
.achievement-symbol { color: var(--achievement); font-size: 1.4rem; line-height: 1; }
.achievement--spark .achievement-symbol { position: relative; animation: spark-settle 0.85s ease-out both; }
.achievement--spark .achievement-symbol::before,
.achievement--spark .achievement-symbol::after {
  content: "✦";
  position: absolute;
  color: var(--achievement);
  font-size: 0.65rem;
  opacity: 0;
  animation: spark-particle 1.1s ease-out both;
}
.achievement--spark .achievement-symbol::before { left: -0.35rem; top: -0.4rem; --spark-x: -0.55rem; }
.achievement--spark .achievement-symbol::after { right: -0.4rem; top: -0.15rem; --spark-x: 0.6rem; animation-delay: 0.08s; }
.achievement--star .achievement-symbol { animation: star-light 0.8s ease-out both; }
.achievement--star::before {
  content: "";
  width: 1.2rem;
  height: 2px;
  background: var(--achievement);
  transform-origin: left center;
  animation: line-light 0.8s ease-out both;
}
.achievement--flame .flame-icon { display: block; animation: flame-appear 0.85s ease-out both; }
@keyframes spark-settle {
  from { opacity: 0; transform: scale(0.7) translateY(0.3rem); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes spark-particle {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--spark-x), -0.7rem) scale(0.7); }
}
@keyframes star-light {
  from { opacity: 0.3; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes line-light {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 1; transform: scaleX(1); }
}
@keyframes flame-appear {
  from { opacity: 0.3; transform: translateY(0.2rem) scale(0.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
[data-celebrations="off"] .achievement *,
[data-celebrations="off"] .achievement::before,
[data-celebrations="off"] .achievement::after,
[data-celebrations="off"] .achievement-symbol::before,
[data-celebrations="off"] .achievement-symbol::after {
  animation: none !important;
}
[data-celebrations="off"] .achievement-symbol::before,
[data-celebrations="off"] .achievement-symbol::after { display: none; }
@media (prefers-reduced-motion: reduce) {
  .achievement *, .achievement::before, .achievement::after,
  .achievement-symbol::before, .achievement-symbol::after { animation: none !important; }
  .achievement-symbol::before, .achievement-symbol::after { display: none; }
}

.generation-stage { border-top: 1px solid var(--border); padding-top: 0.75rem; }
.generation-stage h3 { margin: 0 0 0.25rem; font-size: 0.98rem; }
.picture-scene { display: block; width: 100%; height: auto; border-radius: 10px; }
.picture-plan { white-space: pre-wrap; line-height: 1.55; }
.picture-record-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.picture-record-controls button { flex: 1 1 9rem; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
audio { max-width: 100%; }
fieldset { border: 1px solid var(--border); border-radius: 12px; }
fieldset button { margin: 0.25rem; }

@media (max-width: 27rem) {
  .nav-handle { display: none; }
  .site-nav-inner { gap: 0.25rem; }
  .nav-end { gap: 0.2rem; }
  .nav-btn { padding-inline: 0.45rem; }
}

@media (max-width: 48rem) {
  .constellation { grid-template-columns: 1fr; }
  .constellation-node { padding-left: 2.5rem; min-height: 4rem; }
  .constellation-symbol { position: absolute; left: 0.75rem; top: 0.75rem; }
  .constellation-node:not(:last-child)::after {
    left: 1.4rem;
    top: 100%;
    width: 2px;
    height: 0.55rem;
  }
}

body.drill .wrap { max-width: 36rem; }

@media (min-width: 40rem) {
  h1 { font-size: 1.75rem; }
  .tasks {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
