:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --border: #e1e4e9;
  --border-strong: #cdd2da;
  --text: #16181d;
  --text-muted: #666d78;
  --text-faint: #9198a3;
  --primary: #4552e0;
  --primary-hover: #363fc4;
  --primary-contrast: #ffffff;
  --secondary-accent: #16a34a;
  --focus-ring: rgba(69, 82, 224, 0.35);
  --success-bg: #e4f6ea;
  --success-text: #1c7a37;
  --error-bg: #fdecec;
  --error-text: #c22a2f;
  --warning-bg: #fdf1dc;
  --warning-text: #96650a;
  --shadow-sm: 0 1px 2px rgba(20, 22, 26, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 22, 26, 0.10);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Fixed chart status colors — never themed, never overridden by school branding. */
  --chart-draft: #8a94a6;
  --chart-progress: #fab219;
  --chart-cancelled: #d03b3b;

  /* Classic Rubik's cube colors — decorative, fixed regardless of theme/branding. */
  --cube-white: #f2f2f2;
  --cube-red: #d81e2c;
  --cube-orange: #ff6b06;
  --cube-yellow: #ffd500;
  --cube-green: #009e49;
  --cube-blue: #0051ba;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f13;
    --surface: #16191f;
    --surface-2: #1c2028;
    --border: #282d37;
    --border-strong: #363c48;
    --text: #edeef2;
    --text-muted: #a2a9b4;
    --text-faint: #6b7280;
    --primary: #8b96ff;
    --primary-hover: #a3adff;
    --primary-contrast: #11131a;
    --focus-ring: rgba(139, 150, 255, 0.4);
    --success-bg: #123322;
    --success-text: #5fd88a;
    --error-bg: #3a1418;
    --error-text: #ff8f93;
    --warning-bg: #3a2a10;
    --warning-text: #f0b849;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --bg: #0d0f13;
  --surface: #16191f;
  --surface-2: #1c2028;
  --border: #282d37;
  --border-strong: #363c48;
  --text: #edeef2;
  --text-muted: #a2a9b4;
  --text-faint: #6b7280;
  --primary: #8b96ff;
  --primary-hover: #a3adff;
  --primary-contrast: #11131a;
  --focus-ring: rgba(139, 150, 255, 0.4);
  --success-bg: #123322;
  --success-text: #5fd88a;
  --error-bg: #3a1418;
  --error-text: #ff8f93;
  --warning-bg: #3a2a10;
  --warning-text: #f0b849;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.15s ease, color 0.15s ease;
}

h1, h2, h3 { letter-spacing: -0.01em; font-weight: 600; }

a { color: var(--primary); text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent); }
a:hover { color: var(--primary-hover); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem;
}

/* Icon buttons (theme toggle, password visibility) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; display: none; }

.theme-toggle[data-current="light"] .icon-moon { display: block; }
.theme-toggle[data-current="dark"] .icon-sun { display: block; }

.password-toggle[data-visible="false"] .icon-eye { display: block; }
.password-toggle[data-visible="true"] .icon-eye-off { display: block; }

/* Navbar */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-top: 3px solid var(--primary);
}
.navbar-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand-mark {
  display: inline-flex;
  color: var(--primary);
}
.brand-mark svg { width: 22px; height: 22px; }
.nav-toggle-checkbox { display: none; }
.nav-toggle-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  color: var(--text);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); font-weight: 600; }
.nav-user { color: var(--text-faint); font-size: 0.9rem; }
.nav-logout { margin: 0; display: flex; align-items: center; }

