/* ============================================================================
   Skill Tree — a Duolingo-style winding learning path.
   Styled entirely with theme.css design tokens.
   ============================================================================ */

.st-page {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) var(--space-2xl);
}

/* Screen-reader-only utility (scoped — not defined in shared styles.css). */
.st-page .visually-hidden,
.st-hud .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Header / HUD ─────────────────────────────────────────────────────────── */

.st-hud {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.st-hud__top {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.st-hud__level {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  flex-shrink: 0;
}

.st-hud__level-num {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  color: var(--xp-purple);
}

.st-hud__level-cap {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.st-hud__xp {
  flex: 1;
  min-width: 140px;
}

.st-hud__xp-bar {
  height: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.st-hud__xp-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--xp-purple), var(--primary));
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.st-hud__xp-text {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.st-hud__stats {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.st-hud__stat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.st-hud__stat-icon {
  font-size: 1rem;
  line-height: 1;
}

.st-hud__stat--streak.is-active .st-hud__stat-icon {
  animation: st-flame 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 4px var(--streak-amber));
}

@keyframes st-flame {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50%      { transform: scale(1.18) rotate(3deg); }
}

.st-hud__actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.st-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-accent);
  background: var(--button-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.1s;
  min-height: var(--touch-min);
}

.st-mini-btn:hover {
  border-color: var(--button-border-hover);
  color: var(--text-main);
}

.st-mini-btn:active { transform: scale(0.96); }

.st-mini-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ── Intro ────────────────────────────────────────────────────────────────── */

.st-intro {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.st-intro__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-text);
  margin: 0 0 var(--space-sm);
}

.st-intro__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  font-weight: 700;
  margin: 0 0 var(--space-sm);
  color: var(--text-main);
}

.st-intro__lead {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 46ch;
}

/* ── Week sections ────────────────────────────────────────────────────────── */

.st-week {
  margin-bottom: var(--space-sm);
}

.st-week__header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-xl) 0 var(--space-md);
}

.st-week__line {
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.st-week__label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.st-week__count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--primary-text);
  background: var(--primary-soft);
  border-radius: var(--radius-full);
  padding: 0.1rem 0.5rem;
}

/* ── The winding path ─────────────────────────────────────────────────────── */

.st-path {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Each step holds one node, offset left/right to zig-zag. */
.st-step {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0.45rem 0;
}

.st-step--l { transform: translateX(-21%); }
.st-step--r { transform: translateX(21%); }
.st-step--c { transform: translateX(0); }

/* Connector drawn from this node up toward the previous one. */
.st-step__connector {
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 4px;
  height: 0.9rem;
  background: repeating-linear-gradient(
    var(--border) 0 6px,
    transparent 6px 11px
  );
  transform: translateX(-50%);
}

.st-step__connector.is-cleared {
  background: var(--primary);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ── Node button ──────────────────────────────────────────────────────────── */

.st-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-sans);
}

.st-node:focus-visible {
  outline: none;
}

.st-node:focus-visible .st-node__disc {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.st-node__disc {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  border: 3px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.16s, border-color 0.16s, background 0.16s;
}

.st-node__milestone-ring {
  position: absolute;
  top: -6px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px dashed var(--accent-2);
  opacity: 0.55;
  pointer-events: none;
}

.st-node__label {
  font-size: 0.74rem;
  font-weight: 600;
  text-align: center;
  max-width: 130px;
  line-height: 1.25;
  color: var(--text-accent);
}

.st-node__phasebar {
  display: flex;
  gap: 3px;
}

.st-node__phasebar span {
  width: 14px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--border);
  transition: background 0.25s;
}

.st-node__phasebar span.is-on {
  background: var(--primary);
}

/* — Locked — */
.st-node--locked { cursor: not-allowed; }
.st-node--locked .st-node__disc {
  opacity: 0.4;
  filter: grayscale(0.7);
}
.st-node--locked .st-node__label { opacity: 0.5; }

/* — Available (pulsing invitation) — */
.st-node--available .st-node__disc {
  border-color: var(--primary);
  color: var(--primary-text);
  background: var(--bg-accent);
  animation: st-pulse 2.1s ease-in-out infinite;
}

.st-node--available:hover .st-node__disc {
  transform: translateY(-3px) scale(1.05);
}

@keyframes st-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow), var(--shadow-sm); }
  50%      { box-shadow: 0 0 0 12px transparent, 0 0 22px 4px var(--accent-glow); }
}

/* — In progress — */
.st-node--progress .st-node__disc {
  border-color: var(--accent-2);
  color: var(--accent-2);
  background: var(--accent-2-soft);
}

.st-node--progress:hover .st-node__disc {
  transform: translateY(-3px) scale(1.04);
}

