  :root {
  /* Core palette */
  --bg-primary: #0b0f17;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  /* Segment colors */
  --color-green: #22c55e;
  --color-green-glow: rgba(34, 197, 94, 0.45);
  --color-green-soft: rgba(34, 197, 94, 0.15);

  --color-orange: #f97316;
  --color-orange-glow: rgba(249, 115, 22, 0.45);
  --color-orange-soft: rgba(249, 115, 22, 0.15);

  --color-yellow: #facc15;
  --color-yellow-glow: rgba(250, 204, 21, 0.5);
  --color-yellow-soft: rgba(250, 204, 21, 0.15);

  /* Active theme color defaults to work (green) */
  --current-color: var(--color-green);
  --current-glow: var(--color-green-glow);
  --current-soft: var(--color-green-soft);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient dynamic background lighting */
.background-ambient {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 650px;
  height: 650px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--current-glow) 0%, rgba(11, 15, 23, 0) 70%);
  opacity: 0.35;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  transition: background 0.8s ease, opacity 0.8s ease;
}

.zen-landscape { display: none; }
.tomato-clouds { display: none; }
.tomato-landscape { display: none; }
.sundial-landscape { display: none; }
.forest-landscape { display: none; }
.rainy-landscape { display: none; }
.night-landscape { display: none; }
.winter-landscape { display: none; }

/* Main Container Card */
.app-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 490px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px 28px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7),
              0 0 1px 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  display: inline-flex;
  width: 1.4rem;
  height: 1.4rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.logo-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.logo h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
  transform: translateY(-1px);
}

.icon-btn.active {
  color: var(--current-color);
  border-color: var(--current-color);
  background: var(--current-soft);
}

.stats-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  margin: 0;
  box-sizing: border-box;
  width: min(620px, calc(100vw - 28px));
  max-height: min(90vh, 760px);
  overflow: auto;
  padding: 22px;
  color: var(--text-main);
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.stats-dialog::backdrop {
  background: rgba(3, 5, 12, 0.72);
  backdrop-filter: blur(5px);
}

.stats-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.stats-dialog-header:active { cursor: grabbing; }

.stats-dialog-header h2 {
  margin: 0;
  font-size: 1rem;
}
.stats-dialog-header { gap: 10px; }
.stats-dialog-header h2 { flex: 1; }
.dialog-plus-link { flex-shrink: 0; padding: 14px 18px; color: var(--plus-button-text, #fffbed); background: var(--plus-accent, #455e4b); border: 1px solid var(--plus-accent, #455e4b); border-radius: var(--plus-card-radius, 12px); box-shadow: inset 0 1px 0 #ffffff40, 0 4px 12px #0002; font: inherit; font-size: .78rem; font-weight: 700; letter-spacing: .015em; cursor: pointer; transition: filter .18s ease, transform .18s ease, box-shadow .18s ease; }
.dialog-plus-link:hover { filter: brightness(.94); transform: translateY(-1px); box-shadow: inset 0 1px 0 #ffffff55, 0 6px 18px #0002; }
.dialog-plus-link:active { transform: translateY(0); filter: brightness(.97); }
.dialog-plus-link:focus-visible { outline: 3px solid var(--text-main, #526f58); outline-offset: 4px; }
.settings-plus-link { display: block; width: 100%; margin: 20px 0 0; }

/* Upgrade buttons share the Settings sign-in palette in both dialogs. */
body[data-theme="retro"] .dialog-plus-link { font-family: 'JetBrains Mono', monospace; border-width: 2px; box-shadow: 4px 4px 0 #080613; }
body[data-theme="retro"] .dialog-plus-link:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #080613; }
body[data-theme="retro"] .dialog-plus-link:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #080613; }
@media (prefers-reduced-motion: reduce) {
  .dialog-plus-link { transition: none; }
  .dialog-plus-link:hover, .dialog-plus-link:active,
  body[data-theme="retro"] .dialog-plus-link:hover,
  body[data-theme="retro"] .dialog-plus-link:active { transform: none; }
}

.stats-dialog-close {
  width: 34px;
  height: 34px;
  color: inherit;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.stats-dialog .accomplishments-section { margin: 0; }

body[data-theme="sundial"] .stats-dialog {
  color: #503c29;
  background: #ead9b8;
  border: 3px solid #a47749;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(71, 48, 27, .28);
}

body[data-theme="tomato"] .stats-dialog {
  color: #ffffff;
  background:
    radial-gradient(circle at 38% 18%, #ff8a8a 0%, #ff5c61 32%, #f04449 62%, #c92b32 88%, #a91e26 100%);
  border: 2px solid #ff9a9a;
  border-radius: 46px;
  box-shadow:
    inset 0 12px 25px rgba(255, 255, 255, 0.5),
    inset 0 -16px 30px rgba(0, 0, 0, 0.28),
    0 30px 70px rgba(185, 28, 28, 0.45),
    0 12px 30px rgba(0, 0, 0, 0.38);
}

.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-green);
  opacity: 0;
  transition: opacity 0.3s;
}

.badge.active {
  opacity: 1;
}

.hidden {
  display: none !important;
}

/* Theme Customization Bar */
.theme-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.theme-switcher {
  display: flex;
  align-items: center;
  flex: 3;
  min-width: 0;
  gap: 4px;
}

.theme-pill {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.theme-pill:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.07);
}

.theme-pill.active {
  background: var(--current-color);
  color: #0b0f17;
  font-weight: 700;
  box-shadow: 0 4px 14px var(--current-glow);
}

.theme-pill-icon {
  font-size: 1rem;
  line-height: 1;
}

.theme-pill-icon svg {
  display: block;
  width: 1em;
  height: 1em;
}

.theme-pill-label {
  letter-spacing: -0.01em;
}

.theme-more {
  position: relative;
  flex: 1;
  min-width: 0;
}

.theme-more-toggle { width: 100%; }

.theme-more-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 9px);
  right: 0;
  width: max-content;
  min-width: 190px;
  padding: 6px;
  color: var(--text-main);
  background: #111827;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}

.theme-more-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: .76rem;
  text-align: left;
  text-transform: lowercase;
}

.theme-more-option { opacity: .76; }
.theme-more-select { cursor: pointer; opacity: 1; }
.theme-more-select:hover { background: rgba(255, 255, 255, .12); }
.theme-more-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  height: 20px;
  font-size: .72rem;
  line-height: 1;
}
.theme-more-option[data-theme="rolex"] .theme-more-lock { font-size: 1rem; }
.theme-more-note { padding: 6px 10px 4px; color: inherit; opacity: .68; font-size: .62rem; }
.forest-mode-control { display: none; position: absolute; top: 62px; left: 50%; transform: translateX(-50%); z-index: 4; padding: 3px; border-radius: 999px; background: rgba(248, 247, 228, .88); box-shadow: 0 2px 8px rgba(35, 64, 41, .18); }
body[data-theme="forest"] .forest-mode-control { display: flex; }
.forest-mode-button { border: 0; border-radius: 999px; padding: 5px 10px; background: transparent; color: #496746; font: inherit; font-size: .62rem; font-weight: 700; cursor: pointer; opacity: .78; }
.forest-mode-button[aria-pressed="true"] { background: #638d57; color: #fffef0; opacity: 1; box-shadow: 0 1px 4px rgba(0, 0, 0, .16); }

/* Decorative elements hidden unless their matching theme is active */
.tomato-stem-crown,
.zen-rake-svg,
.tomato-dial-face,
.sundial-face,
.radio-top-panel,
.radio-dial-face {
  display: none;
}

/* Cycle Section & Lights */
.cycle-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 18px 16px 14px;
}

.cycle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cycle-title {
  color: var(--text-subtle);
  font-weight: 700;
}

.cycle-counter {
  color: var(--text-muted);
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

/* Lights track */
.lights-track {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  align-items: center;
  position: relative;
  padding: 4px 2px;
}

.light-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
  background: none;
  border: none;
  color: inherit;
  outline: none;
  padding: 0;
  user-select: none;
}

.light-bulb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition);
  background-color: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.light-inner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: var(--transition);
}

/* Color specifications for lights */
/* Work (Green) */
.light-item[data-type="work"] .light-bulb {
  border-color: rgba(34, 197, 94, 0.25);
}
.light-item[data-type="work"] .light-inner-dot {
  background-color: var(--color-green);
  opacity: 0.45;
}

/* Short Rest (Orange) */
.light-item[data-type="shortRest"] .light-bulb {
  border-color: rgba(249, 115, 22, 0.25);
}
.light-item[data-type="shortRest"] .light-inner-dot {
  background-color: var(--color-orange);
  opacity: 0.45;
}

/* Long Rest (Yellow) */
.light-item[data-type="longRest"] .light-bulb {
  border-color: rgba(250, 204, 21, 0.25);
}
.light-item[data-type="longRest"] .light-inner-dot {
  background-color: var(--color-yellow);
  opacity: 0.45;
}

/* Active State */
.light-item.active .light-bulb {
  transform: scale(1.15);
  box-shadow: 0 0 16px var(--current-color), 0 0 4px #ffffff;
  border-color: #ffffff;
}

.light-item.active[data-type="work"] .light-bulb {
  background-color: var(--color-green);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.8), 0 0 6px var(--color-green);
  border-color: #ffffff;
}
.light-item.active[data-type="shortRest"] .light-bulb {
  background-color: var(--color-orange);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.8), 0 0 6px var(--color-orange);
  border-color: #ffffff;
}
.light-item.active[data-type="longRest"] .light-bulb {
  background-color: var(--color-yellow);
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.85), 0 0 6px var(--color-yellow);
  border-color: #ffffff;
}

.light-item.active .light-inner-dot {
  opacity: 1;
  background-color: #ffffff;
  transform: scale(1.2);
}

/* Pulsing effect when timer is actively ticking */
body.is-running .light-item.active .light-bulb {
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 16px var(--current-glow), 0 0 4px var(--current-color);
  }
  50% {
    box-shadow: 0 0 26px var(--current-glow), 0 0 8px var(--current-color);
  }
}

/* Completed State */
.light-item.completed .light-bulb {
  opacity: 1;
  filter: brightness(1.12);
}
.light-item.completed[data-type="work"] .light-bulb {
  background-color: rgba(34, 197, 94, 0.3);
  border-color: var(--color-green);
  box-shadow: 0 0 10px var(--color-green-glow), inset 0 1px 4px rgba(255, 255, 255, .35);
}
.light-item.completed[data-type="shortRest"] .light-bulb {
  background-color: rgba(249, 115, 22, 0.3);
  border-color: var(--color-orange);
  box-shadow: 0 0 10px var(--color-orange-glow), inset 0 1px 4px rgba(255, 255, 255, .35);
}
.light-item.completed[data-type="longRest"] .light-bulb {
  background-color: rgba(250, 204, 21, 0.3);
  border-color: var(--color-yellow);
  box-shadow: 0 0 10px var(--color-yellow-glow), inset 0 1px 4px rgba(255, 255, 255, .35);
}

.light-item.completed .light-inner-dot {
  width: 10px;
  height: 10px;
  background-color: #ffffff;
  opacity: 0.9;
}

/* Hover preview */
.light-item:hover .light-bulb {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.4);
}

.light-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-subtle);
  font-weight: 500;
  transition: var(--transition);
}

.light-item.active .light-number {
  color: var(--text-main);
  font-weight: 700;
}

/* Legend */
.lights-legend {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
  color: var(--text-subtle);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.green {
  background-color: var(--color-green);
  box-shadow: 0 0 8px var(--color-green-glow);
}

.legend-dot.orange {
  background-color: var(--color-orange);
  box-shadow: 0 0 8px var(--color-orange-glow);
}

.legend-dot.yellow {
  background-color: var(--color-yellow);
  box-shadow: 0 0 8px var(--color-yellow-glow);
}

/* Timer Main Area */
.timer-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.timer-display-wrapper {
  position: relative;
  width: 290px;
  height: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG Progress Ring */
.progress-ring {
  width: 100%;
  height: 100%;
  /* New themes inherit clockwise progress; only a theme-specific rule should change this. */
  transform: scaleX(-1) rotate(-90deg);
  position: absolute;
  top: 0;
  left: 0;
}

.progress-ring-bg {
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 10;
}

.progress-ring-fill {
  fill: transparent;
  stroke: var(--current-color);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 879.64; /* 2 * PI * 140 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.8s linear, stroke 0.4s ease;
  filter: drop-shadow(0 0 10px var(--current-glow));
}

.sundial-ring-sun { display: none; }
.winter-aurora-clock { display: none; }
.forest-clock-scene { display: none; }
.rainy-clock-scene { display: none; }
.night-moon-clock { display: none; }

.timer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
  gap: 6px;
}

.segment-badge {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--current-soft);
  border: 1px solid var(--current-glow);
  color: var(--text-main);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: var(--transition);
}

.segment-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--current-color);
  box-shadow: 0 0 8px var(--current-color);
}

.time-readout {
  font-family: 'JetBrains Mono', monospace;
  font-size: 3.8rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #ffffff;
  margin-top: 4px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.segment-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Controls */
.timer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.control-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition);
  outline: none;
}

.control-btn.primary {
  width: 72px;
  height: 72px;
  background: var(--current-color);
  color: #0b0f17;
  box-shadow: 0 8px 24px var(--current-glow),
              0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.control-btn.primary:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 30px var(--current-glow);
}

.control-btn.primary:active {
  transform: scale(0.96);
}

.control-btn.secondary {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.control-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  transform: scale(1.06);
}

.control-btn.secondary:active {
  transform: scale(0.95);
}

/* Accomplishments Section */
.accomplishments-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 18px 16px 16px;
}

.accomplishments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accomplishments-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.accomplishments-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  font-size: 1rem;
}
.accomplishments-icon svg { display: block; width: 100%; height: 100%; }
body[data-theme="rolex"] .accomplishments-icon { color: #e0ca91; }
body[data-theme="astronomical"] .accomplishments-icon { color: #dfca91; }

.accomplishments-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--text-subtle);
}

.reset-stats-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-subtle);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.reset-stats-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.reset-stats-btn svg {
  transition: transform 0.3s ease;
}

.reset-stats-btn:hover svg {
  transform: rotate(-90deg);
}

/* Metric Cards Grid */
.accomplishments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  opacity: 0.8;
}

.stat-card.work::before {
  background: var(--color-green);
  box-shadow: 0 0 8px var(--color-green-glow);
}

.stat-card.rest::before {
  background: var(--color-orange);
  box-shadow: 0 0 8px var(--color-orange-glow);
}

.stat-card.cycles::before {
  background: var(--color-yellow);
  box-shadow: 0 0 8px var(--color-yellow-glow);
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.stat-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.stat-dot.green {
  background-color: var(--color-green);
  box-shadow: 0 0 6px var(--color-green-glow);
}

.stat-dot.orange {
  background-color: var(--color-orange);
  box-shadow: 0 0 6px var(--color-orange-glow);
}

.stat-dot.yellow {
  background-color: var(--color-yellow);
  box-shadow: 0 0 6px var(--color-yellow-glow);
}

.stat-name {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.stat-subtext {
  font-size: 0.68rem;
  color: var(--text-subtle);
  font-weight: 400;
}

.daily-focus-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 14px;
}

.daily-focus-header,
.daily-focus-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.daily-focus-title {
  color: inherit;
  font-size: .78rem;
  font-weight: 700;
}

.daily-focus-goal-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  font-size: .68rem;
  opacity: .86;
}

.daily-focus-goal-input {
  width: 48px;
  padding: 3px 4px;
  border: 1px solid currentColor;
  border-radius: 5px;
  color: inherit;
  background: rgba(255, 255, 255, .16);
  font: inherit;
  text-align: center;
}

.daily-focus-readout {
  justify-content: flex-start;
  gap: 6px;
}

.daily-focus-of,
.daily-focus-target {
  color: inherit;
  opacity: .72;
  font-size: .8rem;
}

.daily-focus-value {
  color: inherit;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
}

.daily-focus-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, .12);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12);
}

.daily-focus-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--color-green);
  transition: width .35s ease;
}

.daily-focus-progress-text {
  align-self: flex-end;
  color: inherit;
  opacity: .7;
  font-size: .65rem;
}

.work-history-card {
  margin-top: 12px;
  padding: 12px 14px 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .06);
}

