:root {
  --plastic: #d8d0ba;
  --plastic-dim: #c3bb9f;
  --plastic-deep: #a89f83;
  --plastic-hi: #ece6d2;
  --ink: #33301f;
  --ink-dim: #6b6448;
  --bg-deep: #171a15;
  --bg-panel: #23271f;
  --bg-panel-light: #2f342a;
  --parchment: #e9dfc7;
  --parchment-dim: #b3ab93;
  --moss-light: #39e67a;
  --terracotta: #b3543a;
  --terracotta-soft: rgba(179,84,58,0.55);
  --chart-amber: #f0a050;
  --chart-amber-soft: rgba(240,160,80,0.5);
  --chart-amber-faint: rgba(240,160,80,0.15);
  --wood-1: #6e4a2c;
  --wood-2: #5c3d24;
  --wood-4: #3d2716;
  --accent-glow: #39e67a;
  --accent-glow-soft: rgba(57,230,122,0.65);
  --accent-glow-soft2: rgba(57,230,122,0.7);
  --accent-glow-soft3: rgba(57,230,122,0.4);
  --accent-glow-faint: rgba(57,230,122,0.15);
  --font-logo: 'Michroma', sans-serif;
  --font-glyph: 'Aldrich', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-pixel: 'Bytesized', monospace;
  --font-body: 'Inter', sans-serif;
}

body.dark-mode {
  --plastic: #262119;
  --plastic-dim: #332c22;
  --plastic-deep: #17130d;
  --plastic-hi: #3a3226;
  --ink: #e9dfc7;
  --ink-dim: #b3ab93;
  --accent-glow: #e0a458;
  --accent-glow-soft: rgba(224,164,88,0.65);
  --accent-glow-soft2: rgba(224,164,88,0.7);
  --accent-glow-soft3: rgba(224,164,88,0.4);
  --accent-glow-faint: rgba(224,164,88,0.15);
  --moss-light: #e0a458;
  --chart-amber: #39e67a;
  --chart-amber-soft: rgba(57,230,122,0.5);
  --chart-amber-faint: rgba(57,230,122,0.15);
}
* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }

body {
  margin: 0;
  padding: 30px;
  min-height: 100vh;
  background: linear-gradient(120deg, var(--wood-1), var(--wood-2) 45%, var(--wood-4) 100%);
}

.device-body {
  position: relative;
  background: radial-gradient(ellipse at 20% -10%, var(--plastic-hi) 0%, transparent 55%), var(--plastic);
  color: var(--ink);
  font-family: var(--font-body);
  padding: 0 6vw 60px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3), inset 0 0 22px rgba(0,0,0,0.4);
  height: calc(100vh - 6em);
  width: 70%;
  margin: 0 auto;
}

.fastener {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--plastic-deep);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.55), inset 0 -1px 0 rgba(255,255,255,0.12);
  opacity: 0.6;
}
.fastener.tl { top: 12px; left: 12px; }
.fastener.tr { top: 12px; right: 12px; }
.fastener.bl { bottom: 12px; left: 12px; }
.fastener.br { bottom: 12px; right: 12px; }

