/* Hina Marama · Te Whare Hihiri
   Warm, calm, safe. TWH base colours + one gentle tint per season.
   These season tints are the TWH seasonal colours for all marketing (Kailah, 11 Nov 2026). */

:root {
  --cream:   #f6f3e4;   /* Cannoli Cream */
  --card:    #fcfaf2;
  --ganache: #362921;   /* Ganache */
  --soft:    #6b5a4e;
  --muted:   #9a8a7c;
  --boa:     #8b8356;   /* Boa */
  --sage:    #a3ae8f;
  --line:    rgba(54, 41, 33, 0.10);
  --shadow:  0 6px 24px rgba(54, 41, 33, 0.07);

  /* Season tints */
  --hotoke:  #6e4b3c;  --hotoke-wash:  #efe4dc;   /* deep cocoa */
  --koanga:  #7f8f6b;  --koanga-wash:  #e7ebdc;   /* soft sage */
  --raumati: #c0914a;  --raumati-wash: #f5e9d2;   /* warm honey */
  --ngahuru: #a8684b;  --ngahuru-wash: #f2e0d5;   /* clay */

  --tint: var(--hotoke);
  --wash: var(--hotoke-wash);

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Montserrat', system-ui, -apple-system, sans-serif;
  --radius: 22px;
  color-scheme: light;
}

body[data-season="hotoke"]  { --tint: var(--hotoke);  --wash: var(--hotoke-wash); }
body[data-season="koanga"]  { --tint: var(--koanga);  --wash: var(--koanga-wash); }
body[data-season="raumati"] { --tint: var(--raumati); --wash: var(--raumati-wash); }
body[data-season="ngahuru"] { --tint: var(--ngahuru); --wash: var(--ngahuru-wash); }

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #241a15; --card: #2f241e; --ganache: #f1e8dc; --soft: #d4c5b6; --muted: #a39282;
    --line: rgba(241, 232, 220, 0.12); --shadow: none; color-scheme: dark;
    --hotoke-wash: #3a2a23; --koanga-wash: #2f3326; --raumati-wash: #3d3022; --ngahuru-wash: #3d2a22;
    --hotoke: #c99a82; --koanga: #b3c29b; --raumati: #e0b56f; --ngahuru: #d49478;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--cream);
  color: var(--ganache);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  transition: background .6s ease;
}
button { font-family: inherit; color: inherit; cursor: pointer; border: none; background: none; }
p + p { margin-top: .6rem; }

/* Screens */
.screen {
  display: none;
  min-height: 100vh;
  padding: calc(env(safe-area-inset-top) + 16px) 18px 32px;
  max-width: 520px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--wash) 0, var(--cream) 340px);
}
.screen.active { display: block; animation: fadeIn .35s ease; }
.screen.tabbed { padding-bottom: calc(env(safe-area-inset-bottom) + 96px); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Type */
.kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--tint); font-weight: 600; margin-bottom: .5rem; }
.brand-small { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; line-height: 1.1; }
.date-line { font-size: 12.5px; color: var(--muted); }
.small-note { font-size: 12.5px; color: var(--muted); margin-top: .8rem; text-align: center; }
.footer-note { text-align: center; font-size: 12px; color: var(--muted); margin: 24px 0 8px; }
.section-title { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; line-height: 1.15; margin-bottom: .6rem; }

/* Buttons */
.btn-primary {
  display: block; width: 100%; text-align: center; text-decoration: none;
  background: var(--ganache); color: var(--cream);
  padding: 15px 20px; border-radius: 999px; font-size: 15px; font-weight: 500; letter-spacing: .02em;
  margin-top: 1rem; transition: transform .15s ease, opacity .2s;
}
.btn-primary:active { transform: scale(.98); }
.btn-small { background: var(--tint); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500; margin-top: .7rem; }
.btn-ghost { color: var(--tint); padding: 10px 4px; font-size: 13.5px; font-weight: 500; margin-top: .4rem; display: block; }
.btn-back { color: var(--soft); font-size: 14px; padding: 6px 0; }
.link-btn { color: var(--tint); font-weight: 600; font-size: 14px; margin-top: .9rem; padding: 0; }
.link-btn.small { font-size: 12.5px; margin: .2rem 0 .6rem; }
.icon-btn { font-size: 20px; color: var(--soft); width: 40px; height: 40px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); }
.round-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); font-size: 22px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 150px; margin: .7rem 0 0; }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); padding: 20px; margin-top: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; min-height: 44px; }