/* — Done — */
.st-node--done .st-node__disc {
  border-color: var(--status-success);
  background: var(--status-success);
  color: var(--primary-on);
}

.st-node--done:hover .st-node__disc {
  transform: translateY(-3px) scale(1.04);
}

.st-node__check {
  font-size: 2rem;
  line-height: 1;
}

/* Pop animation when a node just became done. */
.st-node--justdone .st-node__disc {
  animation: st-node-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes st-node-pop {
  0%   { transform: scale(0.7) rotate(-12deg); }
  55%  { transform: scale(1.22) rotate(6deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ── Modal ────────────────────────────────────────────────────────────────── */

.st-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(2, 6, 14, 0.66);
  backdrop-filter: blur(3px);
  opacity: 0;
  animation: st-fade-in 0.22s ease forwards;
}

.st-modal-overlay.is-closing {
  animation: st-fade-out 0.2s ease forwards;
}

@keyframes st-fade-in  { to { opacity: 1; } }
@keyframes st-fade-out { to { opacity: 0; } }

.st-modal {
  width: min(540px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transform: scale(0.9) translateY(18px);
  animation: st-modal-in 0.3s 0.04s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

@keyframes st-modal-in {
  to { transform: scale(1) translateY(0); }
}

.st-modal__header {
  position: sticky;
  top: 0;
  background: var(--panel);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  border-bottom: 1px solid var(--border-soft);
}

.st-modal__heading { flex: 1; min-width: 0; }

.st-modal__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-text);
  margin: 0 0 0.2rem;
}

.st-modal__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.st-modal__close {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-muted);
  background: var(--button-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.st-modal__close:hover {
  color: var(--text-main);
  border-color: var(--button-border-hover);
}

.st-modal__close:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Phase stepper */
.st-stepper {
  display: flex;
  gap: 0.4rem;
  padding: var(--space-md) var(--space-lg) 0;
}

.st-stepper__seg {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  cursor: default;
  font-family: var(--font-sans);
}

.st-stepper__dot {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--border);
  transition: background 0.3s;
}

.st-stepper__seg.is-current .st-stepper__dot { background: var(--primary); }
.st-stepper__seg.is-complete .st-stepper__dot { background: var(--status-success); }

.st-stepper__name {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.st-stepper__seg.is-current .st-stepper__name { color: var(--primary-text); }
.st-stepper__seg.is-complete .st-stepper__name { color: var(--status-success-text); }

/* Modal body / phase content */
.st-modal__body {
  padding: var(--space-lg);
}

.st-phase__kicker {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-2);
  margin: 0 0 var(--space-sm);
}

.st-phase__prompt {
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-main);
  margin: 0 0 var(--space-md);
}

.st-phase__task {
  background: var(--card-inner);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-accent);
  margin: 0 0 var(--space-md);
}

.st-phase__task code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--code-bg);
  border-radius: 3px;
  padding: 0.05em 0.35em;
  color: var(--code-text);
}

.st-phase__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--primary-text);
  text-decoration: none;
  border-bottom: 1px dashed var(--primary);
}

.st-phase__link:hover { color: var(--primary-hover); }

.st-phase__textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-main);
  background: var(--surface-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.st-phase__textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.st-phase__textarea::placeholder { color: var(--text-muted); }

.st-phase__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: -0.4rem 0 var(--space-md);
}

/* Modal footer / nav */
.st-modal__footer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-lg) var(--space-lg);
}

.st-modal__footer .st-spacer { flex: 1; }

.st-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.3rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
  min-height: var(--touch-min);
}

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

.st-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.st-btn--primary {
  background: var(--primary);
  color: var(--primary-on);
}

.st-btn--primary:hover { background: var(--primary-hover); }

.st-btn--ghost {
  background: var(--button-bg);
  color: var(--text-accent);
  border-color: var(--border-soft);
}

.st-btn--ghost:hover {
  color: var(--text-main);
  border-color: var(--button-border-hover);
}

.st-btn--done {
  background: var(--status-success);
  color: var(--primary-on);
}

.st-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* "Phase complete" flash inside the modal */
.st-phase-flash {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%) scale(0.6);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--status-success-text);
  text-shadow: 0 2px 12px var(--status-success-soft);
  pointer-events: none;
  opacity: 0;
}

.st-phase-flash.is-firing {
  animation: st-flash-pop 1s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

@keyframes st-flash-pop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  25%  { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  70%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -130%) scale(1); }
}

/* Floating "+XP" chip */
.st-xp-pop {
  position: fixed;
  z-index: 9500;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--xp-purple);
  text-shadow: 0 2px 10px var(--xp-purple-soft);
  pointer-events: none;
  animation: st-xp-rise 1.1s ease-out forwards;
}

