:root {
  color-scheme: dark;
  --bg: #11131a;
  --panel: #191d27;
  --panel-soft: #202635;
  --panel-warm: #24212a;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f6f0e7;
  --muted: #b8bdc9;
  --gold: #d9b56d;
  --cyan: #7bd4e8;
  --rose: #e89aa8;
  --mint: #b8d890;
  --ink: #0e1118;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 10%, rgba(217, 181, 109, 0.16), transparent 22rem),
    linear-gradient(135deg, rgba(123, 212, 232, 0.08), transparent 34%),
    linear-gradient(225deg, rgba(232, 154, 168, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(217, 181, 109, 0.06), transparent 42rem),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 80px),
    var(--bg);
  color: var(--text);
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px;
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 24px;
}

.workbench {
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  align-items: start;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 16px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-logo,
.site-nav {
  border: 1px solid var(--line);
  background: rgba(17, 19, 26, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 8px 14px 8px 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.logo-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #11131a;
}

.site-nav {
  display: flex;
  gap: 6px;
  border-radius: 999px;
  padding: 6px;
}

.site-nav a {
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--panel-soft);
  color: var(--text);
  outline: none;
}

.input-panel,
.result-panel,
.guide-card,
.quality-note {
  border: 1px solid var(--line);
  background: rgba(25, 29, 39, 0.9);
  backdrop-filter: blur(18px);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.input-panel {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 24px;
  z-index: 2;
}

.result-panel {
  position: relative;
  padding: 24px;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  z-index: 1;
}

.result-panel > *,
.chart-layout,
.summary {
  max-width: 100%;
  min-width: 0;
}

.guide-panel {
  position: static;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr) minmax(240px, 300px);
  gap: 14px;
  align-items: stretch;
  min-width: 0;
  z-index: 1;
}

.brand {
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.16;
  margin-bottom: 12px;
}

h2 {
  font-size: 24px;
  margin-bottom: 4px;
}

h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.intro,
#statusText,
.notice,
.section-head p {
  color: var(--muted);
  line-height: 1.65;
}

.mascot {
  position: relative;
  width: 118px;
  height: 142px;
  margin: 0 auto 18px;
}

.mascot-halo {
  position: absolute;
  top: 0;
  left: 32px;
  width: 54px;
  height: 18px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.mascot-head {
  position: absolute;
  top: 22px;
  left: 18px;
  width: 82px;
  height: 72px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 44% 44% 38% 38%;
  background: #f6f0e7;
  box-shadow: inset -14px -10px 0 rgba(217,181,109,0.34), 0 16px 34px rgba(0,0,0,0.16);
}

.mascot-eye {
  position: absolute;
  top: 29px;
  width: 8px;
  height: 12px;
  border-radius: 50%;
  background: #11131a;
}

.mascot-eye.left {
  left: 25px;
}

.mascot-eye.right {
  right: 25px;
}

.mascot-mouth {
  position: absolute;
  left: 35px;
  bottom: 18px;
  width: 14px;
  height: 7px;
  border-bottom: 2px solid #11131a;
  border-radius: 0 0 999px 999px;
}

.mascot-body {
  position: absolute;
  left: 31px;
  bottom: 0;
  width: 58px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px 18px 20px 20px;
  background: var(--panel-soft);
  border: 2px solid rgba(255,255,255,0.16);
}

.mascot-star {
  color: var(--gold);
  font-size: 26px;
  line-height: 1;
}

.guide-card {
  padding: 22px;
  text-align: center;
}

.oldie-card {
  overflow: hidden;
  padding: 0;
}

.oldie-portrait {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  object-position: center top;
  border-bottom: 1px solid var(--line);
}

.oldie-card .panel-kicker,
.oldie-card h2,
.oldie-card p {
  margin-left: 18px;
  margin-right: 18px;
}

.oldie-card .panel-kicker {
  margin-top: 18px;
}

.oldie-card p {
  margin-bottom: 18px;
}

.guide-card h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.guide-card p,
.quality-note p {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0;
}

.panel-kicker {
  color: var(--gold);
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.prompt-strip {
  display: grid;
  gap: 8px;
}

.prompt-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.prompt-strip a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(32, 38, 53, 0.72);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
  text-align: center;
  text-decoration: none;
}

.prompt-strip a:hover,
.prompt-strip a:focus-visible {
  border-color: var(--cyan);
  outline: none;
}

.quality-note {
  padding: 18px;
}

.quality-note strong {
  display: block;
  margin-bottom: 8px;
}

.zodiac-mini-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(25, 29, 39, 0.72);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
}

.zodiac-mini-strip img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  display: block;
  object-fit: cover;
}

.birth-form {
  display: grid;
  gap: 16px;
}

.relationship-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.form-divider {
  height: 1px;
  margin: 4px 0 8px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.7), transparent);
}

.mini-copy {
  color: #667085;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 0;
}

.plain-explain {
  border-left: 4px solid var(--gold);
  color: #4f5b70;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.65;
  margin: 12px 0 14px;
  padding-left: 14px;
}

.plain-explain.compact {
  font-size: 16px;
  margin: 8px 0 10px;
}

.hero-explain {
  background: rgba(255, 248, 232, 0.72);
  border-radius: 0 8px 8px 0;
  color: var(--night-deep);
  font-size: 19px;
  margin-top: 14px;
  padding-bottom: 10px;
  padding-top: 10px;
}

.mode-entry {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 22px 0;
}

.mode-card {
  border: 1px solid rgba(26, 54, 93, 0.18);
  border-radius: 8px;
  color: var(--night-deep);
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.96), rgba(245, 238, 220, 0.9)),
    var(--paper);
  box-shadow: 0 10px 0 rgba(120, 68, 15, 0.1);
}

.mode-card-primary {
  border-color: rgba(212, 175, 55, 0.65);
  background:
    linear-gradient(135deg, rgba(212, 175, 55, 0.2), transparent 46%),
    linear-gradient(180deg, rgba(255, 248, 232, 0.98), rgba(245, 238, 220, 0.92)),
    var(--paper);
}

.mode-card:hover,
.mode-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.mode-card span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mode-card strong {
  font-size: 22px;
  line-height: 1.25;
}

.mode-card small {
  color: #5f6674;
  font-size: 14px;
  line-height: 1.55;
}

.relationship-grid {
  display: grid;
  gap: 14px;
}

fieldset {
  border: 1px solid rgba(26, 54, 93, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.34);
}

legend {
  color: var(--night-deep);
  font-weight: 900;
  padding: 0 8px;
}

.relationship-panel {
  border-top: 1px solid rgba(26, 54, 93, 0.14);
  margin-top: 28px;
  padding-top: 24px;
}

.relationship-panel .section-head {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.relationship-panel .section-head .secondary {
  justify-self: start;
  margin-top: 4px;
}

.relationship-wheels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.relationship-wheels article {
  border: 1px solid rgba(26, 54, 93, 0.16);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.36);
}

.relationship-wheels h4 {
  color: var(--night-deep);
  font-size: 15px;
  margin: 0 0 10px;
}

.relationship-wheels canvas {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  border: 2px solid rgba(26, 54, 93, 0.22);
  border-radius: 8px;
  background: #0e1118;
}

.synastry-wheel-card {
  border: 1px solid rgba(26, 54, 93, 0.16);
  border-radius: 8px;
  margin: 0 0 18px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(26, 54, 93, 0.08), rgba(212, 175, 55, 0.08)),
    rgba(255, 255, 255, 0.38);
  box-shadow: 0 16px 28px rgba(26, 54, 93, 0.08);
}

.synastry-wheel-card canvas {
  width: min(100%, 680px);
  aspect-ratio: 1;
  display: block;
  margin: 0 auto;
  border: 2px solid rgba(26, 54, 93, 0.22);
  border-radius: 8px;
  background: #0e1118;
}

.connection-map {
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 8px;
  margin: 0 0 18px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(245, 238, 220, 0.48)),
    rgba(255, 255, 255, 0.42);
  box-shadow: 0 16px 28px rgba(26, 54, 93, 0.08);
  overflow: hidden;
}

.connection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.connection-head h4 {
  color: var(--night-deep);
  font-size: 16px;
  margin: 0;
}

