/* NOVUM: dark, clean blue, iOS-style */
:root {
  color-scheme: dark;
  --bg: #04060b;
  --card: #10141d;
  --card-2: #171c28;
  --fill: rgba(120, 140, 180, 0.16);
  --fill-2: rgba(120, 140, 180, 0.24);
  --sep: rgba(140, 150, 175, 0.18);
  --text: #f5f7fb;
  --text-2: rgba(225, 232, 245, 0.62);
  --text-3: rgba(225, 232, 245, 0.36);
  --accent: #3b9bff;
  --accent-2: #5ac8fa;
  --green: #30d158;
  --red: #ff453a;
  --orange: #ff9f0a;
  --yellow: #ffd60a;
  --r-lg: 20px;
  --r-md: 14px;
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --tabh: 52px;
  --st: 0;
  --ov: 1;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.35; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
  background-image: radial-gradient(120% 50% at 50% -10%, rgba(59, 155, 255, 0.16), transparent 70%);
  background-attachment: fixed;
}
html.sheet-open body { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
button:disabled { cursor: default; }
input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.ic { width: 22px; height: 22px; flex: none; }

.boot { height: 100dvh; display: grid; place-items: center; font-weight: 800; letter-spacing: 0.3em; color: var(--accent); }

/* ---------- layout ---------- */
.screen {
  max-width: 640px; margin: 0 auto;
  padding: 0 16px calc(var(--tabh) + var(--sab) + 32px);
  animation: screenIn 0.38s var(--spring);
}
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } }

/* nav bar + large title */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  padding-top: var(--sat);
  background: rgba(8, 11, 18, calc(var(--st) * 0.78));
  border-bottom: 0.5px solid rgba(140, 150, 175, calc(var(--st) * 0.22));
}
html.scrolled .nav { -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.nav-inner { max-width: 640px; margin: 0 auto; height: 44px; display: flex; align-items: center; justify-content: center; position: relative; padding: 0 12px; }
.nav-title { font-size: 17px; font-weight: 600; opacity: var(--st); transform: translateY(calc((1 - var(--st)) * 6px)); }
.nav-right { position: absolute; right: 12px; top: 0; height: 44px; display: flex; align-items: center; }
.lt { padding-top: calc(var(--sat) + 48px); padding-bottom: 14px; }
.large-title {
  margin: 0; font-size: 34px; line-height: 1.12; font-weight: 800; letter-spacing: -0.025em;
  opacity: calc(1 - var(--st)); transform: scale(var(--ov)); transform-origin: left center;
}
.eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); margin-bottom: 2px; opacity: calc(1 - var(--st)); }
.lt-sub { color: var(--text-2); font-size: 15px; margin-top: 4px; opacity: calc(1 - var(--st)); }
.greet { margin: 0 0 14px; font-size: 20px; font-weight: 600; }