header {
  padding: 44px 0 44px;
  margin: 0 -6vw;
  padding-left: 6vw;
  padding-right: 6vw;
  border-bottom: 1px solid var(--plastic-deep);
  position: relative;
}
.logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 20px;
}
.logo-mark { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-dot {
  width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(180deg, #9a9689, #6f6c5f);
  box-shadow: 0 1px 1px rgba(255,255,255,0.4), inset 0 1px 1px rgba(0,0,0,0.3);
}
.logo-glyph { font-family: var(--font-glyph); font-size: 50px; line-height: 1; color: var(--ink); }
.logo-text { display: flex; flex-direction: column; gap: 4px; }
.logo-name {
  display: flex; font-family: var(--font-logo); font-size: 19px;
  letter-spacing: 0.1em; color: var(--ink); text-transform: uppercase;
}
.logo-name .ch { display: inline-block; }
.logo-name .sp { display: inline-block; width: 0.55em; }
.logo-role {
  display: flex; font-family: var(--font-logo); font-size: 12px;
  letter-spacing: 0.28em; color: var(--plastic-deep); text-transform: uppercase;
}

.controls {
  position: absolute;
  right: 6vw;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--plastic);
  border: 1px solid var(--plastic-deep);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), inset 0 0 0 1px rgba(0,0,0,0.08);
  padding: 14px 16px;
}
.controls-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.controls .fastener { width: 6px; height: 6px; }
.controls .fastener.tl { top: 5px; left: 5px; }
.controls .fastener.tr { top: 5px; right: 5px; }
.controls .fastener.bl { bottom: 6px; left: 6px; }
.controls .fastener.br { bottom: 6px; right: 6px; }
.ctrl-btn {
  position: relative;
  border-radius: 10px;
  border: 1px solid var(--plastic-deep);
  background: var(--plastic-dim);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -2px 0 rgba(0,0,0,0.15);
  cursor: pointer;
  padding: 0;
  transition: box-shadow 0.15s ease, background 0.4s ease, border-color 0.4s ease;
}
.ctrl-btn:active {
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.1);
}
.theme-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}
.theme-toggle {
  position: relative;
  width: 44px; height: 24px;
  border-radius: 12px;
  border: 1px solid var(--plastic-deep);
  background: var(--plastic-dim);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
  padding: 0;
  flex-shrink: 0;
}
.theme-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  opacity: 0.45;
  transition: opacity 0.3s ease, filter 0.3s ease;
}
.theme-icon.sun {
  stroke: var(--ink-dim);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.theme-icon.moon {
  fill: var(--ink-dim);
  stroke: none;
}
.theme-icon.sun.is-lit {
  stroke: var(--terracotta);
  opacity: 1;
  filter: drop-shadow(0 0 3px var(--terracotta-soft));
}
.theme-icon.moon.is-lit {
  fill: var(--accent-glow);
  opacity: 1;
  filter: drop-shadow(0 0 3px var(--accent-glow-soft));
}
.theme-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--plastic-hi);
  box-shadow: 0 1px 2px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.4);
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}
body.dark-mode .theme-thumb {
  transform: translateX(20px);
}
@media (max-width: 720px) { .controls { display: none; } }

.world-map {
  position: relative;
  width: 150px;
  height: 75px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.5);
  background: radial-gradient(circle at 30% 20%, var(--bg-panel-light), var(--bg-deep) 80%);
  flex-shrink: 0;
}
.world-map svg {
  width: 100%;
  height: 100%;
  display: block;
}
.world-map .wm-land {
  fill: rgba(57,230,122,0.16);
  stroke: rgba(57,230,122,0.45);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}
.world-map .wm-night {
  fill: rgba(0,0,0,0.55);
  pointer-events: none;
}
.world-map .wm-terminator {
  fill: none;
  stroke: #f0a050;
  stroke-width: 0.8;
  opacity: 0.8;
  filter: drop-shadow(0 0 2px rgba(240,160,80,0.5));
  vector-effect: non-scaling-stroke;
}
.world-map .wm-marker {
  fill: var(--terracotta);
  stroke: var(--terracotta);
  stroke-width: 3;
  stroke-opacity: 0.35;
  display: none;
}
.world-map .wm-marker.is-located {
  display: block;
}
.world-map .wm-marker.is-fallback {
  fill: #ff2d2d;
  stroke: #ff2d2d;
  r: 2.2px;
  stroke-width: 2.5;
  stroke-opacity: 0.4;
}

