/* ---------------------------------------------------------------------------
   Panels, the countdown ring gauges, and the two motif stages.
   --------------------------------------------------------------------------- */

/* Only ever visible when the module script did not run. */
.boot-notice {
  max-width: 1180px;
  margin: 0 auto 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--paper-2);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  font-size: 0.72rem;
  line-height: 1.85;
  color: var(--ink-2);
}
.boot-notice[hidden] { display: none; }
.boot-notice strong { display: block; color: var(--amber); margin-bottom: 0.35rem; font-weight: 700; }
.boot-notice code { color: var(--ink); }

.panel {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem 1.35rem;
  transition: background var(--slow), border-color var(--slow);
}

.panel-head { margin-bottom: 0.9rem; }

.panel-head h2 {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.panel-note {
  font-size: 0.68rem;
  font-weight: 300;
  color: var(--ink-2);
  margin-top: 0.3rem;
  line-height: 1.7;
}
.panel-note b { color: var(--amber); font-weight: 500; }

/* ---------- the hero: four countdown rings ---------- */
.hero { padding-bottom: 1.1rem; }

.gauges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding: 0.4rem 0.5rem 0;
}

.gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.gauge-name { font-size: 0.68rem; color: var(--ink-2); letter-spacing: 0.02em; }

.gauge-ring { position: relative; width: 100%; max-width: 176px; aspect-ratio: 1; }
.gauge-ring svg { display: block; width: 100%; height: 100%; }

.gauge-value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  text-align: center;
}
.gauge-value b {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.gauge-value span { font-size: 0.6rem; color: var(--ink-2); }

.gauge[data-scale='year']  .gauge-value b { color: var(--scale-year); }
.gauge[data-scale='month'] .gauge-value b { color: var(--scale-month); }
.gauge[data-scale='week']  .gauge-value b { color: var(--scale-week); }
.gauge[data-scale='day']   .gauge-value b { color: var(--scale-day); }

.gauge-meta {
  font-size: 0.62rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* Slow, so the rings drift rather than snap. */
.gauge-ring .arc { transition: stroke-dasharray var(--slow); }

.warmline {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--amber);
  text-align: center;
}

/* ---------- the two motif stages ---------- */
.stage {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}

.sky-stage { height: 320px; }
.moon-stage { height: 320px; }

.sky-stage > svg,
.moon-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Week = seven windows lit. Sits clear of nothing in particular here, so it
   simply rests near the bottom of each stage. */
.week-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 9px;
  align-items: flex-end;
}
.win {
  width: 8px;
  height: 11px;
  border-radius: 1.5px;
  transform-origin: bottom center;
  transition: background var(--slow), box-shadow var(--slow), transform var(--slow);
}
.week-row.on-dark .win.lit   { background: #FFD08A; box-shadow: 0 0 9px 1px rgba(255, 190, 110, 0.8); }
.week-row.on-dark .win.unlit { background: rgba(255, 255, 255, 0.17); }
.week-row.on-light .win.lit   { background: #C4791F; box-shadow: 0 0 6px 0 rgba(170, 105, 30, 0.38); }
.week-row.on-light .win.unlit { background: rgba(140, 112, 80, 0.2); }

.stage-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  font-size: 0.66rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* ---------- location, only when the sky is a guess ---------- */
.locate {
  margin-top: 0.8rem;
  font-size: 0.66rem;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.locate button { padding: 0.32rem 0.7rem; font-size: 0.64rem; }
.locate[hidden] { display: none; }

/* ---------- the line that travels with a shared image ---------- */
.page-foot {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
}
.page-foot a { color: var(--ink-2); text-decoration: none; }
.page-foot a:hover { color: var(--amber); }

/* Card hover lift is a desktop nicety only. */
@media (hover: hover) and (pointer: fine) {
  .panel { transition: background var(--slow), border-color var(--slow), transform 260ms ease; }
  .panel:hover { transform: translateY(-2px); }
}