/* ---------- cards & lists ---------- */
.card { background: var(--card); border-radius: var(--r-lg); position: relative; overflow: hidden; }
.tap { transition: transform 0.35s var(--spring), background-color 0.2s; }
.tap:active { transform: scale(0.975); transition-duration: 0.1s; }
.row.tap:active, .list .tap:active { transform: none; background: var(--card-2); }
.stack { display: grid; gap: 12px; }
.group { margin-top: 28px; }
.group-h { margin: 0 0 8px 16px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); }
.group-h-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.group-h-row .group-h { margin-bottom: 0; }
.group-f { margin: 8px 16px 0; font-size: 13px; color: var(--text-2); line-height: 1.4; }
.list > * + *::before {
  content: ''; position: absolute; top: 0; left: 60px; right: 0; height: 0.5px; background: var(--sep);
}
.list > .row, .list > .field, .list > .slider-row, .list > div { position: relative; }
.list > .field::before, .list > .slider-row::before, .list > .pad::before, .list > .bmi::before, .list > .note::before { left: 16px; }
.list > .goal-row + *::before, .list > * + .goal-row::before { left: 74px; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 52px; padding: 10px 16px; text-align: left;
}
.row-ic {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 17px; color: #fff; background: var(--fill-2);
}
.row-ic .ic { width: 18px; height: 18px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-size: 17px; }
.row-sub { font-size: 14px; color: var(--text-2); line-height: 1.35; }
.row-next { font-size: 13px; color: var(--accent); margin-top: 2px; }
.row-detail { color: var(--text-2); font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-chev { color: var(--text-3); display: flex; }
.row-chev .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.row.danger .row-title { color: var(--red); }
.body-row { align-items: flex-start; }
.body-row .row-ic { margin-top: 2px; }
.body-row .row-chev { align-self: center; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb12 { margin-bottom: 12px; }
.pad { padding: 12px 16px; } .pad-x { padding: 0 0; } .pad-b { padding-bottom: 16px; }
.muted { color: var(--text-2); } .center { text-align: center; } .tiny { font-size: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: 14px; font-weight: 600; font-size: 17px;
  transition: transform 0.3s var(--spring), opacity 0.2s, background-color 0.25s;
}
.btn:active:not(:disabled) { transform: scale(0.96); }
.btn:disabled { opacity: 0.4; }
.btn.sm { min-height: 36px; padding: 0 16px; font-size: 15px; border-radius: 999px; }
.btn.big { min-height: 56px; font-size: 18px; }
.btn.block { display: flex; width: 100%; margin-top: 12px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-tinted { background: rgba(59, 155, 255, 0.16); color: var(--accent); }
.btn-plain { background: var(--card); color: var(--accent); }
.btn-plain.danger, .btn.danger { color: var(--red); }
.btn-danger { background: var(--red); color: #fff; }
.btn-done { background: color-mix(in srgb, var(--c, var(--accent)) 22%, transparent); color: var(--c, var(--accent)); }
.btn-primary[style*='--c'] { background: var(--c); }
.link { color: var(--accent); font-size: 17px; min-height: 44px; padding: 0 4px; display: inline-flex; align-items: center; }
.link.b { font-weight: 600; }
.link.sm { font-size: 15px; min-height: 32px; }
.link:disabled { color: var(--text-3); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); transition: transform 0.3s var(--spring), opacity 0.2s; }
.icon-btn:active { transform: scale(0.88); }
.icon-btn:disabled { opacity: 0.25; }
.icon-btn.accent { background: rgba(59, 155, 255, 0.16); width: 36px; height: 36px; }
.icon-btn.accent .ic { width: 20px; height: 20px; stroke-width: 2.6; }
.icon-btn.muted { color: var(--text-3); }
.icon-btn.muted .ic { width: 19px; height: 19px; }

/* tick circle for habits */
.tick {
  width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; position: relative;
}
.tick::before {
  content: ''; position: absolute; inset: 7px; border-radius: 50%;
  border: 2px solid var(--fill-2); transition: all 0.35s var(--bounce);
}
.tick .ic { position: relative; width: 18px; height: 18px; stroke-width: 3; color: #fff; opacity: 0; transform: scale(0.4); transition: all 0.35s var(--bounce); }
.tick.on::before { background: var(--c); border-color: var(--c); }
.tick.on .ic { opacity: 1; transform: scale(1); }
.tick:active::before { transform: scale(0.85); }

.add-pill { width: 44px; height: 44px; display: grid; place-items: center; flex: none; position: relative; color: #fff; }
.add-pill::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--accent); transition: transform 0.3s var(--bounce), background 0.2s; }
.add-pill .ic { position: relative; width: 18px; height: 18px; stroke-width: 3; }
.add-pill.on::before { background: var(--green); }
.add-pill:active::before { transform: scale(0.85); }

/* ---------- rings ---------- */
.ring { position: relative; flex: none; }
.ring svg { display: block; overflow: visible; }
.ring-fg { transition: stroke-dashoffset 1.1s var(--spring); }
.ring-c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-stack { position: relative; flex: none; }
.ring-abs { position: absolute; display: grid; place-items: center; }
.ring-txt { display: flex; flex-direction: column; align-items: center; line-height: 1.1; font-size: 15px; font-weight: 700; }
.ring-txt b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ring-txt small { font-size: 10px; font-weight: 600; color: var(--text-2); }
.ring-emoji { font-size: 20px; }

/* ---------- home ---------- */
.quit-card { display: block; width: 100%; padding: 16px 18px; text-align: left; }
.quit-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--qc) 18%, transparent), transparent 60%); }
.qc-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.qc-emoji { font-size: 18px; }
.qc-label { color: var(--qc); }
.qc-saved { margin-left: auto; color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.qc-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 8px; }
.qc-time { display: flex; gap: 14px; font-variant-numeric: tabular-nums; }
.qc-time span { display: flex; flex-direction: column; }
.qc-time b { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.qc-time small { font-size: 12px; color: var(--text-2); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.qc-time .qc-sec b { color: var(--text-3); }
.qc-foot { font-size: 14px; color: var(--text-2); position: relative; z-index: 1; }
@media (max-width: 360px) { .qc-time { gap: 10px; } .qc-time b { font-size: 28px; } }

.money-card { display: block; width: 100%; padding: 18px; margin-top: 12px; text-align: left;
  background: linear-gradient(135deg, #12233f 0%, #0f1622 70%); }
.kicker { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); }
.kicker .ic { width: 16px; height: 16px; }
.mc-big { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; margin: 4px 0; font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #fff, #9fd3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mc-sub { font-size: 14px; color: var(--text-2); }

.badges { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.badges::-webkit-scrollbar { display: none; }
.badge { flex: none; width: 92px; scroll-snap-align: start; background: var(--card); border-radius: var(--r-md); padding: 14px 8px 12px; text-align: center; }
.badge-medal {
  width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 16px; color: var(--text-3); border: 2px dashed var(--fill-2);
}
.badge.got .badge-medal { border: 0; color: #fff; background: linear-gradient(140deg, var(--accent-2), var(--accent)); box-shadow: 0 4px 18px rgba(59, 155, 255, 0.35); }
.badge.got .badge-medal .ic { width: 26px; height: 26px; stroke-width: 3; }
.badge-l { font-size: 14px; font-weight: 600; }
.badge-s { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.badge:not(.got) .badge-l { color: var(--text-2); }

.checkin-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; }
.cc-emoji { font-size: 30px; }
.cc-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cc-main span { font-size: 14px; color: var(--text-2); }
.pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }

.ny-card { display: block; width: 100%; margin-top: 28px; padding: 22px 20px; text-align: left;
  background: radial-gradient(140% 120% at 0% 0%, #1b3b74 0%, #0d1424 55%, #0a0e17 100%); }
.ny-year { font-size: 44px; font-weight: 900; letter-spacing: -0.04em; line-height: 1;
  background: linear-gradient(90deg, #fff 0%, #8cc8ff 60%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ny-year.xl { font-size: 72px; }
.ny-t { font-size: 20px; font-weight: 700; margin: 8px 0 4px; }
.ny-s { color: var(--text-2); font-size: 15px; margin-bottom: 14px; }
.ny-mini { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; margin-bottom: 16px; text-align: left;
  background: linear-gradient(120deg, #15294c, var(--card) 70%); }
.ny-mini-y { font-weight: 900; font-size: 20px; color: #9fd3ff; letter-spacing: -0.03em; }
.ny-hero { text-align: center; padding: 8px 8px 4px; }
.ny-hero p { font-size: 15px; margin: 6px 0 0; }

/* ---------- check-in ---------- */
.day-nav { display: flex; align-items: center; justify-content: space-between; padding: 6px; }
.day-nav-t { display: flex; flex-direction: column; align-items: center; }
.day-nav-t span { font-size: 14px; color: var(--text-2); }
.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 10px; }
.moods::before { display: none; }
.mood { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; border-radius: 14px; min-height: 72px; transition: background 0.2s, transform 0.35s var(--bounce); }
.mood-e { font-size: 32px; transition: transform 0.35s var(--bounce); filter: grayscale(0.5); opacity: 0.7; }
.mood-l { font-size: 12px; color: var(--text-2); }
.mood.on { background: rgba(59, 155, 255, 0.18); }
.mood.on .mood-e { transform: scale(1.18); filter: none; opacity: 1; }
.mood.on .mood-l { color: var(--text); font-weight: 600; }
.mood:active { transform: scale(0.9); }

.slider-row { padding: 14px 16px 16px; }
.slider-top { display: flex; justify-content: space-between; font-size: 16px; margin-bottom: 12px; }
.slider-v { color: var(--text-2); font-size: 15px; }
.slider-v b { color: var(--text); font-variant-numeric: tabular-nums; margin-right: 4px; }
input[type='range'] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; margin: 0; touch-action: pan-y;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--c) var(--p), var(--fill-2) var(--p));
}
input[type='range']::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--c) var(--p), var(--fill-2) var(--p)); }
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 0 0.5px rgba(0, 0, 0, 0.1);
}
input[type='range']::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
input[type='range'].unset::-webkit-slider-thumb { background: #8a93a6; }

.note { display: block; width: 100%; border: 0; outline: 0; background: transparent; padding: 14px 16px; resize: vertical; min-height: 96px; font-size: 16px; }
.note::placeholder { color: var(--text-3); }

/* ---------- segmented control ---------- */
.seg {
  position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr);
  background: var(--fill); border-radius: 10px; padding: 2px; min-height: 36px;
}
.seg-thumb {
  position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / var(--n));
  transform: translateX(calc(var(--i) * 100%)); background: #3a4254; border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25); transition: transform 0.4s var(--spring);
}
.seg button { position: relative; z-index: 1; text-align: center; min-height: 32px; font-size: 14px; font-weight: 500; padding: 6px 4px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s; }
.seg button.on { color: var(--text); font-weight: 600; }
.seg-sm { min-height: 32px; }
.seg-sm button { font-size: 13px; padding: 4px 8px; }

/* toggle */
.toggle { width: 51px; height: 31px; border-radius: 16px; background: var(--fill-2); position: relative; transition: background 0.25s; flex: none; }
.toggle span { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); transition: transform 0.35s var(--spring); }
.toggle.on { background: var(--green); }
.toggle.on span { transform: translateX(20px); }

/* stepper */
.stepper { display: flex; align-items: center; gap: 4px; background: var(--fill); border-radius: 10px; }
.stepper button { width: 44px; height: 36px; font-size: 22px; color: var(--accent); }
.stepper span { min-width: 86px; text-align: center; font-size: 15px; font-weight: 600; }

/* form field */
.field { display: flex; align-items: center; gap: 12px; padding: 4px 16px; min-height: 52px; flex-wrap: wrap; }
.field-l { flex: none; min-width: 96px; }
.field-c { flex: 1; display: flex; }
.field-c input, .field-c select {
  width: 100%; border: 0; outline: 0; background: transparent; text-align: right; color: var(--text-2); font-size: 17px; min-height: 44px;
}
.field-c input:focus { color: var(--text); }
.field-c input[type='date'], .field-c input[type='datetime-local'] { -webkit-appearance: none; appearance: none; display: flex; justify-content: flex-end; color: var(--accent); }
.field-c input::-webkit-date-and-time-value { text-align: right; }
.field-h { width: 100%; font-size: 13px; color: var(--text-2); padding-bottom: 8px; }

/* ---------- goals ---------- */
.goal-row { min-height: 68px; }
.goal-row .row-detail { font-weight: 600; }
.empty { text-align: center; padding: 48px 24px; }
.empty-e { font-size: 52px; }
.empty-t { font-size: 22px; font-weight: 700; margin: 10px 0 6px; }
.empty-x { color: var(--text-2); font-size: 15px; max-width: 320px; margin: 0 auto; }
.empty-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }

.detail-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 12px; }
.dh-in { display: flex; flex-direction: column; align-items: center; }
.dh-e { font-size: 34px; }
.dh-in b { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.dh-name { font-size: 24px; font-weight: 800; margin: 16px 0 4px; letter-spacing: -0.02em; }
.dh-label { font-size: 16px; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.chip { font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--fill); color: var(--text-2); }
.chip[style*='--c'] { background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); }
.chip.big { min-height: 44px; padding: 0 16px; font-size: 15px; display: inline-flex; align-items: center; transition: all 0.25s var(--spring); }
.chip.big:not(.on) { background: var(--fill); color: var(--text-2); }
.chip.big.on { background: var(--c); color: #000; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }

.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.stats3 > div { background: var(--card); border-radius: var(--r-md); padding: 12px 8px; text-align: center; display: flex; flex-direction: column; }
.stats3 b { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats3 span { font-size: 12px; color: var(--text-2); }
.mini-h { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); margin-bottom: 10px; }
.weekdots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 60px; }
.wd span { font-size: 12px; color: var(--text-2); }
.wd i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); transition: all 0.35s var(--bounce); }
.wd.today span { color: var(--accent); font-weight: 700; }
.wd.on i { background: var(--c); }
.wd i .ic { width: 16px; height: 16px; stroke-width: 3; color: #fff; }
.wd:disabled { opacity: 0.35; }
.heat { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.heat-col { display: grid; grid-template-rows: repeat(7, 1fr); gap: 4px; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: var(--fill); }
.heat i.on { background: var(--c); }
.heat i.future { opacity: 0.3; }
.info { font-size: 15px; color: var(--text-2); line-height: 1.45; }
.entry-add { display: flex; gap: 8px; align-items: center; padding: 8px 8px 8px 16px; }
.entry-add input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; min-height: 44px; }

.editor-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 8px 0 0; }
.eh-icon { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; font-size: 44px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4); transition: background 0.3s; }
.eh-name { width: 100%; text-align: center; font-size: 22px; font-weight: 700; border: 0; outline: 0; background: var(--card); border-radius: var(--r-md); padding: 14px; }
.eh-name::placeholder { color: var(--text-3); }
.emoji-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 10px; }
.emo { aspect-ratio: 1; font-size: 24px; border-radius: 12px; display: grid; place-items: center; transition: transform 0.3s var(--bounce), background 0.2s; min-height: 44px; }
.emo.on { background: var(--fill-2); transform: scale(1.08); }
.swatches { display: flex; justify-content: space-between; gap: 6px; padding: 14px 16px; }
.sw { width: 36px; height: 36px; border-radius: 50%; background: var(--c); position: relative; transition: transform 0.3s var(--bounce); }
.sw::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2.5px solid transparent; transition: border-color 0.2s; }
.sw.on::after { border-color: var(--c); }
.sw:active { transform: scale(0.85); }
.list > .emoji-grid::before, .list > .swatches::before, .list > .chip-row::before, .list > .moods::before { display: none; }