.connection-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #5f6674;
  font-size: 13px;
}

.connection-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.connection-legend i {
  width: 28px;
  height: 3px;
  border-radius: 999px;
  display: inline-block;
}

.line-flow {
  background: var(--gold);
}

.line-friction {
  background: #c95d4a;
}

.line-neutral {
  background: #9aa3ad;
}

.line-person-a {
  background: #d4af37;
}

.line-person-b {
  background: #7bd4e8;
}

#connectionSvg {
  width: 100%;
  min-height: 250px;
  display: block;
}

.relationship-copy {
  border: 1px solid rgba(26, 54, 93, 0.16);
  border-radius: 8px;
  margin-top: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.4);
}

.city-helper {
  display: grid;
  gap: 10px;
  margin-top: -4px;
}

.city-helper span {
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
}

.city-helper span.is-working {
  color: var(--brown);
}

.city-helper span.is-ok {
  color: #3f6844;
}

.city-helper span.is-error {
  color: #9c4635;
}

.city-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.city-chips button {
  min-height: 34px;
  border: 1px solid rgba(212, 175, 55, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--night-deep);
  font-size: 12px;
  font-weight: 900;
  padding: 0 12px;
  box-shadow: 0 4px 0 rgba(120, 68, 15, 0.1);
}

.city-chips button::before,
.city-chips button::after {
  content: none;
}

.city-chips button:hover,
.city-chips button:focus-visible {
  border-color: var(--gold);
  background: rgba(245, 238, 220, 0.95);
  transform: translateY(-1px);
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  background: rgba(14, 17, 24, 0.86);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

textarea {
  min-height: 108px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(123, 212, 232, 0.12);
}

.grid {
  display: grid;
  gap: 12px;
}

.two {
  grid-template-columns: 1fr 1fr;
}

.three {
  grid-template-columns: 1fr 1fr 1.35fr;
}

.actions,
.result-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.result-head {
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.download-actions {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
}

.download-format {
  background: rgba(255, 248, 232, 0.74);
  border: 1px solid rgba(212, 175, 55, 0.34);
  border-radius: 999px;
  display: flex;
  gap: 6px;
  padding: 5px;
}

.download-format label {
  align-items: center;
  border-radius: 999px;
  color: #46536c;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 5px;
  line-height: 1.2;
  padding: 7px 9px;
  white-space: nowrap;
}

.download-format label:has(input:checked) {
  background: #10254a;
  color: #fff7dc;
}

.download-format input {
  accent-color: var(--gold);
  margin: 0;
}

.download-actions small {
  color: #697386;
  font-size: 12px;
  font-weight: 700;
  max-width: 260px;
  text-align: right;
}

.oldie-progress {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(26, 54, 93, 0.08), rgba(212, 175, 55, 0.12)),
    rgba(255, 248, 232, 0.86);
  border: 1px solid rgba(212, 175, 55, 0.42);
  border-radius: 8px;
  box-shadow: 0 10px 0 rgba(120, 68, 15, 0.1);
  display: grid;
  gap: 14px;
  grid-template-columns: 112px minmax(0, 1fr);
  margin: -2px 0 20px;
  padding: 12px 16px;
}

.oldie-progress[hidden] {
  display: none;
}

.oldie-progress.is-complete {
  border-color: rgba(119, 144, 122, 0.58);
  background:
    linear-gradient(135deg, rgba(119, 144, 122, 0.15), rgba(212, 175, 55, 0.12)),
    rgba(255, 248, 232, 0.9);
}

.oldie-progress-video {
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(26, 54, 93, 0.12);
  border-radius: 8px;
  display: block;
  height: auto;
  object-fit: contain;
  width: 100%;
}

.oldie-progress span {
  color: var(--gold);
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.oldie-progress strong {
  color: var(--night-deep);
  display: block;
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 6px;
}

.oldie-progress p {
  color: #566177;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  margin: 0;
}

.turnstile-panel {
  align-items: center;
  background: rgba(255, 248, 232, 0.94);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: -2px 0 20px;
  padding: 16px;
}

.turnstile-panel[hidden] {
  display: none;
}

.turnstile-panel strong {
  color: var(--night-deep);
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}

.turnstile-panel p {
  color: #566177;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.turnstile-widget {
  min-height: 65px;
  min-width: 300px;
}

.next-steps {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(212, 175, 55, 0.16), rgba(26, 54, 93, 0.08)),
    rgba(255, 248, 232, 0.72);
  border: 1px solid rgba(212, 175, 55, 0.42);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -2px 0 20px;
  padding: 14px;
}

.next-steps[hidden] {
  display: none;
}

.next-steps span {
  color: var(--night-deep);
  font-weight: 900;
  margin-right: 4px;
}

.next-steps button {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(26, 54, 93, 0.16);
  box-shadow: 0 4px 0 rgba(120, 68, 15, 0.1);
  color: var(--night-deep);
  min-height: 38px;
}

.next-steps button:hover,
.next-steps button:focus-visible {
  border-color: var(--gold);
  transform: translateY(-1px);
}

button {
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  padding: 0 16px;
  cursor: pointer;
  color: #12141a;
  font-weight: 700;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary {
  background: linear-gradient(135deg, var(--gold), #f1c16e);
}

.secondary {
  border: 1px solid var(--line);
  background: rgba(32, 38, 53, 0.88);
  color: var(--text);
}

.chart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

#chartCanvas {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.summary {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.big-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.big-three div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px;
  background: rgba(32, 38, 53, 0.8);
  min-width: 0;
}

.big-three span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.big-three strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.interpretation {
  color: var(--text);
  line-height: 1.75;
  max-width: 100%;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.transit-panel {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(212, 175, 55, 0.08), rgba(26, 54, 93, 0.08)),
    rgba(255, 255, 255, 0.04);
}

.transit-panel .section-head {
  margin-bottom: 14px;
}

.transit-copy {
  color: var(--muted);
}

.transit-overview,
.transit-afterword {
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-wrap;
}

.transit-month-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.transit-month-card {
  border: 1px solid rgba(26, 54, 93, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.82);
  overflow: hidden;
  box-shadow: 0 8px 0 rgba(120, 68, 15, 0.1);
}

.transit-month-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  color: var(--night-deep);
  cursor: pointer;
  list-style: none;
  background: rgba(255, 255, 255, 0.72);
}

.transit-month-card summary::-webkit-details-marker {
  display: none;
}

.transit-month-card summary span {
  font-weight: 800;
  color: var(--gold);
}

.transit-month-card summary small {
  color: #5d6780;
  font-size: 12px;
}

.transit-month-card[open] summary {
  border-bottom: 1px solid rgba(26, 54, 93, 0.14);
  background: var(--night-deep);
}

.transit-month-card[open] summary span,
.transit-month-card[open] summary small {
  color: var(--gold);
}

.transit-month-body {
  padding: 18px;
  color: #27324a;
  line-height: 1.75;
  white-space: pre-wrap;
  background: rgba(255, 248, 232, 0.96);
}

.tables {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  margin-top: 24px;
}

table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
}

th {
  color: var(--gold);
  font-size: 13px;
  background: var(--panel-soft);
}

td {
  color: var(--muted);
  font-size: 14px;
}

.notice {
  margin: 22px 0 0;
  font-size: 13px;
}

.content-band {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 26px 28px 36px;
}

.oldie-section {
  position: relative;
  z-index: 1;
  padding-top: 0;
}

.oldie-section .guide-panel {
  position: static !important;
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr) minmax(240px, 300px);
  gap: 14px;
  width: 100%;
  max-width: none;
  align-items: stretch;
}

.section-head {
  max-width: 760px;
  margin-bottom: 18px;
}

.split-head {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 14px;
  text-decoration: none;
}

.section-link:hover,
.section-link:focus-visible {
  border-color: var(--gold);
  outline: none;
}

