/* Visual polish pass: quiet celestial depth, a single warm-gold signal, and layered surfaces. */
html, body {
  background: #05081e;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(ellipse at 82% 2%, rgba(129, 98, 146, .22), transparent 34%),
    radial-gradient(ellipse at 12% 58%, rgba(89, 80, 138, .13), transparent 36%),
    linear-gradient(180deg, rgba(5, 8, 30, .48), rgba(5, 8, 30, .96) 78%);
}

body::after {
  opacity: .22;
  background-image:
    radial-gradient(circle at 13% 18%, rgba(230, 196, 139, .55) 0 1px, transparent 1.5px),
    radial-gradient(circle at 84% 29%, rgba(158, 139, 201, .42) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 76%, rgba(230, 196, 139, .3) 0 1px, transparent 1.5px);
  background-size: 173px 211px, 229px 257px, 307px 283px;
}

.ambient {
  z-index: -1;
  opacity: .16;
  mix-blend-mode: screen;
}

.app-shell {
  isolation: isolate;
}

.app-shell::before {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  left: 0;
  height: 340px;
  content: "";
  background: radial-gradient(ellipse at 68% 5%, rgba(230, 196, 139, .075), transparent 48%);
  pointer-events: none;
}

.topbar {
  border-bottom: 1px solid rgba(230, 196, 139, .08);
}

.rhythm-hero {
  position: relative;
  isolation: isolate;
  padding-top: 42px;
}

.rhythm-hero::after {
  position: absolute;
  z-index: -1;
  top: 24px;
  right: -18%;
  width: 76%;
  height: 190px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(ellipse, rgba(129, 98, 146, .16), transparent 68%);
  filter: blur(9px);
  pointer-events: none;
}

.today-reflection-entry,
.insight-card.is-primary,
.month-compass {
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px rgba(255, 255, 255, .09), 0 22px 58px rgba(0, 0, 0, .2);
}

.today-reflection-entry {
  background:
    radial-gradient(circle at 92% 0, rgba(230, 196, 139, .16), transparent 34%),
    linear-gradient(145deg, rgba(68, 51, 84, .88), rgba(25, 26, 55, .97));
}

.today-reflection-entry::before {
  position: absolute;
  top: 0;
  right: 16%;
  left: 16%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(230, 196, 139, .58), transparent);
  opacity: .8;
}

.today-reflection-entry > *,
.insight-card.is-primary > *,
.month-compass > * {
  position: relative;
  z-index: 1;
}

.insight-card.is-primary {
  background:
    radial-gradient(circle at 88% 0, rgba(230, 196, 139, .14), transparent 36%),
    linear-gradient(150deg, rgba(48, 43, 78, .92), rgba(20, 22, 47, .98));
}

.focus-card {
  box-shadow: inset 0 1px rgba(159, 180, 165, .12), 0 18px 45px rgba(0, 0, 0, .18);
}

.month-compass {
  background:
    radial-gradient(circle at 95% 0, rgba(230, 196, 139, .14), transparent 32%),
    linear-gradient(150deg, rgba(43, 38, 69, .94), rgba(20, 22, 47, .98));
}

.today-phase-switch {
  background: rgba(10, 12, 35, .58);
  box-shadow: inset 0 1px rgba(255, 255, 255, .07), 0 12px 28px rgba(0, 0, 0, .12);
}

.today-phase-indicator {
  background: linear-gradient(135deg, rgba(230, 196, 139, .2), rgba(158, 139, 201, .13));
  box-shadow: inset 0 1px rgba(255, 255, 255, .12), 0 6px 18px rgba(230, 196, 139, .08);
  will-change: transform;
}

#screen > .rhythm-hero,
#screen > .history-header,
#screen > .question-header,
#screen > .today-phase-switch,
#screen > .reflection-phase-switch,
#screen > .insight-card.is-primary,
#screen > .today-reflection-entry,
#screen > .month-compass,
#screen > .reflection-panel,
#screen .month-signal-map {
  will-change: transform, opacity;
}

.primary-button,
.secondary-button,
.feature-tile,
.nav-item,
.filter-chip {
  transition: transform .22s var(--ease-out), border-color .22s var(--ease-out), background .22s var(--ease-out), color .22s var(--ease-out);
}

.primary-button:active,
.secondary-button:active,
.feature-tile:active,
.nav-item:active,
.filter-chip:active {
  transform: translateY(1px) scale(.985);
}