.readout {
  width: 100px; height: 30px;
  border-radius: 8px;
  background: radial-gradient(circle at 40% 30%, var(--bg-panel-light), var(--bg-deep) 85%);
  border: 1px solid rgba(233,223,199,0.12);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.6), inset 0 -1px 0 rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.readout-text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent-glow);
  text-shadow: 0 0 6px var(--accent-glow-soft2);
  transition: color 0.4s ease;
}
.readout-signal:not([hidden]) {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 60%;
}
.readout-signal span {
  width: 3px;
  border-radius: 1px;
  background: var(--accent-glow);
  box-shadow: 0 0 5px var(--accent-glow-soft2);
  animation: signal-bounce 1.1s ease-in-out infinite;
  transition: background 0.4s ease;
}
.readout-signal span:nth-child(1) { height: 30%; animation-delay: 0s; }
.readout-signal span:nth-child(2) { height: 70%; animation-delay: 0.12s; }
.readout-signal span:nth-child(3) { height: 45%; animation-delay: 0.24s; }
.readout-signal span:nth-child(4) { height: 85%; animation-delay: 0.36s; }
.readout-signal span:nth-child(5) { height: 55%; animation-delay: 0.48s; }
@keyframes signal-bounce {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.stage {
  margin-top: 36px;
  display: flex;
  gap: 18px;
  height: 80%;
  width: 100%;
}

.bank {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 104px;
  flex-shrink: 0;
  background: var(--plastic);
  border: 1px solid var(--plastic-deep);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), inset 0 0 0 1px rgba(0,0,0,0.08);
  padding: 14px;
}
.bank .fastener { width: 6px; height: 6px; }
.bank .fastener.tl { top: 5px; left: 5px; }
.bank .fastener.tr { top: 5px; right: 5px; }
.bank .fastener.bl { bottom: 5px; left: 5px; }
.bank .fastener.br { bottom: 5px; right: 5px; }

.icon-btn {
  position: relative;
  flex: 1;
  min-height: 52px;
  border-radius: 10px;
  border: 1px solid var(--plastic-deep);
  background: var(--plastic-dim);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -2px 0 rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn svg {
  width: 22px; height: 22px;
  stroke: var(--ink-dim);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.25s ease, filter 0.25s ease;
}
.icon-btn.is-lit svg {
  stroke: var(--terracotta);
  filter: drop-shadow(0 0 3px var(--terracotta)) drop-shadow(0 0 11px var(--terracotta-soft));
}
.icon-btn:active,
.icon-btn.is-locked {
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.4),
    inset 0 -1px 0 rgba(255,255,255,0.3),
    inset 0 0 0 2px var(--terracotta);
}

.screen {
  position: relative;
  flex: 1;
  min-height: 320px;
  border-radius: 22px;
  overflow: hidden;
  border: 15px solid var(--plastic-dim);
  border-image: linear-gradient(135deg, var(--plastic-deep) 0%, var(--plastic-dim) 45%, var(--plastic-hi) 100%) 1;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  isolation: isolate;
  background: var(--plastic);
}
.screen::before {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
  transition: background 0.5s ease;
  background: radial-gradient(circle at 30% 20%, var(--bg-panel-light), var(--bg-deep) 80%);
}
.screen::after {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 50%, transparent 38%, rgba(0,0,0,0.55) 100%);
}
.screen-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss-light);
  text-shadow: 0 0 6px var(--accent-glow-soft2);
  margin-bottom: 8px;
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.4s ease;
}
.screen h3 {
  font-family: var(--font-logo);
  font-size: 22px;
  margin: 0 0 8px;
  color: var(--parchment);
  text-shadow: 0 0 8px rgba(233,223,199,0.5);
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.4s ease;
}
.screen p {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--parchment-dim);
  text-shadow: 0 0 4px rgba(233,223,199,0.3);
  margin: 0;
  max-width: 40ch;
  line-height: 1.5;
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.4s ease;
}

.screen-bracket {
  position: absolute;
  width: 10px; height: 10px;
  border-color: var(--accent-glow-soft);
  border-style: solid;
  opacity: 0.7;
  filter: drop-shadow(0 0 3px var(--accent-glow-soft3));
  pointer-events: none;
}
.screen-bracket.tl { top: 12px; left: 12px; border-width: 1px 0 0 1px; }
.screen-bracket.tr { top: 12px; right: 12px; border-width: 1px 1px 0 0; }
.screen-bracket.bl { bottom: 12px; left: 12px; border-width: 0 0 1px 1px; }
.screen-bracket.br { bottom: 12px; right: 12px; border-width: 0 1px 1px 0; }