/* ---------- progress ---------- */
.glance { padding: 18px; }
.glance-top { display: flex; align-items: center; gap: 18px; }
.gl-c { display: flex; flex-direction: column; align-items: center; }
.gl-c b { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.gl-c span { font-size: 12px; color: var(--text-2); }
.gl-legend { flex: 1; display: grid; gap: 8px; }
.gl-li { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.gl-li i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.gl-li span { flex: 1; }
.gl-li b { font-variant-numeric: tabular-nums; }
.glance-empty { text-align: center; color: var(--text-2); padding-bottom: 6px; }
.glance-empty p { margin: 0 0 12px; font-size: 15px; }
.year-bar { margin-top: 18px; }
.yb-t { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-2); margin-bottom: 8px; }
.yb-t span:first-child { color: var(--text); font-weight: 600; }
.yb { height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.yb i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width 1s var(--spring); }
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin: 16px 0 8px; }
.mo { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mo-bar { width: 100%; height: 44px; background: var(--fill); border-radius: 4px; display: flex; align-items: flex-end; overflow: hidden; }
.mo-bar i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; }
.mo span { font-size: 11px; color: var(--text-2); }
.mo.future .mo-bar { opacity: 0.4; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
.tile { background: var(--card); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; }
.tile-k { font-size: 13px; color: var(--text-2); font-weight: 600; }
.tile b { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tile-u { font-size: 13px; color: var(--text-2); }

.chart-card { padding: 14px 10px 10px; }
.chart { position: relative; width: 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.chart svg { display: block; }
.chart .grid { stroke: var(--sep); stroke-width: 1; }
.chart .axis { fill: var(--text-2); font-size: 11px; font-family: var(--font); }
.chart .dlabel { fill: var(--text); font-size: 11px; font-weight: 600; font-family: var(--font); }
.chart .cross { stroke: var(--text-3); stroke-width: 1; }
.chart-empty { position: absolute; inset: 0 0 24px 30px; display: grid; place-items: center; text-align: center; font-size: 14px; color: var(--text-2); padding: 0 16px; }
.tip { position: absolute; top: 0; width: 128px; pointer-events: none; background: rgba(36, 42, 56, 0.96); border-radius: 10px; padding: 8px 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); font-size: 13px; }
.tip-d { color: var(--text-2); font-size: 12px; margin-bottom: 4px; }
.tip-r { display: flex; align-items: center; gap: 6px; }
.tip-r i, .legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tip-r b { margin-left: auto; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 16px; padding: 0 6px 8px; font-size: 13px; color: var(--text); }
.legend span { display: flex; align-items: center; gap: 6px; }
.insight { margin: 8px 6px 2px; font-size: 14px; color: var(--text-2); }

/* ---------- profile ---------- */
.profile-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; }
.avatar { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, var(--accent-2), var(--accent) 60%, #1a4fd6); flex: none; }
.pc-name { font-size: 22px; font-weight: 700; }
.bmi { padding: 14px 16px 16px; }
.bmi-top { display: flex; align-items: flex-start; justify-content: space-between; }
.bmi-v { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pill { font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; }
.pill.good { background: rgba(48, 209, 88, 0.16); color: var(--green); }
.pill.good::before { content: '✓'; }
.pill.warn { background: rgba(255, 159, 10, 0.16); color: var(--orange); }
.pill.warn::before { content: '!'; font-weight: 800; }
.pill.bad { background: rgba(255, 69, 58, 0.16); color: var(--red); }
.pill.bad::before { content: '!'; font-weight: 800; }
.bmi-scale { position: relative; display: flex; height: 8px; margin-top: 14px; gap: 2px; }
.bmi-scale i { height: 100%; border-radius: 4px; opacity: 0.85; }
.bmi-scale .z1 { width: 17.5%; background: var(--orange); }
.bmi-scale .z2 { width: 32.5%; background: var(--green); }
.bmi-scale .z3 { width: 25%; background: var(--orange); }
.bmi-scale .z4 { width: 25%; background: var(--red); }
.bmi-scale b { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--card);
  transform: translate(-50%, -50%); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); transition: left 0.8s var(--spring); }
.bmi-ticks { position: relative; height: 18px; margin-top: 6px; font-size: 11px; color: var(--text-2); }
.bmi-ticks span { position: absolute; transform: translateX(-50%); }
.bmi-ticks span:first-child { left: 0; transform: none; }
.bmi-ticks span:last-child { right: 0; transform: none; }
.about { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; margin: 36px 0 8px; color: var(--text-2); font-size: 14px; }
.about img { border-radius: 14px; margin-bottom: 6px; }
.about b { color: var(--text); letter-spacing: 0.3em; font-size: 15px; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 22px 36px; }
.timeline li::before { content: ''; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--fill-2); }
.timeline li.done::before { background: var(--c); }
.timeline li:last-child::before { display: none; }
.tl-dot { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--fill-2); display: grid; place-items: center; background: var(--bg); }
.timeline li.done .tl-dot { background: var(--c); border-color: var(--c); }
.tl-dot .ic { width: 14px; height: 14px; stroke-width: 3.2; color: #fff; }
.tl-when { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.03em; }
.tl-when em { font-style: normal; color: var(--accent); text-transform: none; letter-spacing: 0; }
.tl-title { font-size: 17px; font-weight: 700; margin: 2px 0 3px; }
.timeline li:not(.done) .tl-title { color: var(--text-2); }
.tl-text { font-size: 15px; color: var(--text-2); line-height: 1.45; }
.disclaimer { font-size: 13px; color: var(--text-2); background: var(--card); border-radius: var(--r-md); padding: 12px 14px; line-height: 1.45; margin: 4px 0 0; }

/* ---------- craving SOS ---------- */
.sos {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 14px 16px; text-align: left;
  border-radius: var(--r-lg); background: linear-gradient(120deg, rgba(90, 200, 250, 0.2), rgba(59, 155, 255, 0.1) 60%, var(--card));
  border: 1px solid rgba(90, 200, 250, 0.25);
}
.sos.compact { margin: 16px 0 0; }
.sos-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: rgba(90, 200, 250, 0.2); flex: none; }
.sos-t { font-size: 17px; font-weight: 700; }
.sos-s { font-size: 14px; color: var(--text-2); }
.why { display: block; width: 100%; margin-top: 12px; padding: 14px 18px; text-align: left; border-radius: var(--r-lg); background: var(--card); border-left: 3px solid var(--accent); }
.why-k { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); margin-bottom: 4px; }
.why-t { font-size: 17px; font-style: italic; line-height: 1.35; }

