/* Pournami Sadhana — dark, elegant, minimal (astrogent-inspired) */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg:        #0a0a0d;
  --bg-soft:   #111118;
  --card:      #14141d;
  --card-edge: #23232f;
  --ink:       #ece9e1;
  --ink-soft:  #aaa79e;
  --ink-faint: #74726c;
  --gold:      #d9c38a;
  --gold-deep: #b59a55;
  --silver:    #cfd6e0;
  --good:      #7fd29a;
  --bad:       #e08a82;
  --warn:      #e6c86a;
  --radius:    16px;
  --maxw:      720px;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 50% -8%, #1b1b27 0%, rgba(27,27,39,0) 60%),
    radial-gradient(800px 500px at 88% 12%, #181523 0%, rgba(24,21,35,0) 55%),
    var(--bg);
  line-height: 1.6;
  letter-spacing: 0.1px;
  min-height: 100vh;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--gold); color: #1a1408; padding: 8px 14px; border-radius: 0 0 8px 0; z-index: 10;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Invocation header */
.invocation {
  text-align: center;
  padding: 30px 16px 10px;
}
.invocation p {
  margin: 2px 0;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1rem + 0.8vw, 1.5rem);
  letter-spacing: 0.04em;
  color: var(--gold);
  font-weight: 500;
}
.invocation p:nth-child(2) { color: var(--silver); }
.invocation p:nth-child(3) { color: var(--gold); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 18px 60px;
}

.moon-mark {
  width: 70px; height: 70px; margin: 18px auto 6px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 34%, #fdf6e3 0%, #e7d9b0 55%, #b9a36a 100%);
  box-shadow:
    0 0 0 1px #00000040,
    0 0 38px 6px rgba(217,195,138,0.28),
    inset -10px -8px 22px rgba(0,0,0,0.35);
}

.title {
  font-family: var(--serif);
  font-weight: 600;
  text-align: center;
  font-size: clamp(2.3rem, 1.8rem + 3vw, 3.4rem);
  margin: 6px 0 6px;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #fbf3dc 0%, var(--gold) 60%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--gold);
}

.lede {
  text-align: center;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 auto 28px;
  font-size: 1.02rem;
}

/* Disclaimer */
.disclaimer {
  max-width: 60ch;
  margin: 0 auto 30px;
  padding: 14px 18px;
  border: 1px solid #3a3322;
  border-left: 3px solid var(--gold-deep);
  border-radius: 10px;
  background: #14110a;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}
.disclaimer strong { color: var(--gold); }

/* Cards */
.card {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  margin: 0 0 22px;
  box-shadow: 0 14px 40px -22px rgba(0,0,0,0.8);
}
.card[hidden] { display: none; }

.step-tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold-deep);
  border: 1px solid #3a3322;
  background: #1c1810;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.card h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  margin: 0 0 14px;
  color: var(--ink);
}
.src-h {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 22px 0 10px;
  color: var(--silver);
}

.hint { color: var(--ink-faint); font-size: 0.86rem; margin: 12px 0 0; }
.hint a, .nextline a { color: var(--gold); }

/* City form */
.city-form { display: flex; gap: 10px; }
.city-form input {
  flex: 1; min-width: 0;
}
input[type="text"], input[type="number"], input[type="date"] {
  background: #0d0d13;
  border: 1px solid #2c2c3a;
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--sans);
}
input:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(181,154,85,0.18); }

button {
  font-family: var(--sans);
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid var(--gold-deep);
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #1a1408;
  font-weight: 600;
  padding: 12px 20px;
  font-size: 0.98rem;
  transition: transform .05s ease, filter .15s ease;
}
button:hover { filter: brightness(1.06); }
button:active { transform: translateY(1px); }
button.ghost {
  background: transparent; color: var(--ink-soft);
  border: 1px solid #2c2c3a; font-weight: 500;
}
button[disabled] { opacity: .5; cursor: progress; }

.status { font-size: 0.92rem; color: var(--ink-soft); margin-top: 12px; min-height: 1.2em; }
.status.err { color: var(--bad); }