/* Opening */
.opening, .setup, .paywall { text-align: center; padding-top: 10px; }
.art-frame { width: 210px; height: 210px; margin: 8px auto 22px; border-radius: 50%; background-size: cover; background-position: center 30%; box-shadow: 0 0 0 8px var(--card), 0 0 0 9px var(--line), var(--shadow); }
.art-portrait { background-image: url('images/wahine-portrait-light.png'); background-size: 170%; background-position: center 35%; }
.art-seated { background-image: url('images/wahine-moon-cycle.png'); width: 160px; height: 160px; }
.brand-mark { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--boa); font-weight: 600; }
.opening-title { font-family: var(--serif); font-size: 3rem; font-weight: 500; line-height: 1; margin: .3rem 0 .7rem; }
.opening-title.small { font-size: 2.2rem; }
.opening-line { font-family: var(--serif); font-size: 1.45rem; font-style: italic; color: var(--soft); line-height: 1.3; }
.whakatauki { margin: 1.6rem 0 1rem; }
.whakatauki .reo { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.whakatauki .translation { font-size: 12.5px; color: var(--muted); margin-top: .1rem; }

/* Setup */
.setup { text-align: left; }
.setup .btn-back { margin-bottom: 10px; }
.setup-moon { font-size: 2.2rem; display: block; text-align: center; margin: 10px 0; }
.setup-title { font-family: var(--serif); font-size: 2.1rem; font-weight: 500; line-height: 1.1; text-align: center; }
.setup-hint { color: var(--muted); font-size: 13px; text-align: center; margin-top: .4rem; }
.field { width: 100%; font: inherit; color: var(--ganache); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 1.2rem 0 .4rem; box-shadow: var(--shadow); }
.field:focus { outline: 2px solid var(--tint); outline-offset: 1px; }
.field-label { display: block; text-align: center; font-weight: 500; margin-top: 1.6rem; }
.length-row { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: .8rem; }
.length-value { font-family: var(--serif); font-size: 1.8rem; min-width: 110px; text-align: center; }

/* Season hero */
.season-hero { display: flex; align-items: center; gap: 18px; margin: 10px 0 4px; }
.season-ring { flex: 0 0 116px; height: 116px; }
.season-ring svg { width: 116px; height: 116px; display: block; }
.season-name { font-family: var(--serif); font-size: 2.6rem; font-weight: 500; line-height: 1; color: var(--tint); }
.season-name.big { font-size: 3rem; }
.season-sub { color: var(--soft); font-size: 13.5px; margin-top: .3rem; }

.together-card { background: var(--wash); border-color: transparent; }
.together-line { font-family: var(--serif); font-size: 1.3rem; line-height: 1.35; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.centre { justify-content: center; margin-top: 18px; }
.chip { padding: 9px 15px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); font-size: 13.5px; transition: all .2s; }
.chip.selected { background: var(--tint); color: #fff; border-color: var(--tint); }
.checkin-response { margin-top: 14px; color: var(--soft); font-size: 14.5px; }
.checkin-response:empty { display: none; }
.yesterday { font-size: 12.5px; color: var(--muted); margin-bottom: .5rem; }
.yesterday:empty { display: none; }

.today-line { font-family: var(--serif); font-size: 1.4rem; line-height: 1.3; margin-bottom: .8rem; }
.body-preview p { color: var(--soft); font-size: 14.5px; }
.tomorrow { margin-top: .9rem; font-size: 13px; color: var(--muted); font-style: italic; }

/* Kai */
.kai-why { color: var(--soft); font-size: 14px; margin-bottom: .6rem; }
.kai-list { list-style: none; }
.kai-list li { padding: 9px 0 9px 22px; border-top: 1px solid var(--line); position: relative; font-size: 14.5px; }
.kai-list li::before { content: ''; position: absolute; left: 4px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--tint); opacity: .7; }
.kai-extra { margin-top: .8rem; font-size: 14px; }
.kai-extra b { font-weight: 600; }

/* Moon */
.moon-card { cursor: pointer; }
.moon-row { display: flex; align-items: center; gap: 16px; }
.moon-svg { flex: 0 0 72px; }
.moon-svg svg { display: block; width: 72px; height: 72px; }
.moon-svg.big { margin: 0 auto; width: 170px; }
.moon-svg.big svg { width: 170px; height: 170px; }
.moon-label { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; line-height: 1.15; }
.moon-label.big { font-size: 1.8rem; margin-top: 14px; }
.moon-kid { font-size: 13px; color: var(--tint); font-weight: 600; letter-spacing: .03em; }
.moon-night { font-size: 12.5px; color: var(--muted); }
.moon-hero { text-align: center; padding: 10px 0 4px; }
.phase-for { font-family: var(--serif); font-size: 1.3rem; line-height: 1.35; }
.moon-energy { color: var(--soft); font-size: 14px; margin-top: .7rem; }
.tool { border-top: 1px solid var(--line); padding: 10px 0; }
.tool-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--boa); font-weight: 600; }
.wawata { font-family: var(--serif); font-size: 1.3rem; font-style: italic; line-height: 1.35; }
.phase-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.phase-item.now { background: var(--wash); margin: 0 -12px; padding: 10px 12px; border-radius: 14px; border-top-color: transparent; }
.phase-item .emoji { font-size: 1.5rem; }
.phase-item .t { font-weight: 600; font-size: 14px; }
.phase-item .k { font-size: 12.5px; color: var(--muted); }
.now-badge { margin-left: auto; font-size: 11px; background: var(--tint); color: #fff; padding: 3px 9px; border-radius: 999px; }

/* Quick actions */
.quick-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.quick { background: var(--card); border-radius: 18px; padding: 14px 6px; box-shadow: var(--shadow); border: 1px solid var(--line); font-size: 13px; font-weight: 500; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.quick span { font-size: 20px; color: var(--tint); }

.install-card { display: none; margin-top: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--wash); font-size: 14px; }
.install-card.visible { display: block; }

/* Journal */
.prompt { font-family: var(--serif); font-size: 1.45rem; line-height: 1.3; margin-bottom: .3rem; }
.prompt.small { font-size: 1.2rem; margin-bottom: .6rem; }
.journal-box { width: 100%; font: inherit; color: var(--ganache); background: var(--cream); border: 1px solid var(--line); border-radius: 16px; padding: 14px; resize: vertical; min-height: 150px; }
.journal-box:focus { outline: 2px solid var(--tint); }
.saved-msg { text-align: center; font-size: 13px; color: var(--tint); margin-top: .6rem; opacity: 0; transition: opacity .3s; min-height: 1em; }
.saved-msg.visible { opacity: 1; }
.lastime { background: var(--wash); border-color: transparent; }
.last-time-text { font-family: var(--serif); font-size: 1.15rem; font-style: italic; }
.season-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.season-tabs button { padding: 8px 2px; border-radius: 12px; font-size: 12.5px; background: var(--cream); border: 1px solid var(--line); }
.season-tabs button.active { background: var(--tint); color: #fff; border-color: var(--tint); }
.entry { border-top: 1px solid var(--line); padding: 12px 0; }
.entry .d { font-size: 12px; color: var(--muted); }
.entry .q { font-size: 13px; color: var(--tint); font-weight: 500; margin-top: 2px; }
.entry .t { font-size: 14.5px; white-space: pre-wrap; margin-top: 4px; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

/* Breathe */
.breathe { text-align: center; padding-top: 18px; }
.breath-circle {
  width: 230px; height: 230px; margin: 10px auto 0; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, var(--card) 0, var(--wash) 70%);
  box-shadow: 0 0 0 10px var(--wash), 0 0 60px var(--wash);
  transform: scale(.72); transition: transform 4s ease-in-out;
}
.breath-circle.in { transform: scale(1); transition-duration: 4s; }
.breath-circle.hold { transform: scale(1); }
.breath-circle.out { transform: scale(.72); transition-duration: 6s; }
#breath-word { font-family: var(--serif); font-size: 1.8rem; color: var(--tint); }
#breath-count { font-size: 14px; color: var(--muted); min-height: 1.2em; }
.breath-time { margin-top: 18px; color: var(--soft); font-size: 14px; min-height: 1.4em; }
.toggle-line { display: block; margin-top: 14px; font-size: 13.5px; color: var(--soft); }

/* Guide */
.guide-head { margin: 6px 0; }
.guide-body p { color: var(--soft); }
.list-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--tint); font-weight: 600; margin: 1rem 0 .3rem; }
.list-label:first-child { margin-top: 0; }
.guide-list { list-style: none; }
.guide-list li { padding: 6px 0 6px 18px; position: relative; font-size: 14.5px; }
.guide-list li::before { content: '·'; position: absolute; left: 4px; color: var(--tint); font-weight: 700; }

