:root {
  color-scheme: dark;
  --bg: #07100f;
  --panel: rgba(10, 20, 19, 0.92);
  --panel-2: rgba(14, 28, 26, 0.9);
  --ink: #eafff9;
  --ink-soft: #b5d4cc;
  --muted: #77918a;
  --line: rgba(0, 255, 196, 0.2);
  --theme: #ff3434;
  --theme-dim: rgba(255, 52, 52, 0.12);
  --theme-glow: rgba(255, 52, 52, 0.72);
  --accent: var(--theme);
  --led: var(--theme);
  --led-dim: var(--theme-dim);
  --led-glow: var(--theme-glow);
  --danger: #ffcd6b;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  --accent: var(--theme);
  --led: var(--theme);
  --led-dim: var(--theme-dim);
  --led-glow: var(--theme-glow);
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background:
    linear-gradient(rgba(0, 255, 196, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 196, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 16% 0%, color-mix(in srgb, var(--theme) 12%, transparent), transparent 26rem),
    var(--bg);
  background-size: 3.5rem 3.5rem, 3.5rem 3.5rem, auto, auto;
}
a { color: inherit; }
code { font-family: var(--mono); color: var(--accent); }
.skip-link {
  position: fixed;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 100;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
  color: var(--ink);
  font: 800 0.76rem/1 var(--mono);
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 120ms ease;
}
.skip-link:focus { transform: translateY(0); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme) 72%, white);
  outline-offset: 3px;
}
.no-script-notice {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--panel);
  color: var(--ink-soft);
}
.utility-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem clamp(0.9rem, 3vw, 1.5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 15, 0.92);
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #0d1817;
  color: var(--accent);
  font-weight: 900;
}
.brand-title,
.brand-subtitle,
.label,
.source-strip span,
.toolbar span,
.zone-card > span {
  display: block;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.brand-title {
  font-weight: 850;
  font-size: 0.95rem;
}
.brand-subtitle {
  color: var(--muted);
  font-size: 0.68rem;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
nav a {
  padding: 0.45rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-decoration: none;
}
nav a:hover {
  border-color: var(--line);
  color: var(--accent);
}
.clock-app {
  width: min(1800px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}
.now-panel,
.toolbar,
.zone-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}
.now-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: clamp(1rem, 2vw, 1.35rem);
  border-radius: 1rem;
}
.now-readout {
  min-width: 0;
  container-type: inline-size;
}
.label,
.source-strip span,
.toolbar span,
.zone-card > span {
  margin: 0;
  color: var(--muted);
  font: 800 0.66rem/1.35 var(--mono);
}
#utcClock {
  display: flex;
  align-items: center;
  gap: 0.22em;
  margin: 0.25rem 0;
  color: var(--accent);
  font: 900 clamp(3rem, 7vw, 6.8rem)/0.9 var(--mono);
  letter-spacing: -0.08em;
  max-width: 100%;
  overflow: hidden;
}
#utcClock .time-digits {
  font-size: inherit;
  font-weight: inherit;
}
#utcDate,
.source-note {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}
.source-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
}
.source-strip div {
  min-height: 4.35rem;
  padding: 0.65rem;
  border: 1px solid rgba(0, 255, 196, 0.13);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.22);
}
.source-strip strong {
  display: block;
  margin-top: 0.35rem;
  font: 850 1rem/1.1 var(--mono);
  overflow-wrap: anywhere;
}
.source-note {
  grid-column: 1 / -1;
  padding-top: 0.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  align-items: end;
  margin: 0;
  padding: 0.85rem;
  border-radius: 1rem;
}
.toolbar label {
  display: grid;
  gap: 0.35rem;
}
.clock-color-control {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.clock-color-control legend {
  margin-bottom: 0.4rem;
  padding: 0;
  color: var(--muted);
  font: 800 0.66rem/1.35 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.color-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}
.color-swatch {
  --swatch: #ff3434;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  min-width: 0;
  min-height: 2.8rem;
  padding: 0 0.55rem;
}
.color-swatch i {
  flex: 0 0 auto;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0.65rem color-mix(in srgb, var(--swatch) 68%, transparent);
}
.color-swatch span {
  overflow: hidden;
  color: var(--ink-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.color-swatch[aria-pressed="true"] {
  border-color: var(--swatch);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--swatch) 45%, transparent);
}
.color-swatch[data-clock-color="amber"] { --swatch: #ffb000; }
.color-swatch[data-clock-color="green"] { --swatch: #42ff55; }
.color-swatch[data-clock-color="cyan"] { --swatch: #00f5ff; }
.color-swatch[data-clock-color="ice"] { --swatch: #a9d8ff; }
.color-swatch[data-clock-color="violet"] { --swatch: #b56cff; }
input,
select,
button {
  min-height: 2.55rem;
  border: 1px solid rgba(0, 255, 196, 0.2);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  font: 700 0.9rem/1 var(--sans);
}
input,
select {
  width: 100%;
  padding: 0 0.75rem;
}
button {
  padding: 0 0.85rem;
  cursor: pointer;
}
button:hover,
button[aria-pressed="true"] {
  border-color: rgba(0, 255, 196, 0.48);
  background: rgba(0, 255, 196, 0.12);
}
.zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: clamp(0.8rem, 1vw, 1.1rem);
}
.converter {
  margin: 0.85rem 0;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}
.drawer-toggle {
  position: fixed;
  right: 1rem;
  top: 5.25rem;
  z-index: 30;
  min-width: 4.8rem;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
}
.tools-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  width: min(28rem, calc(100vw - 1rem));
  height: 100vh;
  padding: 1rem;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, #000 6%);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.34);
  transform: translateX(105%);
  transition: transform 180ms ease;
}
body.drawer-open .tools-drawer {
  transform: translateX(0);
}
.drawer-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.drawer-header h1 {
  margin: 0.25rem 0 0;
  font-size: 1.8rem;
  letter-spacing: -0.05em;
}
#drawerClose {
  min-height: 2.2rem;
  width: 2.2rem;
  padding: 0;
  border-radius: 999px;
}
.converter-heading {
  margin-bottom: 0.8rem;
}
.converter-heading p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  line-height: 1.5;
}
.converter-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  align-items: end;
}
.converter-controls label {
  display: grid;
  gap: 0.35rem;
}
.converter-actions {
  display: grid;
  gap: 0.45rem;
}
.conversion-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.conversion-card {
  padding: 0.8rem;
  border: 1px solid rgba(0, 255, 196, 0.14);
  border-radius: 0.85rem;
  background: rgba(0, 0, 0, 0.2);
}
.conversion-card h2 {
  margin: 0.4rem 0 0.65rem;
  font-size: 1.1rem;
}
.conversion-card time {
  display: block;
  color: var(--accent);
  font: 900 1.7rem/1 var(--mono);
  letter-spacing: -0.05em;
}
.conversion-card p,
.conversion-card code {
  display: block;
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.conversion-card span {
  color: var(--muted);
  font: 800 0.64rem/1.35 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.zone-card {
  position: relative;
  min-height: 13rem;
  padding: clamp(1rem, 1.4vw, 1.3rem);
  border-radius: 1.15rem;
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--theme) 12%, transparent), transparent 12rem),
    linear-gradient(135deg, color-mix(in srgb, var(--theme) 7%, transparent), transparent 42%),
    var(--panel-2);
  border-color: color-mix(in srgb, var(--theme) 26%, transparent);
}
.zone-card h2 {
  margin: 0.5rem 2.2rem 0.9rem 0;
  font-size: clamp(1.45rem, 2vw, 2.15rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.zone-card time {
  display: flex;
  align-items: center;
  gap: 0.2em;
  max-width: 100%;
  overflow: hidden;
  color: var(--accent);
  font-family: var(--mono);
  font-size: clamp(2.6rem, 4.2vw, 4.6rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.1em;
}
.zone-card time .time-digits {
  display: block;
  font-family: var(--mono);
  font-size: inherit;
  font-weight: 900;
  line-height: inherit;
  letter-spacing: inherit;
}
.dial,
.hero-dial {
  display: none;
  position: relative;
  width: 8.5rem;
  height: 8.5rem;
  margin: 0.6rem auto 0.85rem;
  border: 2px solid color-mix(in srgb, var(--theme) 48%, transparent);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--theme) 24%, transparent) 0 0.22rem, transparent 0.24rem),
    radial-gradient(circle, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.28));
  box-shadow: 0 0 22px color-mix(in srgb, var(--theme) 12%, transparent);
}
.dial i,
.hero-dial i {
  position: absolute;
  inset: 0.45rem;
  border-radius: 50%;
}
.dial i::before,
.dial i::after,
.hero-dial i::before,
.hero-dial i::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0.18rem;
  height: 0.62rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme) 42%, var(--ink-soft));
  transform: translateX(-50%);
}
.dial i::before,
.hero-dial i::before { top: 0; }
.dial i::after,
.hero-dial i::after { bottom: 0; }
.dial i:nth-child(2),
.hero-dial i:nth-child(2) { transform: rotate(30deg); }
.dial i:nth-child(3),
.hero-dial i:nth-child(3) { transform: rotate(60deg); }
.dial i:nth-child(4),
.hero-dial i:nth-child(4) { transform: rotate(90deg); }
.hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 0.18rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme) 28%, var(--ink));
  transform-origin: 50% 100%;
}
.hour-hand {
  height: 2.25rem;
  transform: translateX(-50%) rotate(var(--hour-angle, 0deg));
}
.minute-hand {
  height: 3.15rem;
  transform: translateX(-50%) rotate(var(--minute-angle, 0deg));
}
.second-hand {
  width: 0.1rem;
  height: 3.45rem;
  background: var(--theme);
  transform: translateX(-50%) rotate(var(--second-angle, 0deg));
}
.pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: var(--theme);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 18px var(--theme-glow);
}
.time-digits {
  display: inline-block;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}