.work-history-header,
.work-history-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.work-history-modes { display: flex; gap: 3px; }
.work-history-mode,
.work-history-nav {
  color: inherit;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, .1);
  font: inherit;
  cursor: pointer;
}
.work-history-mode { padding: 4px 8px; border-radius: 7px; font-size: .68rem; opacity: .72; }
.work-history-mode.active { opacity: 1; background: rgba(255, 255, 255, .23); }
.work-history-navigation { justify-content: center; margin: 8px 0 5px; font-size: .72rem; font-weight: 600; }
.work-history-nav { width: 25px; height: 24px; padding: 0; border-radius: 6px; font-size: 1rem; line-height: 1; }
.work-history-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; height: 108px; }
.work-history-day { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; }
.work-history-bar { width: min(24px, 72%); min-height: 0; border-radius: 5px 5px 2px 2px; background: var(--current-color, #22c55e); opacity: .85; }
.work-history-day-value { min-height: 11px; font-size: .55rem; opacity: .82; white-space: nowrap; }
.work-history-day-name { font-size: .62rem; opacity: .7; }
.work-history-chart.monthly { grid-template-rows: 12px repeat(6, minmax(0, 1fr)); height: 190px; gap: 3px; }
.work-history-weekday { text-align: center; font-size: .58rem; opacity: .65; }
.work-history-chart.monthly .work-history-day { justify-content: center; position: relative; gap: 1px; border-radius: 5px; background: rgba(255, 255, 255, .035); }
.work-history-chart.monthly .work-history-bar { position: absolute; right: 3px; bottom: 3px; left: 3px; width: auto; min-height: 2px; opacity: .45; }
.work-history-chart.monthly .work-history-day-value { z-index: 1; font-size: .5rem; }
.work-history-chart.monthly .work-history-day-name { z-index: 1; font-size: .65rem; font-weight: 700; }
.work-history-spacer { display: block; }

body[data-theme="zen"] .work-history-card { background: rgba(243, 241, 232, .8); border-color: rgba(104, 122, 94, .24); }
body[data-theme="sundial"] .work-history-card { background: rgba(255, 246, 223, .65); border-color: rgba(139, 101, 61, .22); }
body[data-theme="tomato"] .work-history-card { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .3); backdrop-filter: blur(8px); }
body[data-theme="tomato"] .work-history-bar { background: #fda4af; }

/* Tooltip for lights */
.light-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 4px 8px;
  font-size: 0.68rem;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.light-item:hover .light-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive adjustments */
@media (max-width: 440px) {
  .app-container {
    padding: 24px 16px 20px;
    gap: 20px;
  }

  .theme-pill {
    flex-direction: column;
    gap: 2px;
    padding: 6px 2px;
    font-size: .62rem;
    line-height: 1.1;
  }

  .theme-pill-label { text-align: center; }

  .timer-display-wrapper {
    width: 250px;
    height: 250px;
  }

  .time-readout {
    font-size: 3.2rem;
  }

  .light-bulb {
    width: 24px;
    height: 24px;
  }

  .control-btn.primary {
    width: 64px;
    height: 64px;
  }

  .accomplishments-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card.cycles {
    grid-column: span 2;
  }
}

/* Quiet Zen Garden theme */
body[data-theme="zen"] {
  --color-green: #789274;
  --color-green-glow: rgba(120, 146, 116, .35);
  --text-main: #27372b;
  --text-muted: #657464;
  --text-subtle: #788372;
  background-color: #a9c3c3;
  background-image: none;
  color: #27372b;
}
body[data-theme="zen"] .zen-landscape {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
body[data-theme="zen"] .zen-landscape svg { display: block; width: 100%; height: 100%; }
body[data-theme="tomato"] .tomato-clouds {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
body[data-theme="tomato"] .tomato-clouds svg { display: block; width: 100%; height: 100%; }
body[data-theme="tomato"] .tomato-landscape {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
body[data-theme="tomato"] .tomato-landscape svg { display: block; width: 100%; height: 100%; }
body[data-theme="zen"] .background-ambient {
  background: radial-gradient(circle, rgba(83, 129, 80, .48), rgba(36, 57, 43, 0) 72%);
  opacity: .72;
  filter: blur(62px);
}
body[data-theme="zen"] .app-container {
  background:
    linear-gradient(90deg, rgba(112, 145, 92, .2), rgba(132, 153, 118, .1) 6%, transparent 19%, transparent 81%, rgba(132, 153, 118, .1) 94%, rgba(112, 145, 92, .2)),
    linear-gradient(180deg, rgba(112, 145, 92, .18), rgba(132, 153, 118, .09) 7%, transparent 22%, transparent 78%, rgba(132, 153, 118, .09) 93%, rgba(112, 145, 92, .18)),
    linear-gradient(145deg, #f7f5ed, #ece9dd 65%, #e5e2d5);
  background-size: auto;
  color: #27372b;
  border: 1px solid rgba(104, 122, 94, .36);
  border-radius: 30px;
  box-shadow: 0 24px 60px rgba(49, 61, 44, .2), inset 0 1px rgba(255,255,255,.85), inset 0 0 32px rgba(103, 128, 93, .1);
}
body[data-theme="zen"] .tomato-stem-crown { display: none; }
body[data-theme="zen"] .logo-icon,
body[data-theme="zen"] .logo h1,
body[data-theme="zen"] .cycle-title,
body[data-theme="zen"] .accomplishments-title { color: #526e52; }
body[data-theme="zen"] .logo h1 { background: none; -webkit-text-fill-color: currentColor; }
body[data-theme="zen"] .logo-icon { width: 1.4rem; height: 1.4rem; }
body[data-theme="zen"] .icon-btn,
body[data-theme="zen"] .theme-bar,
body[data-theme="zen"] .cycle-section,
body[data-theme="zen"] .accomplishments-section,
body[data-theme="zen"] .stat-card {
  background-color: rgba(255, 255, 250, .55);
  border-color: rgba(109, 127, 98, .23);
  color: #344638;
}
body[data-theme="zen"] .theme-pill { color: #677463; }
body[data-theme="zen"] .theme-pill.active {
  color: #f8f6ee;
  background: linear-gradient(135deg, #748c70, #536f57);
  box-shadow: 0 3px 10px rgba(67, 96, 69, .24);
}
body[data-theme="zen"] .timer-display-wrapper::before {
  content: '';
  position: absolute;
  z-index: 1;
  width: 82%;
  height: 82%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 25% 31%, #817d6c 0 5px, #aaa48f 6px 9px, transparent 10px),
    radial-gradient(ellipse at 76% 68%, #777565 0 6px, #aaa48f 7px 10px, transparent 11px),
    radial-gradient(ellipse at 69% 22%, #9a9583 0 3px, #b8b19d 4px 6px, transparent 7px),
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.42), transparent 45%),
    linear-gradient(145deg, #e6e0d0, #d8d1bf 60%, #e3ddce);
  border: 7px solid #d5d0bd;
  box-shadow: 0 0 0 2px #a8a48f, inset 0 0 0 2px rgba(255,255,255,.48), 0 12px 24px rgba(39,55,43,.22);
}
body[data-theme="zen"] .progress-ring { z-index: 2; }
body[data-theme="zen"] .progress-ring { transform: scaleX(-1) rotate(-90deg); }
body[data-theme="zen"] .progress-ring-bg { stroke: rgba(56, 75, 58, .16); }
body[data-theme="zen"] .progress-ring-fill {
  stroke: var(--current-color);
  filter: drop-shadow(0 0 6px var(--current-glow));
}
body[data-theme="zen"] .zen-rake-svg {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}
body[data-theme="zen"] .zen-rake-groove {
  fill: none;
  stroke: rgba(105, 110, 105, .82);
  stroke-width: 2;
  stroke-linecap: round;
}
body[data-theme="zen"] .zen-rake-handle {
  stroke: #735b3c;
  stroke-width: 3;
  stroke-linecap: round;
}
body[data-theme="zen"] .timer-content { z-index: 3; }
body[data-theme="zen"] .segment-badge {
  background: rgba(248, 245, 234, .9);
  border-color: rgba(118, 123, 99, .55);
  color: #405442;
}
body[data-theme="zen"] .time-readout { color: #344c3a; text-shadow: 0 1px rgba(255,255,255,.75); }
body[data-theme="zen"] .segment-subtext,
body[data-theme="zen"] .stat-subtext,
body[data-theme="zen"] .stat-name,
body[data-theme="zen"] .cycle-counter { color: #566652; }
body[data-theme="zen"] .light-item[data-type="work"] .light-bulb { border-color: rgba(120, 146, 116, .58); }
body[data-theme="zen"] .light-item[data-type="work"] .light-inner-dot { background-color: #789274; }
body[data-theme="zen"] .light-item[data-type="shortRest"] .light-bulb { border-color: rgba(169, 126, 82, .48); }
body[data-theme="zen"] .light-item[data-type="shortRest"] .light-inner-dot { background-color: #b58a5c; }
body[data-theme="zen"] .light-item[data-type="longRest"] .light-bulb { border-color: rgba(142, 112, 75, .52); }
body[data-theme="zen"] .light-item[data-type="longRest"] .light-inner-dot { background-color: #9c8056; }
body[data-theme="zen"] .light-item.active .light-bulb { border-color: #f4f0e5; }
body[data-theme="zen"] .light-item.active[data-type="work"] .light-bulb {
  background: linear-gradient(145deg, #789274, #526f58);
  box-shadow: 0 0 12px rgba(120, 146, 116, .48), 0 0 3px rgba(244, 240, 229, .7);
}
body[data-theme="zen"] .light-item.active[data-type="shortRest"] .light-bulb {
  background-color: #b58a5c;
  box-shadow: 0 0 12px rgba(181, 138, 92, .45), 0 0 3px rgba(244, 240, 229, .7);
}
body[data-theme="zen"] .light-item.active[data-type="longRest"] .light-bulb {
  background-color: #9c8056;
  box-shadow: 0 0 12px rgba(156, 128, 86, .45), 0 0 3px rgba(244, 240, 229, .7);
}
body[data-theme="zen"] .light-item.active .light-inner-dot { background-color: #f4f0e5; }
body[data-theme="zen"] .light-item.completed[data-type="work"] .light-bulb { background-color: rgba(120, 146, 116, .3); border-color: #789274; }
body[data-theme="zen"] .light-item.completed[data-type="shortRest"] .light-bulb { background-color: rgba(181, 138, 92, .3); border-color: #b58a5c; }
body[data-theme="zen"] .light-item.completed[data-type="longRest"] .light-bulb { background-color: rgba(156, 128, 86, .3); border-color: #9c8056; }
body[data-theme="zen"].is-running .light-item.active .light-bulb { animation: none; }
body[data-theme="zen"] .legend-dot.green {
  background: linear-gradient(145deg, #789274, #526f58);
  box-shadow: 0 0 7px rgba(120, 146, 116, .45);
}
body[data-theme="zen"] .legend-dot.orange {
  background-color: #b58a5c;
  box-shadow: 0 0 7px rgba(181, 138, 92, .38);
}
body[data-theme="zen"] .legend-dot.yellow {
  background-color: #9c8056;
  box-shadow: 0 0 7px rgba(156, 128, 86, .38);
}
body[data-theme="zen"] .control-btn.primary { color: #f8f6ed; background: linear-gradient(145deg, #789274, #526f58); border: 1px solid #a3b19a; }
body[data-theme="zen"] .control-btn.secondary { color: #526f58; background: #f4f1e7; border: 1px solid #bcc4b1; }
body[data-theme="zen"] .stat-value { color: #49664f; }
body[data-theme="zen"] .stat-card.work::before { background: #789274; box-shadow: 0 0 8px rgba(120, 146, 116, .35); }
body[data-theme="zen"] .stat-card.rest::before { background: #b58a5c; box-shadow: 0 0 8px rgba(181, 138, 92, .3); }
body[data-theme="zen"] .stat-card.cycles::before { background: #9c8056; box-shadow: 0 0 8px rgba(156, 128, 86, .3); }
body[data-theme="zen"] .stat-dot.green { background: #789274; box-shadow: 0 0 6px rgba(120, 146, 116, .35); }
body[data-theme="zen"] .stat-dot.orange { background: #b58a5c; box-shadow: 0 0 6px rgba(181, 138, 92, .3); }
body[data-theme="zen"] .stat-dot.yellow { background: #9c8056; box-shadow: 0 0 6px rgba(156, 128, 86, .3); }
body[data-theme="zen"] .stats-dialog { color: #27372b; background: #f2f0e7; border-color: #aab49e; }
body[data-theme="zen"] .theme-more-menu { color: #344638; background: #f2f0e7; border-color: #aab49e; }

/* ==========================================================================
   DESERT OASIS SUNDIAL THEME
   ========================================================================== */
body[data-theme="sundial"] {
  --color-green: #75834f;
  --color-green-glow: rgba(117, 131, 79, .35);
  --text-main: #493b2b;
  --text-muted: #79634a;
  --text-subtle: #927b5c;
  background: #d9b880;
  color: #493b2b;
}
body[data-theme="sundial"] .sundial-landscape {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
body[data-theme="sundial"] .sundial-landscape svg { display: block; width: 100%; height: 100%; }
body[data-theme="sundial"] .background-ambient {
  background: radial-gradient(circle, rgba(240, 194, 111, .38), transparent 72%);
  opacity: .65;
}
body[data-theme="sundial"] .app-container {
  color: #493b2b;
  background: linear-gradient(145deg, #f2e5c8, #e0c99f 68%, #cfb27e);
  border: 2px solid #a7794e;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(63, 43, 25, .34), inset 0 1px rgba(255, 249, 228, .8);
}
body[data-theme="sundial"] .sundial-face { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
body[data-theme="sundial"] .sundial-face svg { width: 100%; height: 100%; overflow: visible; }
body[data-theme="sundial"] .progress-ring { z-index: 2; }
body[data-theme="sundial"] .progress-ring { transform: scaleX(-1) rotate(-90deg); }
body[data-theme="sundial"] .progress-ring-fill { transition: stroke-dashoffset .8s linear, stroke .4s ease; }
body[data-theme="sundial"] .sundial-plate { fill: #d8d0a8; stroke: #8a815e; stroke-width: 4; filter: drop-shadow(0 4px 5px rgba(54, 61, 39, .22)); }
body[data-theme="sundial"] .sundial-inner-line { fill: none; stroke: #a49a70; stroke-width: 1.5; }
body[data-theme="sundial"] .sundial-hour-marks { fill: none; stroke: #7e7757; stroke-width: 3; }
body[data-theme="sundial"] .sundial-shadow { fill: none; stroke: #50594a; stroke-width: 7; stroke-linecap: round; opacity: .65; filter: drop-shadow(0 1px 1px rgba(40,45,34,.3)); }
body[data-theme="sundial"] .sundial-gnomon { fill: #8b7147; stroke: #5e5037; stroke-width: 2; }
body[data-theme="sundial"] .sundial-pivot { fill: #d8ba69; stroke: #826c3d; stroke-width: 2; }
body[data-theme="sundial"] .sundial-sun { fill: #e3aa48; stroke: #b88031; stroke-width: 3; }
body[data-theme="sundial"] .sundial-ring-sun { fill: #f0bc58; stroke: #a96c2c; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 3px rgba(74, 49, 25, .55)); transition: transform .8s linear; }
body[data-theme="sundial"] .sundial-ring-sun { display: block; }
body[data-theme="sundial"] .sundial-ring-sun path { fill: none; }
body[data-theme="sundial"] .timer-content { z-index: 3; }
body[data-theme="sundial"] .logo h1,
body[data-theme="sundial"] .cycle-title,
body[data-theme="sundial"] .accomplishments-title { color: #725033; }
body[data-theme="sundial"] .logo h1 { background: none; -webkit-text-fill-color: currentColor; }
body[data-theme="sundial"] .icon-btn,
body[data-theme="sundial"] .theme-bar,
body[data-theme="sundial"] .cycle-section,
body[data-theme="sundial"] .accomplishments-section,
body[data-theme="sundial"] .stat-card {
  background-color: rgba(255, 248, 229, .62);
  border-color: rgba(139, 101, 61, .3);
  color: #58432e;
}
body[data-theme="sundial"] .theme-pill { color: #79634a; }
body[data-theme="sundial"] .theme-pill.active {
  color: #fff8ec;
  background: linear-gradient(145deg, #bd7045, #98583a);
  box-shadow: 0 3px 9px rgba(112, 69, 38, .24);
}
body[data-theme="sundial"] .segment-badge { color: #6a4d31; background: rgba(250, 240, 217, .92); border-color: rgba(160, 117, 69, .5); }
body[data-theme="sundial"] .time-readout { color: #593d27; text-shadow: 0 1px rgba(255,255,255,.7); }
body[data-theme="sundial"] .segment-subtext,
body[data-theme="sundial"] .stat-subtext,
body[data-theme="sundial"] .stat-name,
body[data-theme="sundial"] .cycle-counter { color: #79634a; }
body[data-theme="sundial"] .progress-ring-bg { stroke: rgba(116, 82, 49, .2); }
body[data-theme="sundial"] .progress-ring-fill { stroke: url(#sundialProgressGradient); filter: drop-shadow(0 0 6px rgba(189, 112, 69, .48)); }
body[data-theme="sundial"] .light-item[data-type="work"] .light-inner-dot { background: #75834f; }
body[data-theme="sundial"] .light-item[data-type="shortRest"] .light-inner-dot { background: #bd7045; }
body[data-theme="sundial"] .light-item[data-type="longRest"] .light-inner-dot { background: #d0aa5d; }
body[data-theme="sundial"] .light-item[data-type="work"] .light-bulb { border-color: rgba(117, 131, 79, .42); }
body[data-theme="sundial"] .light-item[data-type="shortRest"] .light-bulb { border-color: rgba(189, 112, 69, .42); }
body[data-theme="sundial"] .light-item[data-type="longRest"] .light-bulb { border-color: rgba(208, 170, 93, .5); }
body[data-theme="sundial"] .light-item.active[data-type="work"] .light-bulb { background: #75834f; box-shadow: 0 0 12px rgba(117, 131, 79, .42); }
body[data-theme="sundial"] .light-item.active[data-type="shortRest"] .light-bulb { background: #bd7045; box-shadow: 0 0 12px rgba(189, 112, 69, .42); }
body[data-theme="sundial"] .light-item.active[data-type="longRest"] .light-bulb { background: #d0aa5d; box-shadow: 0 0 12px rgba(208, 170, 93, .42); }
body[data-theme="sundial"] .light-item.active .light-inner-dot { background: #fff8ec; }
body[data-theme="sundial"] .light-item.completed[data-type="work"] .light-bulb { background: rgba(117, 131, 79, .3); border-color: #75834f; }
body[data-theme="sundial"] .light-item.completed[data-type="shortRest"] .light-bulb { background: rgba(189, 112, 69, .3); border-color: #bd7045; }
body[data-theme="sundial"] .light-item.completed[data-type="longRest"] .light-bulb { background: rgba(208, 170, 93, .3); border-color: #d0aa5d; }
body[data-theme="sundial"] .stat-card.work::before { background: #75834f; }
body[data-theme="sundial"] .stat-card.rest::before { background: #bd7045; }
body[data-theme="sundial"] .stat-card.cycles::before { background: #d0aa5d; }
body[data-theme="sundial"] .stat-value { color: #49331f; }
body[data-theme="sundial"] .stat-dot.green { background: #75834f; }
body[data-theme="sundial"] .stat-dot.orange { background: #bd7045; }
body[data-theme="sundial"] .stat-dot.yellow { background: #d0aa5d; }
body[data-theme="sundial"] .legend-dot.green { background: #75834f; box-shadow: 0 0 7px rgba(117, 131, 79, .4); }
body[data-theme="sundial"] .legend-dot.orange { background: #bd7045; box-shadow: 0 0 7px rgba(189, 112, 69, .4); }
body[data-theme="sundial"] .legend-dot.yellow { background: #d0aa5d; box-shadow: 0 0 7px rgba(208, 170, 93, .4); }
body[data-theme="sundial"] .theme-more-menu { color: #58432e; background: #ead9b8; border-color: #a47749; }
body[data-theme="sundial"] .control-btn.primary { color: #fff8ec; background: linear-gradient(145deg, #bd7045, #98583a); border: 1px solid #a7794e; }
body[data-theme="sundial"] .control-btn.secondary { color: #795638; background: #f2e4c7; border: 1px solid #bea17b; }
/* ==========================================================================
   CLASSIC KITCHEN TOMATO TIMER THEME (body[data-theme="tomato"])
   ========================================================================== */

body[data-theme="tomato"] {
  background-color: #82c8e8;
  background-image:
    radial-gradient(circle at 50% 16%, #d5f1ff 0%, #a9def5 42%, #72b9df 100%);
  color: #ffffff;
}

body[data-theme="tomato"] .background-ambient {
  background: radial-gradient(circle, rgba(224, 246, 255, .72) 0%, rgba(224, 246, 255, 0) 70%);
  opacity: .68;
}

/* Plump 3D Tomato Body */
body[data-theme="tomato"] .app-container {
  background:
    radial-gradient(circle at 38% 18%, #ff8a8a 0%, #ff5c61 32%, #f04449 62%, #c92b32 88%, #a91e26 100%);
  border-radius: 46px;
  border: 2px solid #ff9a9a;
  box-shadow:
    inset 0 12px 25px rgba(255, 255, 255, 0.5),
    inset 0 -16px 30px rgba(0, 0, 0, 0.28),
    0 30px 70px rgba(185, 28, 28, 0.45),
    0 12px 30px rgba(0, 0, 0, 0.38);
  color: #ffffff;
  position: relative;
  gap: 22px;
}

/* Tomato Stem Crown on Top */
body[data-theme="tomato"] .tomato-stem-crown {
  display: block;
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
  animation: stem-gentle-breeze 7s infinite ease-in-out;
}

@keyframes stem-gentle-breeze {
  0%, 100% {
    transform: translateX(-50%) rotate(0deg);
  }
  50% {
    transform: translateX(-50%) rotate(2.5deg);
  }
}

/* Header & Logo */
body[data-theme="tomato"] .logo h1 {
  font-family: 'Fredoka', 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #ffffff 40%, #ffcaca 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(100, 15, 15, 0.8));
}

body[data-theme="tomato"] .icon-btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

body[data-theme="tomato"] .icon-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
}

body[data-theme="tomato"] .icon-btn.active {
  background: #ffffff;
  color: #dc2626;
  border-color: #ffffff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.6);
}

/* Theme Switcher */
body[data-theme="tomato"] .theme-bar {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25);
}

body[data-theme="tomato"] .theme-more-menu {
  color: #ffffff;
  background: linear-gradient(145deg, #f04449, #c92b32 72%, #a91e26);
  border-color: rgba(255, 255, 255, .38);
}

body[data-theme="tomato"] .theme-pill {
  color: rgba(255, 255, 255, 0.8);
}

body[data-theme="tomato"] .theme-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

body[data-theme="tomato"] .theme-pill.active {
  background: #ffffff;
  color: #dc2626;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Cycle Section */
body[data-theme="tomato"] .cycle-section {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
}

body[data-theme="tomato"] .cycle-title {
  color: #fef2f2;
}

body[data-theme="tomato"] .cycle-counter {
  color: #fef2f2;
}

body[data-theme="tomato"] .legend-item {
  color: #fef2f2;
}

/* Tomato Cherry & Seed Segment Lights */
body[data-theme="tomato"] .light-bulb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

body[data-theme="tomato"] .light-inner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ffffff;
  opacity: 0.5;
}

body[data-theme="tomato"] .light-item[data-type="work"] .light-inner-dot {
  background-color: #88a96c;
}

body[data-theme="tomato"] .light-item[data-type="work"] .light-bulb { border-color: #7d9c61; }

body[data-theme="tomato"] .light-item.active .light-bulb {
  transform: scale(1.18);
  border-color: #e4e8df;
}

body[data-theme="tomato"] .light-item.active[data-type="work"] .light-bulb {
  background: radial-gradient(circle at 35% 30%, #b3c891, #638648);
  box-shadow: 0 0 18px rgba(99, 134, 72, .72), 0 0 4px rgba(228, 232, 223, .38);
  border-color: #638648;
}

body[data-theme="tomato"] .light-item.active[data-type="shortRest"] .light-bulb,
body[data-theme="tomato"] .light-item.active[data-type="longRest"] .light-bulb {
  background: radial-gradient(circle at 35% 30%, #e4e8df, #cbd6d3);
  box-shadow: 0 0 16px rgba(224, 231, 222, .3), 0 0 4px rgba(228, 232, 223, .38);
}

body[data-theme="tomato"] .light-item[data-type="shortRest"] .light-bulb {
  border-color: #9bd2ee;
  background-clip: border-box;
  overflow: hidden;
}
body[data-theme="tomato"] .light-item[data-type="shortRest"] .light-inner-dot { background-color: #78bde2; opacity: .95; }
body[data-theme="tomato"] .light-item.active[data-type="shortRest"] .light-bulb {
  background: radial-gradient(circle closest-side at center, #d7f0fb 0%, #a9d9f0 65%, #78bde2 100%);
  box-shadow: 0 0 18px rgba(120, 189, 226, .78), 0 0 4px rgba(228, 232, 223, .38);
}

body[data-theme="tomato"] .light-item[data-type="longRest"] .light-bulb { border-color: #e4e8df; }
body[data-theme="tomato"] .light-item[data-type="longRest"] .light-inner-dot { background-color: #e4e8df; opacity: 1; }
body[data-theme="tomato"] .light-item.active[data-type="longRest"] .light-bulb {
  background: radial-gradient(circle at 35% 30%, #e4e8df, #cbd6d3);
  box-shadow: 0 0 18px rgba(224, 231, 222, .35), 0 0 4px rgba(228, 232, 223, .38);
}

body[data-theme="tomato"] .light-item.active .light-inner-dot {
  background-color: #e4e8df;
  opacity: 1;
}

body[data-theme="tomato"] .light-item.completed .light-bulb {
  background: rgba(255, 255, 255, 0.25);
  border-color: #e4e8df;
}

body[data-theme="tomato"] .light-item.completed[data-type="work"] .light-bulb {
  background: rgba(99, 134, 72, .42);
  border-color: #88a96c;
}

body[data-theme="tomato"] .light-item.completed[data-type="shortRest"] .light-bulb {
  background: rgba(120, 189, 226, .42);
  border-color: #9bd2ee;
}

body[data-theme="tomato"] .light-item.completed[data-type="longRest"] .light-bulb {
  background: rgba(255, 255, 255, .42);
  border-color: #e4e8df;
}

body[data-theme="tomato"] .legend-dot.green { background: #78945f; box-shadow: 0 0 7px rgba(120, 148, 95, .5); }
body[data-theme="tomato"] .legend-dot.orange { background: #78bde2; box-shadow: 0 0 7px rgba(120, 189, 226, .55); }
body[data-theme="tomato"] .legend-dot.yellow { background: #ffffff; box-shadow: 0 0 7px rgba(255, 255, 255, .62); }

body[data-theme="tomato"] .light-number {
  color: rgba(255, 255, 255, 0.85);
}

body[data-theme="tomato"] .light-item.active .light-number {
  color: #e4e8df;
  font-weight: 700;
}

/* Timer Main: Tomato Dial Face */
body[data-theme="tomato"] .tomato-dial-face {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
  cursor: pointer;
}

body[data-theme="tomato"] .timer-content {
  pointer-events: none;
}

body[data-theme="tomato"] .tomato-dial-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Static Outer Housing Bezel */
body[data-theme="tomato"] .tomato-dial-housing {
  fill: #faf6ef;
  stroke: #ded6cb;
  stroke-width: 3;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.45));
}

/* Rotating Mechanical Kitchen Dial */
body[data-theme="tomato"] .tomato-rotating-dial {
  transform-origin: 145px 145px;
  will-change: transform;
  transition: transform 0.8s cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* While running, rotate with a continuous mechanical sweep */
body[data-theme="tomato"].is-running .tomato-rotating-dial {
  transition: transform 0.25s linear;
}

/* Dial Surface */
body[data-theme="tomato"] .tomato-dial-face-bg {
  fill: #fffdf9;
}

body[data-theme="tomato"] .tomato-dial-rim-border {
  fill: none;
  stroke: #ece5d8;
  stroke-width: 1.5;
}

body[data-theme="tomato"] .tomato-dial-inner-ring {
  fill: none;
  stroke: rgba(185, 28, 28, 0.12);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

/* Mechanical Ticks */
body[data-theme="tomato"] .tomato-tick-major {
  stroke: #1c1917;
  stroke-width: 2.4;
  stroke-linecap: round;
}

body[data-theme="tomato"] .tomato-tick-minor {
  stroke: #78716c;
  stroke-width: 1.2;
  stroke-linecap: round;
}

/* Radially Oriented Numbers */
body[data-theme="tomato"] .tomato-num {
  font-family: 'Fredoka', 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  fill: #1c1917;
  text-anchor: middle;
  dominant-baseline: central;
  user-select: none;
}

body[data-theme="tomato"] .tomato-handle-body {
  fill: #fffdf9;
  stroke: #e5ded2;
  stroke-width: 2.5;
  filter: drop-shadow(0 2px 3px rgba(95, 64, 52, .24));
}

body[data-theme="tomato"] .tomato-handle-edge {
  fill: none;
  stroke: #f5f0e8;
  stroke-width: 1.3;
  stroke-linecap: round;
}

/* Stationary Top Pointer Arrow (fixed at 12 o'clock) */
body[data-theme="tomato"] .tomato-dial-pointer-triangle {
  fill: #dc2626;
  stroke: #ffffff;
  stroke-width: 1.5;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

body[data-theme="tomato"] .tomato-dial-pointer-dot {
  fill: #ffffff;
  stroke: #dc2626;
  stroke-width: 1;
}

/* Hide SVG progress ring in Tomato theme because the rotating dial IS the timer countdown! */
body[data-theme="tomato"] .progress-ring {
  opacity: 0;
  pointer-events: none;
}

body[data-theme="tomato"] .segment-badge {
  background: rgba(220, 38, 38, 0.12);
  border: 1.5px solid #dc2626;
  color: #991b1b;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
}

body[data-theme="tomato"] .time-readout {
  font-family: 'Fredoka', 'JetBrains Mono', monospace;
  font-size: 3.8rem;
  font-weight: 700;
  color: #991b1b;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

body[data-theme="tomato"] .segment-subtext {
  color: #78350f;
  font-weight: 600;
}

/* Tactical Kitchen Timer Pushbuttons */
body[data-theme="tomato"] .control-btn.primary {
  background: #ffffff;
  color: #dc2626;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.35),
    inset 0 3px 6px rgba(255, 255, 255, 0.9),
    inset 0 -3px 6px rgba(0, 0, 0, 0.15);
}

body[data-theme="tomato"] .control-btn.primary:hover {
  transform: scale(1.06);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.4),
    0 0 16px rgba(255, 255, 255, 0.6);
}

body[data-theme="tomato"] .control-btn.secondary {
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body[data-theme="tomato"] .control-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

/* Accomplishments: Kitchen Recipe / Memo Pad */
body[data-theme="tomato"] .accomplishments-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25);
}

body[data-theme="tomato"] .accomplishments-title {
  color: #ffffff;
  font-family: 'Fredoka', sans-serif;
}

body[data-theme="tomato"] .stat-card {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

body[data-theme="tomato"] .stat-name {
  color: #ffffff;
}

body[data-theme="tomato"] .stat-value {
  color: #ffffff;
}

body[data-theme="tomato"] .stat-subtext {
  color: rgba(255, 255, 255, 0.85);
}

body[data-theme="tomato"] .daily-focus-title,
body[data-theme="tomato"] .daily-focus-value {
  color: #ffffff;
}

body[data-theme="tomato"] .daily-focus-progress-text {
  color: rgba(255, 255, 255, 0.9);
}
body[data-theme="tomato"] .daily-focus-track { background: rgba(0, 0, 0, .22); }

/* Completed cycle lights stay fully illuminated, matching the active light. */
.light-item.completed .light-bulb { transform: scale(1.15); opacity: 1; filter: none; }
.light-item.completed[data-type="work"] .light-bulb {
  background: var(--color-green);
  border-color: #fff;
  box-shadow: 0 0 20px var(--color-green-glow), 0 0 6px var(--color-green);
}
.light-item.completed[data-type="shortRest"] .light-bulb {
  background: var(--color-orange);
  border-color: #fff;
  box-shadow: 0 0 20px var(--color-orange-glow), 0 0 6px var(--color-orange);
}
.light-item.completed[data-type="longRest"] .light-bulb {
  background: var(--color-yellow);
  border-color: #fff;
  box-shadow: 0 0 22px var(--color-yellow-glow), 0 0 6px var(--color-yellow);
}
.light-item.completed .light-inner-dot {
  width: 8px;
  height: 8px;
  background: #fff;
  opacity: 1;
  transform: scale(1.2);
}

body[data-theme="zen"] .light-item.completed .light-bulb { border-color: #f4f0e5; }
body[data-theme="zen"] .light-item.completed[data-type="work"] .light-bulb {
  background: linear-gradient(145deg, #789274, #526f58);
  box-shadow: 0 0 12px rgba(120, 146, 116, .48), 0 0 3px rgba(244, 240, 229, .7);
}
body[data-theme="zen"] .light-item.completed[data-type="shortRest"] .light-bulb {
  background: #b58a5c;
  box-shadow: 0 0 12px rgba(181, 138, 92, .45), 0 0 3px rgba(244, 240, 229, .7);
}
body[data-theme="zen"] .light-item.completed[data-type="longRest"] .light-bulb {
  background: #9c8056;
  box-shadow: 0 0 12px rgba(156, 128, 86, .45), 0 0 3px rgba(244, 240, 229, .7);
}
body[data-theme="zen"] .light-item.completed .light-inner-dot { background: #f4f0e5; }

body[data-theme="sundial"] .light-item.completed[data-type="work"] .light-bulb {
  background: #75834f;
  box-shadow: 0 0 12px rgba(117, 131, 79, .42);
}
body[data-theme="sundial"] .light-item.completed[data-type="shortRest"] .light-bulb {
  background: #bd7045;
  box-shadow: 0 0 12px rgba(189, 112, 69, .42);
}
body[data-theme="sundial"] .light-item.completed[data-type="longRest"] .light-bulb {
  background: #d0aa5d;
  box-shadow: 0 0 12px rgba(208, 170, 93, .42);
}
body[data-theme="sundial"] .light-item.completed .light-inner-dot { background: #fff8ec; }

body[data-theme="tomato"] .light-item.completed .light-bulb { transform: scale(1.18); }
body[data-theme="tomato"] .light-item.completed[data-type="work"] .light-bulb,
body[data-theme="tomato"] .light-item.completed[data-type="shortRest"] .light-bulb,
body[data-theme="tomato"] .light-item.completed[data-type="longRest"] .light-bulb { border-color: transparent; }
body[data-theme="tomato"] .light-item.completed .light-inner-dot {
  width: 8px;
  height: 8px;
  background: #e4e8df;
  border: 0;
  box-sizing: border-box;
  opacity: 1;
  transform: scale(1.2);
}
body[data-theme="tomato"] .light-item.completed[data-type="work"] .light-bulb {
  background: radial-gradient(circle at 35% 30%, #b3c891, #638648);
  box-shadow: 0 0 18px rgba(99, 134, 72, .72), 0 0 4px rgba(228, 232, 223, .38);
  border-color: #638648;
}
body[data-theme="tomato"] .light-item.completed[data-type="shortRest"] .light-bulb {
  background: radial-gradient(circle closest-side at center, #d7f0fb 0%, #a9d9f0 65%, #78bde2 100%);
  box-shadow: 0 0 18px rgba(120, 189, 226, .78), 0 0 4px rgba(228, 232, 223, .38);
}
body[data-theme="tomato"] .light-item.completed[data-type="longRest"] .light-bulb {
  background: radial-gradient(circle at 35% 30%, #e4e8df, #cbd6d3);
  box-shadow: 0 0 18px rgba(224, 231, 222, .35), 0 0 4px rgba(228, 232, 223, .38);
}
body[data-theme="tomato"] .light-item.completed[data-type="work"] .light-inner-dot { background: #d5e6bd; }
body[data-theme="tomato"] .light-item.completed[data-type="shortRest"] .light-inner-dot { background: #e3f6ff; }
body[data-theme="tomato"] .light-item.completed[data-type="longRest"] .light-inner-dot { background: #e4e8df; }

/* Responsive adjustments for new themes */
@media (max-width: 440px) {
  body[data-theme="sundial"] .app-container {
    padding: 22px 14px 20px;
  }
  
  body[data-theme="tomato"] .app-container {
    border-radius: 36px;
    padding: 24px 14px 20px;
  }

  body[data-theme="tomato"] .tomato-stem-crown {
    top: -30px;
    transform: translateX(-50%) scale(0.85);
  }

  body[data-theme="tomato"] .tomato-pointer-triangle {
    top: -10px;
    font-size: 1rem;
  }

  body[data-theme="tomato"] .time-readout {
    font-size: 3.2rem;
  }

}

/* RAINY DAY THEME */
body[data-theme="rainy"] {
  --bg-primary: #a8bdc3;
  --bg-card: rgba(228, 238, 236, .86);
  --bg-card-border: rgba(66, 92, 101, .26);
  --text-main: #344b58;
  --text-muted: #5c747d;
  --text-subtle: #728a90;
  --color-green: #628e8a;
  --color-green-glow: rgba(98, 142, 138, .48);
  --color-orange: #7e9fb5;
  --color-orange-glow: rgba(126, 159, 181, .46);
  --color-yellow: #a899bb;
  --color-yellow-glow: rgba(168, 153, 187, .5);
  background-color: var(--bg-primary);
  color: var(--text-main);
}

body[data-theme="rainy"] .rainy-landscape {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

body[data-theme="rainy"] .rainy-landscape svg { display: block; width: 100%; height: 100%; }
body[data-theme="rainy"] .rainy-clock-scene {
  display: block; position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none;
  filter: drop-shadow(0 10px 16px rgba(49, 78, 85, .24));
}
body[data-theme="rainy"] .rainy-clock-drops path {
  stroke-dasharray: 6 28; stroke-dashoffset: 34; animation: rainy-clock-fall 1.1s linear infinite;
}
body[data-theme="rainy"] .rainy-clock-creek-glint { animation: rainy-clock-water-glint 4s ease-in-out infinite alternate; }
@keyframes rainy-clock-fall { to { stroke-dashoffset: 0; } }
@keyframes rainy-clock-water-glint { from { opacity: .32; } to { opacity: .82; } }
body[data-theme="rainy"] .background-ambient {
  background: radial-gradient(circle, rgba(224, 240, 239, .56), transparent 72%);
  opacity: .68;
}
body[data-theme="rainy"] .app-container {
  color: #344b58;
  background: linear-gradient(145deg, rgba(235, 243, 241, .94), rgba(194, 213, 214, .94) 70%, rgba(166, 191, 195, .96));
  border: 2px solid rgba(111, 145, 151, .72);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(44, 71, 78, .3), inset 0 1px rgba(255, 255, 255, .72);
}
body[data-theme="rainy"] .logo h1,
body[data-theme="rainy"] .cycle-title,
body[data-theme="rainy"] .accomplishments-title { color: #44636d; }
body[data-theme="rainy"] .logo h1 { background: none; -webkit-text-fill-color: currentColor; }
body[data-theme="rainy"] .icon-btn,
body[data-theme="rainy"] .theme-bar,
body[data-theme="rainy"] .cycle-section,
body[data-theme="rainy"] .accomplishments-section,
body[data-theme="rainy"] .stat-card {
  background-color: rgba(241, 247, 244, .54);
  border-color: rgba(91, 122, 129, .26);
  color: #405b64;
}
body[data-theme="rainy"] .theme-pill { color: #5c747d; }
body[data-theme="rainy"] .theme-pill:hover { color: #344b58; background: rgba(255, 255, 255, .44); }
body[data-theme="rainy"] .theme-pill.active,
body[data-theme="rainy"] .theme-more-toggle.active {
  color: #f5f8f5;
  background: linear-gradient(145deg, #759b9b, #527b80);
  box-shadow: 0 3px 10px rgba(65, 103, 108, .3);
}
body[data-theme="rainy"] .theme-more-menu { color: #405b64; background: #e1ece9; border-color: #9bb2b4; }
body[data-theme="rainy"] .theme-more-select:hover { background: rgba(101, 144, 149, .14); }
body[data-theme="rainy"] .segment-badge { color: #405b64; background: rgba(236, 243, 239, .92); border-color: rgba(95, 129, 136, .48); }
body[data-theme="rainy"] .time-readout { color: #344b58; text-shadow: 0 1px rgba(255, 255, 255, .56); }
body[data-theme="rainy"] .segment-subtext,
body[data-theme="rainy"] .stat-subtext,
body[data-theme="rainy"] .stat-name,
body[data-theme="rainy"] .cycle-counter { color: #5c747d; }
body[data-theme="rainy"] .progress-ring-bg { stroke: rgba(58, 86, 94, .18); }
body[data-theme="rainy"] .progress-ring { transform: scaleX(-1) rotate(-90deg); }
body[data-theme="rainy"] .light-item[data-type="work"] .light-bulb { border-color: rgba(98, 142, 138, .58); }
body[data-theme="rainy"] .light-item[data-type="work"] .light-inner-dot { background: #628e8a; }
body[data-theme="rainy"] .light-item[data-type="shortRest"] .light-bulb { border-color: rgba(126, 159, 181, .58); }
body[data-theme="rainy"] .light-item[data-type="shortRest"] .light-inner-dot { background: #7e9fb5; }
body[data-theme="rainy"] .light-item[data-type="longRest"] .light-bulb { border-color: rgba(168, 153, 187, .58); }
body[data-theme="rainy"] .light-item[data-type="longRest"] .light-inner-dot { background: #a899bb; }
body[data-theme="rainy"] .light-item:is(.active, .completed) .light-bulb { border-color: #edf3ef; }
body[data-theme="rainy"] .light-item:is(.active, .completed)[data-type="work"] .light-bulb { background: linear-gradient(145deg, #759b9b, #527b80); box-shadow: 0 0 12px rgba(98, 142, 138, .48), 0 0 3px rgba(237, 243, 239, .7); }
body[data-theme="rainy"] .light-item:is(.active, .completed)[data-type="shortRest"] .light-bulb { background: #7e9fb5; box-shadow: 0 0 12px rgba(126, 159, 181, .46), 0 0 3px rgba(237, 243, 239, .7); }
body[data-theme="rainy"] .light-item:is(.active, .completed)[data-type="longRest"] .light-bulb { background: #a899bb; box-shadow: 0 0 12px rgba(168, 153, 187, .5), 0 0 3px rgba(237, 243, 239, .7); }
body[data-theme="rainy"] .light-item:is(.active, .completed) .light-inner-dot { background: #edf3ef; }
body[data-theme="rainy"] .legend-dot.green,
body[data-theme="rainy"] .stat-dot.green { background: #628e8a; box-shadow: 0 0 7px rgba(98, 142, 138, .4); }
body[data-theme="rainy"] .legend-dot.orange,
body[data-theme="rainy"] .stat-dot.orange { background: #7e9fb5; box-shadow: 0 0 7px rgba(126, 159, 181, .38); }
body[data-theme="rainy"] .legend-dot.yellow,
body[data-theme="rainy"] .stat-dot.yellow { background: #a899bb; box-shadow: 0 0 7px rgba(168, 153, 187, .38); }
body[data-theme="rainy"] .control-btn.primary { color: #f5f8f5; background: linear-gradient(145deg, #759b9b, #527b80); border: 1px solid #a1baba; }
body[data-theme="rainy"] .control-btn.secondary { color: #4e7278; background: #edf3ef; border: 1px solid #aebfc0; }
body[data-theme="rainy"] .stat-value { color: #456b70; }
body[data-theme="rainy"] .work-history-card { background: rgba(241, 247, 244, .58); border-color: rgba(91, 122, 129, .26); }
body[data-theme="rainy"] .work-history-bar { background: linear-gradient(90deg, #759b9b, #527b80); }
body[data-theme="rainy"] .daily-focus-track { background: rgba(66, 92, 101, .14); }
body[data-theme="rainy"] .stats-dialog { color: #344b58; background: #dce9e6; border-color: #91aaad; }
body[data-theme="rainy"] .stats-dialog-close { background: rgba(85, 117, 124, .12); border-color: rgba(85, 117, 124, .3); }
body[data-theme="rainy"] .rain-streaks path {
  stroke-dasharray: 13 51.56;
  stroke-dashoffset: 64.56;
  animation: rainy-streak-fall 1s linear infinite;
}
body[data-theme="rainy"] .rain-streaks path:nth-child(2) { animation-delay: -.34s; }
body[data-theme="rainy"] .rain-streaks path:nth-child(3) { animation-delay: -.68s; }
@keyframes rainy-streak-fall {
  to { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-theme="rainy"] .rain-streaks path { animation: none; }
  body[data-theme="rainy"] .rainy-clock-drops path,
  body[data-theme="rainy"] .rainy-clock-creek-glint { animation: none; }
}

/* NIGHT SKY THEME */
body[data-theme="night"] {
  --bg-primary: #111a31;
  --bg-card: rgba(25, 34, 60, .9);
  --bg-card-border: rgba(228, 226, 245, .14);
  --text-main: #f2f0e9;
  --text-muted: #c2c4d5;
  --text-subtle: #9299b7;
  --color-green: #9b91cf;
  --color-green-glow: rgba(155, 145, 207, .5);
  --color-orange: #78a9c5;
  --color-orange-glow: rgba(120, 169, 197, .48);
  --color-yellow: #e3c77e;
  --color-yellow-glow: rgba(227, 199, 126, .52);
  background-color: var(--bg-primary);
  color: var(--text-main);
}
body[data-theme="night"] .night-landscape {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
body[data-theme="night"] .night-landscape svg { display: block; width: 100%; height: 100%; }
body[data-theme="night"] .night-moon-clock {
  display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(244, 237, 218, .38));
}
body[data-theme="night"] .night-moon-clock circle,
body[data-theme="night"] .night-moon-clock path { transition: d .25s ease, fill .25s ease; }
body[data-theme="night"] .night-moon-clock { width: 100%; height: 100%; }
body[data-theme="night"] .night-clock-comet { filter: drop-shadow(0 0 4px rgba(210, 225, 255, .8)); }
body[data-theme="night"] .shooting-star { display: block; }
body[data-theme="night"] .travelling-planet { display: block; }
.static-travelling-planet { display: none; }
body[data-theme="night"] .background-ambient {
  background: radial-gradient(circle, rgba(153, 153, 211, .27), transparent 72%);
  opacity: .7;
}
body[data-theme="night"] .app-container {
  color: #f2f0e9;
  background: linear-gradient(145deg, rgba(43, 52, 82, .96), rgba(28, 37, 66, .97) 68%, rgba(20, 29, 54, .98));
  border: 2px solid rgba(179, 177, 218, .62);
  border-radius: 28px;
  box-shadow: 0 24px 64px rgba(5, 10, 28, .56), inset 0 1px rgba(248, 245, 230, .16);
}
body[data-theme="night"] .logo h1,
body[data-theme="night"] .cycle-title,
body[data-theme="night"] .accomplishments-title { color: #e6d9ad; }
body[data-theme="night"] .logo h1 { background: none; -webkit-text-fill-color: currentColor; }
body[data-theme="night"] .icon-btn,
body[data-theme="night"] .theme-bar,
body[data-theme="night"] .cycle-section,
body[data-theme="night"] .accomplishments-section,
body[data-theme="night"] .stat-card {
  background-color: rgba(238, 238, 250, .08);
  border-color: rgba(214, 215, 240, .18);
  color: #e4e4ed;
}
body[data-theme="night"] .theme-pill { color: #c2c4d5; }
body[data-theme="night"] .theme-pill:hover { color: #fffdf5; background: rgba(229, 229, 250, .12); }
body[data-theme="night"] .theme-pill.active,
body[data-theme="night"] .theme-more-toggle.active {
  color: #211f37;
  background: linear-gradient(145deg, #c2b9e8, #9287c7);
  box-shadow: 0 3px 12px rgba(151, 139, 212, .35);
}
body[data-theme="night"] .theme-more-menu { color: #eeeaf1; background: #293451; border-color: #667291; }
body[data-theme="night"] .theme-more-select:hover { background: rgba(183, 178, 224, .16); }
body[data-theme="night"] .segment-badge { color: #ebe7d7; background: rgba(42, 51, 78, .94); border-color: rgba(177, 177, 216, .52); }
body[data-theme="night"] .time-readout { color: #f3efe1; text-shadow: 0 2px 8px rgba(10, 15, 35, .5); }
body[data-theme="night"] .segment-subtext,
body[data-theme="night"] .stat-subtext,
body[data-theme="night"] .stat-name,
body[data-theme="night"] .cycle-counter { color: #c2c4d5; }
body[data-theme="night"] .progress-ring-bg { stroke: rgba(223, 225, 246, .16); }
body[data-theme="night"] .progress-ring { transform: scaleX(-1) rotate(-90deg); }
body[data-theme="night"] .light-item[data-type="work"] .light-bulb { border-color: rgba(155, 145, 207, .72); }
body[data-theme="night"] .light-item[data-type="work"] .light-inner-dot { background: #9b91cf; }
body[data-theme="night"] .light-item[data-type="shortRest"] .light-bulb { border-color: rgba(120, 169, 197, .72); }
body[data-theme="night"] .light-item[data-type="shortRest"] .light-inner-dot { background: #78a9c5; }
body[data-theme="night"] .light-item[data-type="longRest"] .light-bulb { border-color: rgba(227, 199, 126, .76); }
body[data-theme="night"] .light-item[data-type="longRest"] .light-inner-dot { background: #e3c77e; }
body[data-theme="night"] .light-item:is(.active, .completed) .light-bulb { border-color: #f6f1df; }
body[data-theme="night"] .light-item:is(.active, .completed)[data-type="work"] .light-bulb { background: linear-gradient(145deg, #b5a9e3, #8478bd); box-shadow: 0 0 14px rgba(155, 145, 207, .54); }
body[data-theme="night"] .light-item:is(.active, .completed)[data-type="shortRest"] .light-bulb { background: #78a9c5; box-shadow: 0 0 14px rgba(120, 169, 197, .5); }
body[data-theme="night"] .light-item:is(.active, .completed)[data-type="longRest"] .light-bulb { background: #e3c77e; box-shadow: 0 0 14px rgba(227, 199, 126, .5); }
body[data-theme="night"] .light-item:is(.active, .completed) .light-inner-dot { background: #f6f1df; }
body[data-theme="night"] .legend-dot.green,
body[data-theme="night"] .stat-dot.green { background: #9b91cf; box-shadow: 0 0 8px rgba(155, 145, 207, .45); }
body[data-theme="night"] .legend-dot.orange,
body[data-theme="night"] .stat-dot.orange { background: #78a9c5; box-shadow: 0 0 8px rgba(120, 169, 197, .42); }
body[data-theme="night"] .legend-dot.yellow,
body[data-theme="night"] .stat-dot.yellow { background: #e3c77e; box-shadow: 0 0 8px rgba(227, 199, 126, .4); }
body[data-theme="night"] .control-btn.primary { color: #211f37; background: linear-gradient(145deg, #c2b9e8, #9287c7); border: 1px solid #c9c2e4; }
body[data-theme="night"] .control-btn.secondary { color: #ddd8f0; background: rgba(234, 233, 248, .1); border: 1px solid rgba(210, 208, 239, .3); }
body[data-theme="night"] .stat-value { color: #e6d9ad; }
body[data-theme="night"] .work-history-card { background: rgba(238, 238, 250, .08); border-color: rgba(214, 215, 240, .18); }
body[data-theme="night"] .work-history-bar { background: linear-gradient(90deg, #aaa0dc, #8379bd); }
body[data-theme="night"] .daily-focus-track { background: rgba(5, 10, 28, .32); }
body[data-theme="night"] .stats-dialog { color: #f2f0e9; background: #222d4c; border-color: #76809e; }
body[data-theme="night"] .stats-dialog-close { background: rgba(234, 233, 248, .1); border-color: rgba(210, 208, 239, .25); }
@media (prefers-reduced-motion: reduce) {
  .shooting-star { display: none !important; }
  .travelling-planet { display: none !important; }
  .night-clock-comet { display: none !important; }
  body[data-theme="night"] .static-travelling-planet { display: block; }
}

/* FOREST RETREAT THEME */
body[data-theme="forest"] {
  --bg-primary: #cce4dd;
  --bg-card: rgba(247, 246, 225, .94);
  --bg-card-border: rgba(81, 119, 75, .22);
  --text-main: #314b39;
  --text-muted: #5a7357;
  --text-subtle: #74866a;
  --color-green: #638d57;
  --color-green-glow: rgba(99, 141, 87, .4);
  --color-orange: #b57948;
  --color-orange-glow: rgba(181, 121, 72, .38);
  --color-yellow: #b29a4e;
  --color-yellow-glow: rgba(178, 154, 78, .42);
  background-color: var(--bg-primary);
  color: var(--text-main);
}
body[data-theme="forest"] .forest-landscape {
  display: block; position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
body[data-theme="forest"] .forest-landscape svg { display: block; width: 100%; height: 100%; }
body[data-theme="forest"] .forest-clock-scene {
  display: block; position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none;
  filter: drop-shadow(0 10px 16px rgba(38, 70, 49, .28));
}
body[data-theme="forest"][data-forest-mode="night"] .forest-clock-scene { filter: drop-shadow(0 10px 16px rgba(5, 14, 24, .42)); }
body[data-theme="forest"][data-forest-mode="night"] .forest-clock-sky { fill: #23374a; stroke: #c1d4ca; }
body[data-theme="forest"][data-forest-mode="night"] .forest-clock-sun { display: none; }
body[data-theme="forest"][data-forest-mode="night"] .forest-clock-stars { opacity: .82; }
body[data-theme="forest"][data-forest-mode="night"] .forest-clock-hill-far { fill: #526475; }
body[data-theme="forest"][data-forest-mode="night"] .forest-clock-hill-mid { fill: #344d52; }
body[data-theme="forest"][data-forest-mode="night"] .forest-clock-pines { fill: #1b3038; }
body[data-theme="forest"][data-forest-mode="night"] .forest-clock-pine-snow { opacity: .22; }
body[data-theme="forest"][data-forest-mode="night"] .forest-clock-hill-front { fill: #1d343b; }
body[data-theme="forest"][data-forest-mode="night"] .forest-clock-creek { stroke: #6b9da0; }
body[data-theme="forest"] .forest-clock-creek-glint { animation: forest-clock-creek-shimmer 5s ease-in-out infinite alternate; }
@keyframes forest-clock-creek-shimmer { from { opacity: .35; } to { opacity: .95; } }
body[data-theme="forest"] .background-ambient {
  background: radial-gradient(circle, rgba(255, 239, 174, .6), transparent 72%); opacity: .76;
}
body[data-theme="forest"] .app-container {
  color: #314b39;
  background: linear-gradient(145deg, rgba(250, 249, 233, .97), rgba(239, 241, 215, .97) 70%, rgba(226, 235, 205, .98));
  border: 2px solid rgba(117, 147, 92, .58); border-radius: 28px;
  box-shadow: 0 24px 64px rgba(40, 72, 48, .25), inset 0 1px rgba(255, 255, 255, .9);
}
body[data-theme="forest"] .logo h1,
body[data-theme="forest"] .cycle-title,
body[data-theme="forest"] .accomplishments-title { color: #476b45; }
body[data-theme="forest"] .stat-value { color: #527647; }
body[data-theme="forest"] .logo h1 { background: none; -webkit-text-fill-color: currentColor; }
body[data-theme="forest"] .icon-btn,
body[data-theme="forest"] .theme-bar,
body[data-theme="forest"] .cycle-section,
body[data-theme="forest"] .accomplishments-section,
body[data-theme="forest"] .stat-card {
  background-color: rgba(255, 255, 247, .66); border-color: rgba(108, 139, 85, .2); color: #405b42;
}
body[data-theme="forest"] .theme-pill { color: #60785a; }
body[data-theme="forest"] .theme-pill:hover { color: #324d39; background: rgba(116, 151, 92, .12); }
body[data-theme="forest"] .theme-pill.active,
body[data-theme="forest"] .theme-more-toggle.active {
  color: #fffdf0; background: linear-gradient(145deg, #82a66b, #588052); box-shadow: 0 3px 12px rgba(48, 83, 47, .25);
}
body[data-theme="forest"] .theme-more-menu { color: #405b42; background: #f4f4df; border-color: #9baa7c; }
body[data-theme="forest"] .theme-more-select:hover { background: rgba(202, 210, 164, .13); }
body[data-theme="forest"] .segment-badge { color: #47634a; background: rgba(249, 249, 233, .94); border-color: rgba(117, 147, 92, .42); }
body[data-theme="forest"] .time-readout { color: #334d39; text-shadow: 0 1px rgba(255, 255, 255, .7); }
body[data-theme="forest"] .segment-subtext,
body[data-theme="forest"] .stat-subtext,
body[data-theme="forest"] .stat-name,
body[data-theme="forest"] .cycle-counter { color: #657b5e; }
body[data-theme="forest"] .progress-ring-bg { stroke: rgba(66, 98, 64, .18); }
body[data-theme="forest"] .progress-ring { transform: scaleX(-1) rotate(-90deg); }
body[data-theme="forest"] .light-item[data-type="work"] .light-bulb { border-color: rgba(99, 141, 87, .66); }
body[data-theme="forest"] .light-item[data-type="work"] .light-inner-dot { background: #638d57; }
body[data-theme="forest"] .light-item[data-type="shortRest"] .light-bulb { border-color: rgba(181, 121, 72, .64); }
body[data-theme="forest"] .light-item[data-type="shortRest"] .light-inner-dot { background: #b57948; }
body[data-theme="forest"] .light-item[data-type="longRest"] .light-bulb { border-color: rgba(178, 154, 78, .68); }
body[data-theme="forest"] .light-item[data-type="longRest"] .light-inner-dot { background: #b29a4e; }
body[data-theme="forest"] .light-item:is(.active, .completed) .light-bulb { border-color: #fffef0; }
body[data-theme="forest"] .light-item:is(.active, .completed)[data-type="work"] .light-bulb { background: linear-gradient(145deg, #83a96d, #5c8453); box-shadow: 0 0 14px rgba(99, 141, 87, .42); }
body[data-theme="forest"] .light-item:is(.active, .completed)[data-type="shortRest"] .light-bulb { background: #b57948; box-shadow: 0 0 14px rgba(181, 121, 72, .38); }
body[data-theme="forest"] .light-item:is(.active, .completed)[data-type="longRest"] .light-bulb { background: #b29a4e; box-shadow: 0 0 14px rgba(178, 154, 78, .4); }
body[data-theme="forest"] .light-item:is(.active, .completed) .light-inner-dot { background: #fffef0; }
body[data-theme="forest"] .legend-dot.green,
body[data-theme="forest"] .stat-dot.green { background: #638d57; box-shadow: 0 0 8px rgba(99, 141, 87, .35); }
body[data-theme="forest"] .legend-dot.orange,
body[data-theme="forest"] .stat-dot.orange { background: #b57948; box-shadow: 0 0 8px rgba(181, 121, 72, .34); }
body[data-theme="forest"] .legend-dot.yellow,
body[data-theme="forest"] .stat-dot.yellow { background: #b29a4e; box-shadow: 0 0 8px rgba(178, 154, 78, .35); }
body[data-theme="forest"] .control-btn.primary { color: #fffdf0; background: linear-gradient(145deg, #82a66b, #588052); border: 1px solid #a6ba88; }
body[data-theme="forest"] .control-btn.secondary { color: #4a6748; background: #f7f6e7; border: 1px solid #b6c29b; }
body[data-theme="forest"] .work-history-card { background: rgba(255, 255, 247, .62); border-color: rgba(108, 139, 85, .2); }
body[data-theme="forest"] .work-history-bar { background: linear-gradient(90deg, #91a977, #567a59); }
body[data-theme="forest"] .daily-focus-track { background: rgba(63, 94, 57, .14); }
body[data-theme="forest"] .stats-dialog { color: #344f39; background: #f4f2df; border-color: #9baa7c; }
body[data-theme="forest"] .stats-dialog-close { background: rgba(91, 125, 76, .1); border-color: rgba(91, 125, 76, .28); }
body[data-theme="forest"][data-forest-mode="night"] {
  --bg-primary: #152338;
  --bg-card: rgba(35, 49, 62, .92);
  --bg-card-border: rgba(216, 219, 193, .16);
  --text-main: #edf0df;
  --text-muted: #c6d0b8;
  --text-subtle: #9eaa9c;
  --color-green: #8dab80;
  --color-green-glow: rgba(141, 171, 128, .42);
  --color-orange: #c69367;
  --color-orange-glow: rgba(198, 147, 103, .4);
  --color-yellow: #d6c17e;
  --color-yellow-glow: rgba(214, 193, 126, .44);
  background-color: var(--bg-primary);
  color: var(--text-main);
}
body[data-theme="forest"][data-forest-mode="night"] .forest-night-shade { opacity: .58; }
body[data-theme="forest"][data-forest-mode="night"] .forest-night-sky { opacity: .92; }
body[data-theme="forest"][data-forest-mode="night"] .forest-shooting-star { display: block; }
body[data-theme="forest"][data-forest-mode="night"] .forest-sun-glints { display: none; }
body[data-theme="forest"][data-forest-mode="night"] .app-container {
  color: #edf0df; background: linear-gradient(145deg, rgba(47, 63, 67, .97), rgba(35, 51, 59, .97) 70%, rgba(28, 43, 54, .98));
  border-color: rgba(174, 184, 145, .58); box-shadow: 0 24px 64px rgba(4, 13, 26, .52), inset 0 1px rgba(244, 239, 205, .12);
}
body[data-theme="forest"][data-forest-mode="night"] .logo h1,
body[data-theme="forest"][data-forest-mode="night"] .cycle-title,
body[data-theme="forest"][data-forest-mode="night"] .accomplishments-title,
body[data-theme="forest"][data-forest-mode="night"] .stat-value { color: #e2d49b; }
body[data-theme="forest"][data-forest-mode="night"] .icon-btn,
body[data-theme="forest"][data-forest-mode="night"] .theme-bar,
body[data-theme="forest"][data-forest-mode="night"] .cycle-section,
body[data-theme="forest"][data-forest-mode="night"] .accomplishments-section,
body[data-theme="forest"][data-forest-mode="night"] .stat-card { background-color: rgba(235, 238, 213, .08); border-color: rgba(217, 224, 184, .16); color: #e8ead5; }
body[data-theme="forest"][data-forest-mode="night"] .theme-pill { color: #c6d0b4; }
body[data-theme="forest"][data-forest-mode="night"] .theme-pill:hover { color: #fffbea; background: rgba(241, 239, 207, .12); }
body[data-theme="forest"][data-forest-mode="night"] .theme-pill.active,
body[data-theme="forest"][data-forest-mode="night"] .theme-more-toggle.active { color: #fffbea; background: linear-gradient(145deg, #789b70, #4f7558); }
body[data-theme="forest"][data-forest-mode="night"] .theme-more-menu,
body[data-theme="forest"][data-forest-mode="night"] .stats-dialog { color: #edf0df; background: #2b3d42; border-color: #788765; }
body[data-theme="forest"][data-forest-mode="night"] .forest-mode-control { background: rgba(35, 49, 62, .9); box-shadow: 0 2px 8px rgba(4, 13, 26, .4); }
body[data-theme="forest"][data-forest-mode="night"] .forest-mode-button { color: #c6d0b8; }
body[data-theme="forest"][data-forest-mode="night"] .forest-mode-button[aria-pressed="true"] { color: #263a35; background: #e9e6ce; }
body[data-theme="forest"][data-forest-mode="night"] .segment-badge { color: #e8ead5; background: rgba(40, 57, 61, .94); border-color: rgba(197, 206, 160, .42); }
body[data-theme="forest"][data-forest-mode="night"] .time-readout { color: #f4f0dc; text-shadow: 0 2px 8px rgba(13, 28, 22, .42); }
body[data-theme="forest"][data-forest-mode="night"] .segment-subtext,
body[data-theme="forest"][data-forest-mode="night"] .stat-subtext,
body[data-theme="forest"][data-forest-mode="night"] .stat-name,
body[data-theme="forest"][data-forest-mode="night"] .cycle-counter { color: #c6d0b4; }
body[data-theme="forest"][data-forest-mode="night"] .progress-ring-bg { stroke: rgba(237, 238, 214, .18); }
body[data-theme="forest"][data-forest-mode="night"] .light-item:is(.active, .completed) .light-bulb { border-color: #f4f0dc; }
body[data-theme="forest"][data-forest-mode="night"] .light-item:is(.active, .completed)[data-type="work"] .light-bulb { background: linear-gradient(145deg, #92ad7e, #5f835f); }
body[data-theme="forest"][data-forest-mode="night"] .light-item:is(.active, .completed)[data-type="shortRest"] .light-bulb { background: #c18c5c; }
body[data-theme="forest"][data-forest-mode="night"] .light-item:is(.active, .completed)[data-type="longRest"] .light-bulb { background: #d2bd78; }
body[data-theme="forest"][data-forest-mode="night"] .light-item:is(.active, .completed) .light-inner-dot { background: #f4f0dc; }
body[data-theme="forest"][data-forest-mode="night"] .control-btn.primary { color: #f7f3df; background: linear-gradient(145deg, #789b70, #4f7558); border-color: #a7b58a; }
body[data-theme="forest"][data-forest-mode="night"] .control-btn.secondary { color: #dbe2c6; background: rgba(234, 237, 207, .1); border-color: rgba(203, 212, 175, .3); }
body[data-theme="forest"][data-forest-mode="night"] .work-history-card { background: rgba(231, 234, 201, .08); border-color: rgba(217, 224, 184, .17); }
body[data-theme="forest"][data-forest-mode="night"] .daily-focus-track { background: rgba(13, 28, 22, .3); }
.forest-shooting-star { display: none; }
.scene-creek-glint-wide,
.scene-creek-glint,
.scene-creek-glint-second { fill: none; stroke-linecap: round; pointer-events: none; }
.scene-creek-glint-wide { stroke: #e7f4df; stroke-width: 5; stroke-dasharray: 30 170; opacity: .24; animation: scene-creek-flow 12s linear infinite; }
.scene-creek-glint { stroke: #f6f4df; stroke-width: 2; stroke-dasharray: 18 110; opacity: .42; animation: scene-creek-flow 9s linear infinite; }
.scene-creek-glint-second { stroke: #d7f0e5; stroke-width: 1.5; stroke-dasharray: 8 80; opacity: .32; animation: scene-creek-flow 11s linear infinite; animation-delay: -4s; }
.scene-water-ripples ellipse { transform-box: fill-box; transform-origin: center; animation: scene-ripple 4.8s ease-out infinite; opacity: 0; }
.scene-water-ripples ellipse:nth-child(2) { animation-delay: -1.2s; }
.scene-water-ripples ellipse:nth-child(3) { animation-delay: -2.4s; }
.scene-water-ripples ellipse:nth-child(4) { animation-delay: -3.6s; }
body[data-theme="forest"][data-forest-mode="night"] .scene-creek-glint-wide { stroke: #d4e9e5; opacity: .32; }
body[data-theme="forest"][data-forest-mode="night"] .scene-creek-glint { stroke: #f5f3df; opacity: .48; }
body[data-theme="forest"][data-forest-mode="night"] .scene-creek-glint-second { stroke: #cce8e1; opacity: .4; }
body[data-theme="forest"][data-forest-mode="night"] .scene-water-ripples { stroke: #e1ecdc; }
body[data-theme="rainy"] .scene-creek-glint-wide { stroke: #d6eeee; opacity: .26; }
body[data-theme="rainy"] .scene-creek-glint { stroke: #eef5ef; opacity: .44; }
body[data-theme="rainy"] .scene-creek-glint-second { stroke: #c7e1e3; opacity: .32; }
body[data-theme="rainy"] .scene-water-ripples { stroke: #e4f1ed; }
body[data-theme="night"] .scene-creek-glint-wide { stroke: #bdcee0; opacity: .28; }
body[data-theme="night"] .scene-creek-glint { stroke: #ecedeb; opacity: .5; }
body[data-theme="night"] .scene-creek-glint-second { stroke: #aebfd7; opacity: .36; }
body[data-theme="night"] .scene-water-ripples { stroke: #dce7f0; }
@keyframes scene-creek-flow {
  to { stroke-dashoffset: -200; }
}
@keyframes scene-ripple {
  0% { opacity: .22; transform: scaleX(.8); }
  85%, 100% { opacity: 0; transform: scaleX(1.45); }
}
@media (prefers-reduced-motion: reduce) {
  body[data-theme="forest"] .forest-shooting-star { display: none !important; }
  body[data-theme="forest"] .forest-clock-creek-glint { animation: none; }
  .scene-creek-glint-wide,
  .scene-creek-glint,
  .scene-creek-glint-second { animation: none; }
  .scene-water-ripples ellipse { animation: none; opacity: .12; }
}

/* NORTHERN LIGHTS THEME */
body[data-theme="winter"] {
  --bg-primary: #1b3448;
  --bg-card: rgba(239, 247, 247, .94);
  --bg-card-border: rgba(86, 130, 143, .3);
  --text-main: #263e50;
  --text-muted: #597181;
  --text-subtle: #788f9b;
  --color-green: #4d8065;
  --color-green-glow: rgba(77, 128, 101, .45);
  --color-orange: #5596a5;
  --color-orange-glow: rgba(85, 150, 165, .44);
  --color-yellow: #8993c7;
  --color-yellow-glow: rgba(137, 147, 199, .48);
  background-color: var(--bg-primary);
  color: var(--text-main);
}
body[data-theme="winter"] .winter-landscape {
  display: block; position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
body[data-theme="winter"] .winter-landscape svg { display: block; width: 100%; height: 100%; }
body[data-theme="winter"] .background-ambient {
  background: radial-gradient(circle, rgba(169, 220, 209, .3), transparent 72%); opacity: .72;
}
body[data-theme="winter"] .app-container {
  color: #263e50;
  background: linear-gradient(145deg, rgba(246, 251, 250, .97), rgba(231, 242, 244, .97) 70%, rgba(218, 233, 238, .98));
  border: 2px solid rgba(141, 183, 191, .7); border-radius: 28px;
  box-shadow: 0 24px 64px rgba(13, 32, 50, .42), inset 0 1px rgba(255, 255, 255, .9);
}
body[data-theme="winter"] .logo h1,
body[data-theme="winter"] .cycle-title,
body[data-theme="winter"] .accomplishments-title,
body[data-theme="winter"] .stat-value { color: #376b61; }
body[data-theme="winter"] .logo h1 { background: none; -webkit-text-fill-color: currentColor; }
body[data-theme="winter"] .icon-btn,
body[data-theme="winter"] .theme-bar,
body[data-theme="winter"] .cycle-section,
body[data-theme="winter"] .accomplishments-section,
body[data-theme="winter"] .stat-card {
  background-color: rgba(250, 253, 251, .7); border-color: rgba(98, 143, 153, .22); color: #3d5b6a;
}
body[data-theme="winter"] .theme-pill { color: #587483; }
body[data-theme="winter"] .theme-pill:hover { color: #294858; background: rgba(94, 152, 163, .12); }
body[data-theme="winter"] .theme-pill.active,
body[data-theme="winter"] .theme-more-toggle.active {
  color: #f6fbf8; background: linear-gradient(145deg, #55958a, #406d7e); box-shadow: 0 3px 12px rgba(39, 83, 96, .25);
}
body[data-theme="winter"] .theme-more-menu { color: #355465; background: #edf5f4; border-color: #9bbdc1; }
body[data-theme="winter"] .theme-more-select:hover { background: rgba(94, 152, 163, .13); }
body[data-theme="winter"] .segment-badge { color: #416978; background: rgba(244, 250, 248, .95); border-color: rgba(102, 157, 165, .42); }
body[data-theme="winter"] .time-readout { color: #263e50; text-shadow: 0 1px rgba(255, 255, 255, .72); }
body[data-theme="winter"] .segment-subtext,
body[data-theme="winter"] .stat-subtext,
body[data-theme="winter"] .stat-name,
body[data-theme="winter"] .cycle-counter { color: #627f8c; }
body[data-theme="winter"] .progress-ring-bg { stroke: rgba(57, 91, 107, .18); }
body[data-theme="winter"] .progress-ring { transform: scaleX(-1) rotate(-90deg); }
body[data-theme="winter"] .winter-aurora-clock {
  display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  filter: drop-shadow(0 12px 18px rgba(8, 21, 43, .34));
}
body[data-theme="winter"] .winter-aurora-clock svg { display: block; width: 100%; height: 100%; }
body[data-theme="winter"] .aurora-ribbon-one { animation: aurora-drift-one 12s ease-in-out infinite alternate; }
body[data-theme="winter"] .aurora-ribbon-two { animation: aurora-drift-two 15s ease-in-out infinite alternate; }
body[data-theme="winter"] .clock-snowfall-one { animation: clock-snow-fall 7s linear infinite; }
body[data-theme="winter"] .clock-snowfall-two { animation: clock-snow-fall 9s linear -4s infinite; }
body[data-theme="winter"] .progress-ring { z-index: 1; }
body[data-theme="winter"] .progress-ring-bg { stroke: rgba(226, 249, 247, .5); stroke-width: 8; }
body[data-theme="winter"] .progress-ring-fill { stroke-width: 8; filter: drop-shadow(0 0 8px var(--current-glow)); }
body[data-theme="winter"] .timer-content { z-index: 2; }
body[data-theme="winter"] .time-readout {
  color: #f3fbff; text-shadow: 0 2px 12px rgba(4, 13, 33, .85);
}
@keyframes aurora-drift-one {
  from { transform: translateX(-5px) translateY(1px); opacity: .75; }
  to { transform: translateX(7px) translateY(-5px); opacity: 1; }
}
@keyframes aurora-drift-two {
  from { transform: translateX(6px) translateY(5px); opacity: .55; }
  to { transform: translateX(-8px) translateY(-3px); opacity: .9; }
}
@keyframes clock-snow-fall {
  0% { transform: translateY(-16px); opacity: 0; }
  16% { opacity: .9; }
  82% { opacity: .8; }
  100% { transform: translateY(34px); opacity: 0; }
}
body[data-theme="winter"] .light-item[data-type="work"] .light-bulb { border-color: rgba(77, 128, 101, .66); }
body[data-theme="winter"] .light-item[data-type="work"] .light-inner-dot { background: #4d8065; }
body[data-theme="winter"] .light-item[data-type="shortRest"] .light-bulb { border-color: rgba(85, 150, 165, .66); }
body[data-theme="winter"] .light-item[data-type="shortRest"] .light-inner-dot { background: #5596a5; }
body[data-theme="winter"] .light-item[data-type="longRest"] .light-bulb { border-color: rgba(137, 147, 199, .7); }
body[data-theme="winter"] .light-item[data-type="longRest"] .light-inner-dot { background: #8993c7; }
body[data-theme="winter"] .light-item:is(.active, .completed) .light-bulb { border-color: #f6fbf8; }
body[data-theme="winter"] .light-item:is(.active, .completed)[data-type="work"] .light-bulb { background: linear-gradient(145deg, #78a88a, #4d8065); box-shadow: 0 0 12px rgba(77, 128, 101, .4); }
body[data-theme="winter"] .light-item:is(.active, .completed)[data-type="shortRest"] .light-bulb { background: #5596a5; box-shadow: 0 0 12px rgba(85, 150, 165, .38); }
body[data-theme="winter"] .light-item:is(.active, .completed)[data-type="longRest"] .light-bulb { background: #8993c7; box-shadow: 0 0 12px rgba(137, 147, 199, .42); }
body[data-theme="winter"] .light-item:is(.active, .completed) .light-inner-dot { background: #f6fbf8; }
body[data-theme="winter"] .legend-dot.green,
body[data-theme="winter"] .stat-dot.green { background: #4d8065; box-shadow: 0 0 7px rgba(77, 128, 101, .35); }
body[data-theme="winter"] .legend-dot.orange,
body[data-theme="winter"] .stat-dot.orange { background: #5596a5; box-shadow: 0 0 7px rgba(85, 150, 165, .34); }
body[data-theme="winter"] .legend-dot.yellow,
body[data-theme="winter"] .stat-dot.yellow { background: #8993c7; box-shadow: 0 0 7px rgba(137, 147, 199, .34); }
body[data-theme="winter"] .control-btn.primary { color: #f5fbf8; background: linear-gradient(145deg, #55958a, #406d7e); border: 1px solid #7db6b4; }
body[data-theme="winter"] .control-btn.secondary { color: #416575; background: #f4f9f7; border: 1px solid #a9c5c9; }
body[data-theme="winter"] .work-history-card { background: rgba(249, 253, 250, .68); border-color: rgba(98, 143, 153, .22); }
body[data-theme="winter"] .work-history-bar { background: linear-gradient(90deg, #55958a, #406d7e); }
body[data-theme="winter"] .daily-focus-track { background: rgba(57, 91, 107, .14); }
body[data-theme="winter"] .stats-dialog { color: #263e50; background: #edf5f4; border-color: #9bbdc1; }
body[data-theme="winter"] .stats-dialog-close { background: rgba(68, 109, 126, .1); border-color: rgba(68, 109, 126, .25); }
.winter-snowfall { animation: winter-snow-drift 10s ease-in-out infinite; }
@keyframes winter-snow-drift {
  0% { transform: translateY(-16px); opacity: 0; }
  18%, 78% { opacity: .7; }
  100% { transform: translateY(22px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-theme="winter"] .winter-snowfall,
  body[data-theme="winter"] .aurora-ribbon,
  body[data-theme="winter"] .clock-snowfall { animation: none; }
}


/* 8-bit arcade: hard edges, a phosphor screen, and a pixel skyline. */
body[data-theme="retro"] {
  --text-main: #f3edff;
  --text-muted: #c2b5dc;
  --text-subtle: #aa9ac9;
  --color-green: #70f5b1;
  --color-orange: #ff9970;
  --color-yellow: #ffe478;
  --radius-lg: 0px;
  --radius-md: 0px;
  --radius-sm: 0px;
  font-family: 'JetBrains Mono', monospace;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #07051433 3px 4px),
    linear-gradient(#100c26 55%, #33204e);
}
body[data-theme="retro"]::before {
  content: '';
  position: fixed;
  inset: auto 0 0;
  height: 28vh;
  background: #18132e;
  clip-path: polygon(0 35%, 6% 35%, 6% 60%, 13% 60%, 13% 15%, 20% 15%, 20% 45%, 28% 45%, 28% 0, 35% 0, 35% 55%, 44% 55%, 44% 25%, 54% 25%, 54% 65%, 62% 65%, 62% 10%, 70% 10%, 70% 40%, 78% 40%, 78% 20%, 86% 20%, 86% 55%, 94% 55%, 94% 30%, 100% 30%, 100% 100%, 0 100%);
  pointer-events: none;
}
body[data-theme="retro"] .app-container {
  background: #201a35;
  border: 3px solid #8972b5;
  box-shadow: 8px 8px 0 #080613, inset 0 0 0 4px #322747;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body[data-theme="retro"] .logo h1 {
  background: none;
  color: #ffe478;
  -webkit-text-fill-color: currentColor;
  font-family: inherit;
  text-shadow: 2px 2px #a84b75;
}
body[data-theme="retro"] :is(.theme-bar, .cycle-section, .accomplishments-section, .stat-card, .stats-dialog, .theme-more-menu) {
  background: #171328;
  border: 2px solid #655184;
  border-radius: 0;
  box-shadow: 3px 3px 0 #0a0814;
}
body[data-theme="retro"] :is(button, input, .theme-pill, .light-bulb, .light-inner-dot, .legend-dot, .balance-bar, .daily-focus-track) {
  border-radius: 0;
  font-family: inherit;
}
body[data-theme="retro"] .theme-pill.active {
  background: #393050;
  color: #ffe478;
  box-shadow: inset 0 -3px #ffe478;
}
body[data-theme="retro"] .timer-display-wrapper {
  background: repeating-linear-gradient(0deg, #0c1f21 0 3px, #0a1a1d 3px 5px);
  border: 4px solid #8972b5;
  box-shadow: 6px 6px 0 #0a0814, inset 0 0 0 5px #0a0814;
}
body[data-theme="retro"] .timer-display-wrapper::after {
  content: 'PLAYER 1 • FOCUS';
  position: absolute;
  top: 26%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  color: #70f5b1;
  font-size: .65rem;
  letter-spacing: .1em;
}
body[data-theme="retro"] .time-readout {
  color: #b4ffd3;
  text-shadow: 3px 3px #266052;
  letter-spacing: -.06em;
}
body[data-theme="retro"] .progress-ring { inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
body[data-theme="retro"] .progress-ring-fill { stroke-linecap: butt; filter: none; transition: stroke-dashoffset 1s steps(4), stroke .2s; }
body[data-theme="retro"] .progress-ring-bg { stroke: #23413d; }
body[data-theme="retro"] .control-btn {
  border: 2px solid #b7a0d9;
  box-shadow: 4px 4px 0 #0a0814;
}
body[data-theme="retro"] .control-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #0a0814; }
body[data-theme="retro"] .light-item.active .light-bulb { animation: none; box-shadow: 3px 3px 0 #0a0814; }
body[data-theme="retro"] button:focus-visible { outline: 3px solid #ffe478; outline-offset: 4px; }

/* Warm wood and glass, with sand driven by the actual interval progress. */
.hourglass-clock { display: none; }
body[data-theme="hourglass"] {
  --text-main: #4e3c2d;
  --text-muted: #756453;
  --text-subtle: #89745e;
  background: radial-gradient(ellipse at 50% 35%, #fbf5e8, #e1d2b8);
}
body[data-theme="hourglass"] .background-ambient { opacity: .12; }
body[data-theme="hourglass"] .app-container {
  background: #faf5e9;
  border-color: #cbb99a;
  box-shadow: 0 20px 65px #71533830;
}
body[data-theme="hourglass"] .logo h1 {
  background: none;
  color: #72513a;
  -webkit-text-fill-color: currentColor;
  font-family: 'Playfair Display', serif;
}
body[data-theme="hourglass"] :is(.theme-bar, .cycle-section, .stat-card, .accomplishments-section, .theme-more-menu, .stats-dialog) {
  background: #f1e8d6;
  border-color: #d5c5aa;
  color: #4e3c2d;
}
body[data-theme="hourglass"] :is(.theme-pill, .icon-btn, .control-btn.secondary) { color: #756453; }
body[data-theme="hourglass"] .theme-pill.active,
body[data-theme="hourglass"] .theme-more-option:hover { background: #e3d3b5; color: #61462f; }
body[data-theme="hourglass"] .timer-display-wrapper {
  height: 350px;
  max-width: 100%;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}
body[data-theme="hourglass"] .progress-ring { display: none; }
body[data-theme="hourglass"] .hourglass-clock {
  display: block;
  position: absolute;
  top: 0;
  width: 100%;
  height: 275px;
}
body[data-theme="hourglass"] .time-readout {
  color: #61462f;
  font-size: 2.8rem;
  text-shadow: 0 1px #fff;
}
body[data-theme="hourglass"] .control-btn.secondary { background: #e9ddc7; border-color: #cbb99a; }
.hourglass-sand-stream { opacity: 0; }
body[data-theme="hourglass"].is-running .hourglass-sand-stream { animation: hourglass-fall .45s linear infinite; }
@keyframes hourglass-fall { to { stroke-dashoffset: -7; } }
@media (prefers-reduced-motion: reduce) {
  body[data-theme="hourglass"].is-running .hourglass-sand-stream { animation: none; }
}

/* Muted sage, clay, and ochre session markers for the hourglass. */
body[data-theme="hourglass"] {
  --color-green: #8b9776;
  --color-orange: #bc9278;
  --color-yellow: #b5a16b;
  --color-green-glow: rgba(139, 151, 118, .16);
  --color-orange-glow: rgba(188, 146, 120, .16);
  --color-yellow-glow: rgba(181, 161, 107, .16);
}
body[data-theme="hourglass"] .light-item[data-type="work"] { --light-tone: #8b9776; --light-tint: #e3e6d9; }
body[data-theme="hourglass"] .light-item[data-type="shortRest"] { --light-tone: #bc9278; --light-tint: #eee0d5; }
body[data-theme="hourglass"] .light-item[data-type="longRest"] { --light-tone: #b5a16b; --light-tint: #ece5cf; }
body[data-theme="hourglass"] .light-item .light-bulb {
  background: #f7f2e7;
  border-color: var(--light-tone);
  box-shadow: none;
}
body[data-theme="hourglass"] .light-item:is(.active, .completed) .light-bulb {
  background: var(--light-tone);
  border-color: #fffaf0;
  box-shadow: 0 0 0 2px var(--light-tone);
  animation: none;
}
body[data-theme="hourglass"] .light-item.completed .light-bulb { filter: none; }
body[data-theme="hourglass"] .light-item:is(.active, .completed) .light-inner-dot { background: #fffaf0; }
body[data-theme="hourglass"] .legend-dot { box-shadow: none; }

/* Green sunburst dial, champagne markers, and a fluted gold bezel. */
.rolex-clock { display: none; }
body[data-theme="rolex"] {
  --text-main: #eee5cc;
  --text-muted: #c0b99d;
  --text-subtle: #a79f80;
  --color-green: #b9a268;
  --color-orange: #c39370;
  --color-yellow: #d5bd7e;
  --color-green-glow: #b9a26822;
  --color-orange-glow: #c3937022;
  --color-yellow-glow: #d5bd7e22;
  background-color: #102b22;
  background-image:
    radial-gradient(ellipse at 50% 38%, transparent 15%, #020c09cc 100%),
    radial-gradient(ellipse at 48% 25%, #c6a45c24, transparent 58%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.38 .62' numOctaves='3' stitchTiles='stitch'/%3E%3CfeDiffuseLighting surfaceScale='2.5' diffuseConstant='.65' lighting-color='%237a9785'%3E%3CfeDistantLight azimuth='225' elevation='45'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Cpath fill='%23102b22' d='M0 0h180v180H0z'/%3E%3Cpath opacity='.24' filter='url(%23grain)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
  background-size: cover, cover, 180px 180px;
  background-attachment: fixed;
}
body[data-theme="rolex"] .background-ambient {
  background: radial-gradient(ellipse, #d6b66b38 0%, #b9974520 30%, transparent 70%);
  opacity: .65;
  filter: blur(65px);
}
body[data-theme="rolex"] .app-container {
  background: linear-gradient(145deg, #15392e, #0b271f);
  border: 1px solid #867448;
  box-shadow: 0 25px 65px #0007, inset 0 0 0 4px #ffffff03;
}
body[data-theme="rolex"] .logo h1 {
  background: none;
  color: #e0ca91;
  -webkit-text-fill-color: currentColor;
  font-family: 'Playfair Display', serif;
  letter-spacing: .04em;
}
body[data-theme="rolex"] .logo-icon { color: #e0ca91; }
body[data-theme="rolex"] :is(.cycle-section, .theme-bar, .stat-card, .accomplishments-section, .theme-more-menu, .stats-dialog) {
  background: #102c24;
  border-color: #b9a26838;
}
body[data-theme="rolex"] .theme-pill.active { background: #b9a26822; color: #eddbab; }
body[data-theme="rolex"] .timer-display-wrapper { isolation: isolate; }
body[data-theme="rolex"] .rolex-clock { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
body[data-theme="rolex"] .chronometer-hands { z-index: 3; pointer-events: none; }
body[data-theme="rolex"] .progress-ring { display: none; }
body[data-theme="rolex"] .timer-content {
  position: absolute;
  top: 64%;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  background: #092f27;
  border: 1px solid #b9a26866;
  border-radius: 3px;
}
body[data-theme="rolex"] .time-readout {
  font-size: 1.15rem;
  color: #eddbab;
  letter-spacing: .05em;
  margin: 0;
  text-shadow: none;
}
body[data-theme="rolex"] .control-btn.primary {
  background: linear-gradient(135deg, #f2dfaa, #b29458);
  color: #15392e;
  box-shadow: 0 4px 14px #0004;
}
body[data-theme="rolex"] .light-item[data-type="work"] { --watch-light: #b9a268; }
body[data-theme="rolex"] .light-item[data-type="shortRest"] { --watch-light: #c39370; }
body[data-theme="rolex"] .light-item[data-type="longRest"] { --watch-light: #d5bd7e; }
body[data-theme="rolex"] .light-item .light-bulb { border-color: var(--watch-light); box-shadow: none; }
body[data-theme="rolex"] .light-item:is(.active, .completed) .light-bulb {
  background: var(--watch-light);
  border-color: #eddbab;
  box-shadow: 0 0 0 2px #b9a26833;
  animation: none;
}
body[data-theme="rolex"] .light-item.completed .light-bulb { filter: none; }
body[data-theme="rolex"] .light-item:is(.active, .completed) .light-inner-dot { background: #eddbab; }
body[data-theme="rolex"] .legend-dot { box-shadow: none; }

/* Astronomical clock: celestial brasswork and a medieval blue dial. */
.astronomical-clock { display: none; }
body[data-theme="astronomical"] {
  --text-main: #ede5cf;
  --text-muted: #c0bba8;
  --text-subtle: #a6a18d;
  --color-green: #b5a269;
  --color-orange: #c18c72;
  --color-yellow: #a4adce;
  --color-green-glow: rgba(181, 162, 105, .2);
  --color-orange-glow: rgba(193, 140, 114, .2);
  --color-yellow-glow: rgba(164, 173, 206, .2);
  background: radial-gradient(circle at 18% 22%, #e1cf9a99 0 1px, transparent 2px),
    radial-gradient(circle at 79% 31%, #e1cf9a88 0 1px, transparent 2px),
    radial-gradient(circle at 85% 73%, #e1cf9a66 0 1px, transparent 2px),
    radial-gradient(ellipse at 50% 35%, #263e55, #0c1726 80%);
}
body[data-theme="astronomical"] .app-container {
  background: linear-gradient(145deg, #1e2c3d, #121f30);
  border: 1px solid #8f7d51;
  box-shadow: 0 25px 65px #0006, inset 0 0 0 4px #c9ad6c0a;
}
body[data-theme="astronomical"] .logo h1 {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #dfca91;
  font-family: 'Playfair Display', serif;
}
body[data-theme="astronomical"] .logo-icon { color: #dfca91; }
body[data-theme="astronomical"] :is(.theme-bar, .cycle-section, .stat-card, .accomplishments-section, .daily-focus-card, .work-history-card, .theme-more-menu, .stats-dialog) {
  background: #142335;
  border-color: #b5a26940;
}
body[data-theme="astronomical"] .theme-pill.active { background: #b5a26926; color: #e1cf9a; box-shadow: none; }
body[data-theme="astronomical"] .theme-more-option:hover { background: #b5a2691a; }
body[data-theme="astronomical"] .timer-display-wrapper { height: 350px; max-width: 100%; flex-direction: column; justify-content: flex-end; }
body[data-theme="astronomical"] .astronomical-clock { display: block; position: absolute; top: 0; width: 100%; height: 290px; filter: drop-shadow(0 8px 10px #0005); }
body[data-theme="astronomical"] .progress-ring { display: none; }
body[data-theme="astronomical"] .time-readout { color: #e1cf9a; font-size: 2.5rem; text-shadow: 0 2px 6px #0004; }
body[data-theme="astronomical"] .control-btn.primary { background: linear-gradient(135deg, #e1cf9a, #a68b53); color: #142335; box-shadow: 0 4px 14px #0004; }
body[data-theme="astronomical"] .light-item[data-type="work"] { --celestial-light: #b5a269; }
body[data-theme="astronomical"] .light-item[data-type="shortRest"] { --celestial-light: #c18c72; }
body[data-theme="astronomical"] .light-item[data-type="longRest"] { --celestial-light: #a4adce; }
body[data-theme="astronomical"] .light-item .light-bulb { border-color: var(--celestial-light); box-shadow: none; }
body[data-theme="astronomical"] .light-item:is(.active, .completed) .light-bulb { background: var(--celestial-light); border-color: #e1cf9a; box-shadow: 0 0 0 2px #b5a26926; animation: none; }
body[data-theme="astronomical"] .light-item.completed .light-bulb { filter: none; }
body[data-theme="astronomical"] .light-item:is(.active, .completed) .light-inner-dot { background: #e1cf9a; }
body[data-theme="astronomical"] .legend-dot { box-shadow: none; }
.theme-more-option[data-theme="astronomical"] .theme-more-lock { font-size: 1rem; }

.astronomical-sky { display: none; }
body[data-theme="astronomical"] .astronomical-sky { display: block; position: fixed; inset: 0; z-index: 0; pointer-events: none; }
body[data-theme="astronomical"] .astronomical-sky svg { display: block; width: 100%; height: 100%; }

.astronomical-progress-track,
.astronomical-progress-fill { fill: none; stroke-width: 3; }
.astronomical-progress-track { stroke: #b5a26926; }
.astronomical-progress-fill {
  stroke: var(--current-color);
  stroke-dasharray: 992.7432785343747;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  transition: stroke-dashoffset .8s linear, stroke .3s ease;
}
@media (prefers-reduced-motion: reduce) {
  .astronomical-progress-fill { transition: none; }
}

/* Tomodo Free + Plus. Shared product surfaces stay readable in every theme. */
[hidden] { display: none !important; }
.review-banner { padding: 10px; border: 1px dashed #a48a52; border-radius: 8px; font-size: .7rem; color: var(--text-main); }
.review-banner a { color: inherit; margin-left: 6px; }
.theme-more-option > span:first-child { display: inline-flex; align-items: center; gap: 10px; }
.theme-plus-badge, .plus-badge { display: inline-block; width: fit-content; padding: 3px 6px; border: 1px solid currentColor; border-radius: 5px; font-size: .56rem; font-weight: 700; letter-spacing: .06em; line-height: 1; text-transform: uppercase; }
.theme-plus-badge { opacity: .65; }
.theme-more-menu { max-width: calc(100vw - 40px); }
.premium-teaser { padding: 18px; border: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 20%, transparent); border-radius: 12px; display: grid; gap: 12px; }
.premium-teaser .plus-badge { opacity: .75; }
.premium-teaser h3 { margin-top: 9px; font-size: .9rem; font-weight: 600; }
.premium-teaser p { margin-top: 5px; font-size: .73rem; line-height: 1.6; opacity: .75; }
.premium-teaser small { font-size: .6rem; opacity: .6; }
.goal-sample { height: 8px; border-radius: 10px; background: #8e9b8226; overflow: hidden; }
.goal-sample span { display: block; height: 100%; width: 58%; background: var(--color-green); border-radius: inherit; opacity: .7; }
.history-sample { display: flex; align-items: flex-end; gap: 12px; height: 48px; }
.history-sample i { flex: 1; height: 45%; border-radius: 4px 4px 0 0; background: var(--color-green); opacity: .55; }
.history-sample i:nth-child(2n) { height: 75%; }
.history-sample i:nth-child(3n) { height: 100%; }
.history-sample i:last-child { height: 30%; }
.plus-action { width: 100%; padding: 12px 16px; color: #fffbed; background: #455e4b; border: 1px solid #455e4b; border-radius: 8px; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.plus-action:hover { background: #344c3a; }
.plus-action:focus-visible, .plus-close:focus-visible { outline: 3px solid #b39a60; outline-offset: 3px; }
.premium-teaser .plus-action { width: fit-content; background: transparent; color: inherit; border-color: currentColor; padding: 8px 12px; font-size: .7rem; }
.plus-dialog { position: fixed; margin: auto; width: min(480px, calc(100vw - 28px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 30px; background: var(--plus-bg, #f8f5eb); color: var(--plus-text, #343d32); border: 1px solid var(--plus-border, #d6d7c6); border-radius: var(--plus-radius, 22px); box-shadow: 0 24px 80px #0005; font-family: 'Plus Jakarta Sans', sans-serif; }
.plus-dialog::backdrop { background: color-mix(in srgb, var(--plus-panel, #09120c) 25%, #030610bb); backdrop-filter: blur(6px); }
.plus-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; background: transparent; color: #66705f; font: inherit; font-size: 1.5rem; cursor: pointer; }
.plus-dialog > .plus-badge { color: var(--plus-accent, #637754); }
.plus-dialog h2 { margin: 16px 0 8px; font-family: 'Playfair Display', serif; font-size: 1.8rem; line-height: 1.2; }
.plus-dialog > p { font-size: .8rem; line-height: 1.6; color: var(--plus-muted, #6b7464); }
.plus-benefits { padding-left: 18px; margin: 20px 0; display: grid; gap: 10px; font-size: .78rem; line-height: 1.6; }
.plus-pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0 12px; }
.plus-pricing > :is(div, label) { position: relative; display: grid; gap: 5px; padding: 20px 12px 14px; border: 1px solid var(--plus-border, #cfd3c1); border-radius: var(--plus-card-radius, 10px); background: var(--plus-panel, transparent); }
.plus-pricing strong { font-size: 1.65rem; }
.plus-pricing strong span { font-size: .75rem; font-weight: 500; }
.plus-pricing small { color: var(--plus-muted, #6b7464); font-size: .62rem; line-height: 1.5; }
.plus-saving { position: absolute; top: -9px; left: 12px; padding: 3px 7px; border-radius: 4px; background: var(--plus-accent, #e4ead8); color: var(--plus-button-text, #343d32); font-size: .58rem; font-weight: 700; }
.plus-dialog .plus-launch-note { font-size: .7rem; margin-bottom: 14px; }
.plus-dialog .plus-free-note { margin-top: 14px; font-size: .65rem; text-align: center; }
.local-review-link { display: block; margin: 12px 0; color: #455e4b; font-size: .7rem; text-align: center; }
@media (max-width: 380px) {
  .plus-dialog { padding: 25px 20px; }
  .theme-more-option { padding-inline: 8px; }
  .theme-more-option > span:first-child { gap: 5px; }
}

/* Plus follows the selected theme, including the previewed premium theme. */
body[data-theme="tomato"] :is(.plus-dialog, .alerts-tooltip, .stats-dialog) {
  --plus-bg: linear-gradient(145deg, #f45157, #b51f2c);
  --plus-text: #fff9ee; --plus-muted: #ffe0d8; --plus-border: #ffaaa0;
  --plus-accent: #fff0c6; --plus-button-text: #86202a; --plus-panel: #ffffff0d;
  --plus-radius: 30px;
}
body[data-theme="zen"] :is(.plus-dialog, .alerts-tooltip, .stats-dialog) {
  --plus-bg: #f2f0e7; --plus-text: #27372b; --plus-muted: #586653;
  --plus-border: #aab49e; --plus-accent: #526f58; --plus-button-text: #fffdf2; --plus-panel: #e7e9dc;
}
body[data-theme="sundial"] :is(.plus-dialog, .alerts-tooltip, .stats-dialog) {
  --plus-bg: #ead9b8; --plus-text: #503c29; --plus-muted: #725b40;
  --plus-border: #a47749; --plus-accent: #765334; --plus-button-text: #fff5df; --plus-panel: #f3e6cd;
}
body[data-theme="rainy"] :is(.plus-dialog, .alerts-tooltip, .stats-dialog) {
  --plus-bg: #dce9e6; --plus-text: #344b58; --plus-muted: #4e6871;
  --plus-border: #91aaad; --plus-accent: #426c72; --plus-button-text: #f5faf6; --plus-panel: #e8f0ed;
}
body[data-theme="night"] :is(.plus-dialog, .alerts-tooltip, .stats-dialog) {
  --plus-bg: #222d4c; --plus-text: #f2f0e9; --plus-muted: #c6c4de;
  --plus-border: #76809e; --plus-accent: #c2b9e8; --plus-button-text: #25233b; --plus-panel: #ffffff06;
}
body[data-theme="forest"] :is(.plus-dialog, .alerts-tooltip, .stats-dialog) {
  --plus-bg: #f4f2df; --plus-text: #344f39; --plus-muted: #586b4c;
  --plus-border: #9baa7c; --plus-accent: #4e7046; --plus-button-text: #fffdee; --plus-panel: #e8ecd7;
}
body[data-theme="forest"][data-forest-mode="night"] :is(.plus-dialog, .alerts-tooltip, .stats-dialog) {
  --plus-bg: #2b3d42; --plus-text: #edf0df; --plus-muted: #bfcdb2;
  --plus-border: #788765; --plus-accent: #a4bf94; --plus-button-text: #23352b; --plus-panel: #ffffff06;
}
body[data-theme="winter"] :is(.plus-dialog, .alerts-tooltip, .stats-dialog) {
  --plus-bg: #edf5f4; --plus-text: #263e50; --plus-muted: #506e7a;
  --plus-border: #9bbdc1; --plus-accent: #406d7e; --plus-button-text: #f5fbf8; --plus-panel: #dfedeb;
}
body[data-theme="retro"] :is(.plus-dialog, .alerts-tooltip, .stats-dialog) {
  --plus-bg: #201a35; --plus-text: #f3edff; --plus-muted: #c2b5dc;
  --plus-border: #8972b5; --plus-accent: #70f5b1; --plus-button-text: #171328; --plus-panel: #171328;
  --plus-radius: 0px; --plus-card-radius: 0px;
  font-family: 'JetBrains Mono', monospace;
  border-width: 3px; box-shadow: 8px 8px 0 #080613;
}
body[data-theme="retro"] .plus-dialog h2 { font-family: inherit; color: #ffe478; }
body[data-theme="retro"] .plus-dialog :is(button, .plus-badge, .plus-saving) { border-radius: 0; }
body[data-theme="hourglass"] :is(.plus-dialog, .alerts-tooltip, .stats-dialog) {
  --plus-bg: #faf5e9; --plus-text: #4e3c2d; --plus-muted: #756453;
  --plus-border: #cbb99a; --plus-accent: #80603d; --plus-button-text: #fff9ed; --plus-panel: #f1e8d6;
}
body[data-theme="rolex"] :is(.plus-dialog, .alerts-tooltip, .stats-dialog) {
  --plus-bg: linear-gradient(145deg, #15392e, #0b271f); --plus-text: #eee5cc; --plus-muted: #c0b99d;
  --plus-border: #867448; --plus-accent: #e0ca91; --plus-button-text: #15392e; --plus-panel: #102c24;
}
body[data-theme="astronomical"] :is(.plus-dialog, .alerts-tooltip, .stats-dialog) {
  --plus-bg: linear-gradient(145deg, #1e2c3d, #121f30); --plus-text: #ede5cf; --plus-muted: #c0bba8;
  --plus-border: #8f7d51; --plus-accent: #dfca91; --plus-button-text: #142335; --plus-panel: #142335;
}
.plus-dialog .plus-close { color: var(--plus-muted, #66705f); }
.plus-dialog h2 { color: var(--plus-text, #343d32); }
.plus-dialog .plus-action { background: var(--plus-accent, #455e4b); color: var(--plus-button-text, #fffbed); border-color: var(--plus-accent, #455e4b); }
.plus-dialog .plus-action:hover { filter: brightness(.94); }
.plus-dialog :is(.plus-action, .plus-close):focus-visible { outline-color: var(--plus-accent, #b39a60); }
.plus-dialog .local-review-link { color: var(--plus-accent, #455e4b); }

/* Slowly shifting dunes sit behind the hourglass and its controls. */
.hourglass-landscape { display: none; }
body[data-theme="hourglass"] .hourglass-landscape {
  display: block; position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.hourglass-landscape svg { display: block; width: 100%; height: 100%; }
body[data-theme="hourglass"] .hourglass-dune { will-change: transform; }
body[data-theme="hourglass"] .hourglass-dune-far { animation: hourglass-dune-far 42s ease-in-out infinite alternate; }
body[data-theme="hourglass"] .hourglass-dune-middle { animation: hourglass-dune-middle 30s ease-in-out infinite alternate; }
body[data-theme="hourglass"] .hourglass-dune-near { animation: hourglass-dune-near 22s ease-in-out infinite alternate; }
@keyframes hourglass-dune-far {
  from { transform: translate(-28px, 0); } to { transform: translate(38px, 9px); }
}
@keyframes hourglass-dune-middle {
  from { transform: translate(45px, 10px); } to { transform: translate(-60px, -9px); }
}
@keyframes hourglass-dune-near {
  from { transform: translate(-65px, 14px); } to { transform: translate(75px, -10px); }
}
@media (prefers-reduced-motion: reduce) {
  body[data-theme="hourglass"] .hourglass-dune { animation: none; will-change: auto; }
}

/* Lead the Plus story with the value of tracking, using clearly labeled sample data. */
.plus-history-preview { margin: 20px 0; padding: 16px; background: var(--plus-panel, #e7e9dc); border: 1px solid var(--plus-border, #cfd3c1); border-radius: var(--plus-card-radius, 12px); }
.plus-history-preview figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--plus-muted, #6b7464); font-size: .7rem; }
.plus-example-label { padding: 3px 6px; border: 1px solid var(--plus-border, #cfd3c1); border-radius: 4px; font-size: .55rem; letter-spacing: .04em; }
.plus-history-total { margin-top: 10px; font-family: 'JetBrains Mono', monospace; font-size: 1.5rem; font-weight: 600; }
.plus-history-total > span { display: block; margin-top: 3px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: .62rem; font-weight: 400; color: var(--plus-muted, #6b7464); }
.plus-chart-goal-label { margin-top: 14px; font-size: .58rem; text-align: right; color: var(--plus-muted, #6b7464); }
.plus-week-chart { display: flex; position: relative; align-items: stretch; gap: 13px; height: 100px; margin: 8px 2px 20px; }
.plus-chart-goal-line { position: absolute; top: 25%; left: 0; right: 0; border-top: 1px dashed var(--plus-muted, #6b7464); opacity: .5; }
.plus-chart-column { flex: 1; position: relative; display: flex; align-items: flex-end; justify-content: center; min-width: 0; }
.plus-chart-column i { width: 100%; max-width: 28px; height: var(--bar-height); border-radius: var(--plus-card-radius, 5px) var(--plus-card-radius, 5px) 0 0; background: var(--color-green); opacity: .85; }
.plus-chart-column > span { position: absolute; bottom: -18px; font-size: .6rem; color: var(--plus-muted, #6b7464); }
.plus-dialog .plus-benefits { list-style: none; padding: 0; gap: 12px; }
.plus-benefits li { display: grid; gap: 2px; }
.plus-benefits li strong { font-size: .78rem; font-weight: 700; }
.plus-benefits li > span { font-size: .7rem; color: var(--plus-muted, #6b7464); }
.plus-dialog .plus-action:disabled { cursor: default; opacity: .7; filter: none; }
.plus-secondary { display: block; width: 100%; margin-top: 7px; padding: 10px; border: 0; background: none; color: var(--plus-muted, #6b7464); font: inherit; font-size: .72rem; cursor: pointer; }
.plus-secondary:hover { text-decoration: underline; }
.plus-secondary:focus-visible { outline: 3px solid var(--plus-accent, #b39a60); outline-offset: 2px; }

.plus-tracking-intro { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--plus-border, #cfd3c1); }
.plus-tracking-intro h3 { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 600; }
.plus-tracking-intro p { margin-top: 6px; color: var(--plus-muted, #6b7464); font-size: .73rem; line-height: 1.6; }
.plus-tracking-intro + .plus-history-preview { margin-top: 14px; }
body[data-theme="retro"] .plus-tracking-intro h3 { font-family: inherit; }

.plus-goal-preview { margin: 14px 0 12px; padding: 16px; background: var(--plus-panel, #e7e9dc); border: 1px solid var(--plus-border, #cfd3c1); border-radius: var(--plus-card-radius, 12px); }
.plus-goal-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--plus-muted, #6b7464); font-size: .7rem; }
.plus-goal-readout { display: flex; align-items: baseline; gap: 7px; margin-top: 10px; }
.plus-goal-readout strong { font-family: 'JetBrains Mono', monospace; font-size: 1.4rem; font-weight: 600; }
.plus-goal-readout > span { color: var(--plus-muted, #6b7464); font-size: .72rem; }
.plus-goal-track { height: 9px; margin-top: 12px; overflow: hidden; border-radius: var(--plus-card-radius, 8px); background: color-mix(in srgb, var(--color-green) 18%, transparent); }
.plus-goal-track > span { display: block; height: 100%; width: 66.6667%; background: var(--color-green); border-radius: inherit; }
.plus-goal-caption { margin-top: 7px; color: var(--plus-muted, #6b7464); font-size: .6rem; text-align: right; }
.plus-goal-preview + .plus-history-preview { margin-top: 12px; }

.plus-feature-intro { margin-top: 18px; }
.plus-feature-intro h3 { font-size: .78rem; font-weight: 700; }
.plus-feature-intro p { margin-top: 3px; font-size: .7rem; line-height: 1.6; color: var(--plus-muted, #6b7464); }
.plus-feature-intro + .plus-goal-preview,
.plus-feature-intro + .plus-history-preview { margin-top: 9px; }

.settings-dialog h2 { margin-top: 0; }
.settings-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--plus-border, #cfd3c1); }
.settings-section h3 { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.settings-description { margin-top: 8px; font-size: .73rem; line-height: 1.6; color: var(--plus-muted, #6b7464); }
#accountSettingsStatus { margin-top: 12px; font-size: .78rem; font-weight: 600; }
.settings-account-actions { display: grid; gap: 8px; margin-top: 14px; }
.settings-outline { padding: 10px; border: 1px solid var(--plus-border, #cfd3c1); border-radius: var(--plus-card-radius, 8px); background: var(--plus-panel, transparent); color: var(--plus-muted, #6b7464); font: inherit; font-size: .7rem; }
.settings-dialog :disabled { cursor: not-allowed; opacity: .65; }
#defaultThemeForm { display: grid; gap: 10px; margin-top: 16px; }
#defaultThemeForm label { font-size: .72rem; }
#defaultThemeSelect { width: 100%; padding: 12px; border: 1px solid var(--plus-border, #cfd3c1); border-radius: var(--plus-card-radius, 8px); color: var(--plus-text, #343d32); background: var(--plus-panel, #e7e9dc); font: inherit; font-size: .8rem; }
#defaultThemeSelect:focus-visible { outline: 3px solid var(--plus-accent, #b39a60); outline-offset: 2px; }
@media (max-width: 380px) {
  .header-actions { gap: 4px; }
  .header-actions .icon-btn { width: 30px; height: 30px; }
}

/* One compact header control for audio and desktop alerts. */
.alerts-control { position: relative; }
.alerts-menu.plus-dialog {
  position: absolute; z-index: 35; top: calc(100% + 10px); right: 0; bottom: auto; left: auto;
  margin: 0; width: 250px; max-width: calc(100vw - 44px); max-height: min(70vh, 400px);
  padding: 14px; border-radius: var(--plus-card-radius, 12px); box-shadow: 0 12px 35px #0004;
}
.alerts-menu.plus-dialog h2 { margin: 0 0 10px; font: inherit; font-size: .72rem; font-weight: 700; }
.alert-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 7px; background: transparent; color: var(--plus-text, #343d32); border: 0; border-radius: var(--plus-card-radius, 6px); font: inherit; font-size: .75rem; cursor: pointer; text-align: left; }
.alert-option:hover { background: var(--plus-panel, #e7e9dc); }
.alert-option svg { flex-shrink: 0; }
.alert-status { margin-left: auto; font-size: .65rem; color: var(--plus-muted, #6b7464); }
.alert-option[aria-checked="true"] .alert-status { color: var(--plus-accent, #526f58); font-weight: 700; }
.alert-option[aria-pressed="true"] .alert-status { color: var(--plus-accent, #526f58); font-weight: 700; }
.soundscape-volume { display: flex; align-items: center; gap: 12px; margin: 12px 7px; padding-bottom: 14px; border-bottom: 1px solid var(--plus-border, #d6d7c6); color: var(--plus-muted, #6b7464); font-size: .65rem; }
.soundscape-volume input { width: 90px; min-width: 0; margin-left: auto; accent-color: var(--plus-accent, #526f58); }
.soundscape-volume input:focus-visible { outline: 2px solid var(--plus-accent, #526f58); outline-offset: 3px; }
.alert-option:disabled { opacity: .55; cursor: not-allowed; }
.alert-option:focus-visible { outline: 2px solid var(--plus-accent, #b39a60); outline-offset: 1px; }
.alerts-menu .alert-help { margin: 8px 7px 0; color: var(--plus-muted, #6b7464); font-size: .62rem; line-height: 1.6; }

.alerts-tooltip {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 36;
  padding: 7px 10px; border-radius: var(--plus-card-radius, 6px); background: var(--plus-bg, #f8f5eb); color: var(--plus-text, #343d32); border: 1px solid var(--plus-border, #d6d7c6);
  font-size: .65rem; line-height: 1.4; white-space: nowrap; pointer-events: none;
  visibility: hidden; opacity: 0; transition: opacity .12s ease;
}
#alertsMenuToggle[aria-expanded="false"]:is(:hover, :focus-visible) + .alerts-tooltip { visibility: visible; opacity: 1; }
.header-tooltip-control { position: relative; }
.header-tooltip-control > .icon-btn:is(:hover, :focus-visible) + .alerts-tooltip { visibility: visible; opacity: 1; }

.account-signin-form { display: grid; gap: 10px; margin-top: 16px; }
.account-signin-form label { font-size: .72rem; }
.account-signin-form input { width: 100%; padding: 12px; border: 1px solid var(--plus-border, #cfd3c1); border-radius: var(--plus-card-radius, 8px); color: var(--plus-text, #343d32); background: var(--plus-panel, #e7e9dc); font: inherit; font-size: .8rem; }
.settings-outline:not(:disabled) { cursor: pointer; }
.settings-outline:not(:disabled):hover { border-color: var(--plus-accent, #455e4b); }
.plus-plan { cursor: pointer; }
.plus-plan input { position: absolute; top: 10px; right: 10px; accent-color: var(--plus-accent, #455e4b); }
.plus-plan:has(input:checked) { border-color: var(--plus-accent, #455e4b); box-shadow: inset 0 0 0 1px var(--plus-accent, #455e4b); }
#accountMessage:empty, #checkoutMessage:empty { display: none; }

.account-auth-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border: 1px solid var(--plus-border, #cfd3c1); border-radius: var(--plus-card-radius, 8px); }
.account-auth-modes button { padding: 9px 8px; border: 0; border-radius: var(--plus-card-radius, 5px); background: none; color: var(--plus-muted, #6b7464); font: inherit; font-size: .72rem; cursor: pointer; }
.account-auth-modes button[aria-pressed="true"] { background: var(--plus-accent, #526f58); color: var(--plus-button-text, #fffdf2); }
.account-password-confirm { display: grid; gap: 10px; }
.account-auth-links { display: grid; gap: 0; }
.account-auth-links .plus-secondary { margin: 0; padding: 8px; }
.account-password-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--plus-border, #cfd3c1); }
.account-password-section h4 { font-size: .82rem; }
.account-auth-modes button:focus-visible { outline: 2px solid var(--plus-accent, #b39a60); outline-offset: 2px; }
.password-toggle { display: block; width: 100%; margin-top: 16px; }
#passwordMessage:empty { display: none; }
