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

body {
  background: #0c0c18;
  color: #d8d0c0;
  font-family: Georgia, 'Times New Roman', serif;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ─── App layout: clock fills full viewport ──────────────────────────────── */

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

#clock-container {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.4rem;
}

/* ─── Hamburger menu button ──────────────────────────────────────────────── */

#menu-btn {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  background: rgba(7, 7, 20, 0.92);
  border: 1px solid rgba(255, 235, 180, 0.18);
  border-radius: 50%;
  color: rgba(255, 235, 180, 0.75);
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

#menu-btn:hover {
  background: rgba(20, 18, 40, 0.95);
  border-color: rgba(255, 235, 180, 0.35);
  transform: scale(1.05);
}

/* ─── Menu overlay ───────────────────────────────────────────────────────── */

#menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 150;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: opacity 0.25s;
}

#menu-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ─── Menu panel ─────────────────────────────────────────────────────────── */

#menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 22rem;
  max-width: 90vw;
  height: 100vh;
  background: rgba(7, 7, 20, 0.97);
  border-left: 1px solid rgba(255, 235, 180, 0.12);
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 235, 180, 0.2) transparent;
  box-sizing: border-box;
}

#menu-panel.hidden {
  transform: translateX(100%);
}

#menu-panel::-webkit-scrollbar {
  width: 6px;
}

#menu-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 235, 180, 0.2);
  border-radius: 3px;
}

#menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 235, 180, 0.10);
  flex-shrink: 0;
}

#menu-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(180, 165, 140, 0.55);
  font-family: Georgia, serif;
}

#menu-close-btn {
  background: none;
  border: none;
  color: rgba(255, 235, 180, 0.45);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.15s;
}

#menu-close-btn:hover {
  color: rgba(255, 235, 180, 0.9);
}

/* ─── Menu sections ──────────────────────────────────────────────────────── */

.menu-section {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid rgba(255, 235, 180, 0.06);
  box-sizing: border-box;
  min-width: 0;
}

.menu-section:last-child {
  border-bottom: none;
}

.menu-section-title {
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(180, 165, 140, 0.45);
  font-family: Georgia, serif;
  margin-bottom: 0.55rem;
}

.menu-section-title--full {
  width: 100%;
  display: block;
  text-align: center;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 235, 180, 0.08);
}

.menu-section-content {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

/* ─── Menu cards ─────────────────────────────────────────────────────────── */

.menu-card {
  background: rgba(14, 14, 32, 0.65);
  border: 1px solid rgba(255, 235, 180, 0.08);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  box-sizing: border-box;
}

.menu-card.clickable {
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.menu-card.clickable:hover {
  background: rgba(20, 20, 45, 0.75);
  border-color: rgba(255, 235, 180, 0.15);
}

.menu-card.compact {
  padding: 0.4rem 0.55rem;
  flex: 1;
  min-width: 0;
}

.menu-row {
  display: flex;
  gap: 0.4rem;
  min-width: 0;
}

/* ─── Toggle rows ────────────────────────────────────────────────────────── */

.menu-toggle-row {
  display: flex;
  gap: 0.5rem;
  min-width: 0;
}

.menu-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(14, 14, 32, 0.55);
  border: 1px solid rgba(255, 235, 180, 0.07);
  border-radius: 7px;
  padding: 0.45rem 0.6rem;
  min-width: 0;
  box-sizing: border-box;
}

/* ─── Location card ──────────────────────────────────────────────────────── */

.location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 0.5rem;
}

.location-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
  min-width: 0;
}

