/* Glow & Calm — screens: form bits, onboarding ("Build Your Era"), Today. */

/* ---------- inputs & switches (shared) ---------- */
.input {
  width: 100%; min-height: var(--tap); padding: 10px 14px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text);
}
.input::placeholder { color: var(--text-muted); opacity: .85; }
.input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.input-lg { font-size: var(--fs-lg); padding: 14px 18px; border-radius: var(--r-md); }
.row-text .input { margin-top: 8px; }

.switch {
  position: relative; flex: none; width: 52px; height: 32px; padding: 0;
  border: 0; border-radius: var(--r-pill); background: var(--line-strong);
  transition: background var(--t-fast) var(--ease);
}
.switch::before { content: ''; position: absolute; inset: -6px; } /* 44px touch target */
.switch-knob {
  position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(61, 35, 48, .25);
  transition: transform var(--t-fast) var(--ease-bounce);
}
.switch[aria-checked="true"] { background: var(--button-bg); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(20px); }

.label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted); margin: var(--s-3) 0 var(--s-2); }
.label:first-child { margin-top: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s-2); }
.chip-link { text-decoration: none; min-height: 32px; padding: 6px 12px; }
.chip-gold { background: color-mix(in srgb, var(--gold) 28%, var(--surface)); color: var(--gold-ink); }

/* ---------- onboarding ---------- */
.onb-layer { position: fixed; inset: 0; z-index: 70; background: var(--bg); overflow-y: auto; }
.onb {
  min-height: 100dvh; max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding: calc(var(--s-4) + var(--safe-t)) var(--gutter) calc(var(--s-4) + var(--safe-b));
}
.onb-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: var(--tap); }
.onb-dots { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.onb-dots li { width: 8px; height: 8px; border-radius: 4px; background: var(--primary-soft); transition: all var(--t-med) var(--ease); }
.onb-dots li.on { width: 22px; background: var(--primary); }
.onb-stage { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: var(--s-6) 0; touch-action: pan-y; }
.onb-card h1 { font-size: clamp(1.7rem, 1.3rem + 2vw, 2.3rem); margin-bottom: var(--s-2); }
.onb-card h1:focus { outline: none; }
.onb-emoji { font-size: 2.6rem; line-height: 1; margin-bottom: var(--s-4); }
.onb-sub { color: var(--text-muted); margin-bottom: var(--s-5); }
.onb-hint { margin-top: var(--s-4); }
.onb-nav { display: flex; justify-content: space-between; gap: var(--s-3); }
.onb-nav .btn { flex: 1; }
.onb-nav .btn[hidden] + .btn { flex: 1; }
@keyframes onb-in-right { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes onb-in-left { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  min-height: 84px; padding: var(--s-3) var(--s-4); text-align: left;
  border: 2px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text);
  font-weight: 500; box-shadow: var(--shadow-soft);
  transition: transform var(--t-fast) var(--ease-bounce), border-color var(--t-fast);
}
.choice-emoji { font-size: 1.5rem; line-height: 1; }
.choice[aria-pressed="true"], .radio-card[aria-checked="true"] { border-color: var(--primary-strong); background: var(--surface-2); }
.choice[aria-pressed="true"] { transform: scale(1.02); }
.choice:disabled, .pick:disabled { opacity: .45; cursor: not-allowed; }

.radio-list { display: grid; gap: var(--s-3); }
.radio-card {
  display: flex; align-items: center; gap: var(--s-4); min-height: 64px; padding: var(--s-3) var(--s-4); text-align: left;
  border: 2px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-soft);
}
.radio-text strong { display: block; font-weight: 500; }
.radio-text span { display: block; color: var(--text-muted); font-size: var(--fs-sm); }

.chip-grid { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pick {
  min-height: var(--tap); padding: 8px 14px; border: 2px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--text); font-size: var(--fs-sm); font-weight: 500;
}
.pick[aria-pressed="true"] { border-color: var(--primary-strong); background: var(--surface-2); }