@keyframes st-xp-rise {
  0%   { opacity: 0; transform: translateY(8px) scale(0.8); }
  20%  { opacity: 1; transform: translateY(-4px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-46px) scale(1); }
}

/* ── Badges shelf ─────────────────────────────────────────────────────────── */

.st-badges {
  margin-top: var(--space-2xl);
}

.st-badges__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 var(--space-lg);
  color: var(--text-main);
}

.st-badges__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr));
  gap: var(--space-md);
}

.st-badge {
  text-align: center;
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  transition: transform 0.18s, box-shadow 0.18s;
}

.st-badge--earned {
  border-color: var(--primary);
  box-shadow: 0 0 16px var(--accent-faint);
}

.st-badge--earned:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.st-badge--locked {
  opacity: 0.45;
  filter: grayscale(0.6);
}

.st-badge__icon {
  font-size: 2.1rem;
  display: block;
  margin-bottom: 0.35rem;
}

.st-badge__name {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.2rem;
}

.st-badge__desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin: 0;
}

.st-badge__date {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--status-success-text);
}

/* New-badge toast */
.st-badge-toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%) translateY(120%);
  z-index: 9600;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.7rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--primary);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow);
  font-family: var(--font-sans);
  transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.st-badge-toast.is-visible {
  transform: translateX(-50%) translateY(0);
}

.st-badge-toast__icon { font-size: 1.6rem; }

.st-badge-toast__text { line-height: 1.3; }

.st-badge-toast__eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-text);
}

.st-badge-toast__name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

/* ── Level-up banner ──────────────────────────────────────────────────────── */

.st-levelup {
  position: fixed;
  inset: 0;
  z-index: 9700;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
}

.st-levelup.is-firing {
  animation: st-fade-in 0.3s ease forwards, st-fade-out 0.45s 1.9s ease forwards;
}

.st-levelup__card {
  text-align: center;
  padding: var(--space-xl) var(--space-2xl);
  background: var(--panel);
  border: 2px solid var(--xp-purple);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 50px var(--xp-purple-soft), var(--shadow);
  transform: scale(0.6);
}

.st-levelup.is-firing .st-levelup__card {
  animation: st-levelup-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes st-levelup-bounce {
  to { transform: scale(1); }
}

.st-levelup__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--xp-purple);
  margin: 0 0 var(--space-sm);
}

.st-levelup__num {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-main);
  margin: 0;
}

/* ── Confetti (replicated celebration pattern) ────────────────────────────── */

.st-confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 9800;
  pointer-events: none;
  overflow: hidden;
}

.st-confetti {
  position: absolute;
  top: -14px;
  width: 10px;
  height: 10px;
  opacity: 0;
  animation: st-confetti-fall 3s ease-in forwards;
}

.st-confetti.is-circle { border-radius: 50%; }
.st-confetti.is-sm { width: 6px;  height: 6px; }
.st-confetti.is-lg { width: 14px; height: 14px; }

@keyframes st-confetti-fall {
  0%   { opacity: 1; transform: translateY(0) rotate(0deg); }
  85%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(112vh) rotate(720deg); }
}

/* ── Toast for export/import feedback ─────────────────────────────────────── */

.st-flash-toast {
  position: fixed;
  left: 50%;
  top: 1.2rem;
  transform: translateX(-50%) translateY(-150%);
  z-index: 9600;
  padding: 0.6rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--status-success);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.st-flash-toast.is-visible { transform: translateX(-50%) translateY(0); }
.st-flash-toast--error { border-color: var(--status-error); }

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 560px) {
  .st-step--l { transform: translateX(-14%); }
  .st-step--r { transform: translateX(14%); }

  .st-node__disc { width: 66px; height: 66px; font-size: 1.2rem; }
  .st-node__label { max-width: 108px; font-size: 0.7rem; }
  .st-node__milestone-ring { width: 78px; height: 78px; }

  .st-hud__top { gap: var(--space-sm); }
  .st-hud__level-num { font-size: 1.4rem; }
}

@media (max-width: 400px) {
  .st-step--l { transform: translateX(-8%); }
  .st-step--r { transform: translateX(8%); }
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .st-node--available .st-node__disc,
  .st-hud__stat--streak.is-active .st-hud__stat-icon,
  .st-node--justdone .st-node__disc,
  .st-modal,
  .st-modal-overlay,
  .st-phase-flash.is-firing,
  .st-xp-pop,
  .st-levelup.is-firing,
  .st-levelup.is-firing .st-levelup__card {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .st-confetti-layer { display: none !important; }
}