.card-peek {
  font-size: 0.82rem;
  color: rgba(255, 235, 180, 0.62);
  line-height: 1.1;
  flex-shrink: 0;
  max-width: 5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Weather display ────────────────────────────────────────────────────── */

.weather-display {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ─── Tide cards ─────────────────────────────────────────────────────────── */

.tide-card {
  text-align: center;
}

.info-value.tide-high {
  color: rgba(130, 210, 255, 0.92);
  font-size: 0.95rem;
}

.info-value.tide-low {
  color: rgba(55, 145, 200, 0.82);
  font-size: 0.95rem;
}

.info-value.tide-phase {
  color: rgba(100, 180, 230, 0.85);
  font-size: 0.88rem;
}

.tide-note {
  font-size: 0.52rem;
  color: rgba(100, 160, 200, 0.45);
  font-style: italic;
  text-align: center;
  margin-top: 0.15rem;
}

.tide-icon {
  font-size: 0.8em;
  margin-right: 0.15rem;
}

/* ─── Verse section tabs (Haiku / Shanty) ───────────────────────────────── */

.verse-section-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.verse-tab {
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.15s;
}

.verse-tab--active {
  opacity: 1;
}

.verse-tab:hover {
  opacity: 0.7;
}

.verse-tab-sep {
  opacity: 0.25;
}

/* ─── Haiku card ─────────────────────────────────────────────────────────── */

.haiku-card {
  position: relative;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.haiku-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 0.82rem;
  line-height: 1.65;
  color: rgba(220, 210, 190, 0.92);
  text-align: center;
  white-space: pre-line;
  padding: 0.4rem 1.8rem 0.4rem 0.4rem;
}

.haiku-loading {
  color: rgba(180, 165, 140, 0.55);
  font-style: italic;
}

.haiku-refresh {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: none;
  border: 1px solid rgba(255, 235, 180, 0.15);
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  color: rgba(255, 235, 180, 0.45);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s, transform 0.2s;
}

.haiku-refresh:hover {
  color: rgba(255, 235, 180, 0.85);
  border-color: rgba(255, 235, 180, 0.35);
}

.haiku-refresh.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ─── Time test controls ─────────────────────────────────────────────────── */

.time-test-controls {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.25rem;
}

/* ─── Band scale controls ────────────────────────────────────────────────── */

.band-scale-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.band-scale-controls input[type="range"] {
  flex: 1;
}

.band-value {
  font-size: 0.75rem;
  font-family: monospace;
  color: rgba(255, 200, 80, 0.8);
  min-width: 2.5rem;
  text-align: right;
}

/* ─── Vortex params grid ─────────────────────────────────────────────────── */

.vortex-params-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(100, 60, 180, 0.08);
  border: 1px solid rgba(160, 100, 255, 0.12);
  border-radius: 6px;
  box-sizing: border-box;
  min-width: 0;
}

.vortex-params-grid.hidden {
  display: none;
}

.vortex-params-grid #vp-reset-btn {
  grid-column: span 2;
  margin-top: 0.25rem;
}

/* ─── Menu actions ───────────────────────────────────────────────────────── */

.menu-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.9rem;
  margin-top: auto;
}

.menu-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(14, 14, 32, 0.7);
  border: 1px solid rgba(255, 235, 180, 0.15);
  border-radius: 7px;
  padding: 0.6rem 0.8rem;
  color: rgba(255, 235, 180, 0.7);
  font-family: Georgia, serif;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.menu-action-btn:hover {
  background: rgba(20, 20, 45, 0.85);
  border-color: rgba(255, 235, 180, 0.3);
  color: rgba(255, 235, 180, 0.95);
}

.action-icon {
  font-size: 1rem;
}

/* ─── People clock popup ─────────────────────────────────────────────────── */

#people-clock-popup {
  position: fixed;
  z-index: 250;
  background: rgba(7, 7, 20, 0.96);
  border: 1px solid rgba(255, 235, 180, 0.18);
  border-radius: 10px;
  padding: 0.6rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

#people-clock-popup.hidden {
  display: none;
}

#people-clock-canvas {
  display: block;
  width: 120px;
  height: 120px;
}

/* ─── Hide menu in fullscreen ────────────────────────────────────────────── */

:fullscreen #menu-btn,
:-webkit-full-screen #menu-btn,
:fullscreen #menu-panel,
:-webkit-full-screen #menu-panel,
:fullscreen #menu-overlay,
:-webkit-full-screen #menu-overlay {
  display: none;
}

/* ─── Info labels and values ─────────────────────────────────────────────── */

.info-label {
  font-size: 0.55rem;
  color: rgba(180, 165, 140, 0.52);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: Georgia, serif;
  white-space: nowrap;
}

#nat-label {
  white-space: normal;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.58rem;
  color: rgba(200, 185, 160, 0.72);
}

.info-value {
  font-size: 1.1rem;
  color: rgba(255, 235, 180, 0.9);
  line-height: 1.1;
  white-space: nowrap;
}

.info-value.natural {
  font-size: 1.22rem;
  color: rgba(255, 240, 160, 0.95);
}

.nat-animal {
  font-size: 1.0rem;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
  transition: opacity 0.6s ease;
}