/* the "Your 2027 Era" card (Phase 6 exports it as a 9:16 PNG) */
.era-card {
  position: relative; overflow: hidden; text-align: center;
  padding: var(--s-8) var(--s-6) var(--s-6); border-radius: var(--r-lg);
  background: linear-gradient(165deg, #FFE4EE 0%, #F9A8C9 55%, #F472A8 100%);
  color: #3D2330; box-shadow: var(--shadow-lift);
}
.era-card::after { content: '✦  ✧  ✦'; position: absolute; top: 14px; right: 18px; color: #fff; opacity: .85; letter-spacing: 4px; font-size: 12px; }
.era-kicker { font-size: var(--fs-sm); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #6B2E4A; }
.era-title { font-size: clamp(2rem, 1.5rem + 3vw, 2.8rem); margin: var(--s-2) 0; color: #3D2330; }
.era-title:focus { outline: none; }
.era-tagline { font-family: var(--font-display); font-style: italic; font-size: var(--fs-lg); color: #4A2A3A; }
.era-words { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: var(--s-5) 0 0; }
.era-words li { padding: 6px 14px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .75); font-weight: 500; font-size: var(--fs-sm); }
.era-mix { margin-top: var(--s-4); font-size: var(--fs-sm); color: #4A2A3A; }
.era-brand { margin-top: var(--s-5); font-size: var(--fs-xs); color: #6B2E4A; }
.onb-summary { margin: var(--s-5) 0; display: grid; gap: var(--s-2); font-size: var(--fs-sm); }
.onb-result .btn-block { margin-bottom: var(--s-2); }

/* ---------- Today ---------- */
.today-head { margin-bottom: var(--s-5); }
.today-head h1:focus { outline: none; }
.today-date { color: var(--link); font-weight: 500; font-size: var(--fs-sm); margin-bottom: 4px; }
.low-toggle {
  display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-4);
  padding: var(--s-3) var(--s-4); border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
}
.low-toggle-text { flex: 1; min-width: 0; }
.low-toggle-text strong { display: block; font-weight: 500; font-size: var(--fs-sm); }
.low-toggle-text span { display: block; color: var(--text-muted); font-size: var(--fs-xs); }

.tcard-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-bottom: var(--s-3); }
.tcard-head h2 { margin: 0; font-size: var(--fs-lg); }
.tcard-tools { display: flex; align-items: center; gap: 2px; flex: none; }
.tcard-tools .icon-btn { font-size: 1.1rem; font-weight: 600; }
.tcard-tools .icon-btn:disabled { opacity: .3; }
.tcard.is-hidden { opacity: .6; box-shadow: none; border-style: dashed; }
.tcard.draggable { cursor: grab; }
.tcard.dragging { opacity: .4; }
.tcard.drop-target { outline: 2px dashed var(--primary); outline-offset: 4px; }
.today-edit-row { display: flex; justify-content: center; margin-top: var(--s-5); }

/* vibe polaroid */
.polaroid {
  margin: 0 auto var(--s-3); max-width: 300px; padding: 12px 12px 6px;
  background: #fff; border-radius: 6px; transform: rotate(-1.5deg);
  box-shadow: 0 10px 28px -8px rgba(61, 35, 48, .3);
}
.polaroid-img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; background: #FBEAF1; }
.polaroid-img.preset, .polaroid-img.placeholder { display: grid; place-items: center; align-content: center; gap: 6px; font-size: 3.4rem; }
.polaroid-img.placeholder small { font-size: var(--fs-sm); color: #8A6475; }
.polaroid-caption {
  width: 100%; min-height: var(--tap); margin-top: 4px; border: 0; background: transparent; text-align: center;
  font-family: var(--font-display); font-style: italic; font-size: var(--fs-lg); color: #3D2330;
}
.polaroid-caption::placeholder { color: #8A6475; }
.vibe .row-actions { justify-content: center; }
.preset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); margin-top: var(--s-3); }
.preset {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  aspect-ratio: 1; padding: 4px; border: 2px solid transparent; border-radius: 16px; font-size: 1.6rem;
}
.preset small { font-size: 10px; line-height: 1.15; color: #3D2330; background: rgba(255, 255, 255, .8); padding: 2px 5px; border-radius: 6px; text-align: center; }
.preset[aria-pressed="true"] { border-color: var(--primary-strong); }

/* check-in */
.mood-row, .energy-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s-2); }
.mood, .battery {
  min-height: 52px; border: 2px solid transparent; border-radius: 16px; background: var(--surface-3);
  font-size: 1.6rem; display: grid; place-items: center; color: var(--text-muted);
  transition: transform var(--t-fast) var(--ease-bounce);
}
.mood[aria-checked="true"], .battery[aria-checked="true"] { border-color: var(--primary-strong); background: var(--surface-2); transform: scale(1.06); }
.battery { color: var(--primary-strong); }
.battery-svg { width: 36px; height: 20px; }
.soft-tip { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-3); font-size: var(--fs-sm); }

/* Just 3 Things + routines */
.things, .rows, .across { list-style: none; margin: 0 0 var(--s-3); padding: 0; }
.thing, .rrow { display: flex; align-items: center; gap: var(--s-3); min-height: 52px; }
.thing + .thing, .rrow + .rrow { border-top: 1px solid var(--line); }
.thing-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.thing.done .thing-text { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--primary); }
.tick {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; position: relative;
  border: 2px solid var(--primary); border-radius: 10px; background: var(--surface); color: transparent;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease-bounce);
}
.tick::before { content: ''; position: absolute; inset: -6px; }
.tick[aria-checked="true"] { background: var(--primary-strong); color: var(--on-primary); transform: scale(1.08); }
.tick .icon { stroke-width: 3; }
.add-row { display: flex; gap: var(--s-2); }
.add-row .input { flex: 1; min-width: 0; }
.later { margin-top: var(--s-3); border-top: 1px dashed var(--line-strong); padding-top: var(--s-2); }
.later summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; color: var(--text-muted); font-size: var(--fs-sm); font-weight: 500; }
.later ul { list-style: none; margin: 0; padding: 0; }
.later li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); min-height: 48px; font-size: var(--fs-sm); }
.rrow-link { flex: 1; min-width: 0; color: var(--text); text-decoration: none; padding: 6px 0; }
.rrow-link strong { display: block; font-weight: 500; }
.rrow-link span { display: block; color: var(--text-muted); font-size: var(--fs-sm); }
.rrow.done .rrow-link strong { text-decoration: line-through; text-decoration-color: var(--primary); }