.eyebrow {
  color: var(--gold);
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.comic-grid,
.article-grid,
.faq-list,
.zodiac-grid {
  display: grid;
  gap: 14px;
}

.comic-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.comic-hero-card {
  border: 2px solid rgba(26, 54, 93, 0.22);
  border-radius: 8px;
  margin: 0 0 20px;
  overflow: hidden;
  background: var(--night-deep);
  box-shadow:
    0 18px 0 rgba(120, 68, 15, 0.14),
    0 28px 70px rgba(26, 54, 93, 0.18);
}

.comic-hero-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.zodiac-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.zodiac-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(25, 29, 39, 0.86);
  overflow: hidden;
}

.zodiac-card img {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
}

.zodiac-card span {
  display: block;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  padding: 10px;
  text-align: center;
}

.comic-panel,
.article-card,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(25, 29, 39, 0.86);
  backdrop-filter: blur(14px);
}

.comic-panel {
  position: relative;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.comic-panel::after {
  content: none;
}

.comic-panel img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.comic-panel-copy {
  position: relative;
  min-height: 178px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.98), rgba(245, 238, 220, 0.96)),
    var(--paper);
  border-top: 1px solid rgba(26, 54, 93, 0.14);
}

.panel-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #11131a;
  font-weight: 900;
  margin-bottom: 18px;
}

.comic-panel h3,
.article-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.comic-panel p,
.article-card p,
.faq-list p {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0;
}

.article-grid {
  grid-template-columns: 1.35fr 1fr 1fr;
}

.article-card {
  padding: 20px;
}

.featured-article {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  background:
    linear-gradient(135deg, rgba(217, 181, 109, 0.18), transparent 42%),
    linear-gradient(225deg, rgba(123, 212, 232, 0.12), transparent 52%),
    rgba(25, 29, 39, 0.9);
}

.featured-article h3 {
  font-size: 26px;
  max-width: 420px;
}

.article-card span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}

.article-card a {
  display: inline-flex;
  margin-top: 18px;
  color: var(--gold);
  font-weight: 800;
  text-decoration: none;
}

.blog-preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-preview-grid .article-card,
.blog-preview-grid .featured-article {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.98), rgba(245, 238, 220, 0.96)),
    var(--paper);
}

.blog-preview-grid .article-card span {
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-preview-grid .article-card h3,
.blog-preview-grid .featured-article h3 {
  color: var(--night-deep);
  font-size: 22px;
  line-height: 1.35;
  margin: 14px 0 14px;
  max-width: none;
}

.blog-preview-grid .article-card p {
  color: #5f6674;
  font-size: 16px;
  line-height: 1.75;
}

.blog-preview-grid .article-card a {
  margin-top: auto;
}

.coming-soon-grid .coming-soon-card {
  min-height: 210px;
}

.coming-soon-card {
  position: relative;
}

.coming-soon-card::after {
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.42);
  border-radius: 999px;
  color: var(--night-deep);
  content: "COMING SOON";
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  position: absolute;
  right: 18px;
  top: 18px;
}

.faq-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.faq-list details {
  padding: 18px 20px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 800;
}

.site-footer {
  color: #5f6674;
  font-size: 14px;
  font-weight: 800;
  margin: 0 auto;
  max-width: var(--container);
  padding: 10px 24px 38px;
  text-align: center;
}

.site-footer p {
  background: rgba(255, 248, 232, 0.72);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 999px;
  display: inline-block;
  margin: 0;
  padding: 10px 18px;
}

.faq-list summary::marker {
  color: var(--gold);
}

.faq-list p {
  margin-top: 12px;
}

.search-keywords {
  color: #5f6674;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
  margin-top: 8px;
}

@media (max-width: 1380px) {
  .workbench {
    grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  }

  .guide-panel {
    position: static;
    grid-column: 1 / -1;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    align-items: stretch;
  }

  .guide-card,
  .quality-note {
    box-shadow: none;
  }

  .prompt-strip {
    align-content: center;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prompt-strip span {
    grid-column: 1 / -1;
  }

  .zodiac-mini-strip {
    grid-column: 1 / -1;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .shell,
  .workbench,
  .chart-layout,
  .tables,
  .comic-grid,
  .article-grid,
  .faq-list {
    grid-template-columns: 1fr;
  }

  .zodiac-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .input-panel {
    position: static;
  }

  .guide-panel {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: stretch;
    flex-direction: column;
  }

  .site-nav {
    overflow-x: auto;
  }

  .split-head {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 10px 14px 0;
  }

  .shell {
    padding: 14px;
  }

  .input-panel,
  .result-panel {
    padding: 18px;
  }

  .two,
  .three,
  .big-three {
    grid-template-columns: 1fr;
  }

  .actions,
  .result-head {
    align-items: stretch;
    flex-direction: column;
  }

  .mascot-callout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .prompt-strip {
    grid-template-columns: 1fr;
  }

  .zodiac-grid,
  .zodiac-mini-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-band {
    padding: 18px 14px 28px;
  }

  button {
    width: 100%;
  }

  .tables > div {
    min-width: 0;
  }

  .result-data-table {
    display: block;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .result-data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .result-data-table tbody {
    display: grid;
    gap: 10px;
  }

  .result-data-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(26, 54, 93, 0.16);
    border-radius: 8px;
    background: rgba(255, 248, 232, 0.9);
    box-shadow: 0 4px 0 rgba(120, 68, 15, 0.08);
  }

  .result-data-table td {
    display: block;
    min-width: 0;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(26, 54, 93, 0.1);
    color: #354158;
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .result-data-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: #8a6b17;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
  }

  .result-data-table td:nth-child(odd) {
    border-right: 1px solid rgba(26, 54, 93, 0.1);
  }

  .result-data-table td:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .aspect-table tr {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  }

  .aspect-table td:first-child {
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 0;
  }

  .aspect-table td:nth-child(2) {
    border-right: 0;
  }

  .relationship-table tr {
    grid-template-columns: 1fr;
  }

  .relationship-table td,
  .relationship-table td:nth-child(odd),
  .relationship-table td:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid rgba(26, 54, 93, 0.1);
  }

  .relationship-table td:last-child {
    border-bottom: 0;
  }
}

/* Final layout guard: Oldie must never overlap the report text. */
.shell.workbench {
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr) !important;
}

.shell.workbench > .guide-panel {
  position: static !important;
  grid-column: 1 / -1 !important;
  grid-row: auto !important;
  width: 100% !important;
  max-width: none !important;
  z-index: 1 !important;
}

.shell.workbench > .result-panel {
  min-width: 0 !important;
  overflow: visible !important;
  z-index: 2 !important;
}

@media (max-width: 980px) {
  .shell.workbench {
    grid-template-columns: 1fr !important;
  }
}

/* Oldie is a separate content band, not a sidebar. */
.oldie-section {
  padding-top: 0 !important;
}

.oldie-section .guide-panel {
  position: static !important;
  display: grid !important;
  grid-template-columns: minmax(360px, 1.3fr) minmax(220px, 0.7fr) minmax(240px, 0.8fr) !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: none !important;
  align-items: stretch !important;
}

.oldie-section .oldie-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  align-items: center;
  min-height: 210px;
  text-align: left;
}