.bottom-nav {
  background: rgba(16, 18, 43, .86);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 18px 58px rgba(0, 0, 0, .42);
}

.nav-item.is-active {
  box-shadow: inset 0 1px rgba(255, 255, 255, .09);
}

.month-signal {
  animation: none;
}

.month-signal i {
  box-shadow: 0 0 7px rgba(230, 196, 139, .28);
}

@media (prefers-reduced-motion: reduce) {
  .rhythm-hero::after,
  .today-reflection-entry::before {
    display: none;
  }
}

/* Landscape v1 visual layer. Runtime data and actions stay in app.js. */
html, body { background: var(--bg-base); color: var(--text); }
body::before, body::after, .app-shell::before { display: none; }
.icon-button, .profile-avatar-button { width: 44px; height: 44px; }
.landscape-hero { position: relative; isolation: isolate; width: calc(100% + 36px); min-height: min(100vw, 560px); margin: 0 -18px; overflow: hidden; background: linear-gradient(180deg, #DCEAEC 0%, #B9D1D5 48%, var(--bg-base) 100%); }
.landscape-hero--rhythm { min-height: min(50vw, 280px); background: linear-gradient(180deg, #182E4B 0%, #304E68 46%, var(--bg-base) 100%); }
.landscape-picture, .landscape-picture img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.landscape-picture { z-index: 0; }
.landscape-picture img { object-fit: cover; object-position: 50% 50%; }
.landscape-picture.is-failed { display: none; }
.landscape-hero::after { position: absolute; z-index: 1; right: 0; bottom: 0; left: 0; height: 34%; content: ""; background: linear-gradient(180deg, transparent, var(--bg-base)); pointer-events: none; }
.landscape-hero__copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 20px 20px 160px; }
.landscape-hero--rhythm .landscape-hero__copy { padding-bottom: 48px; }
.landscape-hero--today[data-landscape-phase="morning"] .landscape-hero__copy, .landscape-hero--today[data-landscape-phase="day"] .landscape-hero__copy { color: #15263B; background: linear-gradient(to bottom, rgba(220, 234, 234, .96), rgba(220, 234, 234, .88)); border-radius: 0 0 16px 16px; }
.landscape-hero--today[data-landscape-phase="evening"] .landscape-hero__copy, .landscape-hero--rhythm .landscape-hero__copy { color: var(--text); background: rgba(12, 23, 43, .86); border-radius: 0 0 16px 16px; }
.landscape-hero__copy .eyebrow { margin-bottom: 8px; }
.landscape-hero--today[data-landscape-phase="morning"] .eyebrow, .landscape-hero--today[data-landscape-phase="day"] .eyebrow { color: #536E7C; }
.landscape-hero__copy h1 { max-width: 100%; margin: 0 0 16px; font: 600 30px/1.15 system-ui, -apple-system, "Segoe UI", Arial, sans-serif; letter-spacing: -.02em; }
.landscape-hero__copy .lead { max-width: 34rem; margin: 0; color: inherit; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
.today-phase-switch { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; min-height: 44px; margin: 0; padding: 4px; border: 1px solid rgba(245, 242, 235, .18); border-radius: 16px; background: rgba(12, 23, 43, .9); box-shadow: none; }
.today-phase-switch button, .rhythm-period-switch button { min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: #B9C4D0; font: 600 13px/1.2 system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
.today-phase-switch button.is-active, .rhythm-period-switch button.is-active { color: #0C172B; }
.today-phase-indicator { top: 4px; bottom: 4px; border-radius: 12px; background: var(--accent-gold); box-shadow: none; }
.today-reflection-entry { margin: 0 0 24px; padding: 20px; border: 1px solid rgba(185, 196, 208, .14); border-radius: 22px; background: var(--surface); box-shadow: none; }
.today-reflection-entry::before { display: none; }
.today-reflection-entry h2 { margin: 0 0 8px; font: 600 22px/1.25 system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
.today-reflection-entry p { margin: 0 0 16px; color: var(--muted); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
.today-reflection-entry .primary-button { width: 100%; min-height: 48px; }
.today-reflection-entry .text-button { min-height: 44px; margin-top: 4px; }
.rhythm-period-switch { display: grid; grid-template-columns: repeat(2, 1fr); min-height: 52px; margin: 16px 0 24px; padding: 4px; border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--surface); }
.rhythm-period-switch button.is-active { background: var(--accent-gold); }
.insight-card, .focus-card, .focus-manager, .focus-choice, .month-compass, .period-compass, .period-reveal { border-color: var(--border-subtle); background: var(--surface); box-shadow: none; }
.bottom-nav { background: rgba(20, 36, 59, .96); box-shadow: 0 16px 55px rgba(0, 0, 0, .35); }
@media (prefers-reduced-motion: reduce) { .landscape-hero, .landscape-picture, .landscape-picture img { transition: none; } }
@media (max-width: 380px) { .landscape-hero__copy h1 { font-size: 28px; } }

/* Landscape v2: controls belong to the scene instead of masking it. */
.landscape-hero {
  min-height: clamp(430px, 116vw, 590px);
  border-radius: 0 0 30px 30px;
}

.landscape-hero--rhythm {
  min-height: clamp(280px, 60vw, 330px);
}

.landscape-hero--today {
  min-height: clamp(350px, 82vw, 430px);
}

.landscape-hero::after {
  height: 46%;
  background: linear-gradient(180deg, rgba(12, 23, 43, 0) 16%, rgba(12, 23, 43, .38) 100%);
}

.landscape-hero--today[data-landscape-phase="morning"]::after,
.landscape-hero--today[data-landscape-phase="day"]::after {
  background: linear-gradient(180deg, rgba(207, 226, 229, 0) 16%, rgba(19, 48, 66, .16) 100%);
}

.landscape-hero__copy {
  min-height: 100%;
  padding: 26px 24px 132px;
  text-shadow: 0 2px 15px rgba(7, 19, 34, .22);
}

.landscape-hero--rhythm .landscape-hero__copy {
  padding: 30px 24px 76px;
}

.landscape-hero--today[data-landscape-phase="morning"] .landscape-hero__copy,
.landscape-hero--today[data-landscape-phase="day"] .landscape-hero__copy,
.landscape-hero--today[data-landscape-phase="evening"] .landscape-hero__copy,
.landscape-hero--rhythm .landscape-hero__copy {
  background: transparent;
  border-radius: 0;
}

.landscape-hero__copy h1 {
  max-width: 15ch;
  margin-bottom: 22px;
  font-size: clamp(34px, 9vw, 46px);
  font-weight: 650;
}

.landscape-hero__copy .eyebrow {
  font-weight: 750;
  letter-spacing: .14em;
}

.landscape-hero--today[data-landscape-phase="morning"] .landscape-hero__copy,
.landscape-hero--today[data-landscape-phase="day"] .landscape-hero__copy {
  color: #102B43;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .68), 0 10px 30px rgba(255, 255, 255, .22);
}

.landscape-hero--today[data-landscape-phase="morning"] .eyebrow,
.landscape-hero--today[data-landscape-phase="day"] .eyebrow {
  color: rgba(28, 68, 91, .86);
}

.today-phase-switch {
  margin-top: 4px;
  padding: 4px;
  border: 0;
  border-radius: 17px;
  background: rgba(8, 24, 43, .16);
  box-shadow: 0 10px 32px rgba(8, 24, 43, .14);
  -webkit-backdrop-filter: blur(10px) saturate(125%);
  backdrop-filter: blur(10px) saturate(125%);
}

.today-phase-switch button,
.rhythm-period-switch button {
  color: rgba(245, 242, 235, .84);
  text-shadow: 0 1px 8px rgba(8, 24, 43, .36);
}

.landscape-hero--today[data-landscape-phase="morning"] .today-phase-switch,
.landscape-hero--today[data-landscape-phase="day"] .today-phase-switch {
  background: rgba(255, 255, 255, .16);
  box-shadow: 0 10px 32px rgba(28, 68, 91, .10);
}

.landscape-hero--today[data-landscape-phase="morning"] .today-phase-switch button,
.landscape-hero--today[data-landscape-phase="day"] .today-phase-switch button {
  color: rgba(16, 43, 67, .78);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}

.today-phase-indicator {
  background: rgba(235, 187, 99, .68);
  box-shadow: 0 8px 20px rgba(104, 66, 22, .15);
}

.today-phase-switch button.is-active,
.rhythm-period-switch button.is-active {
  color: #102337;
  text-shadow: none;
}

.today-reflection-entry {
  position: relative;
  z-index: 3;
  margin: -42px 0 28px;
  padding: 24px;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(26, 46, 70, .93), rgba(12, 23, 43, .88));
  box-shadow: 0 20px 42px rgba(4, 12, 23, .24);
  -webkit-backdrop-filter: blur(12px) saturate(110%);
  backdrop-filter: blur(12px) saturate(110%);
}

.landscape-hero--today .landscape-hero__copy {
  padding-bottom: 112px;
}

/* Rhythm keeps the result in the foreground; orientation and evidence stay quiet but discoverable. */
.reflection-period-picture {
  border-color: rgba(230, 196, 139, .13);
  background: linear-gradient(150deg, rgba(38, 34, 55, .7), rgba(20, 24, 43, .9));
  box-shadow: none;
}
.reflection-period-picture .reflection-astrology-frame {
  border-color: rgba(230, 196, 139, .3);
  background: rgba(230, 196, 139, .055);
}
.reflection-period-picture .reflection-astrology-frame strong {
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  font-weight: 650;
}
.period-picture-details summary { min-height: 40px; }
.month-compass { border-color: rgba(230, 196, 139, .14); }
.month-periods { gap: 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.month-period { padding: 14px 0; border-width: 0 0 1px; border-radius: 0; background: transparent; }
.month-period.is-current { padding-left: 12px; border-color: rgba(230, 196, 139, .48); border-left: 2px solid var(--gold); background: rgba(230, 196, 139, .045); }
.month-period:last-child { border-bottom: 0; }

/* Final hierarchy pass: readable labels and restrained secondary surfaces. */
.eyebrow {
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: none;
}
.reflection-period-picture > .reflection-compass-panel__heading > div > .eyebrow,
.month-compass .card-kicker,
.today-orientation-card .card-kicker {
  color: var(--gold);
}
.reflection-period-picture > .reflection-compass-panel__heading > div > .eyebrow {
  letter-spacing: .14em;
  text-transform: uppercase;
}
.reflection-compass-panel {
  border-color: rgba(230, 196, 139, .12);
  background: linear-gradient(145deg, rgba(38, 34, 55, .72), rgba(20, 24, 43, .88));
  box-shadow: none;
}
.today-compass-preview-card strong {
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-weight: 650;
}
.today-route-menu {
  border-color: rgba(230, 196, 139, .12);
  background: rgba(16, 25, 49, .38);
  box-shadow: none;
}
.today-route-menu__row { min-height: 64px; padding-top: 10px; padding-bottom: 10px; border-bottom-color: rgba(230, 196, 139, .08); }
.today-route-menu__icon { width: 30px; height: 30px; border-color: rgba(230, 196, 139, .15); color: var(--muted); }
.today-route-menu__arrow { color: var(--muted); }
.reflection-support-menu { border-color: rgba(230, 196, 139, .11); background: rgba(255, 255, 255, .018); }
.reflection-support-menu > button[aria-expanded="true"] { color: var(--text); background: rgba(230, 196, 139, .04); }
.reflection-support-menu__body { border-bottom-color: rgba(230, 196, 139, .08); }
.reflection-observation-card, .reflection-experiment-card { border-color: rgba(255, 255, 255, .09); }

.today-orientation-card--empty {
  display: grid;
  gap: 8px;
  padding: 15px 17px;
}

.today-orientation-card--empty p {
  margin: 0;
  color: var(--muted);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.today-orientation-card--empty .text-button {
  justify-self: start;
  min-height: 36px;
  padding: 4px 0;
  color: var(--muted);
}

.today-reflection-entry .primary-button {
  background: linear-gradient(135deg, #F0C878, #DFAE5D);
  box-shadow: 0 12px 28px rgba(6, 17, 31, .2);
}

.rhythm-period-switch {
  position: relative;
  z-index: 3;
  margin: -52px 0 28px;
  padding: 4px;
  border: 0;
  border-radius: 18px;
  background: rgba(10, 29, 51, .3);
  box-shadow: 0 14px 32px rgba(4, 12, 23, .22);
  -webkit-backdrop-filter: blur(12px) saturate(125%);
  backdrop-filter: blur(12px) saturate(125%);
}

.rhythm-period-switch button.is-active {
  background: rgba(240, 200, 120, .72);
  box-shadow: none;
}

@media (max-width: 380px) {
  .landscape-hero { min-height: 430px; }
  .landscape-hero__copy { padding-right: 20px; padding-left: 20px; }
  .landscape-hero__copy h1 { font-size: 32px; }
}

/* Period picture is one quiet reading surface, not a stack of nested cards. */
.reflection-period-picture { border: 1px solid var(--border-subtle); border-radius: 22px; background: var(--surface); box-shadow: none; }
.reflection-period-picture .reflection-astrology-frame { border: 0; border-radius: 0; background: transparent; }
