/* Deep Time — Sphere R3, Wave 2.
 *
 * Styles for the Deep Time view only: the door under the day-zoom
 * panel and the sheet that opens in front of the Sphere with the
 * year travel controls, the rings of the historical onion, the
 * standing year, one day in full, and the Alignment Plane. The
 * instrument's own stylesheets (living-time-sphere.css and
 * living-time-sphere-app.css, R1.7) are untouched. The sheet's light
 * follows the keeper's Spark a little — a tint on its edge, set
 * from the Spark's kind by sphere-deep-time.js (data-tint).
 */

/* ── The door ──────────────────────────────────────────────────── */

.deep-time-door {
  margin: 14px auto 4px;
  max-width: 720px;
  padding: 14px 16px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(16, 22, 38, 0.92), rgba(8, 11, 20, 0.94));
  text-align: center;
}

.deep-time-door-button {
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #0a0e18;
  background: linear-gradient(180deg, #e8c96a, #c9a437);
  border: 0;
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
}

.deep-time-door-line {
  margin: 9px 0 0;
  font-size: 0.92rem;
  color: rgba(226, 236, 255, 0.78);
}

/* ── The view ──────────────────────────────────────────────────── */

.deep-time {
  position: fixed;
  inset: 0;
  z-index: 1200;
  overflow-y: auto;
  background: rgba(2, 4, 9, 0.55);
  backdrop-filter: blur(2px);
  padding: 18px 12px 40px;
}

.deep-time[hidden] {
  display: none;
}

html.deep-time-open {
  overflow: hidden;
}

.deep-time-sheet {
  --dt-tint: rgba(212, 175, 55, 0.55);
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid var(--dt-tint);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(14, 19, 33, 0.98), rgba(6, 9, 16, 0.99));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 44px -12px var(--dt-tint);
  padding: 22px 20px 26px;
  color: #e7edf9;
}

.deep-time-sheet[data-tint="fire"] { --dt-tint: rgba(255, 122, 61, 0.55); }
.deep-time-sheet[data-tint="water"] { --dt-tint: rgba(84, 168, 255, 0.55); }
.deep-time-sheet[data-tint="shadow"] { --dt-tint: rgba(150, 120, 255, 0.5); }
.deep-time-sheet[data-tint="air"] { --dt-tint: rgba(160, 225, 255, 0.55); }
.deep-time-sheet[data-tint="earth"] { --dt-tint: rgba(140, 200, 120, 0.5); }
.deep-time-sheet[data-tint="light"] { --dt-tint: rgba(255, 236, 170, 0.6); }

.deep-time-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 201, 106, 0.9);
}

#deep-time-title {
  margin: 6px 0 2px;
  font-size: 1.45rem;
  line-height: 1.25;
}

.deep-time-explain {
  margin: 6px 0 10px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(200, 214, 240, 0.72);
}

.deep-time-line {
  margin: 6px 0;
  line-height: 1.55;
}

.deep-time-back,
.deep-time-btn {
  font: inherit;
  font-weight: 600;
  color: #e7edf9;
  background: rgba(24, 34, 58, 0.9);
  border: 1px solid rgba(160, 180, 220, 0.35);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  min-height: 44px;
}

.deep-time-back,
.deep-time-btn-home {
  color: #0a0e18;
  background: linear-gradient(180deg, #e8c96a, #c9a437);
  border: 0;
}

.deep-time-section {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(160, 180, 220, 0.16);
}

.deep-time-section-title {
  margin: 0 0 4px;
  font-size: 1.08rem;
}

.deep-time-standing {
  font-weight: 600;
  margin: 8px 0;
}

.deep-time-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

/* ── The rings ─────────────────────────────────────────────────── */

.deep-time-rings {
  display: block;
  width: min(420px, 100%);
  height: auto;
  margin: 6px auto;
}

.deep-time-ring-decade {
  fill: none;
  stroke: rgba(160, 180, 220, 0.28);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.deep-time-ring-decade.has-records {
  stroke: rgba(232, 201, 106, 0.55);
}

.deep-time-ring-year {
  fill: none;
  stroke: rgba(160, 180, 220, 0.35);
  stroke-width: 2;
  cursor: pointer;
}

.deep-time-ring-year.has-records {
  stroke: rgba(232, 201, 106, 0.85);
  stroke-width: 3;
}

.deep-time-ring-year.is-current {
  stroke: rgba(160, 230, 190, 0.9);
}

.deep-time-ring-year.is-standing {
  stroke-width: 4;
}

.deep-time-ring-year:focus-visible {
  outline: 2px solid rgba(232, 201, 106, 0.9);
  outline-offset: 2px;
}

/* ── The standing year ─────────────────────────────────────────── */

.deep-time-moon {
  padding: 8px 0;
  border-bottom: 1px solid rgba(160, 180, 220, 0.1);
}

.deep-time-moon-head {
  margin: 4px 0;
  font-weight: 600;
}

.deep-time-day-button {
  display: block;
  font: inherit;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  color: #e7edf9;
  background: rgba(20, 28, 48, 0.5);
  border: 1px solid rgba(160, 180, 220, 0.18);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 6px 0;
  cursor: pointer;
  min-height: 44px;
}

/* ── One day in full / the plane ───────────────────────────────── */

.deep-time-day-coordinate {
  font-weight: 600;
  margin: 8px 0 2px;
}

.deep-time-day-civil {
  margin: 0 0 8px;
  color: rgba(226, 236, 255, 0.75);
}

.deep-time-headline {
  font-weight: 600;
  margin: 8px 0 4px;
}

.deep-time-reading-label {
  margin: 12px 0 2px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 201, 106, 0.85);
}

.deep-time-entries {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.deep-time-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 8px 10px;
  border: 1px solid rgba(160, 180, 220, 0.18);
  border-radius: 10px;
  margin-bottom: 8px;
  background: rgba(20, 28, 48, 0.5);
}

.deep-time-entry-title {
  font-weight: 600;
}

.deep-time-entry-meta {
  color: rgba(200, 214, 240, 0.7);
}

.deep-time-plane-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}

.deep-time-plane-side-controls {
  display: grid;
  gap: 8px;
  align-content: start;
}

.deep-time-plane-side-label {
  margin: 0;
  font-weight: 600;
}

.deep-time-date-input {
  font: inherit;
  color: #e7edf9;
  background: rgba(10, 14, 24, 0.9);
  border: 1px solid rgba(160, 180, 220, 0.3);
  border-radius: 10px;
  padding: 9px 12px;
  min-height: 44px;
  color-scheme: dark;
}

.deep-time-plane-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.deep-time-plane-column {
  border: 1px solid rgba(160, 180, 220, 0.16);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(16, 22, 38, 0.5);
}

.deep-time-plane-lines {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(160, 180, 220, 0.16);
}

.deep-time-plane-lines-title {
  margin: 0 0 4px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .deep-time {
    padding: 0;
  }

  .deep-time-sheet {
    border-radius: 0;
    min-height: 100%;
  }

  .deep-time-plane-controls,
  .deep-time-plane-columns {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .deep-time {
    backdrop-filter: none;
  }
}