/* Results list */
.results { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.results[hidden] { display: none; }
.results li button {
  width: 100%;
  text-align: left;
  background: #0e0e15;
  border: 1px solid #2a2a38;
  color: var(--ink);
  font-weight: 500;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 15px;
}
.results li button:hover { border-color: var(--gold-deep); background: #15131c; filter: none; }
.results .place { font-size: 1.02rem; }
.results .meta { color: var(--ink-faint); font-size: 0.8rem; white-space: nowrap; }

/* Merged Step 1 — compact selected state */
.city-selected { display: grid; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--card-edge); }
.drik-na { font-size: 0.82em; color: var(--ink-faint); }
.drik-na a { color: var(--gold); text-decoration: none; }
.drik-na a:hover { text-decoration: underline; }
.sel-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sel-lbl { color: var(--ink-faint); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; min-width: 58px; flex-shrink: 0; }
.sel-city { font-family: var(--serif); font-size: 1.25rem; color: var(--gold); flex: 1; line-height: 1.2; }
.btn-sm { padding: 6px 12px !important; font-size: 0.8rem !important; border-radius: 7px !important; }

/* Banner verdict */
.banner {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.1rem);
  font-weight: 600;
  text-align: center;
  padding: 22px 16px;
  border-radius: 12px;
  border: 1px solid #2c2c3a;
  background: #0e0e15;
  margin-bottom: 8px;
}
.banner.is-pournami { color: #fff4d6; border-color: var(--gold-deep);
  background: radial-gradient(600px 200px at 50% 0%, #2a2310 0%, #0e0e15 70%);
  box-shadow: 0 0 50px -16px rgba(217,195,138,0.4); }
.banner.not-pournami { color: var(--silver); }
.banner-sub { display: block; margin-top: 8px; font-size: 0.62em; color: var(--ink-soft); font-family: var(--sans); font-weight: 400; line-height: 1.5; }
.banner-sub strong { color: var(--gold); }

/* Error / uncertainty card */
.error-card { border-color: #5a2c28; background: linear-gradient(180deg, #1d1311 0%, #140d0c 100%); }
.warn-tag { color: var(--bad); border-color: #5a2c28; background: #211210; }
.error-detail { color: var(--ink); font-size: 1.02rem; background: #140d0c; border: 1px solid #3a2320; border-radius: 10px; padding: 14px 16px; margin: 4px 0 14px; }
.error-action { color: var(--bad); font-size: 0.95rem; }
.error-action strong { color: #ff9b92; }

/* Eclipse warning */
.eclipse-warn {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid #6a3a22; border-left: 4px solid #e0863a;
  background: linear-gradient(180deg, #1f140c 0%, #160f0a 100%);
  border-radius: 12px; padding: 16px 18px; margin: 0 0 22px;
  box-shadow: 0 0 40px -18px rgba(224,134,58,0.5);
}
.eclipse-warn[hidden] { display: none; }
.eclipse-warn .ec-icon { font-size: 1.6rem; line-height: 1.2; filter: drop-shadow(0 0 6px rgba(224,134,58,0.6)); }
.eclipse-warn strong { color: #f0a85e; font-family: var(--serif); font-size: 1.25rem; display: block; margin-bottom: 4px; }
.eclipse-warn p { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.92rem; }
.eclipse-warn #eclipse-detail { color: var(--ink); font-variant-numeric: tabular-nums; }
.eclipse-warn .ec-rules strong { display: inline; color: #f0a85e; font-family: var(--sans); font-size: 1em; }

/* Sadhana labels */
.sadhana-for { color: var(--ink-faint); font-size: 0.9rem; margin: -6px 0 6px; }
.sadhana-for strong { color: var(--gold-deep); }
.warn-inline { display: inline-block; margin-top: 6px; color: var(--warn); font-size: 0.86rem; }

/* Prominent schedule date */
.sched-date {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 1.1rem + 2.2vw, 2.5rem);
  font-weight: 600;
  color: var(--gold);
  margin: 2px 0 22px;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

/* Tables */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #20202c; vertical-align: top; }
th { color: var(--ink-faint); font-weight: 600; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.1em; }
td .yes { color: var(--good); font-weight: 600; }
td .no { color: var(--bad); font-weight: 600; }
td .na { color: var(--ink-faint); font-style: italic; }
.srctable tbody tr:last-child td, .timeline tbody tr:last-child td { border-bottom: none; }

.timeline td:nth-child(2) { font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 600; white-space: nowrap; }
.timeline tr.hl td { background: #15130c; }

/* Moonrise box */
.moonrise-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 20px;
}
.moonrise-box > div {
  background: #0e0e15; border: 1px solid #2a2a38; border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.moonrise-box .k { color: var(--ink-faint); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; }
.moonrise-box .v { font-family: var(--serif); font-size: 1.6rem; color: var(--gold); font-weight: 600; }
.moonrise-box .v.sub { font-size: 1.25rem; color: var(--silver); }

/* Mala input */
.mala-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.mala-row label { color: var(--ink-soft); flex: 1 1 260px; }
.mala-row input { width: 90px; }
.mala-row .unit { color: var(--ink-faint); font-size: 0.88rem; }

.steps { color: var(--ink-soft); padding-left: 20px; margin: 18px 0; }
.steps li { margin: 8px 0; }
.steps strong { color: var(--ink); }

/* Video */
.video-block { margin-top: 22px; }
.fb-frame {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: #07070b; border: 1px solid #2a2a38; border-radius: 12px; overflow: hidden;
}
.fb-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.fb-play {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: radial-gradient(420px 220px at 50% 40%, #1a1626 0%, #07070b 75%);
  color: var(--ink); border: none; border-radius: 12px;
}
.fb-play small { color: var(--ink-faint); font-weight: 400; }
.play-tri {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  display: grid; place-items: center; position: relative;
}
.play-tri::after {
  content: ""; border-style: solid; border-width: 13px 0 13px 22px;
  border-color: transparent transparent transparent #1a1408; margin-left: 5px;
}

.reminders { margin-top: 22px; border-top: 1px solid #20202c; padding-top: 16px; }
.reminders ul { color: var(--ink-soft); padding-left: 20px; }
.reminders li { margin: 8px 0; }

.blessing {
  text-align: center; font-family: var(--serif); font-size: 1.4rem;
  color: var(--gold); margin: 26px 0 4px;
}

.foot {
  max-width: var(--maxw); margin: 0 auto; padding: 30px 18px 50px;
  text-align: center; color: var(--ink-faint); font-size: 0.8rem;
  border-top: 1px solid #1a1a24;
}
.foot p { margin: 4px 0; }

@media (max-width: 560px) {
  .moonrise-box { grid-template-columns: 1fr; }
  .city-form { flex-direction: column; }
  .city-form button { width: 100%; }
}