.oldie-section .oldie-portrait {
  grid-row: 1 / 4;
  width: 180px;
  height: 100%;
  min-height: 210px;
  aspect-ratio: auto;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.oldie-section .oldie-card .panel-kicker,
.oldie-section .oldie-card h2,
.oldie-section .oldie-card p {
  grid-column: 2;
  margin-left: 20px;
  margin-right: 20px;
}

.oldie-section .oldie-card .panel-kicker {
  margin-top: 0;
}

.oldie-section .oldie-card p {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .oldie-section .guide-panel {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  .oldie-section .oldie-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .oldie-section .oldie-portrait {
    grid-row: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .oldie-section .oldie-card .panel-kicker,
  .oldie-section .oldie-card h2,
  .oldie-section .oldie-card p {
    grid-column: auto;
    margin-left: 18px;
    margin-right: 18px;
  }

  .oldie-section .oldie-card .panel-kicker {
    margin-top: 18px;
  }

  .oldie-section .oldie-card p {
    margin-bottom: 18px;
  }
}

/* AstroLease visual refresh: deep night blue, flowing gold, parchment contract panels. */
:root {
  --bg: #10284a;
  --night: #1a365d;
  --night-deep: #0f2240;
  --paper: #f5eedc;
  --paper-soft: #fff8e8;
  --gold: #d4af37;
  --gold-light: #f3d78a;
  --seal: #1f3760;
  --sage: #77907a;
  --lavender: #a090a9;
  --coral: #e9967a;
  --brown: #78440f;
  --ink: #15213a;
  --muted: #667085;
  --line: rgba(26, 54, 93, 0.18);
  --line-strong: rgba(26, 54, 93, 0.34);
  --text: #15213a;
}

body {
  background:
    linear-gradient(180deg, rgba(16, 40, 74, 0.98) 0 270px, rgba(245, 238, 220, 0.98) 270px 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 94px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 94px);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 92px 0 auto;
  height: 84px;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(174deg, transparent 0 33%, rgba(212, 175, 55, 0.9) 34% 39%, transparent 40%),
    linear-gradient(178deg, transparent 0 45%, rgba(243, 215, 138, 0.74) 46% 49%, transparent 50%);
}

.site-header,
.shell,
.content-band {
  position: relative;
  z-index: 1;
}

.site-header {
  margin-top: 10px;
  padding: 10px 18px;
  border: 2px solid rgba(243, 215, 138, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 18%, rgba(243, 215, 138, 0.18), transparent 16rem),
    radial-gradient(circle at 42% 45%, rgba(255, 255, 255, 0.08), transparent 10rem),
    linear-gradient(180deg, rgba(32, 78, 126, 0.82), rgba(16, 40, 74, 0.98)),
    var(--night);
  box-shadow:
    0 16px 0 rgba(120, 68, 15, 0.12),
    0 22px 70px rgba(4, 14, 30, 0.3);
}

.site-logo {
  min-height: 48px;
  padding: 0;
  color: var(--gold-light);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.brand-emblem {
  width: 68px;
  height: 68px;
  display: block;
  border: 2px solid rgba(243, 215, 138, 0.5);
  border-radius: 20px;
  object-fit: cover;
  object-position: center;
  box-shadow:
    0 0 0 4px rgba(16, 40, 74, 0.64),
    0 0 24px rgba(243, 215, 138, 0.32);
}

.logo-copy {
  display: grid;
  gap: 1px;
  line-height: 1.05;
}

.logo-copy strong {
  color: var(--gold-light);
  font-size: 26px;
  letter-spacing: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
}

.logo-copy small {
  color: rgba(245, 238, 220, 0.7);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  flex: 1 1 auto;
  justify-content: center;
  gap: 18px;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.site-nav a {
  position: relative;
  color: rgba(245, 238, 220, 0.82);
  font-size: 19px;
  padding: 12px 8px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: transparent;
  color: var(--gold-light);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.nav-cta {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(120, 68, 15, 0.42);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(135deg, #f4dc94, var(--gold) 62%, #b77e1e);
  color: var(--brown);
  flex: 0 0 auto;
  font-size: 17px;
  font-weight: 900;
  padding: 0 28px;
  text-decoration: none;
  box-shadow:
    inset 0 0 0 2px rgba(255, 248, 232, 0.34),
    0 7px 0 rgba(120, 68, 15, 0.2);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  color: #10284a;
  outline: none;
  transform: translateY(-1px);
}

.hero-wrap {
  width: min(1480px, 100%);
  margin: 24px auto 0;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

.hero-banner {
  display: block;
  border: 2px solid rgba(243, 215, 138, 0.42);
  border-radius: 8px;
  background: var(--night-deep);
  box-shadow:
    0 18px 0 rgba(120, 68, 15, 0.16),
    0 30px 80px rgba(4, 14, 30, 0.34);
  overflow: hidden;
  text-decoration: none;
}

.hero-banner:focus-visible {
  outline: 4px solid rgba(212, 175, 55, 0.35);
  outline-offset: 4px;
}

.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.shell {
  max-width: 1480px;
  padding-top: 34px;
  gap: 28px;
}

.shell.workbench {
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr) !important;
}

.input-panel,
.result-panel,
.guide-card,
.quality-note,
.comic-panel,
.article-card,
.faq-list details,
.zodiac-card {
  border: 2px solid rgba(26, 54, 93, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.96), rgba(245, 238, 220, 0.94)),
    var(--paper);
  color: var(--ink);
  box-shadow:
    0 18px 0 rgba(120, 68, 15, 0.14),
    0 28px 70px rgba(26, 54, 93, 0.18);
}

.input-panel,
.result-panel {
  padding: 28px;
}

.input-panel {
  top: 96px;
}

.input-panel::before,
.result-panel::before,
.guide-card::before,
.quality-note::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(212, 175, 55, 0.46);
  border-radius: 8px;
}

.input-panel,
.result-panel,
.guide-card,
.quality-note {
  position: relative;
  overflow: visible;
}

.input-panel,
.guide-card,
.quality-note {
  overflow: hidden;
}

.brand,
.panel-kicker,
.eyebrow {
  color: var(--gold);
  letter-spacing: 0.14em;
}

h1,
h2,
h3 {
  color: var(--night-deep);
}

h1 {
  font-size: 42px;
  letter-spacing: 0;
}

h2 {
  font-size: 30px;
}

.intro,
#statusText,
.notice,
.section-head p,
.guide-card p,
.quality-note p,
.comic-panel p,
.article-card p,
.faq-list p,
label {
  color: #4f5e73;
}

label {
  font-weight: 800;
}

input,
textarea {
  border: 2px solid rgba(26, 54, 93, 0.18);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

input:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.18);
}

.primary,
.secondary,
.section-link,
.prompt-strip a {
  border-radius: 999px;
  min-height: 48px;
  box-shadow: 0 8px 0 rgba(120, 68, 15, 0.16);
}

.primary {
  border: 2px solid rgba(245, 238, 220, 0.74);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 42%),
    linear-gradient(135deg, #18396c, #10284a 52%, #244f83);
  color: var(--paper-soft);
}

.secondary,
.section-link,
.prompt-strip a {
  border: 2px solid rgba(26, 54, 93, 0.22);
  background: rgba(255, 255, 255, 0.72);
  color: var(--night-deep);
}

.secondary:hover,
.secondary:focus-visible,
.section-link:hover,
.section-link:focus-visible,
.prompt-strip a:hover,
.prompt-strip a:focus-visible {
  border-color: var(--gold);
  color: #10284a;
}

.result-head {
  border-bottom: 2px solid rgba(26, 54, 93, 0.12);
}

.chart-layout {
  grid-template-columns: minmax(360px, 0.95fr) minmax(300px, 1fr);
  gap: 26px;
}

#chartCanvas {
  border: 3px solid rgba(26, 54, 93, 0.3);
  background: #0c1424;
  box-shadow:
    0 0 0 6px rgba(212, 175, 55, 0.12),
    inset 0 0 0 1px rgba(245, 238, 220, 0.06);
}

.big-three div {
  border: 2px solid rgba(26, 54, 93, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(245, 238, 220, 0.8));
  box-shadow: inset 0 -3px 0 rgba(212, 175, 55, 0.22);
}

.big-three span,
td {
  color: #5d6878;
}

.big-three strong,
.interpretation {
  color: var(--ink);
}

th {
  background: var(--night);
  color: var(--gold-light);
}

table {
  border: 1px solid rgba(26, 54, 93, 0.14);
}

td,
th {
  border-bottom-color: rgba(26, 54, 93, 0.14);
}

.content-band {
  max-width: 1480px;
}

.oldie-section {
  margin-top: 12px;
  padding-bottom: 18px;
}

.oldie-section .guide-panel {
  grid-template-columns: minmax(420px, 1.25fr) minmax(260px, 0.75fr) minmax(280px, 0.8fr) !important;
}

.oldie-section .oldie-card {
  min-height: 240px;
  background:
    linear-gradient(90deg, rgba(26, 54, 93, 0.96) 0 230px, rgba(255, 248, 232, 0.98) 230px 100%);
  color: var(--paper);
}

.oldie-section .oldie-card h2 {
  color: var(--night-deep);
}

.oldie-section .oldie-card p {
  color: #59657a;
}

.oldie-section .oldie-portrait {
  width: 220px;
  min-height: 240px;
  background: var(--paper);
  border-right: 2px solid rgba(212, 175, 55, 0.4);
  object-fit: cover;
  object-position: center top;
}

.prompt-strip {
  align-content: center;
}

.prompt-strip span {
  color: var(--night-deep);
}

.quality-note {
  background:
    linear-gradient(180deg, rgba(26, 54, 93, 0.96), rgba(16, 40, 74, 0.98));
  color: var(--paper);
}

.quality-note strong {
  color: var(--gold-light);
}

.quality-note p {
  color: rgba(245, 238, 220, 0.84);
}

.zodiac-mini-strip {
  border: 2px solid rgba(26, 54, 93, 0.18);
  background: rgba(255, 248, 232, 0.74);
}

.zodiac-card {
  background: var(--paper-soft);
}

.zodiac-card img {
  background: linear-gradient(180deg, #dce9ed, #f5eedc);
}

.story-band .comic-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.story-band .comic-hero-card,
.story-band .comic-panel {
  border: 2px solid rgba(26, 54, 93, 0.24);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
  box-shadow:
    0 18px 0 rgba(120, 68, 15, 0.14),
    0 28px 70px rgba(26, 54, 93, 0.18);
}

.story-band .comic-panel {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.story-band .comic-panel::after {
  content: none;
}

.story-band .comic-panel img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
}

.story-band .comic-panel-copy {
  flex: 1;
  min-height: 178px;
  padding: 18px;
  border-top: 1px solid rgba(26, 54, 93, 0.14);
}

.story-band .panel-number {
  margin-bottom: 18px;
}

@media (max-width: 980px) {
  .story-band .comic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .story-band .comic-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .mode-entry {
    grid-template-columns: 1fr;
  }

  .result-head {
    align-items: stretch;
    flex-direction: column;
  }

  .download-actions {
    align-items: stretch;
    width: 100%;
  }

  .download-format {
    border-radius: 8px;
    flex-direction: column;
  }

  .download-actions small {
    max-width: none;
    text-align: left;
  }

  .oldie-progress {
    grid-template-columns: 84px minmax(0, 1fr);
    padding: 10px 12px;
  }

  .oldie-progress strong {
    font-size: 17px;
  }

  .oldie-progress p {
    font-size: 13px;
  }

  .turnstile-panel {
    grid-template-columns: 1fr;
  }

  .turnstile-widget {
    min-width: 0;
    overflow: hidden;
    width: 100%;
  }

  .next-steps {
    align-items: stretch;
    flex-direction: column;
  }

  .next-steps button {
    width: 100%;
  }
}

.zodiac-card span {
  border-top: 2px solid rgba(26, 54, 93, 0.12);
  color: var(--night-deep);
}

.comic-panel,
.article-card,
.faq-list details {
  box-shadow: 0 12px 0 rgba(120, 68, 15, 0.1);
}

.panel-number {
  background: var(--gold);
  color: var(--night-deep);
}

.featured-article {
  background:
    linear-gradient(135deg, rgba(26, 54, 93, 0.96), rgba(16, 40, 74, 0.92)),
    var(--night);
}

.featured-article h3,
.featured-article p {
  color: var(--paper);
}

.article-card span,
.article-card a {
  color: var(--gold);
}

@media (max-width: 1180px) {
  .chart-layout {
    grid-template-columns: 1fr;
  }

  .oldie-section .guide-panel {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 980px) {
  .shell.workbench {
    grid-template-columns: 1fr !important;
  }

  .relationship-wheels {
    grid-template-columns: 1fr;
  }

  .connection-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #connectionSvg {
    min-height: 220px;
  }

  .site-nav a {
    white-space: nowrap;
  }

  .input-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  body::before {
    top: 132px;
  }

  .hero-wrap {
    margin-top: 14px;
    padding: 0 14px;
  }

  .site-logo {
    width: fit-content;
  }

  .logo-copy strong {
    font-size: 17px;
  }

  h1 {
    font-size: 34px;
  }

  .input-panel,
  .result-panel {
    padding: 20px;
  }

  .oldie-section .oldie-card {
    background: var(--paper-soft);
  }

  .oldie-section .oldie-portrait {
    width: 100%;
    min-height: 0;
    border-right: 0;
  }
}

/* Overlap fix: the contract form must scroll normally so Oldie cannot slide under it. */
.input-panel {
  position: relative !important;
  top: auto !important;
  z-index: 1 !important;
}

.oldie-section {
  clear: both;
  margin-top: 44px !important;
  position: relative;
  z-index: 1;
}

.oldie-section .guide-panel,
.oldie-section .guide-card,
.oldie-section .quality-note {
  z-index: 1;
}

/* Final Oldie card cleanup: keep the agent card readable and remove the duplicate mini zodiac strip. */
.oldie-section .zodiac-mini-strip {
  display: none !important;
}

.oldie-section .oldie-card {
  display: grid !important;
  grid-template-columns: clamp(180px, 26vw, 300px) minmax(0, 1fr) !important;
  column-gap: clamp(24px, 4vw, 56px) !important;
  align-items: center !important;
  min-height: 260px !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: rgba(255, 248, 232, 0.96) !important;
}

.oldie-section .oldie-card::before,
.oldie-section .oldie-card::after {
  content: none !important;
}

.oldie-section .oldie-portrait {
  grid-row: 1 / 4 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 260px !important;
  object-fit: cover !important;
  object-position: center top !important;
  border-right: 4px solid var(--night-deep) !important;
  border-bottom: 0 !important;
  background: var(--paper) !important;
}

.oldie-section .oldie-card .panel-kicker,
.oldie-section .oldie-card h2,
.oldie-section .oldie-card p {
  grid-column: 2 !important;
  position: relative !important;
  z-index: 2 !important;
  margin-left: 0 !important;
  margin-right: clamp(22px, 4vw, 56px) !important;
  max-width: 620px !important;
}

.oldie-section .oldie-card .panel-kicker {
  align-self: end !important;
  margin-top: 0 !important;
  margin-bottom: 10px !important;
}

.oldie-section .oldie-card h2 {
  align-self: center !important;
  margin-top: 0 !important;
  margin-bottom: 18px !important;
}

.oldie-section .oldie-card p {
  align-self: start !important;
  color: #4f5b70 !important;
  margin-bottom: 0 !important;
}

@media (max-width: 720px) {
  .oldie-section .oldie-card {
    grid-template-columns: 1fr !important;
    text-align: center !important;
  }

  .oldie-section .oldie-portrait {
    grid-row: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 10 !important;
    border-right: 0 !important;
    border-bottom: 4px solid var(--night-deep) !important;
  }

  .oldie-section .oldie-card .panel-kicker,
  .oldie-section .oldie-card h2,
  .oldie-section .oldie-card p {
    grid-column: 1 !important;
    margin-left: 22px !important;
    margin-right: 22px !important;
  }
}

/* CTA design system: real responsive buttons inspired by the AstroLease reference. */
button,
.nav-cta,
.section-link,
.prompt-strip a {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 999px;
  min-height: 50px;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    background-color 160ms ease;
}

button::before,
.nav-cta::before,
.section-link::before,
.prompt-strip a::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  border: 1px solid rgba(243, 215, 138, 0.58);
  border-radius: inherit;
  pointer-events: none;
}

button::after,
.nav-cta::after,
.section-link::after,
.prompt-strip a::after {
  content: "";
  position: absolute;
  inset: -35% -18%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 50%, rgba(255, 255, 255, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 62% 38%, rgba(243, 215, 138, 0.9) 0 1px, transparent 2px),
    linear-gradient(110deg, transparent 18%, rgba(243, 215, 138, 0.55) 46%, transparent 70%);
  opacity: 0;
  transform: translateX(-32%);
  transition: opacity 180ms ease, transform 260ms ease;
}

.primary,
.nav-cta {
  border: 2px solid rgba(243, 215, 138, 0.82);
  background:
    radial-gradient(circle at 12% 38%, rgba(245, 238, 220, 0.18) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 30%, rgba(243, 215, 138, 0.2) 0 2px, transparent 3px),
    linear-gradient(180deg, rgba(63, 102, 153, 0.78), rgba(16, 40, 74, 0.98) 56%, rgba(10, 25, 50, 1)),
    var(--night);
  color: var(--paper-soft);
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.34);
  box-shadow:
    0 0 0 3px rgba(26, 54, 93, 0.78),
    0 0 26px rgba(212, 175, 55, 0.26),
    0 9px 0 rgba(120, 68, 15, 0.18);
}

.primary {
  min-width: 190px;
  padding-inline: 28px;
}

.primary:hover,
.primary:focus-visible,
.nav-cta:hover,
.nav-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 3px rgba(26, 54, 93, 0.86),
    0 0 34px rgba(212, 175, 55, 0.42),
    0 11px 0 rgba(120, 68, 15, 0.18);
}

.primary:hover::after,
.primary:focus-visible::after,
.nav-cta:hover::after,
.nav-cta:focus-visible::after {
  opacity: 1;
  transform: translateX(24%);
}

.primary:active,
.nav-cta:active {
  transform: translateY(3px);
  box-shadow:
    0 0 0 3px rgba(26, 54, 93, 0.72),
    0 0 18px rgba(212, 175, 55, 0.26),
    0 4px 0 rgba(120, 68, 15, 0.2);
}

.secondary,
.section-link,
.prompt-strip a {
  border: 2px solid rgba(212, 175, 55, 0.74);
  background:
    radial-gradient(circle at 16% 42%, rgba(255, 255, 255, 0.55) 0 1px, transparent 2px),
    linear-gradient(180deg, rgba(87, 128, 174, 0.36), rgba(255, 255, 255, 0.7)),
    rgba(245, 238, 220, 0.9);
  color: var(--night-deep);
  font-weight: 900;
  box-shadow:
    0 0 0 2px rgba(26, 54, 93, 0.14),
    0 7px 0 rgba(120, 68, 15, 0.13);
}

.secondary:hover,
.secondary:focus-visible,
.section-link:hover,
.section-link:focus-visible,
.prompt-strip a:hover,
.prompt-strip a:focus-visible {
  border-color: var(--gold);
  color: var(--night-deep);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 2px rgba(26, 54, 93, 0.16),
    0 0 22px rgba(212, 175, 55, 0.2),
    0 8px 0 rgba(120, 68, 15, 0.13);
}

.secondary:hover::after,
.secondary:focus-visible::after,
.section-link:hover::after,
.section-link:focus-visible::after,
.prompt-strip a:hover::after,
.prompt-strip a:focus-visible::after {
  opacity: 0.6;
  transform: translateX(20%);
}

.secondary:active,
.section-link:active,
.prompt-strip a:active {
  transform: translateY(2px);
  box-shadow:
    0 0 0 2px rgba(26, 54, 93, 0.12),
    0 3px 0 rgba(120, 68, 15, 0.14);
}

button:disabled,
button:disabled:hover,
button:disabled:focus-visible {
  border-color: rgba(120, 120, 120, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(120, 120, 120, 0.28)),
    #8d8d8d;
  color: rgba(255, 255, 255, 0.62);
  opacity: 1;
  text-shadow: none;
  transform: none;
  box-shadow:
    0 0 0 2px rgba(80, 80, 80, 0.18),
    0 5px 0 rgba(80, 80, 80, 0.16);
}

button:disabled::after {
  opacity: 0;
}

.actions .primary::before {
  content: "★";
  display: grid;
  place-items: center;
  z-index: 1;
  inset: auto auto auto 15px;
  top: 50%;
  width: 28px;
  height: 28px;
  border: 0;
  color: var(--gold-light);
  font-size: 15px;
  transform: translateY(-50%);
  text-shadow: 0 0 12px rgba(243, 215, 138, 0.7);
}

.actions .primary {
  padding-left: 52px;
}

.prompt-strip a {
  min-height: 46px;
}

/* Zodiac character files */
.zodiac-card {
  appearance: none;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
  transform: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.zodiac-card::before,
.zodiac-card::after {
  content: none;
}

.zodiac-card:hover,
.zodiac-card:focus-visible {
  border-color: var(--gold);
  box-shadow:
    0 0 0 3px rgba(212, 175, 55, 0.2),
    0 14px 0 rgba(120, 68, 15, 0.13),
    0 24px 52px rgba(26, 54, 93, 0.2);
  outline: none;
  transform: translateY(-4px);
}

.zodiac-card:active {
  box-shadow:
    0 0 0 2px rgba(212, 175, 55, 0.2),
    0 6px 0 rgba(120, 68, 15, 0.13);
  transform: translateY(1px);
}

.zodiac-dialog {
  background: var(--paper);
  border: 2px solid var(--night);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(4, 13, 31, 0.5);
  color: var(--ink);
  margin: auto;
  max-height: min(90vh, 820px);
  max-width: min(1040px, calc(100vw - 40px));
  overflow: auto;
  overflow-x: hidden;
  padding: 0;
  width: 100%;
}

.zodiac-dialog::backdrop {
  background: rgba(5, 14, 32, 0.78);
  backdrop-filter: blur(5px);
}

.zodiac-dialog-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  min-height: 600px;
}

.zodiac-dialog-visual {
  background: var(--night-deep);
  border-right: 2px solid rgba(212, 175, 55, 0.5);
  margin: 0;
  min-height: 0;
  overflow: hidden;
}

.zodiac-dialog-visual img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.zodiac-dialog-copy {
  padding: 48px 52px 36px;
}

.zodiac-dialog-copy h3 {
  color: var(--night-deep);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  margin: 0 52px 14px 0;
}

.zodiac-personality {
  color: var(--muted-ink);
  font-size: 18px;
  line-height: 1.75;
  margin: 0 0 18px;
}

.zodiac-dialog-copy section {
  border-top: 1px solid rgba(26, 54, 93, 0.16);
  padding: 16px 0 4px;
}

.zodiac-dialog-copy h4 {
  color: var(--night-deep);
  font-size: 17px;
  margin: 0 0 8px;
}

.zodiac-dialog-copy ul {
  color: var(--muted-ink);
  display: grid;
  gap: 5px;
  line-height: 1.6;
  margin: 0;
  padding-left: 1.25em;
}

.zodiac-rental-direction p {
  color: var(--night-deep);
  font-weight: 750;
  line-height: 1.65;
  margin: 0;
}

.zodiac-dialog-note {
  color: var(--muted-ink);
  font-size: 13px;
  line-height: 1.55;
  margin: 18px 0 0;
}

.zodiac-dialog-close {
  align-items: center;
  appearance: none;
  background: var(--night-deep);
  border: 2px solid var(--gold);
  border-radius: 50%;
  box-shadow: none;
  color: var(--gold-light);
  cursor: pointer;
  display: flex;
  font: 700 28px/1 Arial, sans-serif;
  height: 44px;
  justify-content: center;
  padding: 0 0 3px;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 44px;
  z-index: 2;
}

.zodiac-dialog-close::before,
.zodiac-dialog-close::after {
  content: none;
}

.zodiac-dialog-close:hover,
.zodiac-dialog-close:focus-visible {
  background: #244976;
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22);
  outline: none;
  transform: none;
}

