:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;

  --color-bg: #f4f2fb;
  --color-bg-alt: #ffffff;
  --color-surface: #ffffff;
  --color-border: #e7e3f7;
  --color-text: #1c1a29;
  --color-text-muted: #6b6680;

  --color-primary: #7c3aed;
  --color-primary-dark: #5b21b6;
  --color-primary-soft: #ede9fe;
  --color-accent: var(--color-primary);

  --color-success: #16a34a;
  --color-success-bg: #dcfce7;
  --color-danger: #e11d48;
  --color-danger-bg: #ffe4e9;

  --color-streak: #fb923c;
  --color-xp: #eab308;
  --color-heart: #f43f5e;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --shadow-sm: 0 1px 3px rgba(40, 20, 70, 0.08);
  --shadow-md: 0 8px 24px rgba(40, 20, 70, 0.14);

  --topbar-h: 58px;
  --bottomnav-h: 64px;
  --max-width: 640px;

  --editor-bg: #15121f;
  --editor-fg: #e6e2f7;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #100e1c;
    --color-bg-alt: #1a1730;
    --color-surface: #201c3a;
    --color-border: #322c50;
    --color-text: #f2effc;
    --color-text-muted: #a49dc4;
    --color-primary-soft: #2c2350;
    --color-success-bg: #0e2f1e;
    --color-danger-bg: #3a1220;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --color-bg: #100e1c;
  --color-bg-alt: #1a1730;
  --color-surface: #201c3a;
  --color-border: #322c50;
  --color-text: #f2effc;
  --color-text-muted: #a49dc4;
  --color-primary-soft: #2c2350;
  --color-success-bg: #0e2f1e;
  --color-danger-bg: #3a1220;
}

:root[data-theme="light"] {
  --color-bg: #f4f2fb;
  --color-bg-alt: #ffffff;
  --color-surface: #ffffff;
  --color-border: #e7e3f7;
  --color-text: #1c1a29;
  --color-text-muted: #6b6680;
  --color-primary-soft: #ede9fe;
  --color-success-bg: #dcfce7;
  --color-danger-bg: #ffe4e9;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

button, input {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a { color: inherit; }

h1, h2, h3, p, ul, ol {
  margin: 0 0 var(--space-3) 0;
}

#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.view {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-4);
  padding-top: calc(var(--topbar-h) + var(--space-4));
  padding-bottom: calc(var(--bottomnav-h) + var(--space-5));
}

.view.full-bleed {
  max-width: none;
  padding: 0;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-inner {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  gap: var(--space-2);
}

.topbar-brand {
  font-weight: 800;
  font-size: 1.05rem;
  background: linear-gradient(120deg, var(--color-primary), #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar-stats {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
}

.stat-pill.streak { color: var(--color-streak); }
.stat-pill.xp { color: var(--color-xp); }
.stat-pill.hearts { color: var(--color-heart); }

.bottomnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--bottomnav-h);
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: center;
  z-index: 40;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottomnav-inner {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 0;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.nav-item .nav-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.nav-item.active {
  color: var(--color-accent);
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}

.continue-card {
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent), #ec4899);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-6);
  position: relative;
  overflow: hidden;
}

.continue-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% -10%, rgba(255,255,255,0.35), transparent 55%);
}

.continue-card-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
  position: relative;
}

.continue-card h2 {
  font-size: 1.4rem;
  margin: var(--space-2) 0 var(--space-4) 0;
  position: relative;
}

.continue-card .btn-primary {
  position: relative;
  background: #fff;
  color: var(--color-primary-dark);
}

.section-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: var(--space-6) 0 var(--space-3) 0;
}

.parcours-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.parcours-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  text-align: left;
  width: 100%;
}

.parcours-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--color-accent) 16%, transparent);
  color: var(--color-accent);
  flex-shrink: 0;
}

.parcours-icon svg { width: 24px; height: 24px; }

.parcours-info { flex: 1; min-width: 0; }

.parcours-info h3 {
  font-size: 1rem;
  margin: 0 0 2px 0;
}