.info-value.mono {
  font-family: monospace;
  font-size: 0.88rem;
  color: rgba(180, 210, 255, 0.8);
}

.info-value.sunrise {
  color: rgba(255, 195, 90, 0.9);
  font-size: 0.9rem;
}

.info-value.sunset {
  color: rgba(255, 145, 70, 0.9);
  font-size: 0.9rem;
}

.info-value.dim {
  font-size: 0.88rem;
  color: rgba(180, 200, 255, 0.65);
}

#constellation-val {
  font-size: 1.4rem;
  line-height: 1.1;
  color: rgba(190, 215, 255, 0.88);
}

.constellation-name {
  font-size: 0.68rem;
  color: rgba(190, 215, 255, 0.55);
  font-family: Georgia, serif;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
}

/* ─── Weather ────────────────────────────────────────────────────────────── */

#weather-icon {
  font-size: 1.25rem;
  line-height: 1.1;
  cursor: default;
}

#weather-temp {
  font-size: 0.66rem;
  color: rgba(160, 195, 235, 0.7);
  font-family: monospace;
  min-height: 0.85rem;
}

/* ─── Location inputs ────────────────────────────────────────────────────── */

#coord-inputs {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

#coord-input {
  background: rgba(255, 235, 180, 0.06);
  border: 1px solid rgba(255, 235, 180, 0.15);
  color: rgba(255, 235, 180, 0.88);
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.72rem;
  flex: 2;
  min-width: 0;
  width: 0;
  text-align: center;
  transition: border-color 0.2s;
}

#coord-input:focus {
  outline: none;
  border-color: rgba(255, 235, 180, 0.42);
}

#coord-input:disabled {
  opacity: 0.4;
  cursor: default;
}

#location-name {
  font-size: 0.60rem;
  color: rgba(180, 200, 255, 0.52);
  font-style: italic;
  font-family: Georgia, serif;
  text-align: left;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 0.8rem;
}

#home-btn {
  background: none;
  border: 1px solid rgba(255, 235, 180, 0.18);
  color: rgba(255, 235, 180, 0.5);
  padding: 0.12rem 0.38rem;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1;
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

#home-btn:hover:not(:disabled) {
  color: rgba(255, 235, 180, 0.9);
  border-color: rgba(255, 235, 180, 0.4);
}

#home-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ─── City dropdown ─────────────────────────────────────────────────────── */

#city-select {
  background: rgba(255, 235, 180, 0.06);
  border: 1px solid rgba(255, 235, 180, 0.15);
  color: rgba(255, 235, 180, 0.88);
  padding: 0.18rem 0.25rem;
  border-radius: 3px;
  font-family: Georgia, serif;
  font-size: 0.72rem;
  flex: 1;
  min-width: 0;
  width: 0;
  cursor: pointer;
  transition: border-color 0.2s;
  color-scheme: dark;
}

#city-select:focus {
  outline: none;
  border-color: rgba(255, 235, 180, 0.42);
}

#city-select option {
  background: #0c0c18;
  color: rgba(255, 235, 180, 0.88);
}

/* ─── Toggle switches ────────────────────────────────────────────────────── */

#toggle-label {
  font-size: 0.60rem;
  font-family: monospace;
  color: rgba(255, 235, 180, 0.5);
  letter-spacing: 0.04em;
  white-space: nowrap;
  min-width: 4.5em;
}

#zodiac-label {
  font-size: 0.60rem;
  font-family: monospace;
  color: rgba(180, 200, 255, 0.5);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

#vortex-label {
  font-size: 0.60rem;
  font-family: monospace;
  color: rgba(160, 120, 255, 0.5);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

#chill-label {
  font-size: 0.60rem;
  font-family: monospace;
  color: rgba(100, 210, 195, 0.5);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 2rem;
  height: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 235, 180, 0.1);
  border: 1px solid rgba(255, 235, 180, 0.2);
  border-radius: 1.1rem;
  transition: background 0.2s, border-color 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 0.72rem;
  height: 0.72rem;
  left: 0.17rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 235, 180, 0.45);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: rgba(100, 180, 120, 0.18);
  border-color: rgba(120, 200, 140, 0.35);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(0.9rem) translateY(-50%);
  background: rgba(140, 210, 160, 0.85);
}