.coming-soon-card a {
  color: var(--gold-dark);
  display: inline-block;
  font-weight: 850;
  margin-top: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.coming-soon-card.available-card::after {
  background: rgba(121, 144, 122, 0.16);
  border-color: rgba(121, 144, 122, 0.58);
  content: "NOW OPEN";
}

@media (max-width: 760px) {
  .zodiac-dialog {
    max-height: calc(100vh - 20px);
    max-width: none;
    width: calc(100vw - 20px);
  }

  .zodiac-dialog-layout {
    display: block;
    min-height: 0;
  }

  .zodiac-dialog-visual {
    aspect-ratio: 1;
    border-bottom: 2px solid rgba(212, 175, 55, 0.5);
    border-right: 0;
    height: auto;
  }

  .zodiac-dialog-visual img {
    height: auto;
    object-fit: contain;
    object-position: center;
  }

  .zodiac-dialog-copy {
    padding: 30px 24px 28px;
  }

  .zodiac-dialog-copy h3 {
    font-size: 32px;
    margin-right: 0;
  }

  .zodiac-dialog-close {
    right: 12px;
    top: 12px;
  }
}

.daily-card-panel {
  margin-top: 28px;
  padding: 30px 0 24px;
  border-top: 2px solid rgba(26, 54, 93, 0.14);
  border-bottom: 2px solid rgba(26, 54, 93, 0.14);
}

.daily-card-panel .section-head {
  max-width: 820px;
  margin-bottom: 22px;
  padding-left: 18px;
  border-left: 4px solid var(--gold);
}

.daily-card-panel .section-head h3 {
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1.25;
}

.daily-card-panel .section-head p {
  margin-bottom: 0;
}

.daily-card-layout {
  display: grid;
  grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
  align-items: start;
  border: 2px solid rgba(26, 54, 93, 0.24);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 248, 232, 0.82);
  box-shadow: 0 16px 0 rgba(120, 68, 15, 0.1);
}