/* quest, affirmation, kind note */
.quest-text { font-family: var(--font-display); font-size: var(--fs-lg); margin-bottom: var(--s-3); }
.quest.done .quest-text { color: var(--text-muted); }
.affirmation blockquote {
  margin: 0 0 var(--s-3); padding: var(--s-2) 0 var(--s-2) var(--s-4); border-left: 4px solid var(--primary);
  font-family: var(--font-display); font-style: italic; font-size: var(--fs-xl); line-height: 1.35;
}
.kind-note { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.35; }

/* water */
.glasses { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-bottom: var(--s-2); }
@media (max-width: 370px) { .glasses { grid-template-columns: repeat(4, 1fr); } }
.glass { min-height: 48px; padding: 4px; border: 0; border-radius: 12px; background: transparent; color: var(--primary); display: grid; place-items: center; }
.glass-svg { width: 24px; height: 30px; }
.glass .glass-fill { fill: transparent; transition: fill var(--t-fast) var(--ease); }
.glass.full .glass-fill { fill: var(--accent); }
.glass:hover { background: var(--surface-3); }

/* points */
.points-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.points-big { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; color: var(--link); }
.points .meter { height: 12px; margin: var(--s-2) 0; }

/* across */
.across li { padding: 10px 0; }
.across li + li { border-top: 1px solid var(--line); }
.across a { color: var(--text); text-decoration: none; }
.across a:hover { color: var(--link); }

/* Today extras (kept here so Today never needs the lazy hub CSS) */
.becoming .era-words { justify-content: flex-start; margin: 0 0 var(--s-2); }
.becoming .era-words li { background: var(--surface-2); }
.move-tip { margin-top: 6px; }

/* ---------- Today as a dashboard ---------- */
.today-wide:empty { display: none; }
.today-wide { margin-bottom: var(--s-4); }
.today-grid > .card + .card { margin-top: var(--s-4); }
@media (min-width: 1100px) {
  /* Today gets the full width on laptops: two columns of cards */
  body:has(.view[data-hub="today"]) .main { max-width: 1180px; }
  .today-grid { columns: 2; column-gap: var(--s-5); }
  .today-grid > .card { break-inside: avoid; margin: 0 0 var(--s-5); }
  .today-grid > .card + .card { margin-top: 0; }
  .today-head { display: grid; grid-template-columns: 1fr minmax(300px, 380px); align-items: end; gap: var(--s-2) var(--s-6); }
  .today-head > :not(.low-toggle) { grid-column: 1; }
  .today-head .low-toggle { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
}

/* ---------- the big cycle card ---------- */
.cycle-today { display: grid; grid-template-columns: 132px 1fr; gap: var(--s-4); align-items: center; }
.cycle-ring { display: block; width: 132px; height: 132px; border-radius: 50%; }
.cycle-ring svg { width: 100%; height: 100%; }
.cycle-ring-label { font: 600 11px var(--font-body); letter-spacing: .14em; fill: var(--text-muted); }
.cycle-ring-day { font: 600 40px var(--font-display); fill: var(--text); }
.cycle-ring-emoji { font-size: 34px; }
.cycle-phase { font-family: var(--font-display); font-size: clamp(1.45rem, 1.2rem + 1.2vw, 1.9rem); font-weight: 500; line-height: 1.15; color: var(--text); }
.cycle-phase span { font-size: var(--fs-md); color: var(--text-muted); font-style: italic; font-weight: 400; }
.cycle-energy { margin-top: var(--s-2); font-size: var(--fs-md); }
.cycle-next { margin-top: var(--s-2); font-weight: 500; color: var(--link); }
.cycle-tips { list-style: none; margin: var(--s-3) 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cycle-tips li { padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--fs-sm); }
.cycle-tips strong { font-weight: 600; margin-right: 6px; }
.cycle-note { margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--text-muted); }
.tcard[data-card="cycle"] { background: linear-gradient(150deg, var(--surface) 30%, var(--surface-2)); }
.tcard[data-card="cycle"] .tcard-head h2 { font-size: var(--fs-md); color: var(--text-muted); font-family: var(--font-body); font-weight: 500; }
@media (max-width: 480px) {
  .cycle-today { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .cycle-ring { width: 156px; height: 156px; }
  .cycle-tips, .cycle-today .row-actions { justify-content: center; }
}
@media (min-width: 1100px) {
  .cycle-today { grid-template-columns: 170px 1fr; gap: var(--s-6); }
  .cycle-ring { width: 170px; height: 170px; }
}
