/* Nora's Hearts — laid out like Miles's app, in soft light violet with dusty pink + purple (Nora's pick). */
:root {
  --bg: #e6ddf1; --bg2: #eee7f6;
  --card: #f6f1fb; --card2: #e9dff4; --card3: #ddd0ec;
  --border: rgba(90,60,120,.10); --border2: rgba(90,60,120,.17);
  --text: #3e2d50; --sub: #75628a; --dim: #a291b4;
  --accent: #c2689a; --accent2: #ad5584; --accent-soft: rgba(194,104,154,.13);
  --lav: #8a6cc6; --lav2: #7559b3; --lav-soft: rgba(138,108,198,.14);
  --green: #4c9467; --green-soft: rgba(76,148,103,.13);
  --heart-off: #d9cde8; --on-grad: #ffffff;
  --grad: linear-gradient(135deg, #cf7ba5 0%, #b480c4 55%, #9478d0 100%);
  --radius: 20px; --radius-sm: 14px;
  --display: 'Fredoka', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  --body: 'Nunito', ui-rounded, -apple-system, 'Segoe UI', system-ui, sans-serif;
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 8px 22px -14px rgba(90,60,120,.35);
  --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: radial-gradient(1200px 520px at 50% -260px, rgba(255,255,255,.55), transparent 70%), var(--bg);
  color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; transition: transform .12s ease, background-color .2s, color .2s, opacity .2s; }
button:active:not(:disabled) { transform: scale(.97); }
button:focus-visible { outline: 3px solid var(--lav); outline-offset: 3px; }
main:focus { outline: none; }
svg.i { width: 1em; height: 1em; vertical-align: -.14em; }

#app { position: fixed; inset: 0; display: flex; flex-direction: column; padding-top: var(--top); z-index: 1; }
.scroll-content { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 20px 18px 32px; }
.page { max-width: 640px; margin: 0 auto; animation: page-in .25s ease; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }

/* Faint floating hearts */
#sky { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
#sky svg { position: absolute; bottom: -40px; opacity: 0; animation: floatUp linear infinite; }
@keyframes floatUp { 0% { transform: translateY(0) rotate(-8deg); opacity: 0; } 10% { opacity: .3; } 85% { opacity: .22; } 100% { transform: translateY(-110vh) rotate(10deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #sky { display: none; } * { animation-duration: .01s !important; transition: none !important; } }

/* Demo banner */
.demo-banner { display: flex; background: #8a6cc6; color: #fff; font-size: 12px; font-weight: 800; padding: 8px 14px; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0; }
.demo-banner[hidden] { display: none; }
.demo-reset { background: rgba(255,255,255,.18); border-radius: 10px; padding: 6px 10px; font-size: 12px; font-weight: 800; }

/* Nav bar */
.nav-bar { display: flex; justify-content: center; gap: 4px; background: rgba(246,241,251,.94); border-top: 1px solid var(--border);
  padding: 8px 8px calc(8px + var(--bottom)); flex-shrink: 0; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.nav-bar[hidden] { display: none; }
.nav-btn { flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; color: var(--dim); }
.nav-btn .nav-icon { width: 52px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.nav-btn .nav-icon svg { width: 23px; height: 23px; }
.nav-btn .nav-label { font-size: 11px; font-weight: 800; letter-spacing: .2px; }
.nav-btn.active { color: var(--text); }
.nav-btn.active .nav-icon { background: var(--accent-soft); color: var(--accent); }

/* Page headings */
.page-head { margin: 4px 0 20px; }
.page-kicker, .home-date { font-size: 12px; font-weight: 800; color: var(--accent); letter-spacing: 1.4px; text-transform: uppercase; }
.page-title, .home-greeting { font-family: var(--display); font-size: 36px; font-weight: 700; line-height: 1.05; margin-top: 2px; letter-spacing: .2px; }
.home-greeting span { color: var(--accent); }
.page-sub { font-size: 14px; color: var(--sub); margin-top: 6px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: var(--sub); text-transform: uppercase; letter-spacing: 1.4px; margin: 0 0 12px; }
.section-title .st-extra { color: var(--dim); font-weight: 700; text-transform: none; letter-spacing: .2px; }
.sec-note { font-size: 13px; color: var(--sub); margin: -6px 0 12px; }

/* Home header */
.home-header { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 20px; }
.avatar-chip { width: 56px; height: 56px; background: var(--card); border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border2); box-shadow: var(--shadow); color: var(--accent); }
.avatar-chip svg { width: 30px; height: 30px; }

/* Streak card */
.streak-card { position: relative; overflow: hidden; border-radius: var(--radius); padding: 22px; margin-bottom: 22px;
  background: radial-gradient(420px 220px at 100% 0%, rgba(194,104,154,.14), transparent 60%), linear-gradient(150deg, #f8eaf4 0%, #f0e5f8 60%, #eae1f7 100%);
  border: 1px solid rgba(194,104,154,.25); box-shadow: var(--shadow); }
.streak-card::before { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(138,108,198,.12), transparent 70%); }
.streak-card.cold { background: linear-gradient(150deg, #f4eff9, #ede6f5); border-color: var(--border2); }
.streak-label { font-size: 12px; font-weight: 800; color: var(--accent2); text-transform: uppercase; letter-spacing: 1.4px; position: relative; }
.streak-card.cold .streak-label { color: var(--sub); }
.streak-main { display: flex; align-items: center; gap: 12px; position: relative; margin-top: 6px; }
.streak-heart { width: 62px; height: 58px; filter: drop-shadow(0 4px 12px rgba(217,143,174,.35)); animation: beat 1.6s ease-in-out infinite; }
.streak-card.cold .streak-heart { filter: none; animation: none; opacity: .6; }
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.08); } 24% { transform: scale(.97); } 36% { transform: scale(1.04); } }
.streak-num { font-family: var(--display); font-size: 88px; font-weight: 700; line-height: .9; letter-spacing: -1px;
  background: linear-gradient(180deg, #b45a8a 10%, #8a6cc6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.streak-unit { font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--sub); line-height: 1; align-self: flex-end; margin-bottom: 12px; }
.streak-msg { font-size: 14px; font-weight: 700; color: var(--accent2); margin: 8px 0 16px; position: relative; line-height: 1.4; }
.streak-card.cold .streak-msg { color: var(--sub); }
.prize-track { position: relative; height: 10px; border-radius: 10px; background: rgba(90,60,120,.10); overflow: hidden; }
.prize-fill { height: 100%; border-radius: 10px; background: var(--grad); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.prize-row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--sub); margin-top: 8px; position: relative; }
.streak-best { font-size: 13px; color: var(--sub); margin-top: 14px; position: relative; }
.streak-best b { color: var(--text); font-weight: 800; }

/* Week dots */
.week-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 24px; }
.week-dot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); font-weight: 800; }
.week-dot .dot-day { font-size: 11px; color: var(--sub); letter-spacing: .5px; }
.week-dot .dot-mark { width: 32px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 13px; }
.week-dot .dot-mark svg { width: 30px; height: 28px; }
.week-dot.done { border-color: rgba(217,143,174,.25); }
.week-dot.today { border-color: var(--accent); background: var(--accent-soft); }
.week-dot.today .dot-day { color: var(--accent2); }
.week-dot.future { opacity: .55; }

/* Cards */
.today-card, .card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.today-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.today-card.is-done::before { background: var(--green); }
.today-kicker { font-size: 12px; font-weight: 800; color: var(--accent2); letter-spacing: 1.2px; text-transform: uppercase; }
.today-title { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1.05; margin: 4px 0 10px; }
.today-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.today-art { position: absolute; right: 16px; top: 18px; width: 92px; height: 86px; opacity: .9; }
.today-card .today-kicker, .today-card .today-title, .today-card .today-meta { padding-right: 100px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 20px; background: var(--card2); color: var(--sub); border: 1px solid var(--border); }
.chip.c-pink { background: var(--accent-soft); color: var(--accent2); border-color: rgba(217,143,174,.25); }
.chip.c-lav { background: var(--lav-soft); color: var(--lav2); border-color: rgba(171,149,214,.25); }
.chip.c-green { background: var(--green-soft); color: var(--green); border-color: rgba(159,207,174,.25); }
.start-btn { width: 100%; min-height: 58px; border-radius: 16px; background: var(--grad); color: var(--on-grad); font-size: 18px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 10px 22px -12px rgba(150,90,170,.55); }
.secondary-btn { width: 100%; min-height: 50px; border-radius: 14px; background: var(--card2); color: var(--text); font-size: 15px; font-weight: 800; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.today-done { text-align: center; font-weight: 800; color: var(--green); background: var(--green-soft); border-radius: 14px; padding: 14px; }
.ex-rows { margin-top: 14px; }
.ex-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 15px; }
.ex-row .n { width: 28px; height: 28px; border-radius: 10px; background: var(--card2); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--sub); flex: none; }
.ex-row .nm { flex: 1; font-weight: 700; }
.ex-row .rx { color: var(--sub); font-size: 13px; font-weight: 700; white-space: nowrap; }
.expand-row { justify-content: center; color: var(--sub); font-weight: 800; font-size: 14px; cursor: pointer; }
.home-foot { display: flex; justify-content: center; margin-top: 4px; }
.parent-btn { font-size: 13px; font-weight: 800; color: var(--sub); min-height: 44px; padding: 7px 16px; border-radius: 20px; border: 1px solid var(--border2); }
.version-foot { text-align: center; font-size: 11px; color: var(--dim); padding: 16px 0; }

/* Moves tab */
.move-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.mc-top { display: flex; align-items: center; gap: 12px; }
.mc-num { width: 40px; height: 40px; border-radius: 14px; background: var(--accent-soft); color: var(--accent2); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 20px; flex: none; }
.mc-name { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.1; }
.mc-rx { font-size: 13px; color: var(--sub); font-weight: 700; }
.mc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 8px; }
.cues { list-style: none; padding: 0; margin: 0 0 10px; }
.cues li { display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; font-size: 15px; }
.cues li svg { flex: none; margin-top: 3px; }
.read-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 14px; background: var(--lav-soft); color: var(--lav2); font-weight: 800; font-size: 14px; margin: -2px 0 12px; }
.resume-note { text-align: center; font-size: 12px; color: var(--sub); font-weight: 700; margin-top: 6px; }
.vid.wide { aspect-ratio: 16 / 9; max-width: 100%; max-height: none; }
.why { font-size: 14px; color: var(--sub); background: var(--bg2); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; }
.watch-btn { min-height: 44px; padding: 0 16px; border-radius: 14px; background: var(--card2); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.locked-card { text-align: center; color: var(--sub); border-style: dashed; border-color: var(--border2); background: transparent; box-shadow: none; }
.locked-card b { color: var(--text); font-family: var(--display); font-size: 20px; display: block; margin: 6px 0 4px; }

/* Calm tab */
.calm-card { text-align: center; }
.balloon { width: 210px; height: 210px; margin: 10px auto 6px; position: relative; display: grid; place-items: center; }
.balloon .orb { position: absolute; inset: 0; margin: auto; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f3cfe0, #d98fae 45%, #ab95d6 100%); opacity: .85; transition: transform linear; transform: scale(.75); }
.balloon .word { position: relative; font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--on-grad); }
.balloon .word.idle { color: var(--text); }
.calm-count { font-size: 14px; color: var(--sub); margin: 4px 0 14px; font-weight: 700; }

/* Progress tab */
.seg-switch { display: flex; gap: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 5px; margin-bottom: 18px; }
.seg-switch button { flex: 1; min-height: 44px; border-radius: 10px; font-size: 15px; font-weight: 800; color: var(--sub); }
.seg-switch button.on { background: var(--card2); color: var(--text); }
.grid30 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 12px; }
.grid30 .h { aspect-ratio: 1; display: grid; place-items: center; position: relative; }
.grid30 .h svg { width: 100%; height: 100%; }
.grid30 .h span { position: absolute; font-size: 12px; font-weight: 800; color: var(--sub); margin-top: -3px; }
.grid30 .h.on span { color: var(--on-grad); }
.grid30 .h.today svg { filter: drop-shadow(0 0 5px #c2689a66); }
.grid30 .h.gift span { color: var(--lav); }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-head b { font-family: var(--display); font-size: 20px; font-weight: 600; }
.cal-nav { width: 40px; height: 40px; border-radius: 12px; background: var(--card2); display: grid; place-items: center; color: var(--sub); }
.cal-nav:disabled { opacity: .3; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal .wd { font-size: 11px; color: var(--dim); font-weight: 800; padding-bottom: 4px; }
.cal .d { aspect-ratio: 1; display: grid; place-items: center; position: relative; font-size: 12px; font-weight: 800; color: var(--sub); border-radius: 10px; }
.cal .d svg { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }
.cal .d span { position: relative; }
.cal .d.on span { color: var(--on-grad); }
.cal .d.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal .d.fz { color: var(--lav2); }
.cal .d.fut { color: var(--dim); opacity: .5; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--sub); margin-top: 12px; font-weight: 700; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.vol-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.vol { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.vol .v { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1; }
.vol .l { font-size: 12px; color: var(--sub); font-weight: 700; margin-top: 4px; }
.vol.big { grid-column: 1 / -1; text-align: center; background: linear-gradient(150deg, #f8eaf4, #efe5f8); }
.vol.big .v { font-size: 56px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.badge { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 12px; }
.badge .medal { width: 54px; height: 50px; position: relative; display: grid; place-items: center; flex: none; }
.badge .medal svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.badge .medal b { position: relative; font-family: var(--display); font-size: 18px; color: var(--on-grad); margin-top: -4px; }
.badge .bn { font-weight: 800; font-size: 14px; line-height: 1.2; }
.badge .bd { font-size: 12px; color: var(--sub); }
.badge.locked .medal b { color: var(--dim); }
.badge.locked .bn { color: var(--sub); }
.ach-sum { font-size: 14px; color: var(--sub); margin: -6px 0 14px; font-weight: 700; }

/* Workout player */
.player { min-height: 100%; display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; }
.ptop { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.iconbtn { width: 44px; height: 44px; border-radius: 14px; background: var(--card); display: grid; place-items: center; color: var(--sub); flex: none; }
.bar { flex: 1; height: 10px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .35s; }
.round { text-align: center; color: var(--lav2); font-weight: 800; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; }
.mvname { text-align: center; font-family: var(--display); font-size: 34px; font-weight: 700; margin: 6px 0 2px; line-height: 1.1; }
.mvalt { text-align: center; color: var(--sub); font-size: 15px; margin-bottom: 8px; font-weight: 700; }
.tags { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.target { text-align: center; margin: 4px 0 12px; }
.target .n { font-family: var(--display); font-size: 84px; font-weight: 700; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.target .u { font-size: 18px; color: var(--sub); font-weight: 800; }
.ring { width: 190px; height: 190px; margin: 0 auto 6px; position: relative; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring .t { font-family: var(--display); font-size: 64px; font-weight: 700; }
.ring .s { position: absolute; bottom: 38px; color: var(--sub); font-size: 14px; font-weight: 800; }
.pfoot { margin-top: auto; display: grid; gap: 10px; padding-top: 6px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; border-radius: 16px; font-size: 19px; font-weight: 800; }
.btn.main { background: var(--grad); color: var(--on-grad); box-shadow: 0 10px 22px -12px rgba(217,143,174,.55); }
.btn.soft { background: var(--card2); color: var(--text); font-size: 16px; min-height: 50px; }
.btn.ghost { background: transparent; color: var(--sub); font-size: 15px; min-height: 44px; }
.btn[disabled] { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* Done screen */
.done-screen { text-align: center; padding-top: 40px; max-width: 640px; margin: 0 auto; }
.done-screen h1 { font-family: var(--display); font-size: 36px; font-weight: 700; margin: 10px 0 4px; }
.done-screen .sub { color: var(--sub); font-size: 17px; margin: 0; }
.burst { position: relative; height: 170px; }
.burst .core { width: 150px; height: 136px; margin: 0 auto; animation: pop .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.burst .p { position: absolute; left: 50%; top: 50%; animation: fly 1.4s ease-out both; }
@keyframes pop { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fly { from { transform: translate(-50%, -50%) scale(.4); opacity: 1; } to { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1); opacity: 0; } }

/* Avatar picker */
.avatar-screen { text-align: center; padding-top: 30px; max-width: 460px; margin: 0 auto; }
.avatar-title { font-family: var(--display); font-size: 36px; font-weight: 700; }
.avatar-sub { color: var(--sub); margin: 6px 0 20px; }
.avatar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.avatar-opt { background: var(--card); border: 2px solid var(--border); border-radius: 22px; padding: 18px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--accent2); }
.avatar-opt svg { width: 44px; height: 44px; }
.avatar-opt .av-name { font-size: 12px; font-weight: 800; color: var(--sub); }
.avatar-opt.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px rgba(217,143,174,.15); }
.avatar-opt.selected .av-name { color: var(--accent2); }

/* Sheet (grown-ups, videos, badge pop-up) */
#sheet { position: fixed; inset: 0; z-index: 10; background: rgba(62,45,80,.42); display: flex; align-items: flex-end; justify-content: center; }
#sheet[hidden] { display: none; }
.panel { background: var(--bg2); width: 100%; max-width: 560px; border-radius: 26px 26px 0 0; padding: 20px 16px calc(var(--bottom) + 20px); max-height: 92vh; overflow: auto; animation: up .25s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.panel h2 { margin: 0 0 6px; font-family: var(--display); font-size: 24px; font-weight: 700; }
.panel .sub { color: var(--sub); margin: 0; font-size: 15px; }
.panel .x { float: right; }
.vid { position: relative; width: 100%; max-width: 340px; margin: 10px auto; aspect-ratio: 9 / 16; max-height: 68vh; border-radius: 18px; overflow: hidden; background: #000; }
.vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pin { display: flex; justify-content: center; gap: 10px; margin: 16px 0; }
.pin i { width: 16px; height: 16px; border-radius: 50%; background: var(--card2); }
.pin i.f { background: var(--accent); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 0 auto; }
.pad button { height: 58px; border-radius: 16px; background: var(--card); font-size: 24px; font-weight: 800; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border2); }
.field select { font: inherit; background: var(--card); color: var(--text); border: 1px solid var(--border2); border-radius: 12px; padding: 8px 10px; }
.note { font-size: 14px; color: var(--sub); }
.held-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--border2); }
.held-row > span:first-child { flex: 1; }
.held-btns { display: flex; gap: 6px; }
.held-btns .btn { width: auto; min-height: 44px; padding: 0 14px; font-size: 14px; }

#toast { position: fixed; left: 50%; bottom: calc(var(--bottom) + 90px); transform: translateX(-50%) translateY(20px); background: var(--card3); color: var(--text); padding: 12px 18px; border-radius: 16px; opacity: 0; transition: .25s; z-index: 20; pointer-events: none; max-width: 90vw; text-align: center; font-weight: 700; }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 360px) {
  .page-title, .home-greeting { font-size: 30px; }
  .today-card .today-kicker, .today-card .today-title, .today-card .today-meta { padding-right: 76px; }
  .today-art { width: 70px; height: 66px; }
  .nav-btn .nav-icon { width: 40px; }
  .badges { grid-template-columns: 1fr; }
}

/* ── Kawaii touches: buddies, speech bubbles, bows, polka dots ── */
.buddy-say { display: flex; align-items: center; gap: 10px; margin: -6px 0 18px; }
.bs-buddy { flex: none; }
.bs-buddy svg { display: block; filter: drop-shadow(0 6px 8px rgba(90,60,120,.22)); }
.bob { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(2deg); } }
.bubble { position: relative; flex: 1; background: #fffafd; border: 1px solid rgba(194,104,154,.28); border-radius: 18px; padding: 12px 14px; font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.35; }
.bubble::before { content: ''; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px; background: #fffafd; border-left: 1px solid rgba(194,104,154,.28); border-bottom: 1px solid rgba(194,104,154,.28); transform: translateY(-50%) rotate(45deg); }
.bubble b { color: var(--accent2); }
.bubble.center { display: inline-block; margin-top: 16px; }
.bubble.center::before { left: 50%; top: -7px; transform: translateX(-50%) rotate(135deg); }
.buddy-say.small { margin: 0 0 14px; }
.buddy-say.small .bubble { font-size: 14px; color: var(--sub); }
.home-greeting svg { vertical-align: -3px; }
.avatar-title svg { vertical-align: -4px; }
.avatar-chip { width: 60px; height: 60px; overflow: hidden; background: #fbf4fb; }
.today-art .art-bow { position: absolute; left: 26px; top: -6px; }
.streak-card { background-image: radial-gradient(rgba(194,104,154,.10) 2px, transparent 2.5px), radial-gradient(420px 220px at 100% 0%, rgba(194,104,154,.14), transparent 60%), linear-gradient(150deg, #f8eaf4 0%, #f0e5f8 60%, #eae1f7 100%);
  background-size: 18px 18px, auto, auto; }
.today-card::before { height: 6px; background: repeating-linear-gradient(90deg, #d98fae 0 14px, #9e84d6 14px 28px, #a9c4ec 28px 42px); }
.avatar-grid { grid-template-columns: repeat(2, 1fr); }
.avatar-opt { padding: 16px 8px 14px; }
.avatar-opt svg { width: 84px; height: 84px; }
.avatar-opt .av-name { font-size: 13px; }
.avatar-opt .av-name b { color: var(--text); font-size: 15px; display: block; }
.balloon .orb { width: 110px; height: 110px; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #ffffff, #efe4f8 70%); border: 3px solid rgba(194,104,154,.35); opacity: 1; }
.balloon .orb svg { width: 84px; height: 84px; }
.calm-card .word { font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--accent2); margin-top: -4px; }
.burst .core svg { animation: bob 2.6s ease-in-out infinite .8s; }
.avatar-chip svg { width: 52px; height: 52px; margin-top: 6px; }

/* ── Vacation freeze (same flow as Miles's app) ── */
:root { --ice: #5f88c6; --ice-soft: rgba(95,136,198,.12); }
.snow { color: var(--ice); display: inline-flex; }
.week-dot .dot-mark .snow svg { width: 22px; height: 22px; }
.cal .d.fz { color: var(--ice); background: var(--ice-soft); }
.freeze-setup { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 10px; }
.freeze-setup .seg-switch { margin-bottom: 4px; }
.freeze-label { font-size: 12px; font-weight: 800; color: var(--sub); letter-spacing: 1.2px; text-transform: uppercase; margin-top: 4px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 58px; height: 58px; border-radius: 16px; background: var(--card2); font-size: 28px; font-weight: 800; }
.stepper div { flex: 1; text-align: center; }
.stepper b { font-family: var(--display); font-size: 40px; line-height: 1; display: block; }
.stepper span { font-size: 13px; color: var(--sub); font-weight: 700; }
.freeze-summary { display: flex; flex-direction: column; gap: 4px; align-items: center; background: var(--ice-soft); border: 1px solid rgba(95,136,198,.28); border-radius: 16px; padding: 14px 18px; font-size: 12px; font-weight: 800; color: var(--ice); letter-spacing: 1px; text-transform: uppercase; }
.freeze-summary b { font-size: 17px; color: var(--text); letter-spacing: 0; text-transform: none; }
.freeze-note { font-size: 14px; color: var(--sub); line-height: 1.5; margin: 0; }
.panel h2 .snow svg { width: 22px; height: 22px; vertical-align: -3px; }
.frozen-buddy { position: relative; width: 120px; height: 120px; margin: 6px auto 4px; }
.frozen-buddy .snow.big { position: absolute; right: -8px; top: -4px; background: var(--card2); border-radius: 50%; padding: 8px; }
.frozen-buddy .snow.big svg { width: 26px; height: 26px; }
.calm-card .how { font-size: 16px; font-weight: 800; color: var(--lav2); margin-top: 2px; min-height: 22px; }
.iconbtn-spacer { width: 44px; height: 44px; flex: none; }