/* Partner */
.partner-section { margin-top: 14px; }
.partner-section.card.highlight { background: var(--wash); border-color: transparent; }
.share-box { background: var(--cream); border: 1px dashed var(--line); border-radius: 14px; padding: 12px; font-size: 12.5px; word-break: break-all; margin-top: 1rem; color: var(--soft); }

/* Paywall */
.price-box { margin: 1.2rem 0 .4rem; }
.price { font-family: var(--serif); font-size: 3rem; line-height: 1; color: var(--tint); }
.price-note { font-size: 13px; color: var(--soft); }

/* Bottom nav */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: none; justify-content: space-around;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(env(safe-area-inset-bottom) + 8px);
}
.bottom-nav.visible { display: flex; }
.bottom-nav button { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; font-size: 11.5px; color: var(--muted); padding: 4px 0; gap: 1px; }
.bottom-nav button span { font-size: 19px; }
.bottom-nav button.active { color: var(--tint); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .screen.active { animation: none; }
  .breath-circle { transition: none; }
}

/* 11 Nov additions */
.row.split { justify-content: space-between; margin-top: .4rem; }
.centre-link { display: block; margin: 18px auto 0; text-align: center; }
.kupu { border-top: 1px solid var(--line); padding: 9px 0; }
.kupu:first-of-type { border-top: none; }
.kupu-w { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; line-height: 1.2; }
.kupu-m { font-size: 14px; color: var(--soft); margin-top: 1px !important; }
.file-label { cursor: pointer; }
.top-bar > div[onclick] { cursor: pointer; }