.sos-body { display: flex; flex-direction: column; align-items: stretch; }
.breath-stage { position: relative; width: 240px; height: 240px; margin: 8px auto 4px; display: grid; place-items: center; }
.breath-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(90, 200, 250, 0.18); }
.breath {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #7fd6ff 0%, var(--accent) 55%, #1a4fd6 100%);
  box-shadow: 0 0 60px rgba(59, 155, 255, 0.45);
  transform: scale(0.5);
  animation: breathe 14s infinite;
}
@keyframes breathe {
  0% { transform: scale(0.5); animation-timing-function: ease-in-out; }
  28.57% { transform: scale(1); animation-timing-function: linear; }
  57.14% { transform: scale(1); animation-timing-function: ease-in-out; }
  100% { transform: scale(0.5); }
}
.breath-label { position: relative; font-size: 22px; font-weight: 700; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }
.sos-timer { text-align: center; display: flex; flex-direction: column; gap: 4px; margin: 10px 0 16px; }
.sos-timer b { font-size: 44px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sos-timer span { font-size: 15px; color: var(--text-2); padding: 0 12px; }
.sos-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; min-height: 96px; animation: cardIn 0.5s var(--spring); }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } }
.sos-card-e { font-size: 28px; line-height: 1; }
.sos-card-k { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); margin-bottom: 4px; }
.sos-card-t { font-size: 17px; line-height: 1.4; }
.center-link { align-self: center; text-align: center; margin-top: 8px; }
.sos-actions { margin-top: auto; padding-top: 12px; }
.glow { box-shadow: 0 0 0 0 rgba(59, 155, 255, 0.6); animation: glow 1.8s infinite; }
@keyframes glow { 70% { box-shadow: 0 0 0 14px rgba(59, 155, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 155, 255, 0); } }
.sos-done { text-align: center; padding: 8px 8px 0; }
.sos-done-e { font-size: 56px; }
.sos-done h2 { font-size: 24px; font-weight: 800; margin: 8px 0 6px; letter-spacing: -0.02em; }
.sos-done p { font-size: 15px; line-height: 1.45; margin: 0; }
.sheet-intro { font-size: 15px; margin: 4px 8px 16px; line-height: 1.45; }

