/* Moon Notebook: the site's dark space theme (colors from wwwroot/css/site.css), made for a phone screen */
@font-face {
  font-family: "Josefin Sans";
  src: url("/fonts/josefin-sans-semibold.woff") format("woff");
  font-weight: 600;
  font-display: swap;
}

:root {
  --space-bg: #0b0d21;
  --ink: #e8e6f5;
  --ink-muted: #a9a6c4;
  --purple: #b9a6ff;
  --purple-strong: #6d4bff;
  --gold: #f5cf6b;
  --line: rgba(185, 166, 255, 0.22);
  --heading: "Josefin Sans", system-ui, sans-serif;
  --tabs-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--space-bg);
  color: var(--ink);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--purple); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }

/* Link back to the site, only when opened in a browser tab */
.site-back { position: relative; z-index: 2; padding: calc(12px + env(safe-area-inset-top)) 16px 0; font-size: .9rem; letter-spacing: .03em; }
.site-back a { color: var(--ink-muted); text-decoration: none; padding: .3rem .2rem; border-radius: 6px; }
.site-back a:hover { color: var(--purple); }
.site-back a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.site-back + main { padding-top: 8px; }
@media (display-mode: standalone) { .site-back { display: none; } .site-back + main { padding-top: calc(20px + env(safe-area-inset-top)); } }
.installed .site-back { display: none; }
.installed .site-back + main { padding-top: calc(20px + env(safe-area-inset-top)); }

main {
  position: relative; z-index: 1;
  max-width: 560px; margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 20px calc(var(--tabs-h) + 28px + env(safe-area-inset-bottom));
  min-height: 100%;
}

h1, h2 { font-family: var(--heading); font-weight: 600; letter-spacing: .02em; }
h1 { font-size: 1.7rem; margin: .4rem 0 .6rem; }
h2 { font-size: 1.1rem; color: var(--gold); margin: 1.8rem 0 .5rem; }
.lede, .small { color: var(--ink-muted); }
.small { font-size: .92rem; }

/* Tonight */
#tonight { display: flex; flex-direction: column; align-items: center; text-align: center; }
#tonight[hidden] { display: none; }
.date { margin: .2rem 0 0; color: var(--ink-muted); font-size: .95rem; letter-spacing: .04em; }
.moon-btn {
  margin: 1.2rem 0 .6rem; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer;
  width: min(78vw, 360px); aspect-ratio: 1;
}
.moon-btn canvas { width: 100%; height: 100%; display: block; }
.moon-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.phase { font-family: var(--heading); font-size: 1.6rem; margin: .4rem 0 0; letter-spacing: .03em; }
.invite { margin: .3rem 0 0; color: var(--ink-muted); max-width: 22rem; }

.why {
  margin: 1.1rem 0 0; max-width: 26rem; color: var(--ink);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .9rem 0;
}
.why p { margin: 0 0 .8rem; }
.facts { display: flex; justify-content: center; gap: 1.4rem; margin: 0; flex-wrap: wrap; }
.facts div { min-width: 5.5rem; }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); }
.facts dd { margin: .1rem 0 0; font-family: var(--heading); color: var(--gold); }