.btn-ghost.danger { color: var(--ngahuru); }

/* Life stage picker */
.stage-list { display: grid; gap: 10px; margin-top: 1.2rem; }
.stage { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); transition: all .25s ease; }
.stage b { display: block; font-weight: 600; font-size: 15px; }
.stage span { font-size: 13px; color: var(--muted); }
.stage.selected { border-color: var(--tint); background: var(--wash); transform: scale(1.01); }
.setup-title.small { font-size: 1.6rem; margin-top: 1.8rem; }
.stage-note { margin-top: 1.4rem; text-align: center; font-family: var(--serif); font-size: 1.25rem; line-height: 1.35; color: var(--soft); }
.body-kicker { margin-top: 1.2rem; }
.quick-row:has(.cycle-only[style*="none"]) { grid-template-columns: repeat(2, 1fr); }

/* Home screen step */
.art-icon { background-image: url('images/icon-512.png'); width: 140px; height: 140px; border-radius: 32px; box-shadow: var(--shadow); }
.install-steps { text-align: left; }
.steps { padding-left: 1.2rem; }
.steps li { margin: .5rem 0; }

/* Calendar */
.cal-title { text-align: center; }
.cal-card { padding: 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-head span { text-align: center; font-size: 11px; color: var(--muted); font-weight: 600; padding-bottom: 4px; }
.cal-day { position: relative; aspect-ratio: 1; border-radius: 12px; background: color-mix(in srgb, var(--c) 28%, var(--card)); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 13px; transition: transform .2s; }
.cal-day.future { background: color-mix(in srgb, var(--c) 12%, var(--card)); }
.cal-day.today { outline: 2px solid var(--ganache); outline-offset: -2px; font-weight: 600; }
.cal-day.picked { transform: scale(1.08); box-shadow: var(--shadow); }
.cal-day .mm { font-size: 9px; line-height: 1; height: 9px; color: var(--ganache); }
.cal-day .dot { position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--ganache); opacity: .6; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; font-size: 11.5px; color: var(--soft); }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 4px; vertical-align: -1px; }
.cal-season { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; }
.cal-moon { color: var(--soft); font-size: 14px; }
.cal-line { font-size: 14px; margin-top: .4rem; }