/* trigger bars */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 28px; align-items: center; gap: 10px; font-size: 15px; }
.bar-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-t { height: 10px; border-radius: 5px; background: var(--fill); overflow: hidden; }
.bar-t i { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; }

/* notification settings */
.time-in { border: 0; outline: 0; background: var(--fill); border-radius: 8px; padding: 6px 8px; color: var(--text); font-size: 15px; min-height: 36px; -webkit-appearance: none; appearance: none; }
.err { color: var(--red); }

/* ---------- auth & Day Zero ---------- */
.auth {
  max-width: 520px; margin: 0 auto; min-height: 100dvh;
  padding: calc(var(--sat) + 16px) 20px calc(var(--sab) + 28px);
  display: flex; flex-direction: column; animation: screenIn 0.4s var(--spring);
}
.welcome { justify-content: space-between; }
.wl-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 0 24px; }
.wl-logo { border-radius: 24px; box-shadow: 0 12px 40px rgba(59, 155, 255, 0.35); }
.wl-name { font-size: 40px; font-weight: 900; letter-spacing: 0.32em; margin: 26px 0 10px; padding-left: 0.32em; }
.wl-tag { font-size: 20px; line-height: 1.4; color: var(--text-2); margin: 0; font-weight: 500; }
.wl-actions .btn + .btn { margin-top: 10px; }
.hs-tip { margin-top: 16px; background: var(--card); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; color: var(--text-2); line-height: 1.45; }
.hs-tip b { color: var(--text); }
.hs-tip > b:first-child { display: block; margin-bottom: 2px; }
.hs-ic { display: inline-flex; vertical-align: -4px; color: var(--accent); }
.hs-ic .ic { width: 18px; height: 18px; }
.auth-head { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 18px -10px; }
.auth-head p { margin: 4px 0 0; font-size: 15px; }
.auth-title { font-size: 30px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; margin: 6px 0 0; }
.auth-title.center { text-align: center; }
.auth-err { color: var(--red); font-size: 15px; margin: 12px 4px 0; line-height: 1.4; }
.auth-fine { font-size: 13px; color: var(--text-2); text-align: center; margin: 14px 12px 4px; line-height: 1.45; }
.tf-card { padding: 4px 16px; }
.tf { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; position: relative; }
.tf + .tf, .tf-pair + .tf, .tf + .tf-pair { border-top: 0.5px solid var(--sep); }
.tf-l { font-size: 13px; font-weight: 600; color: var(--text-2); }
.tf-i { width: 100%; border: 0; outline: 0; background: transparent; font-size: 17px; min-height: 32px; padding: 0; color: var(--text); }
.tf-i::placeholder { color: var(--text-3); }
.tf-i[type='date'], .tf-i[type='datetime-local'] { -webkit-appearance: none; appearance: none; color: var(--accent); }
.tf-h { font-size: 13px; color: var(--text-2); }
.tf.bad .tf-l { color: var(--red); }
.tf-row { display: flex; align-items: center; gap: 8px; }
.tf-eye { color: var(--accent); font-size: 15px; min-height: 44px; padding: 0 4px; }
.tf-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dz-top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin: 0 -10px 12px; }
.dz-badge { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); padding-left: 10px; }
.dz-dots { display: flex; gap: 6px; padding-right: 10px; }
.dz-dots i { width: 22px; height: 5px; border-radius: 3px; background: var(--fill-2); transition: background 0.3s; }
.dz-dots i.on { background: var(--accent); }
.dz-sub { font-size: 16px; line-height: 1.45; margin: 10px 0 20px; }
.dz-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 4px 8px; }
.dz-label > span { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); }
.dz-label .seg { width: 150px; }
.dz-calc { text-align: center; color: var(--text-2); font-size: 15px; margin: 16px 0 0; }
.dz-note { font-size: 15px; line-height: 1.45; margin: 16px 4px 0; }
.dz-q { margin-bottom: 12px; }
.dz-q-h { display: flex; align-items: center; gap: 10px; padding: 14px 0 6px; font-size: 17px; }
.dz-ideas { padding: 16px 0 0; }
.dz-ready { text-align: center; padding: 24px 0 20px; }
.dz-ready .ny-year { font-size: 56px; }
.dz-ready p { font-size: 16px; margin: 8px 0 0; }
.dz-foot { margin-top: auto; padding-top: 24px; }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 92px; padding: 14px;
  background: var(--card); border-radius: var(--r-md); border: 2px solid transparent; text-align: left;
  transition: transform 0.3s var(--bounce), border-color 0.2s, background 0.2s;
}
.pick:active { transform: scale(0.96); }
.pick-e { font-size: 28px; line-height: 1; }
.pick-l { font-size: 16px; font-weight: 600; }
.pick-tick { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-2); opacity: 0; transform: scale(0.5); transition: all 0.3s var(--bounce); }
.pick-tick .ic { width: 14px; height: 14px; stroke-width: 3; color: #fff; }
.pick.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--card)); }
.pick.on .pick-tick { opacity: 1; transform: scale(1); background: var(--c); }
.add-first { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; text-align: left; }
.dh-note { font-size: 14px; color: var(--accent); margin-top: 6px; }
.update-bar {
  position: fixed; left: 12px; right: 12px; z-index: 90; bottom: calc(var(--tabh) + var(--sab) + 12px);
  max-width: 616px; margin: 0 auto; padding: 14px 16px; border-radius: 14px; text-align: center; font-size: 15px;
  background: rgba(40, 70, 130, 0.94); color: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); animation: cardIn 0.5s var(--spring);
}