.actions { display: flex; gap: .8rem; margin-top: 1.6rem; flex-wrap: wrap; justify-content: center; }
.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 46px; padding: .55rem 1.15rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(23, 26, 54, .7); color: var(--ink);
  font: inherit; font-size: 1rem; cursor: pointer;
}
.pill svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill[aria-pressed="true"], .pill[aria-expanded="true"] { border-color: var(--purple); color: #fff; background: rgba(109, 75, 255, .35); }
.pill.gold { background: var(--gold); color: #1b1630; border-color: var(--gold); font-weight: 600; }
.pill:focus-visible, .text-btn:focus-visible, .tabs button:focus-visible, textarea:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
.text-btn { background: none; border: 0; color: var(--purple); font: inherit; padding: .5rem; min-height: 44px; cursor: pointer; text-decoration: underline; }
.danger { color: #e8955a; }

.note-box { width: 100%; max-width: 30rem; margin-top: 1.2rem; text-align: left; }
.note-box[hidden] { display: none; }
.question { display: block; font-family: var(--heading); font-size: 1.15rem; color: var(--gold); margin-bottom: .5rem; text-align: center; }
textarea {
  width: 100%; border-radius: 14px; border: 1px solid var(--line); background: rgba(11, 13, 33, .8); color: var(--ink);
  font: inherit; padding: .8rem; resize: vertical;
}
/* Planets: the last time it was here */
.planet-list { list-style: none; padding: 0; margin: 1rem 0 0; }
/* the line between planets: purple into pink (Isabel, 2026-12-02) */
.planet-card { padding: 1rem 0; border-bottom: 2px solid #9a4f8f; border-image: linear-gradient(90deg, #6d4bff, #9a4f8f 55%, #b4457a) 1; }
.planet-card p { margin: .3rem 0 0; }
.planet-head { font-family: var(--heading); font-size: 1.1rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.planet-head .pg { color: var(--gold); font-size: 1.3rem; width: 1.6rem; text-align: center; }
.planet-head .pin { color: var(--ink-muted); font-family: inherit; font-size: .9rem; }
.link-sign { background: none; border: 0; color: var(--gold); font: inherit; text-decoration: underline; cursor: pointer; padding: .2rem 0; min-height: 36px; }
.link-sign:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.planet-now { color: var(--ink-muted); font-size: .95rem; }
.memory-q { font-family: var(--heading); color: var(--gold); }
.planet-card .pill { margin-top: .6rem; }
.planet-house { color: var(--purple); font-size: .95rem; }
.planet-signfacts { color: var(--ink-muted); font-size: .92rem; }
/* retrograde stretches and dips back into the sign before, in the pink Planet Paths uses for retrograde */
.planet-retro { color: #f2aac0; font-size: .95rem; }
.planet-retro b { font-weight: 600; }
.planet-life { color: var(--ink-muted); font-size: .95rem; }
/* each planet's own notes on its card (2026-12-02) */
.pnotes { margin-top: .4rem; }
.pnotes-h { font-family: var(--heading); color: var(--purple); margin-top: .7rem !important; }
.pnote-list { list-style: none; padding: 0 0 0 .8rem; margin: .2rem 0 0; border-left: 2px solid rgba(185, 166, 255, .35); }
.pnote-list li { padding: .3rem 0; }
.pnote-day { color: var(--ink-muted); font-size: .9rem; }
.pnote-list .text-btn { padding: .2rem .3rem; min-height: 36px; font-size: .9rem; }
.planet-lastbox { margin-top: .4rem; }
.planet-lastbox > summary { cursor: pointer; min-height: 36px; padding: .3rem 0; list-style-position: outside; margin-left: 1rem; }
.planet-lastbox > summary::marker { color: var(--purple); }
.planet-lastbox > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.pnote-link { padding: .2rem 0; min-height: 36px; font-size: .95rem; }
/* retrogrades fold (2026-12-02): the pink of retrograde for its line */
.planet-rxbox > summary { color: #f2aac0; }
.planet-rxbox > summary b { font-weight: 600; }
.rx-list { list-style: none; padding: 0; margin: .3rem 0 0; }
.rx-list > li { padding: .5rem 0; border-top: 1px solid var(--line); }
.rx-list > li > p { margin: 0; }
.pnotes-other { margin-top: .6rem; }
.pnotes-other summary { cursor: pointer; color: var(--ink-muted); font-size: .9rem; min-height: 32px; }
.pnote-tag { color: var(--gold); font-size: .8rem; border: 1px solid rgba(245, 207, 107, .5); border-radius: 999px; padding: 0 .45rem; margin-left: .2rem; }
.pnote-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.pnote-form { margin-top: .6rem; }
.pnote-form .question { text-align: left; font-size: 1rem; }
.pnote-for { color: var(--ink-muted); font-size: .85rem; margin: 0 0 .2rem !important; }
.pnote-form .note-row { display: flex; justify-content: flex-end; gap: .5rem; align-items: center; margin-top: .4rem; }
.pnote-form .pill { margin-top: 0; }
/* the Notebook's Moon | Planets switch and the Planets side (2026-12-02) */
.book-seg { margin-bottom: .4rem; }
.picker-two { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.book-seg button { font-size: 1rem; font-family: var(--heading); }
.pbook-stay { margin-top: 1.2rem; padding-bottom: .6rem; border-bottom: 2px solid #9a4f8f; border-image: linear-gradient(90deg, #6d4bff, #9a4f8f 55%, #b4457a) 1; }
.pbook-h { font-family: var(--heading); font-size: 1.1rem; color: var(--purple); margin: 0 0 .3rem; font-weight: 600; }
.pbook-h span { color: var(--gold); }
.pbook-stay .note-q { margin: .2rem 0; }
/* in the notebook, a day's planet notes under its own entry */
.note-planet { margin-top: .5rem; padding-left: .7rem; border-left: 2px solid rgba(185, 166, 255, .35); }
.note-ptitle { font-family: var(--heading); color: var(--purple); margin: 0; font-size: .95rem; }
.you-box { margin-top: 1rem; border: 1px solid var(--line); border-radius: 14px; padding: .6rem .9rem; background: rgba(23, 26, 54, .5); }
.you-box summary { cursor: pointer; font-family: var(--heading); min-height: 32px; }
.you-box .f, .houses-for, .planet-pick { display: flex; flex-direction: column; gap: .3rem; margin-top: .7rem; font-size: .95rem; }
.you-box input[type=date] {
  min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(11, 13, 33, .9); color: var(--ink);
  font: inherit; padding: 0 .7rem;
}
/* Mood and energy: five choices each, a radio under each label */
.scale { border: 0; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; }
.scale legend { font-family: var(--heading); color: var(--gold); font-size: 1.05rem; margin: 0 auto .45rem; padding: 0; text-align: center; }
.scale label {
  display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .45rem .1rem; min-height: 64px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(23, 26, 54, .6); font-size: .78rem; cursor: pointer;
  color: var(--ink-muted);
}
.scale .em { font-size: 1.5rem; line-height: 1.2; }
.scale label:has(input:checked) { border-color: var(--gold); background: rgba(109, 75, 255, .35); color: #fff; }
.scale label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.note-rate { margin: .2rem 0 0; font-size: .92rem; }
.look-sum { margin: .4rem 0 0; color: var(--ink-muted); font-size: .95rem; }
.backup-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.file-pill { cursor: pointer; }
.file-pill input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-pill:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.switch { display: flex; align-items: center; gap: .6rem; min-height: 44px; }
.switch input { width: 20px; height: 20px; accent-color: var(--purple-strong); }
.note-row { display: flex; justify-content: space-between; align-items: center; margin-top: .6rem; }
.saved { color: var(--ink-muted); font-size: .92rem; }

.install-tip {
  margin-top: 1.8rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; justify-content: center;
  color: var(--ink-muted); font-size: .95rem;
}
.install-tip[hidden] { display: none; }
.install-tip p { margin: 0; text-align: center; max-width: 30rem; }
.install-tip b { color: var(--ink); }
.share-ico { width: 1.1em; height: 1.1em; vertical-align: -.15em; fill: none; stroke: var(--purple); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Notebook */
.notes { list-style: none; padding: 0; margin: 1rem 0 0; }
.notes li { display: grid; grid-template-columns: 44px 1fr; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.notes canvas { width: 44px; height: 44px; }
.note-head { font-size: .9rem; color: var(--ink-muted); }
.note-head b { color: var(--ink); font-weight: 600; }
.note-q { font-family: var(--heading); color: var(--gold); font-size: .98rem; margin: .25rem 0 .2rem; }
.note-text { white-space: pre-wrap; margin: 0; overflow-wrap: anywhere; }
.note-edit { margin-top: .2rem; }
.empty { color: var(--ink-muted); margin-top: 1.4rem; }
.notebook-tools { margin-top: 1.6rem; }

/* Tonight: the Moon's sign */
.sign-chip {
  margin: .35rem 0 0; min-height: 40px; padding: .3rem .9rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(23, 26, 54, .6); color: var(--gold); font: inherit; font-size: .98rem;
}
.sign-chip:focus-visible, .round:focus-visible, .seg button:focus-visible, select:focus-visible, .sign-grid button:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

/* Sky */
.wheel-wrap { width: min(100%, 520px); margin: 1rem auto 0; aspect-ratio: 1; }
.wheel-wrap canvas { width: 100%; height: 100%; display: block; cursor: pointer; touch-action: manipulation; }
.sky-date { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-top: .6rem; font-variant-numeric: tabular-nums; }
.sky-date span { min-width: 9.5rem; text-align: center; }
.round {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(23, 26, 54, .7);
  color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.slider { width: 100%; margin: .6rem 0 0; accent-color: var(--gold); height: 32px; }
.sky-actions { margin-top: .8rem; align-items: center; }
select {
  min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(11, 13, 33, .9); color: var(--ink);
  font: inherit; font-size: .95rem; padding: 0 .7rem;
}
.positions { width: 100%; border-collapse: collapse; margin-top: 1.4rem; font-size: .95rem; font-variant-numeric: tabular-nums; }
.positions th { text-align: left; font-weight: 400; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); padding: .3rem 0; }
.positions td { padding: .45rem 0; border-top: 1px solid var(--line); }
.positions td:first-child { white-space: nowrap; }
.positions .gl { display: inline-block; width: 1.5rem; color: var(--gold); }
.positions .r { color: #e9a0c0; font-size: .8rem; margin-left: .3rem; }
.positions button { background: none; border: 0; color: var(--purple); font: inherit; padding: .2rem 0; cursor: pointer; text-decoration: underline; min-height: 32px; }

/* Signs */
.sign-grid { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.sign-grid button {
  width: 100%; min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(23, 26, 54, .6); color: var(--ink); font: inherit; cursor: pointer; padding: .6rem .2rem;
}
.sign-grid img { width: 54px; height: 54px; }
.sign-grid b { font-family: var(--heading); font-weight: 600; font-size: 1rem; }
.sign-grid small { color: var(--ink-muted); font-size: .72rem; line-height: 1.2; text-align: center; }
.sign-grid .now { border-color: var(--gold); }
.sign-grid .now b::after { content: " ☽"; color: var(--gold); }
.sign-page { text-align: center; }
.sign-page .back { display: block; margin: 0 0 .2rem; text-align: left; }
.sign-page > img { width: 104px; height: 104px; }
.sign-page h1 { margin: .2rem 0 0; font-size: 2rem; }
.sign-page .sub { color: var(--ink-muted); margin: .1rem 0 .6rem; }
.keywords { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 0 0 .8rem; padding: 0; list-style: none; }
.keywords li { border: 1px solid var(--line); border-radius: 999px; padding: .15rem .7rem; font-size: .88rem; }
.sign-page .facts { margin-bottom: .8rem; }
.sign-page .facts button { background: none; border: 0; color: var(--gold); font: inherit; font-family: var(--heading); text-decoration: underline; cursor: pointer; padding: 0; }
.sign-page .text { text-align: left; }
.sign-page .text p { margin: 0 0 .8rem; }
.moon-now { border: 1px solid var(--gold); border-radius: 14px; padding: .7rem .9rem; margin: .4rem 0 1rem; color: var(--gold); text-align: center; }
.con-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: .3rem 0 .6rem; }
.con-switch button { background: none; border: 0; color: var(--ink-muted); font: inherit; font-size: .9rem; padding: .45rem 1rem; min-height: 40px; cursor: pointer; }
.con-switch button[aria-pressed="true"] { background: rgba(109, 75, 255, .4); color: #fff; }
.con-pic { display: block; width: 100%; border-radius: 12px; background: #0b0d21; }
.sign-nav { display: flex; justify-content: space-between; gap: .5rem; margin-top: 1.2rem; }

/* Notebook: look back */
.seg { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-top: .6rem; }
.seg button { flex: 1; background: none; border: 0; color: var(--ink-muted); font: inherit; font-size: .9rem; min-height: 44px; cursor: pointer; padding: 0 .2rem; }
.seg button[aria-pressed="true"] { background: rgba(109, 75, 255, .4); color: #fff; }
.picker { margin-top: .8rem; }
.picker select { width: 100%; }
.look-head { font-family: var(--heading); color: var(--gold); font-size: 1.15rem; margin: 1rem 0 0; }
.year-scroll { overflow-x: auto; margin-top: .6rem; }
.year-grid { border-collapse: collapse; width: 100%; font-size: .78rem; font-variant-numeric: tabular-nums; }
.year-grid th { font-weight: 400; color: var(--ink-muted); padding: .2rem; }
.year-grid th canvas { width: 22px; height: 22px; display: block; margin: 0 auto; }
.year-grid td { text-align: center; padding: .15rem; border-top: 1px solid rgba(185, 166, 255, .1); }
.year-grid td button, .year-grid td span { display: inline-block; width: 30px; height: 30px; border-radius: 50%; }
.year-grid td span { position: relative; }
.year-grid td span::after { content: ""; position: absolute; left: 13px; top: 13px; width: 4px; height: 4px; border-radius: 50%; background: rgba(185, 166, 255, .25); }
.year-grid td button { border: 0; background: radial-gradient(circle, var(--gold) 0 7px, rgba(245, 207, 107, .25) 8px 11px, transparent 12px); cursor: pointer; }
.year-grid .row-h { text-align: left; white-space: nowrap; color: var(--ink-muted); }
.notes li.flash { animation: flash 1.6s ease; }
@keyframes flash { from { background: rgba(245, 207, 107, .18); } to { background: transparent; } }

/* About */
.choice { border: 0; padding: 0; margin: 0; }
.choice legend { padding: 0; margin-bottom: .3rem; }
.choice label { display: flex; align-items: center; gap: .6rem; min-height: 44px; }
.choice input { width: 20px; height: 20px; accent-color: var(--purple-strong); }
.version { margin-top: 2rem; }

/* Bottom bar */
.tabs {
  position: fixed; z-index: 2; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(11, 13, 33, .92); border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.tabs button {
  flex: 1; max-width: 160px; height: var(--tabs-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: 0; color: var(--ink-muted); font: inherit; font-size: .8rem; letter-spacing: .03em; cursor: pointer;
}
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-current="page"] { color: var(--gold); }

@media (prefers-reduced-motion: no-preference) {
  .screen { animation: fade .35s ease; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}