.daily-oldie {
  align-self: stretch;
  margin: 0;
  background: var(--night-deep);
  border-right: 2px solid rgba(212, 175, 55, 0.55);
}

.daily-oldie img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
}

.daily-card-content {
  display: grid;
  gap: 24px;
  min-width: 0;
  padding: 0 26px 26px;
}

.daily-card-content h4,
.daily-history h4 {
  margin: 0 0 10px;
  color: var(--night-deep);
  font-size: 18px;
  line-height: 1.35;
}

.daily-sky-summary {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(140px, 0.9fr) minmax(220px, 1.6fr);
  margin: 0 -26px;
  background: var(--night-deep);
  color: var(--paper-soft);
}

.daily-sky-summary div {
  min-width: 0;
  padding: 18px 20px;
  border-left: 1px solid rgba(243, 215, 138, 0.24);
}

.daily-sky-summary div:first-child {
  border-left: 0;
}

.daily-sky-summary span,
.daily-guidance-grid span,
.daily-action-row span,
.daily-history-item div > span {
  display: block;
  margin-bottom: 6px;
  color: #9a7523;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.4;
}

.daily-sky-summary span {
  color: var(--gold-light);
}

.daily-sky-summary strong {
  display: block;
  color: var(--paper-soft);
  font-size: 17px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.daily-aspect-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(26, 54, 93, 0.14);
}