.toggle-switch--chill .toggle-slider {
  background: rgba(80, 200, 185, 0.08);
  border-color: rgba(80, 200, 185, 0.18);
}

.toggle-switch--chill .toggle-slider::before {
  background: rgba(80, 200, 185, 0.42);
}

.toggle-switch--chill input:checked + .toggle-slider {
  background: rgba(30, 155, 145, 0.22);
  border-color: rgba(80, 200, 185, 0.45);
}

.toggle-switch--chill input:checked + .toggle-slider::before {
  transform: translateX(0.9rem) translateY(-50%);
  background: rgba(100, 220, 205, 0.9);
}

.toggle-switch--vortex .toggle-slider {
  background: rgba(160, 100, 255, 0.08);
  border-color: rgba(160, 100, 255, 0.18);
}

.toggle-switch--vortex .toggle-slider::before {
  background: rgba(160, 100, 255, 0.42);
}

.toggle-switch--vortex input:checked + .toggle-slider {
  background: rgba(100, 60, 200, 0.22);
  border-color: rgba(150, 100, 255, 0.45);
}

.toggle-switch--vortex input:checked + .toggle-slider::before {
  transform: translateX(0.9rem) translateY(-50%);
  background: rgba(180, 130, 255, 0.9);
}

/* ─── General button styles ──────────────────────────────────────────────── */

#download-btn:disabled,
#fullscreen-btn:disabled {
  opacity: 0.35;
  cursor: default;
}


/* ─── Canvas layers ──────────────────────────────────────────────────────── */

#clock-canvas {
  display: block;
  position: relative;
  z-index: 1;
}

#vortex-canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#zodiac-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ─── Noon tooltip ───────────────────────────────────────────────────────── */

#noon-tooltip {
  display: none;
  position: fixed;
  padding: 0.35rem 0.7rem;
  background: rgba(18, 16, 32, 0.92);
  border: 1px solid rgba(255, 235, 180, 0.22);
  border-radius: 5px;
  font-size: 0.78rem;
  color: rgba(255, 235, 180, 0.88);
  font-family: Georgia, serif;
  pointer-events: none;
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ─── Time override input ────────────────────────────────────────────────── */

#time-override-input {
  background: rgba(255, 235, 180, 0.05);
  border: 1px solid rgba(255, 235, 180, 0.15);
  color: rgba(255, 235, 180, 0.65);
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.72rem;
  color-scheme: dark;
  transition: border-color 0.2s, color 0.2s;
  flex: 1;
}

#time-override-input:focus {
  outline: none;
  border-color: rgba(255, 235, 180, 0.35);
}

#time-override-input.active {
  border-color: rgba(255, 175, 55, 0.65);
  color: rgba(255, 200, 80, 0.92);
}

#time-now-btn {
  background: rgba(255, 235, 180, 0.06);
  border: 1px solid rgba(255, 235, 180, 0.15);
  color: rgba(255, 235, 180, 0.5);
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.68rem;
  font-family: monospace;
  letter-spacing: 0.05em;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  white-space: nowrap;
}

#time-now-btn:hover {
  background: rgba(255, 235, 180, 0.1);
  border-color: rgba(255, 235, 180, 0.38);
  color: rgba(255, 235, 180, 0.82);
}

#time-now-btn.active {
  border-color: rgba(255, 175, 55, 0.55);
  color: rgba(255, 185, 60, 0.88);
}

/* ─── Band scale slider ──────────────────────────────────────────────────── */

#band-scale-input {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255, 235, 180, 0.18);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

#band-scale-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: rgba(255, 200, 80, 0.75);
  border: 1px solid rgba(255, 235, 180, 0.3);
  cursor: pointer;
  transition: background 0.15s;
}

#band-scale-input::-moz-range-thumb {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: rgba(255, 200, 80, 0.75);
  border: 1px solid rgba(255, 235, 180, 0.3);
  cursor: pointer;
}

#band-scale-input:hover::-webkit-slider-thumb {
  background: rgba(255, 215, 100, 0.95);
}

/* ─── Vortex params ──────────────────────────────────────────────────────── */

.vp-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  overflow: hidden;
}