.link-button {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0;
  text-decoration: underline;
}

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.alert-success { background: var(--success-bg); color: var(--success-text); }
.alert-error   { background: var(--error-bg);   color: var(--error-text); }
.alert-info    { background: var(--warning-bg); color: var(--warning-text); }

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* Tab toggle */
.tab-toggle {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.tab-toggle a {
  padding: 0.5rem 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-toggle a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }

/* Item repeater */
.item-repeater { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 0.75rem; }
.item-row {
  display: grid;
  grid-template-columns: 2fr 2fr 0.8fr 0.8fr 1fr auto;
  gap: 0.6rem;
  align-items: end;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.item-row label { gap: 0.25rem; }
@media (max-width: 800px) {
  .item-row { grid-template-columns: 1fr 1fr; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.1s ease;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--primary); color: var(--primary-contrast); border-color: transparent; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-block { width: 100%; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.card h3 { margin: 0 0 0.25rem; }
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.1s ease, box-shadow 0.1s ease;
}
.card-link:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }

/* School hero */
.school-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.school-hero-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.4rem;
}
.school-hero-text { flex: 1; min-width: 200px; }

/* Dashboard stat tiles */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.stat-label { font-size: 0.82rem; color: var(--text-muted); }
.stat-value { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }

/* Story panel — part-to-whole breakdown of requisition value by state.
   Categorical identity (draft/in-progress/cancelled), so color is fixed
   status hues (--chart-*), never the school's themable --primary. */
.story-panel { margin: 1.5rem 0 2rem; }
.story-lead { margin: 0 0 0.9rem; max-width: 66ch; color: var(--text); }
.status-stack {
  display: flex;
  gap: 2px;
  height: 28px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.status-stack-segment { flex: 0 0 auto; }
.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
}
.legend-item { display: flex; align-items: center; gap: 0.45rem; }
.legend-swatch { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.legend-value { font-variant-numeric: tabular-nums; color: var(--text-muted); }

/* Cost-center magnitude bars — single series, so identity comes from the
   direct label, not color; one hue (primary) for every bar. */
.cost-center-bars { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 2rem; }
.cost-center-row { display: grid; grid-template-columns: 9rem 1fr 6.5rem; align-items: center; gap: 0.75rem; }
.cost-center-label { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cost-center-track { height: 20px; background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden; }
.cost-center-fill { height: 100%; background: var(--primary); border-radius: 0 4px 4px 0; min-width: 4px; }
.cost-center-value { font-size: 0.85rem; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .cost-center-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .cost-center-value { text-align: left; }
}

/* Settings tabs */
.settings-tabs {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.settings-tabs a {
  padding: 0.6rem 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.settings-tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }

/* Nav "Modules" dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown summary {
  cursor: pointer;
  color: var(--text-muted);
  list-style: none;
  font-size: 0.95rem;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary:hover { color: var(--primary); }
.nav-dropdown[open] summary { color: var(--primary); }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.4rem;
  z-index: 20;
}
.nav-dropdown-menu a, .nav-dropdown-disabled {
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--surface-2); color: var(--primary); }
.nav-dropdown-disabled {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--text-faint);
  cursor: default;
}
.nav-dropdown-disabled em {
  flex-shrink: 0;
  font-style: normal;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: var(--surface-2);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius-md); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; min-width: 480px; }
.table th, .table td {
  text-align: left;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.02em; }
.table tbody tr:last-child td { border-bottom: none; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: var(--surface-2);
  color: var(--text-muted);
}
.badge-active, .badge-approved, .badge-completed, .badge-disbursed { background: var(--success-bg); color: var(--success-text); }
.badge-suspended, .badge-disabled, .badge-rejected, .badge-cancelled { background: var(--error-bg); color: var(--error-text); }
.badge-pending, .badge-pending_quotes, .badge-pending_approval, .badge-revision_requested, .badge-proof_submitted, .badge-partially_delivered { background: var(--warning-bg); color: var(--warning-text); }
.badge-draft, .badge-po_issued, .badge-issued { background: var(--surface-2); color: var(--text-muted); }

/* Invite link */
.invite-link-box {
  display: flex;
  gap: 0.5rem;
  max-width: 520px;
  margin-bottom: 1rem;
}
.invite-link-box input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
}

/* Forms */
.stack { display: flex; flex-direction: column; gap: 1.1rem; }
.form-narrow { max-width: 420px; }
label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
input, select, textarea {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  min-height: 44px;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.field-error { color: var(--error-text); font-size: 0.85rem; margin: -0.6rem 0 0; }

.field-with-action { position: relative; display: flex; }
.field-with-action input { padding-right: 2.75rem; }
.field-with-action .icon-btn {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
}

/* Branding settings */
.color-field { display: flex; align-items: center; gap: 0.6rem; }
.color-field input[type="color"] {
  width: 44px;
  min-height: 44px;
  padding: 3px;
  cursor: pointer;
}
.color-hex-mirror { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.logo-preview {
  display: block;
  max-width: 160px;
  max-height: 80px;
  object-fit: contain;
  margin: 0.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  background: var(--surface);
}

/* Auth page */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 1.5rem;
}
.auth-topbar {
  position: fixed;
  top: 1rem;
  right: 1rem;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-md);
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}
.auth-brand .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  align-items: center;
  justify-content: center;
}
.auth-brand .brand-mark svg { width: 22px; height: 22px; }
.auth-brand-text h1 { margin: 0; font-size: 1.25rem; }
.auth-brand-text p { margin: 0.1rem 0 0; }
.muted { color: var(--text-muted); font-size: 0.9rem; }

/* Rubik's cube dashboard landing (/{slug}/dashboard) */
.cube-landing { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 2rem 1rem 3rem; }
.cube-school-name { margin: 0 0 2.5rem; font-size: 1.75rem; }

.cube-stage { position: relative; display: flex; align-items: center; justify-content: center; gap: 3.5rem; padding: 3rem 1rem; }

.cube-scene {
  --cube-size: clamp(140px, 26vw, 220px);
  width: var(--cube-size);
  height: var(--cube-size);
  perspective: 900px;
  cursor: grab;
  touch-action: none;
}
.cube-scene:active { cursor: grabbing; }
.cube-scene:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 10px; border-radius: 8px; }

.cube-assembly {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(15deg) rotateY(0deg);
}
.cube-assembly.is-solving, .cube-assembly.is-solved { transition: transform 1.6s cubic-bezier(.22, 1, .36, 1); }
/* Dragging always wins over the solving/solved transition above (same
   specificity — order alone wouldn't be reliable since class order on the
   element doesn't affect the cascade) so manual rotation tracks the
   pointer immediately instead of easing toward it. */
.cube-assembly.is-dragging { transition: none !important; }

/* Individual 3x3x3 pieces — see assets/js/app.js for the move engine that
   rotates/repositions these; stickers are fixed to each piece and never
   change color or move independently, same as a real cube. */
.cubie {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--cube-size) / 3);
  height: calc(var(--cube-size) / 3);
  margin-top: calc(var(--cube-size) / -6);
  margin-left: calc(var(--cube-size) / -6);
  transform-style: preserve-3d;
}