.daily-aspect-list li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(26, 54, 93, 0.14);
  color: var(--night-deep);
}

.daily-aspect-list strong {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.daily-aspect-list small {
  color: #667189;
  white-space: nowrap;
}

.daily-aspect-tone {
  display: inline-flex;
  justify-content: center;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 900;
}

.daily-aspect-tone.is-flow {
  background: rgba(121, 144, 122, 0.2);
  color: #3f6545;
}

.daily-aspect-tone.is-friction {
  background: rgba(233, 150, 122, 0.2);
  color: #954a35;
}

.daily-aspect-tone.is-focus {
  background: rgba(212, 175, 55, 0.2);
  color: #805e0d;
}

.daily-guidance-grid,
.daily-action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.daily-action-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid rgba(26, 54, 93, 0.16);
  border-bottom: 2px solid rgba(26, 54, 93, 0.16);
}

.daily-guidance-grid section,
.daily-action-row section {
  min-width: 0;
  padding: 4px 18px;
  border-left: 1px solid rgba(26, 54, 93, 0.16);
}

.daily-guidance-grid section:first-child,
.daily-action-row section:first-child {
  padding-left: 0;
  border-left: 0;
}

.daily-guidance-grid section:last-child,
.daily-action-row section:last-child {
  padding-right: 0;
}

.daily-action-row section {
  padding-top: 18px;
  padding-bottom: 18px;
}

.daily-action-row section:first-child {
  position: relative;
}

.daily-action-row section:first-child::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: -26px;
  width: 4px;
  background: var(--gold);
  content: "";
}

.daily-guidance-grid p,
.daily-action-row p {
  margin: 0;
  color: #4f5e73;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.daily-action-row p {
  color: var(--night-deep);
  font-size: 16px;
  font-weight: 800;
}

.daily-history {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(26, 54, 93, 0.16);
}

.daily-history-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.daily-history-head p,
.daily-history-empty {
  margin: 0;
  color: #667189;
  font-size: 13px;
  line-height: 1.6;
}

.daily-history-head .secondary {
  flex: 0 0 auto;
  min-height: 44px;
}

.daily-history-list {
  display: grid;
  gap: 8px;
}

.daily-history-item {
  border-bottom: 1px solid rgba(26, 54, 93, 0.16);
}

.daily-history-item summary {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 48px;
  padding: 12px 4px;
  color: var(--night-deep);
  cursor: pointer;
}

.daily-history-item summary:hover,
.daily-history-item summary:focus-visible {
  color: #806415;
  outline: none;
}

.daily-history-item summary:focus-visible {
  box-shadow: inset 0 0 0 2px var(--gold);
}

.daily-history-item summary span {
  color: #806415;
  font-size: 13px;
  font-weight: 850;
}

.daily-history-item summary strong {
  overflow-wrap: anywhere;
}

.daily-history-item > div {
  padding: 4px 4px 14px 164px;
}

.daily-history-item p {
  margin: 0 0 12px;
  color: #4f5e73;
  line-height: 1.65;
}

@media (max-width: 980px) {
  .daily-card-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .daily-sky-summary,
  .daily-guidance-grid {
    grid-template-columns: 1fr;
  }

  .daily-sky-summary div,
  .daily-sky-summary div:first-child {
    padding: 13px 20px;
    border-left: 0;
    border-top: 1px solid rgba(243, 215, 138, 0.2);
  }

  .daily-sky-summary div:first-child {
    border-top: 0;
  }

  .daily-guidance-grid section,
  .daily-guidance-grid section:first-child,
  .daily-guidance-grid section:last-child {
    padding: 14px 0;
    border-top: 1px solid rgba(26, 54, 93, 0.14);
    border-left: 0;
  }

  .daily-guidance-grid section:first-child {
    padding-top: 0;
    border-top: 0;
  }
}