.vp-label {
  font-size: 0.52rem;
  font-family: monospace;
  color: rgba(160, 100, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  width: 1.8rem;
  flex-shrink: 0;
  text-align: right;
}

.vp-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 0;
  height: 4px;
  background: rgba(160, 100, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.vp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: rgba(180, 130, 255, 0.8);
  border: 1px solid rgba(200, 160, 255, 0.4);
  cursor: pointer;
  transition: background 0.15s;
}

.vp-slider::-moz-range-thumb {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: rgba(180, 130, 255, 0.8);
  border: 1px solid rgba(200, 160, 255, 0.4);
  cursor: pointer;
}

.vp-slider:hover::-webkit-slider-thumb {
  background: rgba(200, 160, 255, 0.95);
}

.vp-value {
  font-size: 0.52rem;
  font-family: monospace;
  color: rgba(180, 130, 255, 0.7);
  width: 2rem;
  flex-shrink: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}

#vp-reset-btn {
  background: rgba(160, 100, 255, 0.08);
  border: 1px solid rgba(160, 100, 255, 0.2);
  color: rgba(160, 100, 255, 0.55);
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  font-family: Georgia, serif;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

#vp-reset-btn:hover {
  background: rgba(160, 100, 255, 0.15);
  border-color: rgba(180, 130, 255, 0.45);
  color: rgba(180, 130, 255, 0.9);
}

/* ─── Zodiac popup ───────────────────────────────────────────────────────── */

#zodiac-popup {
  position: fixed;
  z-index: 200;
  background: rgba(7, 5, 20, 0.96);
  border: 1px solid rgba(130, 160, 255, 0.30);
  border-radius: 8px;
  padding: 0.85rem 1.1rem 0.9rem;
  max-width: 21rem;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.72), 0 0 40px rgba(70, 90, 200, 0.10);
  pointer-events: none;
  font-family: Georgia, 'Times New Roman', serif;
}

#zodiac-popup.hidden { display: none; }

#zodiac-popup-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px solid rgba(130, 160, 255, 0.14);
  padding-bottom: 0.45rem;
}

#zodiac-popup-symbol {
  font-size: 1.65rem;
  line-height: 1;
  opacity: 0.92;
}

#zodiac-popup-name {
  font-size: 0.68rem;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(160, 185, 255, 0.65);
}

#zodiac-popup-text {
  font-size: 0.83rem;
  color: rgba(215, 205, 185, 0.92);
  font-style: italic;
  line-height: 1.50;
}


/* ─── Animal popup ───────────────────────────────────────────────────────── */

#animal-popup {
  position: fixed;
  z-index: 200;
  background: rgba(7, 5, 20, 0.96);
  border: 1px solid rgba(255, 200, 120, 0.30);
  border-radius: 8px;
  padding: 0.85rem 1.1rem 0.9rem;
  max-width: 21rem;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.72), 0 0 40px rgba(200, 150, 70, 0.10);
  pointer-events: none;
  font-family: Georgia, 'Times New Roman', serif;
}

#animal-popup.hidden { display: none; }

#animal-popup-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 200, 120, 0.14);
  padding-bottom: 0.45rem;
}

#animal-popup-symbol {
  font-size: 1.65rem;
  line-height: 1;
  opacity: 0.92;
}

#animal-popup-name {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 210, 140, 0.75);
}

#animal-popup-text {
  font-size: 0.83rem;
  color: rgba(215, 205, 185, 0.92);
  font-style: italic;
  line-height: 1.50;
}

#animal-popup-arise-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 200, 120, 0.14);
}

.animal-popup-arise-label {
  font-size: 0.72rem;
  color: rgba(255, 210, 140, 0.75);
  font-style: normal;
  letter-spacing: 0.04em;
}

/* ─── Arise alarm panel ──────────────────────────────────────────────────── */

#arise-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 300;
  background: rgba(12, 10, 25, 0.98);
  border: 2px solid rgba(255, 200, 100, 0.35);
  border-radius: 16px;
  padding: 2rem 2.5rem;
  min-width: 320px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.8), 0 0 80px rgba(255, 180, 80, 0.15);
  font-family: Georgia, 'Times New Roman', serif;
  text-align: center;
}

#arise-panel.hidden { display: none; }

#arise-heading {
  font-size: 1.35rem;
  color: rgba(255, 220, 140, 0.95);
  font-weight: normal;
  margin: 0 0 1.2rem 0;
  letter-spacing: 0.04em;
}

#arise-times {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: rgba(200, 190, 170, 0.85);
}

#arise-natural-time {
  color: rgba(255, 240, 160, 0.9);
}