.turntable { position: absolute; inset: 0; transform-style: preserve-3d; }

.cubie-face {
  position: absolute;
  inset: 2px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  backface-visibility: hidden;
}
.cubie-face--front  { transform: translateZ(calc(var(--cube-size) / 6)); background: var(--cube-white); }
.cubie-face--back   { transform: rotateY(180deg) translateZ(calc(var(--cube-size) / 6)); background: var(--cube-yellow); }
.cubie-face--right  { transform: rotateY(90deg) translateZ(calc(var(--cube-size) / 6)); background: var(--cube-red); }
.cubie-face--left   { transform: rotateY(-90deg) translateZ(calc(var(--cube-size) / 6)); background: var(--cube-orange); }
.cubie-face--top    { transform: rotateX(90deg) translateZ(calc(var(--cube-size) / 6)); background: var(--cube-blue); }
.cubie-face--bottom { transform: rotateX(-90deg) translateZ(calc(var(--cube-size) / 6)); background: var(--cube-green); }

/* The one working face (blue/top): each sticker is individually numbered
   and interactive. Inert until solved — hovering/tapping a piece mid-spin
   or mid-scramble is a moving target, so interaction is gated purely by
   the existing is-solved class (see initCubeRoleStickers in app.js). */
.cube-role-sticker {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: none;
}
.cube-assembly.is-solved .cube-role-sticker { pointer-events: auto; }
.cube-role-sticker:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -3px; }
.cube-role-number {
  font-size: calc(var(--cube-size) / 11);
  font-weight: 700;
  color: rgba(0, 0, 0, 0.55);
}

.cube-role-tooltip {
  position: fixed;
  z-index: 30;
  max-width: 220px;
  padding: 0.65rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 0.85rem;
}
.cube-role-tooltip[hidden] { display: none; }
.cube-role-tooltip-title { font-weight: 700; margin: 0 0 0.4rem; color: var(--text); }
.cube-role-tooltip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.cube-role-tooltip-list li { color: var(--text-muted); }
.cube-role-tooltip-list a { color: var(--primary); text-decoration: none; }
.cube-role-tooltip-list a:hover { text-decoration: underline; }
.cube-role-tooltip-hint { margin: 0.5rem 0 0; color: var(--text-faint); font-size: 0.75rem; }

.cube-caption { margin: 1.25rem 0 0; font-size: 1.05rem; color: var(--text-muted); font-weight: 500; }

/* Module list — sits beside the cube on desktop, below it on mobile (see
   the mobile override below). Requisitions (the only live module) links to
   the real page; the rest link to a "coming soon" notice — all clickable,
   none dead-ends, matching the nav dropdown's disabled-item treatment. */
.cube-side { display: flex; flex-direction: column; align-items: flex-start; }
.module-list { display: flex; flex-direction: column; align-items: flex-start; gap: 0.85rem; }
.module-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
a.module-item:hover { color: var(--primary); }
.module-item-disabled { color: var(--text-faint); font-weight: 500; }
a.module-item-disabled:hover { color: var(--text); }
.module-item-disabled em {
  flex-shrink: 0;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: var(--surface-2);
  color: var(--text-faint);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.module-list.is-visible .module-item { opacity: 1; transform: none; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  .cube-assembly.is-solving, .cube-assembly.is-solved { transition: none; }
  .turntable { transition: none !important; }
}

/* Mobile */
@media (max-width: 640px) {
  .nav-toggle-btn { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.75rem;
    padding-top: 0.75rem;
  }
  .nav-toggle-checkbox:checked ~ .nav-links { display: flex; }
  .navbar-inner { position: relative; }

  .cube-stage { flex-direction: column; padding: 2rem 0.5rem 0; gap: 1.75rem; }
  .cube-side { align-items: center; }
  .module-list { align-items: center; }
}