.parcours-info p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ring {
  transform: rotate(-90deg);
  flex-shrink: 0;
}

.ring-bg { fill: none; stroke: var(--color-border); stroke-width: 4; }

.ring-fg {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.ring-label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state {
  text-align: center;
  padding: var(--space-7) var(--space-4);
  color: var(--color-text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1rem;
  transition: transform 0.08s ease, opacity 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  width: 100%;
}

.btn-primary:disabled {
  opacity: 0.4;
  transform: none;
}

.btn-ghost {
  background: var(--color-bg);
  color: var(--color-text);
}

.btn-block { width: 100%; }

.login-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  background: linear-gradient(160deg, var(--color-primary) 0%, #ec4899 55%, #f97316 100%);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.login-logo {
  font-size: 2rem;
  margin-bottom: var(--space-2);
}

.login-card h1 {
  font-size: 1.3rem;
  margin-bottom: var(--space-1);
}

.login-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.login-field {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  background: var(--color-bg);
  font-size: 1rem;
  margin: var(--space-4) 0;
}

.login-field:focus {
  outline: none;
  border-color: var(--color-accent);
}

.login-error {
  color: var(--color-danger);
  font-size: 0.85rem;
  min-height: 1.2em;
  margin-bottom: var(--space-2);
}

.path-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.path-back {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.path-header h1 {
  font-size: 1.15rem;
  margin: 0;
}

.path-header p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 0;
}

.chapter-heading {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: var(--space-6) 0 var(--space-5) 0;
}

.path-wrap {
  position: relative;
}

.path-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.path-nodes {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
}

.path-node-row {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-6);
}

.node {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  background: var(--color-border);
  box-shadow: 0 4px 0 rgba(0,0,0,0.12);
  position: relative;
}

.node.locked {
  background: var(--color-border);
  color: var(--color-text-muted);
  box-shadow: none;
}

.node.available {
  background: var(--color-accent);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--color-accent) 60%, black);
}

.node.in_progress {
  background: var(--color-accent);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--color-accent) 60%, black);
}

.node.completed {
  background: var(--color-success);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--color-success) 60%, black);
}

.node.perfect {
  background: linear-gradient(135deg, var(--color-xp), #f97316);
  box-shadow: 0 4px 0 #b45309;
}

.node-label {
  position: absolute;
  top: 100%;
  margin-top: 8px;
  width: 120px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text);
  left: 50%;
  transform: translateX(-50%);
}

.lesson-screen {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.lesson-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  padding-top: max(var(--space-4), env(safe-area-inset-top));
}

.lesson-close {
  font-size: 1.3rem;
  color: var(--color-text-muted);
  width: 32px;
  flex-shrink: 0;
}

.segbar {
  flex: 1;
  display: flex;
  gap: 4px;
}

.seg {
  flex: 1;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  overflow: hidden;
}

.seg::after {
  content: "";
  display: block;
  height: 100%;
  width: 0%;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.seg.done::after { width: 100%; }
.seg.current::after { width: 55%; }

.lesson-hearts {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--color-heart);
  flex-shrink: 0;
  white-space: nowrap;
}

.lesson-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2) var(--space-5) var(--space-6) var(--space-5);
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}

.lesson-footer {
  position: sticky;
  bottom: 0;
  padding: var(--space-4) var(--space-5);
  padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
}

.lesson-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.step-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

.step-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: var(--space-4);
}

.markdown p { line-height: 1.6; }
.markdown h1, .markdown h2, .markdown h3 { margin-top: var(--space-5); }
.markdown ul, .markdown ol { padding-left: 1.3em; line-height: 1.6; }
.markdown code {
  font-family: var(--font-mono);
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 0.9em;
}

.code-block {
  background: var(--editor-bg);
  color: var(--editor-fg);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
  margin: var(--space-4) 0;
}

.code-block code {
  font-family: inherit;
  background: none;
  color: inherit;
  padding: 0;
  white-space: pre;
}