@media (max-width: 640px) {
  .daily-card-panel {
    padding: 20px 0;
  }

  .daily-card-panel .section-head h3 {
    font-size: 24px;
  }

  .daily-card-layout {
    display: block;
  }

  .daily-oldie {
    border-right: 0;
    border-bottom: 2px solid rgba(212, 175, 55, 0.55);
  }

  .daily-oldie img {
    height: 240px;
    aspect-ratio: auto;
    object-position: center 30%;
  }

  .daily-card-content {
    gap: 22px;
    padding: 0 18px 20px;
  }

  .daily-sky-summary {
    margin: 0 -18px;
  }

  .daily-action-row {
    grid-template-columns: 1fr;
  }

  .daily-action-row section,
  .daily-action-row section:first-child,
  .daily-action-row section:last-child {
    padding: 16px 0;
    border-left: 0;
  }

  .daily-action-row section + section {
    border-top: 1px solid rgba(26, 54, 93, 0.14);
  }

  .daily-action-row section:first-child::before {
    top: 16px;
    bottom: 16px;
    left: -18px;
  }

  .daily-aspect-list li {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .daily-aspect-list small {
    grid-column: 2;
    white-space: normal;
  }

  .daily-history-head {
    align-items: stretch;
    flex-direction: column;
  }

  .daily-history-item summary {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .daily-history-item > div {
    padding: 4px 4px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .daily-card-panel *,
  .daily-card-panel *::before,
  .daily-card-panel *::after {
    scroll-behavior: auto;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* PWA install help stays in normal flow so it never covers tools or results. */
.pwa-install-guide {
  width: min(1384px, calc(100% - 56px));
  margin: 18px auto 0;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 2px solid rgba(212, 175, 55, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(100deg, rgba(26, 54, 93, 0.98), rgba(16, 40, 74, 0.94)),
    var(--night);
  color: var(--paper-soft);
  box-shadow: 0 10px 0 rgba(120, 68, 15, 0.13);
}

.pwa-install-guide[hidden] {
  display: none;
}

.pwa-install-copy {
  min-width: 0;
}

.pwa-install-copy h2 {
  margin: 4px 0 8px;
  color: var(--paper-soft);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
}

.pwa-install-copy p {
  max-width: 840px;
  margin: 0;
  color: rgba(245, 238, 220, 0.86);
  line-height: 1.7;
}

.pwa-install-guide .eyebrow {
  color: var(--gold-light);
}

.pwa-dismiss {
  flex: 0 0 auto;
  min-width: 132px;
}

@media (max-width: 720px) {
  .pwa-install-guide {
    width: calc(100% - 28px);
    margin-top: 14px;
    padding: 20px;
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .pwa-dismiss {
    width: 100%;
    min-height: 48px;
  }
}

/* Mobile header: keep the brand prominent and every destination directly tappable. */
@media (max-width: 640px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 12px;
    padding: 12px 14px 14px;
  }

  .site-logo {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    min-width: 0;
    gap: 10px;
  }

  .brand-emblem {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 16px;
  }

  .logo-copy {
    min-width: 0;
    gap: 2px;
  }

  .logo-copy strong {
    font-size: 22px;
    line-height: 1.08;
    white-space: nowrap;
  }

  .logo-copy small {
    font-size: 10px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .nav-cta {
    grid-column: 2;
    grid-row: 1;
    min-height: 44px;
    padding: 0 16px;
    font-size: 14px;
    white-space: nowrap;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid rgba(243, 215, 138, 0.24);
    overflow: visible;
  }

  .site-nav a {
    display: flex;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 9px 2px;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .site-header {
    padding-inline: 10px;
  }

  .brand-emblem {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .logo-copy strong {
    font-size: 20px;
  }

  .nav-cta {
    padding-inline: 12px;
    font-size: 13px;
  }

  .site-nav a {
    font-size: 12px;
  }
}

/* Mobile task navigation: fixed to the safe area without covering page content. */
.mobile-tab-bar {
  display: none;
}

@media (max-width: 640px), (max-width: 950px) and (max-height: 500px) {
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  #birthForm,
  #dailyCardPanel,
  #relationshipForm,
  #question,
  #faq {
    scroll-margin-top: 168px;
  }

  .mobile-tab-bar {
    position: fixed;
    z-index: 1000;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    min-height: 68px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(243, 215, 138, 0.42);
    background: rgba(18, 42, 77, 0.98);
    box-shadow: 0 -12px 28px rgba(8, 20, 39, 0.24);
  }

  .mobile-tab-link {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    padding: 4px 2px;
    border-radius: 6px;
    color: rgba(245, 238, 220, 0.76);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    touch-action: manipulation;
    transition: background-color 180ms ease, color 180ms ease;
  }

  .mobile-tab-link svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-tab-link:hover,
  .mobile-tab-link:focus-visible,
  .mobile-tab-link.is-active {
    background: rgba(243, 215, 138, 0.12);
    color: var(--gold-light);
  }

  .mobile-tab-link:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: -2px;
  }

  .mobile-tab-link.is-active::after {
    position: absolute;
    bottom: 1px;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--gold-light);
    content: "";
    transform: translateX(-50%);
  }
}

@media (min-width: 641px) and (max-width: 950px) and (max-height: 500px) {
  .site-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    flex-direction: initial;
    gap: 10px;
    padding: 8px 12px;
  }

  .site-logo {
    width: auto;
    min-width: 0;
    padding: 5px 10px 5px 5px;
  }

  .brand-emblem {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
  }

  .logo-copy strong {
    font-size: 17px;
    white-space: nowrap;
  }

  .logo-copy small {
    font-size: 9px;
    white-space: nowrap;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    min-width: 0;
    padding: 4px;
    overflow: visible;
  }

  .site-nav a {
    display: flex;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 6px 3px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
  }

  .nav-cta {
    min-height: 44px;
    padding-inline: 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  #birthForm,
  #dailyCardPanel,
  #relationshipForm,
  #question,
  #faq {
    scroll-margin-top: 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-tab-link {
    transition: none;
  }
}

/* Safe rich-text formatting for AI reports. */
.report-rich {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.report-rich *,
.interpretation * {
  max-width: 100%;
  min-width: 0;
}

.report-rich > :first-child {
  margin-top: 0;
}

.report-rich > :last-child {
  margin-bottom: 0;
}

.report-heading {
  margin: 24px 0 10px;
  color: var(--night-deep);
  font-size: 18px;
  line-height: 1.45;
}

.report-rich h5.report-heading {
  font-size: 16px;
}

.report-rich p {
  margin: 0 0 16px;
  color: inherit;
  line-height: 1.75;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.report-list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding-left: 1.4em;
}

.report-list li {
  padding-left: 2px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.report-rich strong {
  color: var(--night-deep);
  font-weight: 800;
}

/* Short-lived relationship invitations. */
.invite-landing,
.invite-create-panel {
  margin: 22px 0;
  padding: 22px 0;
  border-top: 1px solid rgba(190, 151, 74, 0.42);
  border-bottom: 1px solid rgba(190, 151, 74, 0.28);
}

.invite-landing[hidden],
.invite-create-panel[hidden],
.invite-ready-panel[hidden],
.button-link[hidden],
#relationshipInviteAnotherButton[hidden],
.birth-form[hidden],
.relationship-form[hidden],
.mode-entry[hidden],
.relationship-grid fieldset[hidden] {
  display: none !important;
}

.invite-landing h2,
.invite-create-panel h3 {
  margin: 6px 0 8px;
}

.invite-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  font-weight: 700;
}

.invite-consent input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.invite-ready-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed rgba(26, 54, 93, 0.22);
}

.invite-ready-panel > strong {
  display: block;
  color: var(--navy);
  font-size: 1.08rem;
}

.invite-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.button-link,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(26, 54, 93, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.text-button {
  color: #8a332b;
  border-color: rgba(138, 51, 43, 0.3);
}

.button-link:focus-visible,
.text-button:focus-visible {
  outline: 3px solid rgba(190, 151, 74, 0.45);
  outline-offset: 2px;
}

.invite-status {
  min-height: 1.6em;
  margin: 12px 0 0;
  color: var(--navy);
}

.invite-mode #app > .hero-explain,
.invite-mode #app > .intro,
.invite-mode .result-head,
.invite-mode .oldie-progress,
.invite-mode .next-steps,
.invite-mode .chart-layout,
.invite-mode .daily-card-panel,
.invite-mode .transit-panel,
.invite-mode .result-panel > .tables,
.invite-mode .result-panel > .notice {
  display: none !important;
}

.invite-mode .relationship-form {
  margin-top: 12px;
}

.invite-mode .result-panel {
  min-height: 0;
}

@media (max-width: 640px) {
  .invite-actions > * {
    width: 100%;
  }

  .invite-landing,
  .invite-create-panel {
    padding: 18px 0;
  }
}

.report-rich code {
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(26, 54, 93, 0.08);
  color: var(--night-deep);
  font: inherit;
}

.report-rich hr {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid rgba(26, 54, 93, 0.16);
}

.report-table-wrap {
  max-width: 100%;
  margin: 14px 0 22px;
  overflow-x: auto;
  border: 1px solid rgba(26, 54, 93, 0.16);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.82);
  -webkit-overflow-scrolling: touch;
}

.report-markdown-table {
  min-width: 560px;
  table-layout: auto;
  border: 0;
  border-radius: 0;
}

.report-markdown-table th,
.report-markdown-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
}

.report-markdown-table th {
  white-space: nowrap;
}

@media (max-width: 560px) {
  .report-heading {
    margin-top: 20px;
    font-size: 17px;
  }

  .report-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .report-markdown-table {
    display: block;
    min-width: 0;
    overflow: visible;
    background: transparent;
  }

  .report-markdown-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .report-markdown-table tbody {
    display: grid;
    gap: 10px;
  }

  .report-markdown-table tr {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(26, 54, 93, 0.16);
    border-radius: 8px;
    background: rgba(255, 248, 232, 0.92);
    box-shadow: 0 4px 0 rgba(120, 68, 15, 0.08);
  }

  .report-markdown-table td {
    display: grid;
    grid-template-columns: minmax(72px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(26, 54, 93, 0.1);
    color: #354158;
    font-size: 14px;
    line-height: 1.5;
  }

  .report-markdown-table td::before {
    content: attr(data-label);
    color: #8a6b17;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
  }

  .report-markdown-table td:last-child {
    border-bottom: 0;
  }
}