/* Gentle movement: calm, alive, never busy */
.screen::before {
  content: ''; position: fixed; inset: -20% -20% auto -20%; height: 70vh; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 40% at 30% 30%, var(--wash), transparent 70%), radial-gradient(35% 35% at 75% 20%, color-mix(in srgb, var(--tint) 18%, transparent), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate3d(-3%, 0, 0) scale(1); } to { transform: translate3d(4%, 3%, 0) scale(1.08); } }
.screen.active .card, .screen.active .season-hero, .screen.active .quick-row, .screen.active .moon-hero, .screen.active .stage { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
.screen.active .card:nth-of-type(2) { animation-delay: .06s; }
.screen.active .card:nth-of-type(3) { animation-delay: .12s; }
.screen.active .card:nth-of-type(4) { animation-delay: .18s; }
.screen.active .card:nth-of-type(5) { animation-delay: .24s; }
.screen.active .card:nth-of-type(n+6) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.season-ring svg path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .9s ease forwards; }
.season-ring svg path:nth-child(odd) { animation-delay: .1s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.moon-svg svg, .season-ring > svg[aria-label] { animation: glow 6s ease-in-out infinite; }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 0 transparent); } 50% { filter: drop-shadow(0 0 12px color-mix(in srgb, var(--tint) 45%, transparent)); } }
.chip.selected { animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(1.08); } }
.art-frame { animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
@media (prefers-color-scheme: dark) {
  body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: .5;
    background-image: radial-gradient(1px 1px at 20% 30%, #fff8, transparent), radial-gradient(1px 1px at 70% 15%, #fff6, transparent), radial-gradient(1.5px 1.5px at 85% 60%, #fff5, transparent), radial-gradient(1px 1px at 40% 75%, #fff6, transparent), radial-gradient(1px 1px at 10% 85%, #fff5, transparent);
    animation: twinkle 5s ease-in-out infinite alternate; }
  @keyframes twinkle { from { opacity: .25; } to { opacity: .6; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .season-ring svg path { stroke-dashoffset: 0; }
}
.screen { position: relative; isolation: isolate; }

/* 11 Nov: girls, hapū, bleeds */
.girls-card { background: var(--wash); border-color: transparent; }
.girls-hero { text-align: center; margin-top: 4px; }
.art-frame.small { width: 130px; height: 130px; margin-bottom: 12px; }
.girls-line { font-family: var(--serif); font-size: 1.3rem; line-height: 1.35; }
.girls-line + .girls-line { margin-top: .9rem; }
.whakatauki-big { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; line-height: 1.3; margin-bottom: .4rem; }
.cal-day .drop { position: absolute; top: 4px; right: 5px; width: 6px; height: 8px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--hotoke); }