.tok-keyword { color: #c792ea; font-weight: 600; }
.tok-type { color: #82aaff; }
.tok-string { color: #c3e88d; }
.tok-number { color: #f78c6c; }
.tok-comment { color: #756f92; font-style: italic; }
.tok-preproc { color: #89ddff; }
.tok-const { color: #f07178; }
.tok-punct { color: #8b899e; }
.tok-op { color: #89ddff; }
.tok-register { color: #82aaff; font-weight: 600; }
.tok-mnemonic { color: #c792ea; font-weight: 600; }
.tok-directive { color: #89ddff; }
.tok-label { color: #ffcb6b; font-weight: 700; }

.question-text {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.choice {
  padding: 14px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.choice:active { transform: scale(0.98); }

.choice.correct {
  border-color: var(--color-success);
  background: var(--color-success-bg);
  color: var(--color-success);
}

.choice.wrong {
  border-color: var(--color-danger);
  background: var(--color-danger-bg);
  color: var(--color-danger);
  animation: shake 0.4s ease;
}

.choice.disabled { opacity: 0.55; pointer-events: none; }

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

.trou-line {
  font-size: 1.15rem;
  font-family: var(--font-mono);
  background: var(--editor-bg);
  color: var(--editor-fg);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-4);
}

.trou-input {
  font-family: inherit;
  font-size: 1rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  min-width: 100px;
}

.trou-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.trou-input.correct { border-color: var(--color-success); color: var(--color-success); }
.trou-input.wrong { border-color: var(--color-danger); color: var(--color-danger); animation: shake 0.4s ease; }

.trou-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.hint-btn {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.explanation {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-accent);
  font-size: 0.92rem;
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
}

.explanation.state-correct { border-left-color: var(--color-success); }
.explanation.state-wrong { border-left-color: var(--color-danger); }

.lesson-complete {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-6) var(--space-5);
  position: relative;
  overflow: hidden;
}

.confetti-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lesson-complete-badge {
  font-size: 3.4rem;
  margin-bottom: var(--space-3);
  animation: popIn 0.6s cubic-bezier(.34,1.56,.64,1);
}

.lesson-complete h1 {
  font-size: 1.5rem;
  margin-bottom: var(--space-5);
  position: relative;
}

.recap-stats {
  display: flex;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
  position: relative;
}

.recap-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.recap-stat .big {
  font-size: 1.6rem;
  font-weight: 800;
}

.recap-stat .lbl {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-unlocked {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-5);
  width: 100%;
  max-width: 340px;
  position: relative;
  animation: popIn 0.5s cubic-bezier(.34,1.56,.64,1);
}

.badge-unlocked .badge-icon { font-size: 1.8rem; }
.badge-unlocked .badge-text { text-align: left; }
.badge-unlocked .badge-text strong { display: block; font-size: 0.95rem; }
.badge-unlocked .badge-text span { font-size: 0.8rem; color: var(--color-text-muted); }

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

.profil-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-5) 0 var(--space-6) 0;
}

.profil-avatar {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary), #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-md);
}

.profil-level {
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: var(--space-2);
}

.level-bar {
  width: 100%;
  max-width: 260px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  overflow: hidden;
  margin-bottom: var(--space-1);
}

.level-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #ec4899);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.level-caption {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.stat-tile {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-2);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-tile .val {
  font-size: 1.25rem;
  font-weight: 800;
  display: block;
}

.stat-tile .lbl {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.badge-tile {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-2);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.badge-tile .icon {
  font-size: 1.7rem;
  display: block;
  margin-bottom: var(--space-2);
}

.badge-tile.locked {
  opacity: 0.4;
  filter: grayscale(1);
}

.badge-tile .name {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
}

.logout-btn {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: var(--space-6);
  padding: var(--space-3);
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.review-progress {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  text-align: center;
}

.review-source {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

.review-done {
  text-align: center;
  padding: var(--space-7) var(--space-4);
}

.review-done .icon { font-size: 3rem; margin-bottom: var(--space-3); }

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  margin: var(--space-6) auto;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 720px) {
  .node-label { width: 150px; }
}