.screen-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.screen-frame {
  position: relative;
  flex: 1;
  min-height: 320px;
  display: flex;
}
.screen-frame .fastener { width: 7px; height: 7px; }
.screen-frame .fastener.tl { top: 4px; left: 4px; }
.screen-frame .fastener.tr { top: 4px; right: 4px; }
.screen-frame .fastener.bl { bottom: 4px; left: 4px; }
.screen-frame .fastener.br { bottom: 4px; right: 4px; }

.screen-footer {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 10px;
  height: 82px;
  background: var(--plastic);
  border: 1px solid var(--plastic-deep);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), inset 0 0 0 1px rgba(0,0,0,0.08);
  padding: 14px;
}
.screen-footer .fastener { width: 6px; height: 6px; }
.screen-footer .fastener.tl { top: 5px; left: 5px; }
.screen-footer .fastener.tr { top: 5px; right: 5px; }
.screen-footer .fastener.bl { bottom: 5px; left: 5px; }
.screen-footer .fastener.br { bottom: 5px; right: 5px; }

.open-btn {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--accent-glow-soft);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--moss-light);
  text-shadow: 0 0 4px var(--accent-glow-soft3);
  font-size: 15px;
  line-height: 1;
  opacity: 0.4;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.25s ease, background 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}
.open-btn.is-enabled {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}
.open-btn.is-enabled:hover {
  background: var(--moss-light);
  color: var(--bg-deep);
  text-shadow: none;
}
.open-btn:active {
  filter: brightness(0.9);
}