/* ---------- step-by-step setup ---------- */
.wiz { display: flex; flex-direction: column; flex: 1; }
.wiz-top { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 0 -10px 8px; }
.wiz-spacer { width: 44px; flex: none; }
.wiz-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.wiz-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width 0.6s var(--spring); }
.wiz-badge { min-width: 44px; padding-right: 10px; text-align: right; font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; letter-spacing: 0.02em; }
.wiz-body { display: flex; flex-direction: column; padding-top: 18px; }
.wiz-body.fwd { animation: wizFwd 0.5s var(--spring); }
.wiz-body.back { animation: wizBack 0.5s var(--spring); }
@keyframes wizFwd { from { opacity: 0; transform: translateX(36px); } }
@keyframes wizBack { from { opacity: 0; transform: translateX(-36px); } }
.wiz-body > * { animation: rise 0.55s var(--spring) both; }
.wiz-body > :nth-child(2) { animation-delay: 50ms; }
.wiz-body > :nth-child(3) { animation-delay: 100ms; }
.wiz-body > :nth-child(4) { animation-delay: 150ms; }
.wiz-body > :nth-child(5) { animation-delay: 200ms; }
.wiz-body > :nth-child(n + 6) { animation-delay: 250ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.wiz-emoji { font-size: 48px; line-height: 1; margin-bottom: 16px; animation: pop 0.6s var(--bounce) both !important; }
@keyframes pop { from { opacity: 0; transform: scale(0.4) rotate(-12deg); } }
.wiz-q { font-size: 30px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; margin: 0; }
.wiz-q.center, .wiz-sub.center { text-align: center; }
.wiz-sub { font-size: 16px; line-height: 1.45; color: var(--text-2); margin: 10px 0 0; }
.wiz-em { color: var(--text); font-weight: 600; word-break: break-all; }
.wiz-body > .wiz-in, .wiz-pair, .wiz-at, .wiz-pw, .wiz-num, .code, .dob, .pick-grid, .wiz-add, .wiz-unit { margin-top: 26px; }
.wiz-in {
  width: 100%; min-height: 60px; padding: 0 18px; border: 2px solid transparent; outline: 0; border-radius: 16px;
  background: var(--card); color: var(--text); font-size: 20px; font-weight: 500; transition: border-color 0.2s, background 0.2s;
}
.wiz-in::placeholder { color: var(--text-3); font-weight: 400; }
.wiz-in:focus { border-color: var(--accent); background: var(--card-2); }
.wiz-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wiz-pair .wiz-num { margin-top: 0; }
.wiz-at { position: relative; }
.wiz-at > span { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--text-3); pointer-events: none; }
.wiz-at .wiz-in { padding-left: 38px; }
.wiz-pw { position: relative; }
.wiz-pw .wiz-in { padding-right: 70px; }
.wiz-pw .tf-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.wiz-num { position: relative; }
.wiz-num .wiz-in { font-size: 30px; font-weight: 700; padding-right: 60px; font-variant-numeric: tabular-nums; }
.wiz-num > span { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--text-2); font-weight: 600; pointer-events: none; }
.wiz-unit .seg { max-width: 240px; }
.wiz-hint { font-size: 14px; color: var(--text-2); margin: 10px 4px 0; }
.wiz-big-note { font-size: 17px; font-weight: 600; color: var(--accent); margin: 16px 4px 0; }
.wiz-err { color: var(--red); font-size: 15px; line-height: 1.4; margin: 14px 4px 0; animation: shake 0.4s both !important; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.wiz-fine { font-size: 13px; color: var(--text-2); line-height: 1.45; margin: 18px 4px 0; }
.wiz-fine.center { text-align: center; }
.wiz-actions { margin-top: 28px; display: flex; flex-direction: column; gap: 6px; }
.wiz-actions .btn.block { margin-top: 0; }
.wiz-add { display: flex; gap: 8px; align-items: center; }
.wiz-add .wiz-in { flex: 1; min-width: 0; font-size: 17px; }
.mt12 { margin-top: 12px; }
.pw-meter { height: 6px; border-radius: 3px; background: var(--fill); margin-top: 12px; overflow: hidden; }
.pw-meter i { display: block; height: 100%; border-radius: 3px; transition: width 0.4s var(--spring), background 0.3s; }
.row.pop { animation: rise 0.4s var(--spring); }
.wl-tag span { display: block; animation: rise 0.7s var(--spring) both; }
.wl-tag span:nth-child(2) { animation-delay: 0.15s; }
.wl-tag span:nth-child(3) { animation-delay: 0.3s; }
.wl-logo { animation: pop 0.8s var(--bounce) both; }

input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type='number'] { -moz-appearance: textfield; }