.seg-display {
  display: none !important;
  align-items: center;
  gap: 0.08em;
}
.seg-digit {
  position: relative;
  display: inline-block;
  width: 0.58em;
  height: 1em;
}
.seg-digit i {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: var(--led-dim);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--led) 10%, transparent);
}
.seg-digit i.is-on {
  background: var(--led);
  box-shadow: 0 0 0.08em var(--led-glow), 0 0 0.24em color-mix(in srgb, var(--led) 45%, transparent);
}
.seg-a,
.seg-d,
.seg-g {
  left: 16%;
  width: 68%;
  height: 8%;
}
.seg-a { top: 4%; }
.seg-g { top: 46%; }
.seg-d { bottom: 4%; }
.seg-b,
.seg-c,
.seg-e,
.seg-f {
  width: 9%;
  height: 38%;
}
.seg-b,
.seg-c { right: 5%; }
.seg-e,
.seg-f { left: 5%; }
.seg-b,
.seg-f { top: 10%; }
.seg-c,
.seg-e { bottom: 10%; }
.seg-colon {
  display: inline-grid;
  gap: 0.22em;
  width: 0.18em;
  justify-items: center;
}
.seg-colon i {
  display: block;
  width: 0.12em;
  height: 0.12em;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 0.12em var(--led-glow);
}
.seg-label {
  align-self: center;
  color: var(--led);
  font-size: 0.38em;
  letter-spacing: 0;
}
.period-stack {
  display: inline-grid;
  grid-template-rows: 1fr 1fr;
  gap: 0.12em;
  min-width: 1.7em;
  color: var(--muted);
  font-size: 0.22em;
  line-height: 1;
  letter-spacing: 0.04em;
}
.period-stack span {
  display: block;
  opacity: 0.34;
}
.period-stack .is-active {
  color: var(--accent);
  opacity: 1;
  text-shadow: 0 0 16px rgba(0, 255, 196, 0.3);
}
.clock-suffix {
  flex: 0 0 auto;
  align-self: center;
  color: var(--theme);
  font: 850 0.24em/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.zone-card p {
  margin: 0.8rem 0 0.35rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.25;
}
.zone-card code {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.remove-zone {
  position: absolute;
  right: 0.6rem;
  top: 0.6rem;
  min-height: 1.8rem;
  width: 1.8rem;
  padding: 0;
  border-radius: 999px;
  color: var(--muted);
}
.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 0.9rem;
  color: var(--ink-soft);
  background: rgba(0, 0, 0, 0.18);
}
body[data-display-mode="led"] .zone-card {
  display: flex;
  min-height: 14rem;
  flex-direction: column;
  justify-content: center;
  background:
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--led) 4%, transparent) 0 1px, transparent 1px 0.42rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    #090b0b;
  border-color: color-mix(in srgb, var(--led) 35%, transparent);
}
body[data-display-mode="led"] .zone-card time,
body[data-display-mode="led"] #utcClock {
  color: var(--led);
  text-shadow: 0 0 8px var(--led-glow), 0 0 28px color-mix(in srgb, var(--led) 32%, transparent);
}
body[data-display-mode="led"] #utcClock {
  font-size: clamp(3.5rem, 6.3vw, 7rem);
  font-size: clamp(3.5rem, 20cqi, 7rem);
}
body[data-display-mode="led"] .zone-card h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.55rem, 2.05vw, 2.2rem);
  line-height: 0.95;
}
body[data-display-mode="led"] .zone-card time {
  margin: 0.2rem 0 0.95rem;
  font-size: clamp(2.8rem, 4.45vw, 4.75rem);
  line-height: 1;
  letter-spacing: 0;
}
body[data-display-mode="led"] .zone-card time .seg-display {
  max-width: 100%;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: none;
}
body[data-display-mode="led"] .zone-card time .seg-digit,
body[data-display-mode="led"] .zone-card time .seg-colon,
body[data-display-mode="led"] .zone-card time .seg-label {
  font-size: inherit;
  line-height: inherit;
}
body[data-display-mode="led"] .seg-digit {
  width: 0.54em;
  height: 0.94em;
}
body[data-display-mode="led"] .seg-colon {
  width: 0.18em;
}
body[data-display-mode="led"] .zone-card p {
  font-size: clamp(0.95rem, 1.15vw, 1.12rem);
}
body[data-display-mode="led"] .zone-card code {
  font-size: clamp(0.72rem, 0.9vw, 0.9rem);
}
body[data-display-mode="led"] .time-digits {
  display: none;
}
body[data-display-mode="led"] .seg-display {
  display: inline-flex !important;
}
body[data-display-mode="led"] .period-stack .is-active {
  color: var(--led);
  text-shadow: 0 0 10px var(--led-glow);
}
body[data-clock-color="red"] {
  --theme: #ff3434;
  --theme-dim: rgba(255, 52, 52, 0.12);
  --theme-glow: rgba(255, 52, 52, 0.72);
}
body[data-clock-color="amber"] {
  --theme: #ffb000;
  --theme-dim: rgba(255, 176, 0, 0.13);
  --theme-glow: rgba(255, 176, 0, 0.76);
}
body[data-clock-color="green"] {
  --theme: #42ff55;
  --theme-dim: rgba(66, 255, 85, 0.12);
  --theme-glow: rgba(66, 255, 85, 0.72);
}
body[data-clock-color="cyan"] {
  --theme: #00f5ff;
  --theme-dim: rgba(0, 245, 255, 0.12);
  --theme-glow: rgba(0, 245, 255, 0.72);
}
body[data-clock-color="ice"] {
  --theme: #a9d8ff;
  --theme-dim: rgba(169, 216, 255, 0.14);
  --theme-glow: rgba(169, 216, 255, 0.78);
}
body[data-clock-color="violet"] {
  --theme: #b56cff;
  --theme-dim: rgba(181, 108, 255, 0.13);
  --theme-glow: rgba(181, 108, 255, 0.74);
}
body[data-display-mode="analog"] .zone-card,
body[data-display-mode="radium"] .zone-card {
  text-align: center;
}
body[data-display-mode="text"] .zone-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  min-height: clamp(16rem, 24vw, 20rem);
  overflow: hidden;
}
body[data-display-mode="text"] .zone-card h2 {
  margin-bottom: clamp(0.65rem, 1vw, 1rem);
  font-size: clamp(2rem, 3vw, 3.1rem);
}
body[data-display-mode="text"] .zone-card time {
  align-self: center;
  margin: 0.1rem 0 0.8rem;
  font-size: clamp(3.4rem, 5.1vw, 5.6rem);
  line-height: 0.86;
  letter-spacing: -0.12em;
}
body[data-display-mode="text"] .zone-card time .time-digits {
  max-width: 100%;
  font-size: inherit;
  white-space: nowrap;
}
body[data-display-mode="text"] .zone-card p {
  margin-top: auto;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
}
body[data-display-mode="text"] .zone-card code {
  font-size: clamp(0.78rem, 0.95vw, 0.98rem);
}
body[data-display-mode="text"] .zone-card::after {
  content: "";
  position: absolute;
  inset: auto 1rem 1rem auto;
  width: 4.5rem;
  height: 4.5rem;
  border: 1px solid color-mix(in srgb, var(--theme) 18%, transparent);
  border-radius: 50%;
  opacity: 0.55;
  pointer-events: none;
}
body[data-display-mode="analog"] .zone-card {
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--theme) 14%, transparent), transparent 6rem),
    linear-gradient(135deg, color-mix(in srgb, var(--theme) 8%, transparent), transparent 46%),
    var(--panel-2);
  border-color: color-mix(in srgb, var(--theme) 34%, transparent);
}
body[data-display-mode="analog"] .dial,
body[data-display-mode="radium"] .dial,
body[data-display-mode="analog"] .hero-dial,
body[data-display-mode="radium"] .hero-dial {
  display: block;
}
body[data-display-mode="analog"] .hero-dial,
body[data-display-mode="radium"] .hero-dial {
  width: clamp(10rem, 20vw, 16rem);
  height: clamp(10rem, 20vw, 16rem);
  margin: 0.4rem 0 0.8rem;
}
body[data-display-mode="analog"] #utcClock,
body[data-display-mode="radium"] #utcClock {
  font-size: clamp(2.2rem, 4vw, 4rem);
}
body[data-display-mode="analog"] .zone-card time,
body[data-display-mode="radium"] .zone-card time {
  justify-content: center;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  letter-spacing: -0.04em;
}
body[data-display-mode="radium"] .zone-card {
  background:
    radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--theme) 28%, transparent), transparent 4.8rem),
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--theme) 13%, transparent), transparent 7.2rem),
    linear-gradient(135deg, color-mix(in srgb, var(--theme) 8%, transparent), transparent 46%),
    #0b1109;
  border-color: color-mix(in srgb, var(--theme) 42%, transparent);
  box-shadow:
    0 0 28px color-mix(in srgb, var(--theme) 13%, transparent),
    inset 0 0 42px color-mix(in srgb, var(--theme) 8%, transparent);
}
body[data-display-mode="radium"] .dial,
body[data-display-mode="radium"] .hero-dial {
  border-color: color-mix(in srgb, var(--theme) 62%, transparent);
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--theme) 42%, transparent) 0 0.24rem, transparent 0.27rem),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--theme) 10%, transparent), transparent 62%),
    #10170c;
  box-shadow:
    inset 0 0 34px color-mix(in srgb, var(--theme) 16%, transparent),
    0 0 34px color-mix(in srgb, var(--theme) 22%, transparent),
    0 0 70px color-mix(in srgb, var(--theme) 10%, transparent);
}
body[data-display-mode="radium"] .dial::before,
body[data-display-mode="radium"] .hero-dial::before {
  content: "";
  position: absolute;
  inset: 0.8rem;
  border: 1px dashed color-mix(in srgb, var(--theme) 30%, transparent);
  border-radius: 50%;
  box-shadow: inset 0 0 20px color-mix(in srgb, var(--theme) 8%, transparent);
}
body[data-display-mode="radium"] .dial i::before,
body[data-display-mode="radium"] .dial i::after,
body[data-display-mode="radium"] .hero-dial i::before,
body[data-display-mode="radium"] .hero-dial i::after,
body[data-display-mode="radium"] .hand {
  background: var(--theme);
  box-shadow: 0 0 12px var(--theme-glow), 0 0 26px color-mix(in srgb, var(--theme) 28%, transparent);
}
body[data-display-mode="radium"] .second-hand,
body[data-display-mode="radium"] .pin {
  background: var(--theme);
}
body[data-display-mode="radium"] .zone-card time,
body[data-display-mode="radium"] #utcClock {
  color: var(--theme);
  text-shadow:
    0 0 10px color-mix(in srgb, var(--theme) 52%, transparent),
    0 0 30px color-mix(in srgb, var(--theme) 26%, transparent),
    0 0 60px color-mix(in srgb, var(--theme) 12%, transparent);
}
body[data-clock-state="offline"] #sourceStatus,
body[data-clock-state="holding"] #sourceStatus {
  color: var(--danger);
}
body[data-theme="light"] {
  --bg: #f5fbf8;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-2: rgba(255, 255, 255, 0.96);
  --ink: #12201d;
  --ink-soft: #354b45;
  --muted: #62766f;
  --line: rgba(0, 128, 102, 0.2);
  --danger: #a36200;
  background:
    linear-gradient(rgba(0, 128, 102, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 128, 102, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 16% 0%, color-mix(in srgb, var(--theme) 16%, transparent), transparent 26rem),
    var(--bg);
}
body[data-theme="light"] .utility-header {
  background: rgba(245, 251, 248, 0.9);
}
body[data-theme="light"] .tools-drawer {
  background: rgba(255, 255, 255, 0.96);
}
body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] button,
body[data-theme="light"] .source-strip div,
body[data-theme="light"] .conversion-card {
  background: rgba(255, 255, 255, 0.72);
}
body[data-theme="light"][data-display-mode="led"] .zone-card {
  background: #151010;
  border-color: rgba(180, 0, 0, 0.28);
}
body[data-theme="light"][data-display-mode="led"] .zone-card h2,
body[data-theme="light"][data-display-mode="led"] .zone-card p,
body[data-theme="light"][data-display-mode="led"] .zone-card code,
body[data-theme="light"][data-display-mode="led"] .zone-card span {
  color: #ffd2d2;
}
body[data-theme="light"][data-display-mode="analog"] .zone-card {
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--theme) 11%, transparent), transparent 5.5rem),
    #fffdf6;
  border-color: color-mix(in srgb, var(--theme) 32%, transparent);
}
body[data-theme="light"][data-display-mode="analog"] .dial {
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--theme) 20%, transparent) 0 0.22rem, transparent 0.24rem),
    #fffaf0;
  border-color: color-mix(in srgb, var(--theme) 48%, transparent);
}
body[data-theme="light"][data-display-mode="analog"] .hero-dial {
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--theme) 20%, transparent) 0 0.22rem, transparent 0.24rem),
    #fffaf0;
  border-color: color-mix(in srgb, var(--theme) 48%, transparent);
}
body[data-theme="light"][data-display-mode="radium"] .zone-card {
  background:
    radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--theme) 24%, transparent), transparent 4.8rem),
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--theme) 12%, transparent), transparent 7.2rem),
    #fbf7df;
  border-color: color-mix(in srgb, var(--theme) 34%, transparent);
}
body[data-theme="light"][data-display-mode="radium"] .dial,
body[data-theme="light"][data-display-mode="radium"] .hero-dial {
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--theme) 22%, transparent) 0 0.22rem, transparent 0.24rem),
    #f5edc2;
  border-color: color-mix(in srgb, var(--theme) 58%, transparent);
}
body[data-theme="light"][data-display-mode="radium"] .dial i::before,
body[data-theme="light"][data-display-mode="radium"] .dial i::after,
body[data-theme="light"][data-display-mode="radium"] .hero-dial i::before,
body[data-theme="light"][data-display-mode="radium"] .hero-dial i::after,
body[data-theme="light"][data-display-mode="radium"] .hand,
body[data-theme="light"][data-display-mode="radium"] .second-hand,
body[data-theme="light"][data-display-mode="radium"] .pin {
  background: var(--theme);
  box-shadow: none;
}
body[data-theme="light"][data-display-mode="radium"] .zone-card time,
body[data-theme="light"][data-display-mode="radium"] #utcClock {
  color: var(--theme);
  text-shadow: none;
}

@media (max-width: 980px) {
  .utility-header,
  .now-panel {
    grid-template-columns: 1fr;
  }
  .utility-header {
    align-items: flex-start;
  }
  .source-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .source-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .zone-grid {
    grid-template-columns: 1fr;
  }
}