.subject-knob-outer {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
}
.subject-knob-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.subject-knob-ticks .tick {
  position: absolute;
  top: 50%; left: 50%;
  width: 2px; height: 5px;
  margin: -2.5px 0 0 -1px;
  background: var(--plastic-deep);
  border-radius: 1px;
  transform: rotate(var(--a)) translateY(-13px);
}
.subject-knob {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--plastic-deep);
  background: var(--plastic-dim);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -2px 0 rgba(0,0,0,0.15);
  cursor: pointer;
  padding: 0;
  transition: box-shadow 0.15s ease, background 0.4s ease, border-color 0.4s ease;
}
.subject-knob:active {
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.4),
    inset 0 -1px 0 rgba(255,255,255,0.3);
}
.subject-knob::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--plastic-deep);
  transform: translate(-50%, -50%);
}
.subject-knob-needle {
  position: absolute;
  top: 50%; left: 50%;
  width: 2px; height: 10px;
  margin: -10px 0 0 -1px;
  background: var(--ink-dim);
  border-radius: 1px;
  transform-origin: 50% 100%;
  transform: rotate(var(--knob-angle, 30deg));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chart-subject-labels {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
  justify-content: center;
}
.chart-subject-label {
  font-family: var(--font-pixel);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #6f6255;
  text-shadow: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
.chart-subject-label.is-lit {
  color: var(--chart-amber);
  text-shadow: 0 0 4px var(--chart-amber-soft);
}

.chart-screen {
  position: relative;
  flex: 1;
  min-width: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.5);
  background: radial-gradient(circle at 30% 20%, var(--bg-panel-light), var(--bg-deep) 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 6px 10px;
}
.chart-screen::before,
.chart-screen::after,
.chart-screen .bracket-l,
.chart-screen .bracket-r {
  content: '';
  position: absolute;
  width: 7px; height: 7px;
  border-color: var(--chart-amber-soft);
  border-style: solid;
  opacity: 0.7;
  pointer-events: none;
}
.chart-screen::before { top: 3px; left: 3px; border-width: 1px 0 0 1px; }
.chart-screen::after { top: 3px; right: 3px; border-width: 1px 1px 0 0; }
.chart-screen .bracket-l { bottom: 3px; left: 3px; border-width: 0 0 1px 1px; }
.chart-screen .bracket-r { bottom: 3px; right: 3px; border-width: 0 1px 1px 0; }
.chart-screen svg {
  flex: 1;
  min-width: 0;
  height: 34px;
  overflow: visible;
}
.chart-screen .graph-baseline {
  stroke: rgba(233,223,199,0.12);
  stroke-width: 1;
}
.chart-screen .graph-grid {
  stroke: rgba(233,223,199,0.06);
  stroke-width: 1;
}
.chart-screen .graph-tick {
  stroke: var(--chart-amber-faint);
  stroke-width: 1;
}
.chart-screen .graph-fill {
  fill: var(--chart-amber-faint);
  stroke: none;
}
.chart-screen .graph-line {
  fill: none;
  stroke: var(--chart-amber);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 2px var(--chart-amber-soft));
}
.chart-screen .graph-node {
  fill: var(--bg-deep);
  stroke: var(--chart-amber);
  stroke-width: 1.2;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.chart-screen .graph-node.is-in {
  opacity: 1;
}
.chart-screen .graph-dot {
  fill: var(--chart-amber);
  stroke: var(--chart-amber);
  stroke-width: 1.4;
  filter: drop-shadow(0 0 3px var(--chart-amber-soft));
}

.status-lights {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 4px;
}
.screen .countdown {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 1;
}
.countdown-bar {
  width: 24px;
  height: 5px;
  border-radius: 2px;
  background: var(--moss-light);
  border: 1px solid var(--moss-light);
  opacity: 0.8;
  box-shadow: 0 0 4px var(--accent-glow-soft3);
  transition: background 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}
.countdown-bar.is-drained {
  background: transparent;
  border-color: rgba(233,223,199,0.3);
  opacity: 0.6;
  box-shadow: none;
}
.light {
  width: 16px; height: 54px;
  border-radius: 1px;
  background: var(--plastic-deep);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
#light-preview.is-on {
  background: var(--moss-light);
  box-shadow: 0 0 6px var(--accent-glow-soft);
}
#light-locked.is-on {
  background: var(--terracotta);
  box-shadow: 0 0 6px var(--terracotta-soft);
}

.light-idle-grid {
  width: 54px; height: 54px;
  padding: 4px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.5);
  background: radial-gradient(circle at 30% 20%, var(--bg-panel-light), var(--bg-deep) 80%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  flex-shrink: 0;
}
.light-idle-grid .cell {
  border: 1px solid rgba(233,223,199,0.3);
  border-radius: 1px;
  background: transparent;
  box-shadow: none;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.light-idle-grid.is-on .cell {
  animation: cell-twinkle 2s ease-in-out infinite;
}
.light-idle-grid.is-on .cell:nth-child(1) { animation-duration: 1.9s; animation-delay: 0s; }
.light-idle-grid.is-on .cell:nth-child(2) { animation-duration: 2.4s; animation-delay: 0.3s; }
.light-idle-grid.is-on .cell:nth-child(3) { animation-duration: 1.6s; animation-delay: 0.9s; }
.light-idle-grid.is-on .cell:nth-child(4) { animation-duration: 2.2s; animation-delay: 0.6s; }
.light-idle-grid.is-on .cell:nth-child(5) { animation-duration: 1.7s; animation-delay: 1.2s; }
.light-idle-grid.is-on .cell:nth-child(6) { animation-duration: 2.6s; animation-delay: 0.1s; }
.light-idle-grid.is-on .cell:nth-child(7) { animation-duration: 1.5s; animation-delay: 1.5s; }
.light-idle-grid.is-on .cell:nth-child(8) { animation-duration: 2.1s; animation-delay: 0.8s; }
.light-idle-grid.is-on .cell:nth-child(9) { animation-duration: 1.8s; animation-delay: 1.8s; }
@keyframes cell-twinkle {
  0%, 100% { background: transparent; box-shadow: none; }
  50% { background: #e6b84f; box-shadow: 0 0 4px rgba(230,184,79,0.7); }
}