#arise-people-time {
  color: rgba(180, 210, 255, 0.8);
  font-family: monospace;
  font-size: 0.95rem;
}

#arise-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

#arise-snooze-btn,
#arise-cancel-btn {
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-family: Georgia, serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

#arise-snooze-btn {
  background: rgba(255, 200, 100, 0.15);
  border: 1px solid rgba(255, 200, 100, 0.4);
  color: rgba(255, 220, 140, 0.9);
}

#arise-snooze-btn:hover {
  background: rgba(255, 200, 100, 0.25);
  border-color: rgba(255, 200, 100, 0.6);
}

#arise-cancel-btn {
  background: rgba(100, 100, 120, 0.15);
  border: 1px solid rgba(150, 150, 170, 0.3);
  color: rgba(180, 180, 200, 0.8);
}

#arise-cancel-btn:hover {
  background: rgba(100, 100, 120, 0.25);
  border-color: rgba(150, 150, 170, 0.5);
}

/* ─── Arise alarm menu controls ──────────────────────────────────────────── */

.arise-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.arise-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

#arise-time-input {
  background: rgba(255, 200, 100, 0.08);
  border: 1px solid rgba(255, 200, 100, 0.2);
  color: rgba(255, 220, 140, 0.9);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85rem;
  color-scheme: dark;
}

#arise-time-input:focus {
  outline: none;
  border-color: rgba(255, 200, 100, 0.45);
}

.arise-note {
  font-size: 0.55rem;
  color: rgba(255, 200, 100, 0.45);
  font-style: italic;
}

.arise-sunrise-label {
  font-size: 0.75rem;
  color: rgba(255, 200, 100, 0.7);
}

.arise-sunrise-time {
  font-family: monospace;
  font-size: 0.85rem;
  color: rgba(255, 220, 140, 0.9);
  background: rgba(255, 200, 100, 0.08);
  border: 1px solid rgba(255, 200, 100, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.arise-row--actions {
  margin-top: 0.2rem;
}

.arise-test-btn {
  background: rgba(255, 200, 100, 0.12);
  border: 1px solid rgba(255, 200, 100, 0.3);
  color: rgba(255, 220, 140, 0.85);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.arise-test-btn:hover {
  background: rgba(255, 200, 100, 0.2);
  border-color: rgba(255, 200, 100, 0.5);
}

.toggle-switch--arise .toggle-slider {
  background: rgba(255, 200, 100, 0.08);
  border-color: rgba(255, 200, 100, 0.18);
}

.toggle-switch--arise .toggle-slider::before {
  background: rgba(255, 200, 100, 0.42);
}

.toggle-switch--arise input:checked + .toggle-slider {
  background: rgba(200, 150, 60, 0.22);
  border-color: rgba(255, 200, 100, 0.45);
}

.toggle-switch--arise input:checked + .toggle-slider::before {
  transform: translateX(0.9rem) translateY(-50%);
  background: rgba(255, 210, 120, 0.9);
}

/* ─── Mobile ─────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  #menu-panel {
    width: 100vw;
    max-width: 100vw;
  }

  #menu-btn {
    width: 2.6rem;
    height: 2.6rem;
    font-size: 1.2rem;
    bottom: 0.8rem;
    right: 0.8rem;
  }

  .menu-card {
    padding: 0.45rem 0.55rem;
  }

  .menu-card.compact {
    padding: 0.35rem 0.45rem;
  }

  .menu-row {
    flex-wrap: wrap;
  }

  .menu-toggle-row {
    flex-direction: column;
  }

  .info-value {
    font-size: 0.92rem;
  }

  .info-value.natural {
    font-size: 1.05rem;
  }

  .toggle-switch {
    width: 1.65rem;
    height: 0.92rem;
  }

  .toggle-slider::before {
    width: 0.60rem;
    height: 0.60rem;
    left: 0.14rem;
  }

  .toggle-switch input:checked + .toggle-slider::before,
  .toggle-switch--chill input:checked + .toggle-slider::before,
  .toggle-switch--vortex input:checked + .toggle-slider::before {
    transform: translateX(0.77rem) translateY(-50%);
  }

  #coord-input {
    flex: 2;
  }

  .vortex-params-grid {
    grid-template-columns: 1fr;
  }

  .vortex-params-grid #vp-reset-btn {
    grid-column: span 1;
  }
}