/* 6-digit code boxes */
.code { position: relative; display: block; }
.code-in { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; caret-color: transparent; z-index: 1; }
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-boxes i {
  font-style: normal; height: 62px; border-radius: 14px; background: var(--card); border: 2px solid transparent;
  display: grid; place-items: center; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums;
  transition: border-color 0.2s, transform 0.25s var(--bounce);
}
.code-boxes i.filled { transform: scale(1.04); background: var(--card-2); }
.code-in:focus + .code-boxes i.cur { border-color: var(--accent); }

/* date of birth: three wheels */
.dob { display: grid; grid-template-columns: 0.8fr 1.4fr 1fr; gap: 8px; }
.dob-f {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 72px; padding: 10px 14px;
  border-radius: 16px; background: var(--card); border: 2px solid transparent; transition: border-color 0.2s, background 0.2s;
}
.dob-f:focus-within { border-color: var(--accent); }
.dob-f.set { background: var(--card-2); }
.dob-l { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2); }
.dob-v { font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dob-f:not(.set) .dob-v { color: var(--text-3); }
.dob-f select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; -webkit-appearance: none; appearance: none; cursor: pointer; }

/* Day Zero details card */
.dz-q { padding: 4px 16px 12px; margin-top: 14px; }
.dz-f { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; border-top: 0.5px solid var(--sep); }
.dz-f > span:first-child { font-size: 16px; }
.dz-f input { border: 0; outline: 0; background: transparent; color: var(--accent); font-size: 16px; text-align: right; min-height: 44px; -webkit-appearance: none; appearance: none; }
.dz-money { display: flex; align-items: center; color: var(--text-2); }
.dz-money input { width: 80px; color: var(--text); font-size: 18px; font-weight: 600; }
.dz-save { font-size: 13px; color: var(--green); margin: 4px 0 0; }
.ready-ring {
  width: 96px; height: 96px; margin: 8px auto 20px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #7fd6ff, var(--accent) 60%, #1a4fd6); box-shadow: 0 0 60px rgba(59, 155, 255, 0.5);
  animation: pop 0.8s var(--bounce) both;
}
.ready-ring span { font-size: 44px; font-weight: 900; color: #fff; }

/* Home: "When it gets hard" */
.group.first { margin-top: 6px; }
.support { padding: 0; }
.sup-sos {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; text-align: left;
  background: linear-gradient(120deg, rgba(90, 200, 250, 0.18), rgba(59, 155, 255, 0.06) 70%);
  transition: background 0.2s;
}
.sup-sos:active { background: rgba(90, 200, 250, 0.26); }
.sup-why { display: block; width: 100%; padding: 14px 16px 16px; text-align: left; border-top: 0.5px solid var(--sep); }
.sup-why:active { background: var(--card-2); }
.why-add { display: block; font-size: 16px; color: var(--accent); font-weight: 600; }
.money-card .mc-big { margin-top: 0; }

/* sections ease in one after another when a tab opens */
.page > section, .page > .card, .page > .greet, .page > .tiles { animation: rise 0.55s var(--spring) both; }
.page > :nth-child(4) { animation-delay: 40ms; }
.page > :nth-child(5) { animation-delay: 80ms; }
.page > :nth-child(6) { animation-delay: 120ms; }
.page > :nth-child(7) { animation-delay: 160ms; }
.page > :nth-child(n + 8) { animation-delay: 200ms; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: center;
  padding: 0 max(8px, env(safe-area-inset-left)) var(--sab) max(8px, env(safe-area-inset-right));
  background: rgba(12, 15, 24, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border-top: 0.5px solid var(--sep);
}
.tab {
  flex: 1; max-width: 120px; height: var(--tabh); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); transition: color 0.2s;
}
.tab-ic { position: relative; display: grid; transition: transform 0.35s var(--bounce); }
.tab-ic .ic { width: 25px; height: 25px; }
.tab-l { font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em; }
.tab.on { color: var(--accent); }
.tab.on .ic { stroke-width: 2.4; }
.tab:active .tab-ic { transform: scale(0.84); }
.tab-dot { position: absolute; top: -1px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 1.5px solid #0c0f18; }

/* ---------- bottom sheet ---------- */
.sheet-layer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.sheet-layer.open { pointer-events: auto; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.4s var(--spring); }
.sheet-layer.open .sheet-backdrop { opacity: 1; }
.sheet-layer.stacked .sheet { transform: translate3d(0, 0, 0) scale(0.94) !important; filter: brightness(0.7); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 640px;
  max-height: calc(100dvh - var(--sat) - 12px);
  background: #0c1019; border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column;
  transition: transform 0.5s var(--spring), filter 0.4s;
  will-change: transform; transform-origin: top center;
}
.sheet.tall { height: calc(100dvh - var(--sat) - 12px); }
.sheet.dragging { transition: none; }
.grabber-zone { padding: 6px 0 0; display: flex; justify-content: center; flex: none; }
.grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--fill-2); }
.sheet-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 12px; min-height: 48px; flex: none; }
.sb-title { font-size: 17px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.sb-side { display: flex; }
.sb-right { justify-content: flex-end; }
.sheet-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 4px 16px calc(var(--sab) + 28px);
}
.sheet-body > .group:first-child { margin-top: 12px; }
.sheet .card { background: var(--card); }
.confirm-text { font-size: 16px; color: var(--text-2); text-align: center; margin: 4px 8px 12px; line-height: 1.45; }

/* toast */
.toast {
  position: fixed; left: 50%; top: calc(var(--sat) + 10px); z-index: 100;
  transform: translate(-50%, -140%); background: rgba(40, 46, 62, 0.92); color: #fff;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  padding: 12px 20px; border-radius: 999px; font-size: 15px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45); transition: transform 0.5s var(--spring);
}
.toast.show { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media (min-width: 700px) {
  .sheet { border-radius: 22px; bottom: 20px; }
}
