/* Care Companion — warm ivory, soft sage, muted teal, deep teal, warm peach. */
:root {
  --ivory: #FBF6EE;
  --ivory-2: #F5EEE2;
  --paper: #FFFFFF;
  --sage: #DDE7D6;
  --sage-2: #B9CDB0;
  --teal: #6BA8A0;
  --teal-soft: #DCEDEA;
  --deep: #1E5A57;
  --deep-2: #164744;
  --peach: #F4B48E;
  --peach-soft: #FCE6D7;
  --sand: #F3E6CC;
  --rose: #F6D5CF;
  --lilac: #E7E2F3;
  --ink: #1F2E2D;
  --ink-2: #4D5A58;
  --muted: #7E8987;
  --line: #EDE5D8;
  --danger: #B5443A;
  --danger-soft: #FBE3DF;
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --shadow: 0 1px 2px rgba(60, 45, 30, .04), 0 8px 28px rgba(60, 45, 30, .07);
  --shadow-lg: 0 2px 6px rgba(60, 45, 30, .05), 0 24px 60px rgba(60, 45, 30, .14);
  --display: "Fraunces", Georgia, serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --t: 200ms cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--ivory);
  background-image:
    radial-gradient(900px 500px at 100% -10%, rgba(220, 237, 234, .9), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(252, 230, 215, .8), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--deep); }
h1, h2, h3 { font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 72; font-weight: 600; letter-spacing: -.01em; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(30px, 6vw, 40px); }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 10px; }
.ic { width: 22px; height: 22px; stroke-width: 2; flex: none; }

/* ---------- boot ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--teal); animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.6); opacity: .4; } }

/* ---------- layout ---------- */
.app { min-height: 100vh; }
.shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.main { padding: 20px 16px 120px; max-width: 760px; width: 100%; margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 19px; font-variation-settings: "SOFT" 100; }
.brand .dot { width: 34px; height: 34px; border-radius: 12px; background: var(--deep); display: grid; place-items: center; font-size: 19px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; background: var(--sage); overflow: hidden; display: grid; place-items: center; font-weight: 800; color: var(--deep); box-shadow: var(--shadow); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.nav {
  position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; gap: 4px; padding: 6px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px);
  border-radius: 999px; box-shadow: var(--shadow-lg); z-index: 30; width: min(440px, calc(100% - 24px));
}
.nav button {
  flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 9px 6px 7px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 12.5px; font-weight: 700; color: var(--muted); transition: background var(--t), color var(--t);
}
.nav button .ic { width: 22px; height: 22px; }
.nav button[aria-current="page"] { background: var(--deep); color: #fff; }
.nav .nav-brand, .nav .nav-me { display: none; }

@media (min-width: 960px) {
  .shell { grid-template-columns: 236px 1fr; }
  .nav {
    position: sticky; top: 0; left: auto; bottom: auto; transform: none; height: 100vh; width: auto; border-radius: 0;
    flex-direction: column; padding: 26px 16px; gap: 6px; background: rgba(255, 255, 255, .55); box-shadow: none; border-right: 1px solid var(--line);
  }
  .nav .nav-brand { display: flex; margin: 0 8px 24px; }
  .nav button { flex: none; flex-direction: row; gap: 12px; padding: 13px 16px; font-size: 16px; justify-content: flex-start; }
  .nav .nav-me { display: flex; margin-top: auto; }
  .main { padding: 36px 40px 60px; }
  .topbar .avatar { display: none; }
}

/* ---------- surfaces ---------- */
.card { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px; }
.card + .card, .stack > * + * { margin-top: 14px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 4px 12px; gap: 12px; }
.section-head h2 { font-size: 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--ivory-2); color: var(--ink-2); white-space: nowrap; }
.chip .ic { width: 15px; height: 15px; }

/* type colours */
[data-type="medication"] { --tc: var(--peach-soft); --tc-ink: #9A4F25; }
[data-type="exercise"] { --tc: var(--teal-soft); --tc-ink: var(--deep); }
[data-type="breathing"] { --tc: var(--lilac); --tc-ink: #5B4A8C; }
[data-type="nutrition"], [data-type="selfcare"] { --tc: var(--sage); --tc-ink: #3F6136; }
[data-type="monitoring"], [data-type="education"] { --tc: var(--sand); --tc-ink: #7A5A1E; }
[data-type="wound"] { --tc: var(--rose); --tc-ink: #9A3D33; }
[data-type="test"] { --tc: var(--lilac); --tc-ink: #4F4482; }
[data-type="appointment"] { --tc: #D6E9E6; --tc-ink: var(--deep-2); }
.tile-ic { width: 48px; height: 48px; border-radius: 16px; background: var(--tc, var(--sage)); color: var(--tc-ink, var(--deep)); display: grid; place-items: center; flex: none; }
.tile-ic .ic { width: 24px; height: 24px; }
.chip.type { background: var(--tc); color: var(--tc-ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 999px; padding: 14px 22px;
  font-weight: 800; font-size: 16px; background: var(--deep); color: #fff; transition: transform var(--t), background var(--t), box-shadow var(--t);
  min-height: 52px; text-decoration: none;
}
.btn:hover { background: var(--deep-2); }
.btn:active { transform: scale(.97); }
.btn.soft { background: var(--teal-soft); color: var(--deep); }
.btn.soft:hover { background: #cde5e1; }
.btn.ghost { background: transparent; color: var(--deep); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { background: var(--ivory-2); }
.btn.peach { background: var(--peach-soft); color: #8A4520; }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { min-height: 40px; padding: 8px 15px; font-size: 14.5px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ivory-2); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.icon-btn:hover { background: var(--line); }
.link { background: none; border: 0; padding: 0; color: var(--deep); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Pup ---------- */
.pip-host { position: relative; }
.pip-canvas { width: 100%; height: 100%; display: block; }
.pip-fallback svg { width: 100%; height: 100%; }
.pip-fallback[data-mood="happy"] svg { animation: hop .5s ease 3; }
@keyframes hop { 50% { transform: translateY(-10%); } }
.bubble {
  position: relative; background: var(--paper); border-radius: 22px; padding: 14px 18px; box-shadow: var(--shadow); font-weight: 600; color: var(--ink-2);
  animation: rise .35s cubic-bezier(.2, .8, .2, 1);
}
.bubble b { color: var(--ink); }
.bubble.tail::before { content: ""; position: absolute; left: -7px; top: 22px; width: 16px; height: 16px; background: inherit; transform: rotate(45deg); border-radius: 3px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ---------- welcome / onboarding ---------- */
.welcome { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.welcome-card { width: min(520px, 100%); text-align: center; }
.welcome .pip-host { width: 230px; height: 250px; margin: 0 auto -6px; }
.welcome h1 { font-size: clamp(34px, 8vw, 46px); }
.welcome .lead { font-size: 19px; color: var(--ink-2); margin: 12px auto 26px; max-width: 400px; }
.steps3 { display: flex; justify-content: center; gap: 10px; margin: 0 0 26px; flex-wrap: wrap; }
.steps3 span { display: inline-flex; align-items: center; gap: 7px; background: var(--paper); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14.5px; box-shadow: var(--shadow); }
.gbtn-wrap { display: flex; justify-content: center; min-height: 50px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 18px 0; }
.or::before, .or::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.fineprint { font-size: 13px; color: var(--muted); margin-top: 22px; }
.notice { background: var(--peach-soft); color: #7A3F1D; border-radius: var(--r-sm); padding: 12px 14px; font-size: 14.5px; font-weight: 600; text-align: left; }

.flow { max-width: 620px; margin: 0 auto; padding: 28px 16px 60px; }
.flow-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.flow-top .pip-host { width: 92px; height: 104px; flex: none; }
.progress-dots { display: flex; gap: 6px; margin-bottom: 18px; }
.progress-dots i { height: 6px; flex: 1; border-radius: 9px; background: var(--line); }
.progress-dots i.on { background: var(--teal); }

.field { display: grid; gap: 7px; margin-top: 16px; }
.field label, .label { font-weight: 800; font-size: 15px; }
.input, select.input, textarea.input {
  width: 100%; border: 2px solid var(--line); border-radius: var(--r-sm); padding: 13px 15px; background: var(--paper); transition: border-color var(--t); min-height: 52px;
}
.input:focus { border-color: var(--teal); outline: none; }
textarea.input { min-height: 96px; resize: vertical; }

.drop { display: block;
  border: 2.5px dashed var(--sage-2); border-radius: var(--r-lg); background: rgba(255, 255, 255, .7); padding: 34px 20px; text-align: center; cursor: pointer;
  transition: background var(--t), border-color var(--t), transform var(--t);
}
.drop:hover, .drop.over { background: var(--teal-soft); border-color: var(--teal); }
.drop.over { transform: scale(1.01); }
.drop .big-ic { width: 64px; height: 64px; border-radius: 22px; background: var(--deep); color: #fff; display: grid; place-items: center; margin: 0 auto 14px; }
.drop .big-ic .ic { width: 30px; height: 30px; }
.files { display: grid; gap: 8px; margin-top: 14px; }
.file { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: var(--r-sm); padding: 10px 12px; box-shadow: var(--shadow); }
.file .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.file .tile-ic { width: 40px; height: 40px; border-radius: 12px; }

.reading { text-align: center; padding-top: 6vh; }
.reading .pip-host { width: 220px; height: 240px; margin: 0 auto; }
.read-steps { display: grid; gap: 10px; max-width: 360px; margin: 22px auto 0; text-align: left; }
.read-steps div { display: flex; gap: 12px; align-items: center; background: var(--paper); border-radius: var(--r-sm); padding: 12px 14px; box-shadow: var(--shadow); font-weight: 700; color: var(--muted); transition: color var(--t); }
.read-steps div.on { color: var(--ink); }
.read-steps div.done { color: var(--deep); }
.read-steps .st { width: 26px; height: 26px; border-radius: 50%; background: var(--ivory-2); display: grid; place-items: center; flex: none; }
.read-steps .on .st { background: var(--teal-soft); }
.read-steps .on .st::after { content: ""; width: 12px; height: 12px; border: 2.5px solid var(--teal); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.read-steps .done .st { background: var(--deep); color: #fff; }
.read-steps .done .st .ic { width: 15px; height: 15px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* review */
.rv-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.rv-item:first-child { border-top: 0; padding-top: 0; }
.rv-item .body { flex: 1; min-width: 0; }
.rv-item .title { font-weight: 800; }
.rv-item.off { opacity: .45; }
.flag { margin-top: 8px; background: var(--peach-soft); color: #7A3F1D; padding: 8px 11px; border-radius: 12px; font-size: 14px; font-weight: 700; display: flex; gap: 8px; align-items: flex-start; }
.flag .ic { width: 17px; height: 17px; margin-top: 2px; }
.time-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.time-pill { border: 0; background: var(--ivory-2); border-radius: 999px; padding: 5px 11px; font-weight: 800; font-size: 14px; }
input.time-pill { width: 132px; min-height: 36px; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background var(--t); }
.switch span::after { content: ""; position: absolute; width: 24px; height: 24px; left: 4px; top: 4px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform var(--t); }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(20px); }
.sticky-cta { position: sticky; bottom: 0; margin: 20px -16px 0; padding: 22px 16px 14px; z-index: 5; background: linear-gradient(to bottom, rgba(251, 246, 238, 0), var(--ivory) 40%); }

/* ---------- home ---------- */
.hello { margin: 4px 4px 18px; }
.hello p { color: var(--ink-2); margin-top: 6px; font-size: 18px; }
.hero {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 22px 18px 22px 24px; overflow: hidden; position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #F2F8F5 100%);
}
.hero .pip-host { width: 150px; height: 168px; margin: -14px -8px -22px 0; }
.hero-stats { display: flex; align-items: center; gap: 18px; }
.ring { position: relative; width: 108px; height: 108px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .bg { stroke: var(--teal-soft); }
.ring .fg { stroke: var(--deep); stroke-linecap: round; transition: stroke-dashoffset .8s cubic-bezier(.2, .8, .2, 1); }
.ring .val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 1px; font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 700; font-size: 30px; }
.ring .val small { font-size: 16px; }
.hero-copy .big { font-family: var(--display); font-size: 22px; font-weight: 600; font-variation-settings: "SOFT" 100; }
.hero-copy .muted { font-weight: 600; }
.pip-says { margin: 14px 0 0; }

.now-card { border-radius: var(--r-lg); background: var(--deep); color: #fff; padding: 20px; display: flex; gap: 16px; align-items: center; cursor: pointer; box-shadow: var(--shadow-lg); border: 0; width: 100%; text-align: left; transition: transform var(--t); }
.now-card:hover { transform: translateY(-2px); }
.now-card .tile-ic { background: rgba(255, 255, 255, .14); color: #fff; width: 56px; height: 56px; }
.now-card .k { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.now-card .t { font-family: var(--display); font-size: 22px; font-weight: 600; font-variation-settings: "SOFT" 100; line-height: 1.2; }
.now-card .go { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--deep); display: grid; place-items: center; flex: none; }

.timeline { display: grid; gap: 10px; }
.tl {
  display: flex; align-items: center; gap: 14px; background: var(--paper); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow); border: 0; width: 100%; text-align: left;
  transition: transform var(--t), box-shadow var(--t);
}
.tl:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.tl .when { width: 64px; flex: none; font-weight: 800; font-size: 15px; color: var(--ink-2); }
.tl .when small { display: block; font-weight: 700; font-size: 12px; color: var(--muted); }
.tl .what { flex: 1; min-width: 0; }
.tl .what .t { font-weight: 800; font-size: 17px; line-height: 1.25; }
.tl .what .s { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl .state { width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--line); flex: none; display: grid; place-items: center; color: #fff; }
.tl.done .state { background: var(--deep); border-color: var(--deep); }
.tl.done .what .t { text-decoration: line-through; text-decoration-color: rgba(30, 90, 87, .35); color: var(--ink-2); }
.tl.skipped { opacity: .6; }
.tl.skipped .state { background: var(--ivory-2); color: var(--muted); }
.tl.snoozed .state { border-color: var(--peach); color: #9A4F25; }
.tl.late .when { color: #9A4F25; }
.tl .state .ic { width: 18px; height: 18px; }
.empty { text-align: center; padding: 30px 20px; color: var(--muted); }
.empty .ic { width: 34px; height: 34px; color: var(--teal); }

.mini-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.mini { background: var(--paper); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; border: 0; text-align: left; width: 100%; }
.mini .t { font-weight: 800; line-height: 1.25; }
.mini .s { font-size: 14px; color: var(--muted); }

/* ---------- sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(31, 46, 45, .32); z-index: 40; opacity: 0; transition: opacity var(--t); }
.scrim.open { opacity: 1; }
.sheet {
  position: fixed; z-index: 41; background: var(--ivory); left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto; border-radius: 30px 30px 0 0;
  transform: translateY(100%); transition: transform 260ms cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-lg); padding: 10px 18px 30px;
}
.sheet.open { transform: none; }
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 12px; }
@media (min-width: 760px) {
  .sheet { left: auto; top: 0; width: 500px; max-height: none; height: 100vh; border-radius: 30px 0 0 30px; transform: translateX(100%); padding: 26px 26px 40px; }
  .sheet .grab { display: none; }
}
.sheet-head { display: flex; gap: 14px; align-items: flex-start; }
.sheet-head .grow { flex: 1; min-width: 0; }
.sheet-head h2 { font-size: 26px; margin-top: 6px; }
.sheet-head .when { color: var(--ink-2); font-weight: 700; margin-top: 4px; }
.sheet .block { margin-top: 16px; }
.pip-note { display: flex; gap: 10px; align-items: flex-start; }
.pip-note .face { width: 44px; height: 44px; border-radius: 50%; background: var(--teal-soft); display: grid; place-items: center; font-size: 24px; flex: none; }
.pip-note .bubble { flex: 1; font-size: 16px; }
.facts { display: flex; gap: 8px; flex-wrap: wrap; }
.fact { background: var(--paper); border-radius: var(--r-sm); padding: 10px 14px; box-shadow: var(--shadow); }
.fact .k { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fact .v { font-weight: 800; font-size: 17px; }
.howto { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.howto li { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border-radius: var(--r-sm); padding: 12px 14px; box-shadow: var(--shadow); cursor: pointer; }
.howto li .cb { width: 26px; height: 26px; border-radius: 9px; border: 2.5px solid var(--sage-2); flex: none; display: grid; place-items: center; color: #fff; transition: background var(--t); }
.howto li.on .cb { background: var(--teal); border-color: var(--teal); }
.howto li.on span { color: var(--muted); text-decoration: line-through; }
.howto li .cb .ic { width: 16px; height: 16px; }
.media-row { display: flex; gap: 10px; flex-wrap: wrap; }
.timer { display: flex; align-items: center; gap: 14px; background: var(--paper); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow); }
.timer .clock { font-family: var(--display); font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; font-variation-settings: "SOFT" 100; flex: 1; }
.pain { background: var(--paper); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow); }
.pain-top { display: flex; justify-content: space-between; align-items: baseline; }
.pain-val { font-family: var(--display); font-size: 30px; font-weight: 700; font-variation-settings: "SOFT" 100; }
.pain input[type=range] { width: 100%; accent-color: var(--deep); height: 34px; }
.pain-faces { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-weight: 700; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions .btn.block { grid-column: 1 / -1; }
details.orig { background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow); }
details.orig summary { padding: 14px 16px; font-weight: 800; cursor: pointer; display: flex; gap: 10px; align-items: center; list-style: none; }
details.orig summary::-webkit-details-marker { display: none; }
details.orig .in { padding: 0 16px 16px; }
details.orig blockquote { margin: 0; padding: 10px 14px; border-left: 4px solid var(--sage-2); background: var(--ivory); border-radius: 0 12px 12px 0; font-size: 15px; color: var(--ink-2); white-space: pre-wrap; }
.note-list { display: grid; gap: 8px; margin-top: 10px; }
.note { background: var(--paper); border-radius: var(--r-sm); padding: 10px 13px; box-shadow: var(--shadow); font-size: 15px; }
.note .meta { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.recipe { background: var(--paper); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow); white-space: pre-wrap; font-size: 15.5px; }

/* ---------- my care ---------- */
.alert-card { background: linear-gradient(135deg, #FFF4EF, var(--danger-soft)); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); }
.alert-card h3 { color: var(--danger); display: flex; gap: 10px; align-items: center; }
.alert-card ul { margin: 12px 0 0; padding-left: 20px; }
.alert-card li { margin: 4px 0; font-weight: 600; }
.call-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.grid-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.ctile { background: var(--paper); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow); border: 0; text-align: left; display: grid; gap: 10px; transition: transform var(--t); }
.ctile:hover { transform: translateY(-2px); }
.ctile .t { font-weight: 800; line-height: 1.25; }
.ctile .s { font-size: 13.5px; color: var(--muted); font-weight: 700; }
.sec-items { display: grid; gap: 10px; }
.sec-item { background: var(--paper); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow); }
.sec-item .orig-t { margin-top: 8px; font-size: 14px; color: var(--muted); border-left: 3px solid var(--sage); padding-left: 10px; white-space: pre-wrap; }
.sec-item .src { font-size: 12.5px; color: var(--muted); font-weight: 700; margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.sec-item .src .ic { width: 14px; height: 14px; }
.contact { display: flex; align-items: center; gap: 12px; }
.contact .grow { flex: 1; min-width: 0; }

/* ---------- progress ---------- */
.p3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stat-card { background: var(--paper); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); }
.stat-card .k { font-weight: 800; font-size: 14px; color: var(--muted); }
.stat-card .v { font-family: var(--display); font-weight: 700; font-size: 44px; font-variation-settings: "SOFT" 100; line-height: 1.1; margin-top: 4px; }
.stat-card .v small { font-size: 22px; color: var(--muted); }
.week { display: flex; gap: 8px; align-items: flex-end; height: 120px; margin-top: 14px; }
.week .d { flex: 1; display: grid; gap: 6px; justify-items: center; height: 100%; grid-template-rows: 1fr auto; }
.week .bar { width: 100%; max-width: 38px; border-radius: 12px; background: var(--teal-soft); position: relative; overflow: hidden; align-self: end; height: 100%; }
.week .bar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--teal); border-radius: 12px; transition: height .8s cubic-bezier(.2, .8, .2, 1); }
.week .d.today .bar i { background: var(--deep); }
.week .d span { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.goal { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--line); }
.goal:first-of-type { border-top: 0; }
.goal .grow { flex: 1; }
.goal .t { font-weight: 800; }
.goal select { border: 0; background: var(--ivory-2); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 13.5px; }
.status { padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.status.na { background: var(--ivory-2); color: var(--muted); }
.status.ip { background: var(--teal-soft); color: var(--deep); }
.status.ok { background: var(--sage); color: #3F6136; }
.disclaimer { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); background: var(--ivory-2); padding: 12px 14px; border-radius: var(--r-sm); margin-top: 12px; }
.disclaimer .ic { width: 18px; height: 18px; color: var(--teal); margin-top: 2px; }
.spark { width: 100%; height: 90px; margin-top: 8px; }
.milestones { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.milestones li { display: flex; gap: 14px; padding-bottom: 16px; position: relative; }
.milestones li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.milestones li:last-child::before { display: none; }
.milestones .dot { width: 24px; height: 24px; border-radius: 50%; background: var(--sage); border: 4px solid var(--paper); box-shadow: 0 0 0 2px var(--sage-2); flex: none; }

/* ---------- ask pip ---------- */
.ask { display: grid; grid-template-rows: auto 1fr auto; min-height: calc(100vh - 160px); }
.ask-top { display: flex; gap: 14px; align-items: center; }
.ask-top .pip-host { width: 110px; height: 122px; flex: none; }
.chat { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; }
.msg { max-width: 86%; padding: 12px 16px; border-radius: 22px; font-size: 16px; white-space: pre-wrap; animation: rise .25s ease; }
.msg.me { align-self: flex-end; background: var(--deep); color: #fff; border-bottom-right-radius: 8px; }
.msg.pip { align-self: flex-start; background: var(--paper); box-shadow: var(--shadow); border-bottom-left-radius: 8px; }
.msg.urgent { background: var(--danger-soft); color: #6E211A; font-weight: 700; box-shadow: none; border: 2px solid #F0B7AE; }
.msg.typing::after { content: "●●●"; letter-spacing: 3px; color: var(--teal); animation: pulse .7s infinite alternate; }
.ctx-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--teal-soft); color: var(--deep); padding: 6px 8px 6px 12px; border-radius: 999px; font-weight: 800; font-size: 14px; }
.ctx-chip button { border: 0; background: rgba(255, 255, 255, .6); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.ctx-chip .ic { width: 14px; height: 14px; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.suggest button { border: 0; background: var(--paper); box-shadow: var(--shadow); border-radius: 999px; padding: 9px 14px; font-weight: 700; font-size: 14.5px; }
.composer { position: sticky; bottom: 96px; display: flex; gap: 8px; background: var(--paper); border-radius: 999px; padding: 6px; box-shadow: var(--shadow-lg); }
@media (min-width: 960px) { .composer { bottom: 20px; } }
.composer input { flex: 1; border: 0; background: transparent; padding: 10px 14px; outline: none; min-width: 0; }
.composer .btn { min-height: 46px; padding: 10px 16px; }
.emergency-banner { background: var(--danger); color: #fff; border-radius: var(--r-md); padding: 16px 18px; font-weight: 700; display: grid; gap: 10px; }
.emergency-banner .btn { background: #fff; color: var(--danger); }

/* ---------- profile ---------- */
.set-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.set-row:first-child { border-top: 0; }
.set-row .grow { flex: 1; min-width: 0; }
.set-row .t { font-weight: 800; }
.set-row .s { font-size: 14px; color: var(--muted); }
.ok-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #5BAA6A; margin-right: 6px; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 104px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 14px 12px 18px; border-radius: 999px;
  font-weight: 700; display: flex; align-items: center; gap: 14px; opacity: 0; pointer-events: none; transition: opacity var(--t), transform var(--t); z-index: 60; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { border: 0; background: rgba(255, 255, 255, .15); color: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 800; }
@media (min-width: 960px) { .toast { bottom: 28px; } }

.fade-in { animation: rise .3s cubic-bezier(.2, .8, .2, 1); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- v2: edit, help, modal, video, reminders ---------- */
.rv-item.tap { cursor: pointer; border-radius: 14px; margin: 0 -8px; padding-left: 8px; padding-right: 8px; transition: background var(--t); }
.rv-item.tap:hover { background: var(--ivory); }
.howto-line { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 700; font-size: 14.5px; margin: -4px 4px 10px; }
.howto-line .ic { width: 18px; height: 18px; color: var(--teal); }
.hint { display: flex; gap: 10px; align-items: flex-start; background: var(--teal-soft); color: var(--deep); border-radius: var(--r-sm); padding: 12px 14px; font-size: 15px; font-weight: 600; }
.hint .ic { width: 19px; height: 19px; margin-top: 2px; }
.tip { display: flex; gap: 12px; align-items: flex-start; background: #FFF8E6; border-radius: var(--r-md); padding: 14px 16px; font-weight: 600; color: #5C4A1C; }
.tip .ic { color: #D9A520; margin-top: 2px; }
.tip .k { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #A27B12; }
.help .label { display: block; margin-bottom: 10px; }
.help-chips { display: grid; gap: 8px; }
.help-chip { display: flex; align-items: center; gap: 10px; text-align: left; border: 2px solid var(--teal-soft); background: var(--paper); color: var(--deep); border-radius: 16px; padding: 11px 14px; font-weight: 700; font-size: 15px; transition: background var(--t), border-color var(--t); }
.help-chip:hover { background: var(--teal-soft); border-color: var(--teal); }
.help-chip span { flex: 1; }
.help-chip .ic { width: 19px; height: 19px; flex: none; }
.help-chip.sm { display: inline-flex; padding: 6px 10px; font-size: 13.5px; border-radius: 999px; }
.sec-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.sec-foot .src { margin: 0; }
.mini-x { border: 0; background: transparent; color: var(--muted); width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; }
.mini-x:hover { background: var(--ivory-2); color: var(--danger); }
.mini-x .ic { width: 16px; height: 16px; }
.note .meta { display: flex; justify-content: space-between; align-items: center; }
.field.two { grid-template-columns: 1fr 1fr; gap: 12px; }
.field.two > div { display: grid; gap: 7px; align-content: start; }
.field.two label { font-weight: 800; font-size: 15px; }
.time-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.time-edit { display: inline-flex; align-items: center; background: var(--ivory-2); border-radius: 999px; padding-right: 2px; }
.time-edit .time-pill { background: transparent; }
.wd-row { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.wd { position: relative; }
.wd input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.wd span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ivory-2); font-weight: 800; font-size: 14px; }
.wd input:checked + span { background: var(--deep); color: #fff; }
.wd input:focus-visible + span { outline: 3px solid var(--teal); }

.modal-scrim { position: fixed; inset: 0; background: rgba(31, 46, 45, .45); z-index: 70; opacity: 0; transition: opacity var(--t); }
.modal-scrim.open { opacity: 1; }
.modal { position: fixed; z-index: 71; left: 50%; top: 50%; width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--ivory); border-radius: 28px; padding: 20px; box-shadow: var(--shadow-lg);
  transform: translate(-50%, -46%) scale(.97); opacity: 0; transition: transform 240ms cubic-bezier(.2, .8, .2, 1), opacity var(--t); }
.modal.open { transform: translate(-50%, -50%); opacity: 1; }
.modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.modal-head .k, .rem .k { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--teal); }
.player { position: relative; aspect-ratio: 16 / 9; background: #10201f; border-radius: 18px; overflow: hidden; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-empty { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; color: #cfe3e0; font-weight: 700; text-align: center; padding: 20px; }
.spin { width: 28px; height: 28px; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.vlist { display: grid; gap: 8px; margin-top: 12px; }
.vitem { display: flex; gap: 12px; align-items: center; text-align: left; border: 0; background: var(--paper); border-radius: 16px; padding: 8px; box-shadow: var(--shadow); }
.vitem.on { outline: 3px solid var(--teal); }
.vitem img { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; flex: none; }
.vitem .t { font-weight: 800; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vitem .s { font-size: 12.5px; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.vitem .s .ic { width: 14px; height: 14px; color: var(--teal); }
.rem { text-align: center; padding: 4px 4px 2px; }
.rem-pip { width: 150px; height: 160px; margin: -6px auto 2px; }
.rem h2 { font-size: 28px; margin-top: 6px; }
.rem .actions { text-align: left; }

.mock { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.mock-k { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.mock-k .ic { width: 16px; height: 16px; }
.mock-notif { background: rgba(255, 255, 255, .96); border-radius: 18px; padding: 12px 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .12); display: grid; gap: 2px; font-size: 14.5px; border: 1px solid var(--line); }
.mock-notif .mock-app { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.cal-ic { width: 18px; height: 18px; border-radius: 5px; background: #1A73E8; color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.mock-notif span { color: var(--ink-2); font-size: 13.5px; }
.mock-wa { background: #E7DED3; border-radius: 18px; padding: 12px; }
.wa-bubble { background: #D9FDD3; border-radius: 12px 12px 12px 4px; padding: 9px 11px 20px; font-size: 14px; position: relative; color: #111b21; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); line-height: 1.4; }
.wa-time { position: absolute; right: 9px; bottom: 4px; font-size: 11px; color: #667781; }

.ask-bottom { position: sticky; bottom: 92px; padding-top: 8px; background: linear-gradient(to bottom, rgba(251, 246, 238, 0), var(--ivory) 22%); }
@media (min-width: 960px) { .ask-bottom { bottom: 0; padding-bottom: 16px; } }
.composer { position: static; }
.composer.ready { box-shadow: 0 0 0 3px var(--teal), var(--shadow-lg); }
.composer.ready .btn { animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: scale(1.08); } }
.ready-hint { text-align: center; color: var(--deep); font-weight: 800; font-size: 14px; margin-top: 8px; display: flex; justify-content: center; align-items: center; gap: 6px; }
.ready-hint .ic { width: 16px; height: 16px; }
.attach { width: 46px; height: 46px; border-radius: 50%; background: var(--teal-soft); color: var(--deep); display: grid; place-items: center; cursor: pointer; flex: none; }
.attach:hover { background: #cde5e1; }
.photo-chip { display: flex; align-items: center; gap: 10px; background: var(--paper); border-radius: 16px; padding: 6px 8px; box-shadow: var(--shadow); margin-bottom: 8px; font-weight: 700; font-size: 14px; }
.photo-chip img { width: 46px; height: 46px; object-fit: cover; border-radius: 10px; }
.photo-chip span { flex: 1; }
.msg-img { display: block; max-width: 220px; width: 100%; border-radius: 14px; margin-bottom: 8px; }
.suggest button { text-align: left; }
.signed-in { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 14px; }
.signed-in img { width: 40px; height: 40px; border-radius: 50%; }
.signed-in div { flex: 1; display: grid; }
.signed-in span { font-size: 14px; color: var(--muted); }
.signed-in > .ic:last-child { color: var(--teal); }

@media (min-width: 1200px) {
  .main { max-width: 1120px; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 32px; align-items: start; }
  .home-grid .col-b { position: sticky; top: 24px; padding-top: 70px; }
  .home-grid .col-b .mini-cards { grid-template-columns: 1fr; }
  .home-grid .col-b .section-head:first-child { margin-top: 0; }
}

/* hero: stats + Pup on one row, Pup's line underneath */
.hero { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; padding: 20px 18px 18px 22px; }
.hero .pip-says { grid-column: 1 / -1; margin-top: 6px; }
.hero .pip-host { width: 140px; height: 150px; margin: -18px -6px -10px 0; }
.hero-copy { min-width: 0; }
@media (max-width: 520px) {
  .main { padding-left: 14px; padding-right: 14px; }
  .hero { padding: 16px 14px 16px 16px; }
  .hero .pip-host { width: 104px; height: 118px; margin: -10px -6px -8px 0; }
  .hero-stats { gap: 12px; }
  .ring { width: 84px; height: 84px; }
  .ring .val { font-size: 23px; }
  .hero-copy .big { font-size: 19px; white-space: nowrap; }
  .hero-copy .muted { font-size: 15px; }
  .hello h1 { font-size: 28px; }
  .hello p { font-size: 16px; }
  .tl { gap: 10px; padding: 12px; }
  .tl .when { width: 46px; font-size: 14px; }
  .tl .tile-ic { width: 40px; height: 40px; border-radius: 13px; }
  .tl .tile-ic .ic { width: 20px; height: 20px; }
  .tl .what .t { font-size: 16px; }
  .tl .state { width: 30px; height: 30px; }
  .now-card { padding: 16px; gap: 12px; }
  .now-card .tile-ic { width: 46px; height: 46px; }
  .now-card .t { font-size: 19px; }
  .card { padding: 18px; }
  .sheet-head h2 { font-size: 23px; }
  .sheet { padding: 8px 14px 30px; }
  .actions { grid-template-columns: 1fr 1fr; }
  .field.two { grid-template-columns: 1fr; }
}

.consent { display: flex; gap: 12px; align-items: center; background: var(--paper); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow); border: 2px solid var(--teal-soft); }
.consent > .ic { width: 28px; height: 28px; color: var(--deep); flex: none; }
.consent > div { flex: 1; display: grid; gap: 2px; }
.consent span { font-size: 14px; color: var(--muted); }
.consent.ok { border-color: var(--sage); }
.consent.ok > .ic { color: #3F6136; }
@media (max-width: 520px) { .consent { flex-wrap: wrap; } .consent .btn { width: 100%; } }

/* ---------- v3: friendlier motion, simpler transitions ---------- */
.otter-ic { width: 100%; height: 100%; display: block; }
.brand .dot { background: var(--teal-soft); padding: 3px; }
.pip-note .face { padding: 5px; background: var(--teal-soft); }
.avatar .otter-ic { padding: 6px; }
.tap-pip { cursor: pointer; }

/* screen entrance: content rises in, lists stagger — only when the screen changes */
.main.enter > *, .main.enter .timeline > *, .main.enter .mini-cards > *, .main.enter .col-a > *, .main.enter .col-b > *, .main.enter .card > .rv-item, .main.enter .p3 > *, .main.enter .grid-tiles > * {
  animation: rise .42s cubic-bezier(.2, .8, .2, 1) both;
}
.main.enter .timeline > *:nth-child(2), .main.enter .mini-cards > *:nth-child(2), .main.enter .card > .rv-item:nth-child(2), .main.enter .grid-tiles > *:nth-child(2) { animation-delay: 40ms; }
.main.enter .timeline > *:nth-child(3), .main.enter .mini-cards > *:nth-child(3), .main.enter .card > .rv-item:nth-child(3), .main.enter .grid-tiles > *:nth-child(3) { animation-delay: 80ms; }
.main.enter .timeline > *:nth-child(4), .main.enter .card > .rv-item:nth-child(4), .main.enter .grid-tiles > *:nth-child(4) { animation-delay: 120ms; }
.main.enter .timeline > *:nth-child(5), .main.enter .card > .rv-item:nth-child(5), .main.enter .grid-tiles > *:nth-child(5) { animation-delay: 160ms; }
.main.enter .timeline > *:nth-child(n+6), .main.enter .card > .rv-item:nth-child(n+6), .main.enter .grid-tiles > *:nth-child(n+6) { animation-delay: 200ms; }
.main.enter .col-a > *:nth-child(2), .main.enter > *:nth-child(2) { animation-delay: 30ms; }
.main.enter .col-a > *:nth-child(3), .main.enter > *:nth-child(3) { animation-delay: 60ms; }
.main.enter .col-a > *:nth-child(n+4), .main.enter > *:nth-child(n+4) { animation-delay: 90ms; }

/* cross-fade between tabs (View Transitions) */
::view-transition-old(root) { animation: vt-out .16s ease both; }
::view-transition-new(root) { animation: vt-in .22s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
.nav { view-transition-name: nav; }

/* press feedback */
.tl, .mini, .ctile, .now-card, .help-chip, .vitem, .rv-item.tap { -webkit-tap-highlight-color: transparent; }
.tl:active, .mini:active, .ctile:active, .help-chip:active, .vitem:active, .rv-item.tap:active { transform: scale(.985); }
.now-card:active { transform: scale(.98); }
.nav button[aria-current="page"] .ic { animation: nav-pop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes nav-pop { 40% { transform: translateY(-3px) scale(1.12); } }

/* timeline circle: a real button that completes the activity */
.tl { cursor: pointer; }
.tl .state { background: var(--paper); padding: 0; cursor: pointer; transition: background var(--t), border-color var(--t), transform var(--t); }
.tl .state:hover { border-color: var(--teal); }
.tl .state .ghost-check { opacity: 0; color: var(--teal); transition: opacity var(--t); }
.tl .state:hover .ghost-check, .tl .state:focus-visible .ghost-check { opacity: .55; }
.tl.done .state { background: var(--deep); border-color: var(--deep); color: #fff; }
.tl .state.popped { background: var(--deep); border-color: var(--deep); animation: check-pop .32s cubic-bezier(.3, 1.6, .5, 1); }
.tl .state.popped .ic { opacity: 1; color: #fff; }
@keyframes check-pop { 50% { transform: scale(1.25); } }
.tl.done { background: rgba(255, 255, 255, .7); }

.confetti { position: fixed; width: 8px; height: 8px; border-radius: 2px; z-index: 90; pointer-events: none; margin: -4px 0 0 -4px;
  animation: conf .8s cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes conf { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

.pip-says.pop { animation: bubble-pop .35s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes bubble-pop { 0% { transform: scale(.94); opacity: .4; } }
.hero .pip-says::before { content: ""; position: absolute; right: 54px; top: -7px; width: 14px; height: 14px; background: var(--paper); transform: rotate(45deg); border-radius: 3px; }

/* warning signs: short by default */
details.more summary { cursor: pointer; font-weight: 800; color: var(--danger); margin-top: 8px; font-size: 15px; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: " ▾"; }
details.more[open] summary::after { content: " ▴"; }
details.more ul { margin-top: 4px; }

.p3 { grid-template-columns: 1fr 1fr; }
.stat-card { padding: 18px; }
@media (max-width: 520px) { .stat-card .v { font-size: 38px; } }

/* sheet: smoother, drag handle bigger target */
.sheet .grab { width: 54px; height: 6px; margin: 6px auto 14px; cursor: grab; }
.toast { animation: none; }
.toast.show { transition: opacity .2s ease, transform .28s cubic-bezier(.3, 1.4, .5, 1); }

/* ---------- v4: AI insight on activity cards ---------- */
.ai-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: #EEE9FB; color: #5B4BA6; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; vertical-align: middle; }
.ai-badge .ic { width: 12px; height: 12px; }
.plan-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--sage); color: #3F6136; font-size: 11.5px; font-weight: 800; vertical-align: middle; }
.plan-badge .ic { width: 13px; height: 13px; }
.how-label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ai-insight { background: linear-gradient(135deg, #F6F3FE, #FFFFFF); border: 1.5px solid #E6E0F7; border-radius: var(--r-md); padding: 12px 16px; }
.ai-insight .ai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ai-insight .k { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6E61B5; }
.ai-insight p { font-weight: 700; font-size: 16.5px; color: var(--ink); }
.howto.ai li { border: 1.5px dashed #E1DAF5; box-shadow: none; }
.ai-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.ai-note .ic { width: 16px; height: 16px; margin-top: 2px; flex: none; }
details.ai-more { background: #FAF8FF; border: 1.5px solid #ECE7FA; border-radius: var(--r-sm); padding: 10px 14px; }
details.ai-more summary { cursor: pointer; font-weight: 800; color: #5B4BA6; display: flex; align-items: center; gap: 6px; list-style: none; font-size: 15px; }
details.ai-more summary::-webkit-details-marker { display: none; }
details.ai-more summary .ic { width: 16px; height: 16px; }
details.ai-more ul { margin: 8px 0 0; padding-left: 20px; font-size: 15px; }
details.ai-more li { margin: 4px 0; }
.watch { display: flex; gap: 10px; align-items: center; background: #FFF6E9; color: #7A4E12; border-radius: var(--r-sm); padding: 10px 14px; font-weight: 600; font-size: 14.5px; }
.watch span:first-of-type { flex: 1; }
.watch > .ic { width: 18px; height: 18px; color: #D08A1E; flex: none; }
.skel { height: 16px; border-radius: 8px; background: linear-gradient(90deg, #EEE9FB 25%, #F8F6FE 50%, #EEE9FB 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; margin-top: 6px; }
.skel.short { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- v5: one type scale, one spacing rhythm ----------
   Page title > section title > card title > body > meta > eyebrow label.
   Every screen uses only these six sizes. */
:root {
  --fs-h1: 30px; --fs-h2: 21px; --fs-title: 16.5px; --fs-body: 16px; --fs-meta: 14px; --fs-eye: 12px;
  --gap-sec: 28px; --input-h: 50px;
}
@media (max-width: 520px) { :root { --fs-h1: 27px; --fs-h2: 20px; --gap-sec: 24px; } }

body { font-size: var(--fs-body); }
h1, .hello h1 { font-size: var(--fs-h1); }
.section-head h2, .hello h2, .ask-top h2 { font-size: var(--fs-h2); }
.section-head { margin: var(--gap-sec) 2px 12px; }
.section-head h3 { font-size: 18px; }
.hello { margin: 2px 2px 18px; }
.hello p { font-size: var(--fs-body); color: var(--ink-2); margin-top: 4px; }

/* card titles + meta, everywhere */
.rv-item .title, .tl .what .t, .mini .t, .ctile .t, .set-row .t, .goal .t, .vitem .t, .signed-in b { font-size: var(--fs-title); font-weight: 800; line-height: 1.3; }
.rv-item .small, .tl .what .s, .mini .s, .ctile .s, .set-row .s, .goal .small, .note .meta { font-size: var(--fs-meta); color: var(--muted); font-weight: 600; }
.small { font-size: var(--fs-meta); }

/* form fields: one height, one radius, one label style */
.field label, .label, .field.two label { font-size: 14px; font-weight: 800; color: var(--ink); }
.input, select.input { min-height: var(--input-h); padding: 12px 14px; font-size: 16px; border-radius: var(--r-sm); border-width: 1.5px; }
textarea.input { min-height: 88px; line-height: 1.45; }
.field { gap: 6px; margin-top: 14px; }
.btn { min-height: 50px; font-size: 16px; }
.btn.sm { min-height: 42px; padding: 8px 14px; font-size: 14.5px; }
.btn.big { min-height: 58px; font-size: 17px; }
.card { padding: 20px; }
@media (max-width: 520px) { .card { padding: 16px; } }

/* ---------- detail card ---------- */
.dh-top { display: flex; align-items: center; gap: 8px; }
.dh-top .chip.type .ic { width: 15px; height: 15px; }
.dh-title { font-size: 27px; margin: 12px 0 6px; line-height: 1.15; }
.dh-meta { display: flex; flex-wrap: wrap; row-gap: 2px; color: var(--ink-2); font-size: 15px; font-weight: 700; }
.dh-meta span + span::before { content: "·"; margin: 0 8px; color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 5px 12px; border-radius: 999px; background: var(--ivory-2); color: var(--ink-2); font-size: 13.5px; font-weight: 800; }
.status-pill .ic { width: 15px; height: 15px; }
.status-pill.done { background: var(--sage); color: #3F6136; }
.status-pill.snz { background: var(--peach-soft); color: #8A4520; }
.primary-actions { margin-top: 20px; display: grid; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sec { margin-top: var(--gap-sec); }
.sec-tight { margin-top: 14px; }
.sec-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; font-family: var(--body); font-size: var(--fs-eye); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-variation-settings: normal; }
.sec-title > .ic { width: 16px; height: 16px; color: var(--teal); }
.sec-title .plan-badge, .sec-title .ai-badge { letter-spacing: .02em; text-transform: none; }
.sec-sub { font-size: var(--fs-meta); color: var(--muted); margin: -4px 0 10px; }
.tip-line { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.tip-line .ic { width: 16px; height: 16px; color: #D9A520; margin-top: 3px; flex: none; }
.sec .watch, .sec .ai-more, .sec .ai-note { margin-top: 10px; }
.ai-insight .k { display: inline-flex; align-items: center; gap: 6px; }
.ai-insight .k .ic { width: 14px; height: 14px; }
.ai-insight p { font-size: 16px; }
.sheet .pain { box-shadow: none; border: 1.5px solid var(--line); margin-bottom: 10px; padding: 12px 14px; }
.pain-top > span:first-child { font-weight: 700; font-size: 15px; }
.pain-val { font-size: 24px; }
.help-chip { justify-content: space-between; padding: 12px 14px; font-size: 15px; border-width: 1.5px; }
.help-chip > .ic { color: var(--teal); }
.quiet { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 8px; }
.quiet details.orig { box-shadow: none; background: transparent; border: 1.5px solid var(--line); }
.quiet details.orig summary { font-size: 15px; }
.link-btn { justify-self: start; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 8px 0; color: var(--deep); font-weight: 800; font-size: 15px; }
.link-btn .ic { width: 16px; height: 16px; }
.howto li { padding: 11px 14px; font-size: 15.5px; }
.note-list { margin-top: 10px; }
@media (min-width: 760px) { .sheet { width: 520px; } }

.dh-top .grow { flex: 1; }
.grow { flex: 1; min-width: 0; }

/* ---------- v6: plan-change cards in Ask Pup, reset area ---------- */
.change-card { align-self: flex-start; width: min(100%, 440px); background: var(--paper); border: 2px solid var(--teal-soft); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow); animation: rise .3s ease; }
.change-card.applied { border-color: var(--sage); }
.change-card.declined { opacity: .6; }
.cc-head { display: flex; align-items: center; gap: 8px; font-size: var(--fs-eye); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.cc-head .ic { width: 16px; height: 16px; }
.cc-sum { font-weight: 800; font-size: var(--fs-title); margin-top: 6px; }
.cc-diff { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.cc-diff li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15px; background: var(--ivory); border-radius: 10px; padding: 7px 10px; }
.cc-diff .k { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); min-width: 64px; }
.cc-diff s { color: var(--muted); }
.cc-diff .ic { width: 14px; height: 14px; color: var(--muted); }
.cc-warn { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 14px; font-weight: 600; color: #7A4E12; background: #FFF6E9; border-radius: 10px; padding: 8px 10px; }
.cc-warn .ic { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.cc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cc-done { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 800; font-size: 14.5px; color: #3F6136; }
.change-card.declined .cc-done { color: var(--muted); }
.cc-done .ic { width: 17px; height: 17px; }
.danger-zone { border: 1.5px solid #F3D2CC; }
.danger-zone .set-row { border-top: 0; padding-bottom: 8px; }
.danger-zone .btn { margin-bottom: 8px; }

/* ---------- v7: appointment place card ---------- */
.place-card { background: var(--paper); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow); }
.pc-name { font-weight: 800; font-size: var(--fs-title); }
.pc-line { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.pc-line .ic { width: 16px; height: 16px; margin-top: 3px; color: var(--teal); flex: none; }
.found-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: #E3F0FB; color: #2C5F8A; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; text-transform: none; }
.found-badge .ic { width: 12px; height: 12px; }

/* ---------- v8: OtterPup — journey, areas, habits, reminders ---------- */
[data-type="reminder"] { --tc: #E3EEFA; --tc-ink: #2C5F8A; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 700; font-size: 22px; color: var(--deep); margin-bottom: 4px; }
.wordmark .otter-ic { width: 32px; height: 32px; }

/* where you stand */
.stand { background: linear-gradient(135deg, #FFFFFF, #F1F8F6); }
.stand-top { display: flex; gap: 12px; align-items: flex-start; }
.stand-top .face { width: 46px; height: 46px; border-radius: 50%; background: var(--teal-soft); padding: 5px; flex: none; }
.stand-text { margin-top: 6px; font-size: 16.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.journey { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.j-head { font-size: 15px; }
.j-head b { font-family: var(--display); font-variation-settings: "SOFT" 100; font-size: 20px; }
.j-track { position: relative; height: 10px; border-radius: 99px; background: var(--teal-soft); margin: 12px 0 6px; }
.j-track > i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--teal), var(--deep)); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.j-mark { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; border: 3px solid var(--peach); }
.j-mark.mile { border-color: var(--sage-2); border-radius: 4px; transform: rotate(45deg); }
.j-mark.past { border-color: var(--deep); }
.j-legend { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.j-next { display: flex; gap: 8px; align-items: center; margin-top: 12px; background: var(--ivory); border-radius: 12px; padding: 9px 12px; font-size: 14.5px; }
.j-next .ic { width: 17px; height: 17px; color: var(--teal); flex: none; }

/* areas + courses share one row style */
.area, .course { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.area:first-child, .course:first-child { border-top: 0; padding-top: 0; }
.area .tile-ic, .course .tile-ic { width: 42px; height: 42px; border-radius: 13px; }
.area-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.area-top .t { font-weight: 800; font-size: var(--fs-title); }
.area-top .pct { font-weight: 800; font-size: 15px; color: var(--deep); white-space: nowrap; }
.area-bar { height: 8px; border-radius: 99px; background: var(--ivory-2); margin: 7px 0 5px; overflow: hidden; }
.area-bar i { display: block; height: 100%; border-radius: 99px; background: var(--tc-ink, var(--deep)); opacity: .8; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.area .s, .course .s { font-size: var(--fs-meta); color: var(--muted); font-weight: 600; }

/* habit tracker */
.habit { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.habit:first-child { border-top: 0; padding-top: 0; }
.habit .t { font-weight: 800; font-size: var(--fs-title); }
.habit .s { font-size: var(--fs-meta); color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.habit .s .ic { width: 14px; height: 14px; color: #E08E62; }
.dots { display: flex; gap: 5px; }
.dot-d { display: grid; justify-items: center; gap: 3px; }
.dot-d i { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(var(--teal) calc(var(--f) * 360deg), var(--ivory-2) 0); box-shadow: inset 0 0 0 4px var(--paper); border: 1.5px solid var(--teal-soft); }
.dot-d small { font-size: 10.5px; font-weight: 800; color: var(--muted); }
@media (max-width: 420px) { .dot-d i { width: 18px; height: 18px; } .dots { gap: 3px; } }

/* habit row on Today */
.habit-row .when { display: grid; justify-items: start; color: var(--teal); }
.habit-row .when .rep { width: 20px; height: 20px; }
.hdots { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.hdots i { width: 10px; height: 10px; border-radius: 50%; background: var(--ivory-2); border: 1.5px solid var(--teal-soft); }
.hdots i.on { background: var(--teal); border-color: var(--teal); }
.hdots span { font-size: 13.5px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.plus { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--deep); color: #fff; display: grid; place-items: center; flex: none; transition: transform var(--t); }
.plus:active { transform: scale(.9); }
.plus .ic { width: 20px; height: 20px; }
.plus[disabled] { background: var(--sage); color: #3F6136; }
.plus.popped { animation: check-pop .32s cubic-bezier(.3, 1.6, .5, 1); }
.habit-row.done .what .t { text-decoration: none; color: var(--ink); }

.toast { width: max-content; max-width: min(440px, calc(100% - 32px)); }
.toast span { line-height: 1.35; }

/* ---------- v9: appointment dates ---------- */
.date-ask { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: var(--peach-soft); border-radius: var(--r-md); padding: 14px 16px; }
.date-ask > .ic { width: 24px; height: 24px; color: #9A4F25; flex: none; }
.date-ask .grow { display: grid; gap: 3px; min-width: 200px; }
.date-ask b { font-size: var(--fs-title); }
.date-ask span { font-size: 14.5px; color: #6B4A33; }
.mini.nudge { border: 2px solid var(--teal); }

/* ---------- v10: scan or add — upload screen + camera ---------- */
.add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.add-tile { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  background: var(--paper); border-radius: var(--r-lg); padding: 18px 16px 16px; box-shadow: var(--shadow); min-height: 150px;
  border: 2px solid transparent; transition: transform var(--t), box-shadow var(--t), border-color var(--t), background var(--t); }
.add-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.add-tile:active { transform: scale(.98); }
.add-tile:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.add-tile.over { border-color: var(--teal); background: var(--teal-soft); }
.add-tile.primary { background: var(--deep); color: #fff; }
.add-ic { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; background: var(--teal-soft); color: var(--deep); margin-bottom: auto; }
.add-tile.primary .add-ic { background: rgba(255, 255, 255, .16); color: #fff; }
.add-ic .ic { width: 26px; height: 26px; }
.add-t { font-family: var(--display); font-size: 21px; font-weight: 700; line-height: 1.15; margin-top: 14px; }
.add-s { font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.add-tile.primary .add-s { color: rgba(255, 255, 255, .78); }

.pages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.page-card { all: unset; box-sizing: border-box; position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow); animation: pop-in .25s ease both; }
.page-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-card .doc-face { height: 100%; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--deep); background: var(--teal-soft); font-weight: 900; font-size: 13px; letter-spacing: .08em; }
.page-card .doc-face .ic { width: 34px; height: 34px; }
.page-n { position: absolute; left: 8px; top: 8px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--deep); color: #fff; font-size: 13px; font-weight: 900; display: grid; place-items: center; }
.page-x { all: unset; position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; background: rgba(31, 46, 45, .62); color: #fff; display: grid; place-items: center; cursor: pointer; }
.page-x .ic { width: 16px; height: 16px; }
.page-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 11.5px; font-weight: 800; color: #fff; background: linear-gradient(transparent, rgba(20, 30, 30, .7)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-card:has(.doc-face) .page-name { color: var(--ink-2); background: none; }
.page-card.add-more { cursor: pointer; display: grid; place-content: center; justify-items: center; gap: 6px; border: 2px dashed var(--sage-2); background: transparent; box-shadow: none; color: var(--deep); font-weight: 800; font-size: 14px; }
.page-card.add-more .ic { width: 28px; height: 28px; }
.page-card.add-more:hover { background: var(--teal-soft); border-color: var(--teal); }
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.tips div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); background: var(--ivory-2); border-radius: var(--r-sm); padding: 12px 6px; }
.tips .ic { color: var(--teal); width: 20px; height: 20px; }
.center { text-align: center; }
p.center .ic { width: 14px; height: 14px; vertical-align: -2px; }
@keyframes pop-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

body.no-scroll { overflow: hidden; }
.cam { position: fixed; inset: 0; z-index: 90; background: #0c1413; color: #fff; opacity: 0; transition: opacity .2s ease; }
.cam.open { opacity: 1; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-guide { position: absolute; left: 50%; top: 50%; width: min(78vw, 62vh); aspect-ratio: 1 / 1.414; transform: translate(-50%, -52%); box-shadow: 0 0 0 100vmax rgba(8, 14, 13, .38); border-radius: 18px; pointer-events: none; }
.cam-guide i { position: absolute; width: 34px; height: 34px; border: 4px solid #fff; }
.cam-guide i:nth-child(1) { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-radius: 16px 0 0 0; }
.cam-guide i:nth-child(2) { right: -2px; top: -2px; border-left: 0; border-bottom: 0; border-radius: 0 16px 0 0; }
.cam-guide i:nth-child(3) { left: -2px; bottom: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 16px; }
.cam-guide i:nth-child(4) { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-radius: 0 0 16px 0; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam.snap .cam-flash { animation: cam-flash .35s ease-out; }
@keyframes cam-flash { 0% { opacity: .85; } 100% { opacity: 0; } }
.cam-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 14px 14px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); }
.cam-title { flex: 1; text-align: center; display: grid; line-height: 1.25; }
.cam-title b { font-family: var(--display); font-size: 20px; }
.cam-title span { font-size: 13.5px; font-weight: 700; opacity: .85; }
.cam-btn { all: unset; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .16); cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cam-btn.ghost { background: none; }
.cam-btn.on { background: #F3D27A; color: #1F2E2D; }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 22px 22px max(26px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.cam-shutter { all: unset; width: 78px; height: 78px; border-radius: 50%; border: 5px solid #fff; display: grid; place-items: center; cursor: pointer; }
.cam-shutter span { width: 60px; height: 60px; border-radius: 50%; background: #fff; transition: transform .12s ease; }
.cam-shutter:active span { transform: scale(.86); }
.cam-shutter:focus-visible, .cam-btn:focus-visible, .cam-done:focus-visible { outline: 3px solid var(--peach); outline-offset: 3px; }
.cam-stack { position: relative; width: 56px; height: 72px; justify-self: start; }
.cam-stack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 2px solid #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .4); animation: cam-fly .35s ease-out; }
.cam-stack img:nth-of-type(2) { transform: rotate(-6deg) translate(-4px, 2px); }
.cam-stack img:nth-of-type(3) { transform: rotate(6deg) translate(4px, 2px); }
.cam-stack .n { position: absolute; right: -8px; top: -8px; z-index: 3; min-width: 24px; height: 24px; border-radius: 12px; padding: 0 6px; background: var(--peach); color: #1F2E2D; font-weight: 900; font-size: 13px; display: grid; place-items: center; }
@keyframes cam-fly { from { transform: translate(110px, -160px) scale(2.4); opacity: .4; } to { transform: none; opacity: 1; } }
.cam-done { all: unset; justify-self: end; padding: 12px 18px; border-radius: 999px; background: var(--peach); color: #1F2E2D; font-weight: 900; font-size: 16px; cursor: pointer; }
.cam-done:disabled { opacity: .35; cursor: default; }
@media (prefers-reduced-motion: reduce) { .cam-stack img, .page-card { animation: none; } }

/* ---------- v10: Breathe with Pup ---------- */
.breathe { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 8px 0 2px; }
.br-stage { position: relative; width: min(64vw, 240px); aspect-ratio: 1; display: grid; place-items: center; margin: 4px 0 10px; }
.br-halo { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed rgba(91, 74, 140, .22); }
.br-orb { width: 100%; height: 100%; border-radius: 50%; transform: scale(.62); will-change: transform;
  background: radial-gradient(circle at 35% 30%, #fff 0, #EDE8F7 22%, #CFC4EC 58%, #A996D9 100%);
  box-shadow: 0 0 0 10px rgba(169, 150, 217, .14), 0 0 60px rgba(169, 150, 217, .45); transition: transform .6s ease, box-shadow .6s ease; }
.breathe.on .br-orb { transition: none; }
.breathe[data-phase="hold"] .br-orb { box-shadow: 0 0 0 14px rgba(169, 150, 217, .2), 0 0 80px rgba(169, 150, 217, .55); }
.breathe.finished .br-orb { background: radial-gradient(circle at 35% 30%, #fff 0, #E4F1EE 25%, #B9DCD5 60%, #6BA8A0 100%); }
.br-word { font-family: var(--display); font-size: 26px; font-weight: 700; color: #4A3C78; min-height: 1.3em; }
.br-sub { font-size: 15px; font-weight: 700; color: var(--muted); }
.br-dots { display: flex; gap: 7px; margin: 8px 0 14px; flex-wrap: wrap; justify-content: center; }
.br-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: background .3s, transform .3s; }
.br-dots i.now { background: #A996D9; transform: scale(1.3); }
.br-dots i.done { background: #5B4A8C; }
.breathe .btn { max-width: 340px; }

/* ---------- v10: phone notifications row ---------- */
.push-row .rec { display: inline-block; vertical-align: 2px; margin-left: 6px; font-size: 11px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: var(--deep); background: var(--teal-soft); border-radius: 999px; padding: 2px 8px; }
.push-row.on .rec { display: none; }
.notice.ios { background: var(--lilac); color: #3E3366; }

/* ---------- v11: calmer screens ---------- */
.rv-item .time-pills { gap: 6px; }
.rv-item .time-pill { width: 82px; min-width: 0; min-height: 32px; padding: 4px 6px; font-size: 13.5px; text-align: center; }
.rv-item .time-pill::-webkit-calendar-picker-indicator { display: none; }
details.topics > summary { list-style: none; cursor: pointer; }
details.topics > summary::-webkit-details-marker { display: none; }
details.topics > summary h2::after { content: "›"; display: inline-block; margin-left: 8px; color: var(--muted); transition: transform var(--t); }
details.topics[open] > summary h2::after { transform: rotate(90deg); }
details.preview-fold { margin-top: 12px; }
details.preview-fold > summary, details.note-fold > summary { cursor: pointer; font-weight: 800; color: var(--deep); display: flex; align-items: center; gap: 8px; list-style: none; }
details.preview-fold > summary::-webkit-details-marker, details.note-fold > summary::-webkit-details-marker { display: none; }
details.preview-fold[open] > summary { margin-bottom: 12px; }
details.note-fold[open] > summary { margin-bottom: 10px; }
.welcome .lead { max-width: 30ch; margin-inline: auto; }
/* the phone top bar already names the page */
@media (max-width: 959px) { [data-view="care"] .hello, [data-view="progress"] .hello { display: none; } }

/* ---------- v12: About you (read from the plan) + Pup's reading of shorthand ---------- */
.about { margin-bottom: 14px; }
.about-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.about-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 19px; }
.about-head .link-btn { margin: 0; }
.about dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.about dl div { min-width: 0; }
.about dt { font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.about dd { margin: 2px 0 0; font-weight: 800; overflow-wrap: anywhere; }
.about .allergy { grid-column: 1 / -1; }
.about .allergy dd { color: var(--danger); }
.about.edit .field:first-of-type { margin-top: 4px; }
.assumed { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; font-size: 13.5px; font-weight: 700; color: #5B4A8C; background: var(--lilac); border-radius: 12px; padding: 7px 10px; }
.assumed .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; }

/* ---------- v13: back arrow on setup screens ---------- */
.flow-nav { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 10px; margin-bottom: 14px; }
.flow-nav .progress-dots { margin: 0; }
.back-btn { all: unset; box-sizing: border-box; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); box-shadow: var(--shadow); color: var(--ink); cursor: pointer; transition: transform var(--t); }
.back-btn:active { transform: scale(.92); }
.back-btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.back-btn.ghost { background: none; box-shadow: none; cursor: default; }
.back-btn .ic { width: 22px; height: 22px; }

/* ---------- v14: Ask Pup fits the phone screen, no jump on open ---------- */
.ask { min-height: calc(100vh - 196px); min-height: calc(100dvh - 196px); }
@media (min-width: 960px) { .ask { min-height: calc(100dvh - 100px); } }
@media (max-width: 959px) {
  .ask-top h2 { display: none; }              /* the top bar already says "Ask Pup" */
  .ask-top .pip-host { width: 84px; height: 92px; }
}

/* ---------- v15: video first, phone field, no sideways overflow ---------- */
.video-sec { padding-top: 4px; }
.vcard { all: unset; box-sizing: border-box; position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #1F2E2D; cursor: pointer; box-shadow: var(--shadow); }
.vcard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vcard .vplay { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--deep); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); transition: transform var(--t); }
.vcard:hover .vplay, .vcard:focus-visible .vplay { transform: scale(1.08); }
.vcard .vplay .ic { width: 28px; height: 28px; margin-left: 4px; fill: currentColor; }
.vcard .vmeta { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 26px 14px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); color: #fff; }
.vcard .vmeta b { font-size: 14px; font-weight: 800; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vcard .vmeta i { font-style: normal; font-size: 12.5px; font-weight: 900; background: rgba(0, 0, 0, .55); padding: 2px 7px; border-radius: 6px; flex: none; }
.vcard.loading { display: grid; place-items: center; cursor: default; background: var(--ivory-2); }
.vframe { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; }
.vframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.dh-how { margin: 8px 0 0; font-weight: 700; color: var(--ink-2); font-size: 15.5px; }
.phone-field { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 8px; }
.phone-field select, .phone-field input { min-width: 0; font-size: 16px; }

/* nothing may push the page wider than the phone (that read as "zoomed in") */
html, body { overflow-x: clip; }
.main, .ask, .chat, .ask-bottom { min-width: 0; max-width: 100%; }
.msg { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
.msg img, .msg video { max-width: 100%; height: auto; }
.msg table { display: block; max-width: 100%; overflow-x: auto; }
.msg pre, .msg code { white-space: pre-wrap; overflow-wrap: anywhere; }
.suggest button, .ctx-chip { max-width: 100%; white-space: normal; text-align: left; overflow-wrap: anywhere; }
input, select, textarea { font-size: 16px; }
/* the top bar stays put on phones, so a long chat never looks cut off */
@media (max-width: 959px) {
  .topbar { position: sticky; top: 0; z-index: 20; margin: -20px -16px 12px; padding: 12px 16px 10px; background: rgba(251, 246, 238, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.main.enter > .topbar { animation: none; }

/* ---------- v16: breathing = vertical fill bar, guide above "Mark as done" ---------- */
.breathe-sec { padding-top: 6px; }
.breathe .br-stage { width: auto; aspect-ratio: auto; margin: 2px 0 12px; }
.br-tube { position: relative; width: 96px; height: min(30vh, 210px); border-radius: 60px; background: #F1EDF8; overflow: hidden;
  box-shadow: inset 0 0 0 3px #E3DCF2, 0 14px 34px rgba(91, 74, 140, .16); }
.br-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; transform-origin: 50% 100%; transform: scaleY(.06);
  background: linear-gradient(to top, #8F7BCB, #B9A8E6 70%, #DCD2F5); border-radius: 0 0 60px 60px; will-change: transform; transition: transform .6s ease; }
.breathe.on .br-fill { transition: none; }
.br-tube i { position: absolute; left: 22px; right: 22px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .7); z-index: 1; }
.breathe[data-phase="hold"] .br-tube { box-shadow: inset 0 0 0 3px #C9BCEB, 0 0 0 8px rgba(169, 150, 217, .18), 0 14px 34px rgba(91, 74, 140, .2); }
.breathe.finished .br-fill { background: linear-gradient(to top, #4F9A92, #8CC5BD 70%, #CDE8E3); }
.breathe .btn.big { margin-top: 4px; }

.done-link { margin: 10px auto 0; display: flex; justify-content: center; }

/* ---------- v17: lists always fit the phone, even with large system text ---------- */
/* A grid column grows to its widest no-wrap line; minmax(0, 1fr) lets it shrink to the screen instead. */
.timeline { grid-template-columns: minmax(0, 1fr); }
.mini-cards { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
.tl, .mini, .now-card, .card, .rv-item, .set-row { min-width: 0; }
.tl .what .t, .now-card .t, .mini .t { overflow-wrap: break-word; }
.hdots span { white-space: normal; }
/* "Your care for today" and the date stack on phones instead of squeezing side by side */
@media (max-width: 520px) {
  .section-head { flex-wrap: wrap; row-gap: 2px; }
  .section-head > .muted, .section-head > span.small { flex-basis: 100%; }
}
/* narrow phones / large system text: Pup steps back so the progress text has room */
@media (max-width: 400px) {
  .hero .pip-host { width: 96px; height: 108px; margin: -10px -6px -8px 0; }
  .hero-stats { gap: 12px; }
  .hero .ring { width: 78px; height: 78px; }
}
@media (max-width: 400px) { .hero-copy .big { white-space: normal; font-size: 19px; line-height: 1.2; } }

/* ---------- v18: fluid motion ---------- */
/* Startup splash: Pup bobs while the app gets ready (shown before any script runs) */
.boot { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; }
.boot-pup { width: 92px; height: 92px; animation: boot-bob 1.4s ease-in-out infinite; filter: drop-shadow(0 10px 14px rgba(60, 40, 25, .16)); }
.boot-name { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--deep); letter-spacing: -.01em; }
.boot-bar { width: 120px; height: 5px; border-radius: 9px; background: var(--teal-soft); overflow: hidden; }
.boot-bar i { display: block; width: 40%; height: 100%; border-radius: 9px; background: var(--teal); animation: boot-slide 1.1s ease-in-out infinite; }
@keyframes boot-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes boot-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
#app.first-in > :not(.boot) { animation: app-in .36s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes app-in { from { opacity: 0; } }

/* Tabs: only the page slides — top bar and tab bar stay put; the active tab pill glides */
.main { view-transition-name: page; }
.topbar { view-transition-name: topbar; }
.nav [aria-current="page"] { view-transition-name: navpill; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
:root { --vt-d: 1; }
:root[data-dir="back"] { --vt-d: -1; }
::view-transition-old(page) { animation: vt-page-out .16s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(page) { animation: vt-page-in .3s cubic-bezier(.2, .85, .25, 1) both; }
::view-transition-group(navpill) { animation-duration: .32s; animation-timing-function: cubic-bezier(.3, 1.3, .5, 1); }
@keyframes vt-page-out { to { opacity: 0; transform: translateX(calc(var(--vt-d) * -28px)); } }
@keyframes vt-page-in { from { opacity: 0; transform: translateX(calc(var(--vt-d) * 36px)); } }
/* the page already slides, so list items just settle in softly */
.main.enter > *, .main.enter .timeline > *, .main.enter .mini-cards > *, .main.enter .card > .rv-item { animation-name: settle; animation-duration: .36s; }
@keyframes settle { from { opacity: 0; transform: translateY(4px); } }

/* Sheets: a soft spring up, a quick ease down, content drifts in */
.sheet { transition: transform 420ms cubic-bezier(.2, 1.15, .32, 1); }
.sheet:not(.open) { transition-duration: 220ms; transition-timing-function: cubic-bezier(.4, 0, 1, 1); }
.sheet.open > * { animation: sheet-item .4s cubic-bezier(.2, .8, .2, 1) both; }
.sheet.open > :nth-child(2) { animation-delay: 40ms; } .sheet.open > :nth-child(3) { animation-delay: 80ms; }
.sheet.open > :nth-child(4) { animation-delay: 110ms; } .sheet.open > :nth-child(n+5) { animation-delay: 140ms; }
@keyframes sheet-item { from { opacity: 0; transform: translateY(14px); } }
.scrim.open { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }

/* Pup: the 3D version fades in over the drawn one; his bubble pops when he answers */
.pup-in { animation: pup-in .5s ease both; }
@keyframes pup-in { from { opacity: 0; transform: scale(.94); } }
.pip-says.pop { animation: says-pop .38s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes says-pop { 0% { transform: scale(.92); opacity: .4; } 100% { transform: none; opacity: 1; } }
.tap-pip { cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* Drawn Pup (before 3D loads): fills its spot and has simple moods */
.pup-lite { width: 100%; height: 100%; display: grid; place-items: center; cursor: pointer; }
.pup-lite svg { width: 78%; height: 78%; overflow: visible; }
.pup-lite .pl-body { transform-origin: 100px 200px; animation: pl-breathe 3.2s ease-in-out infinite; }
.pup-lite .pl-head { transform-origin: 100px 110px; }
.pup-lite .pl-eyes { transform-origin: 100px 66px; animation: pl-blink 4.5s infinite; }
.pup-lite[data-mood="happy"] .pl-body, .pup-lite[data-mood="cheer"] .pl-body { animation: pl-hop .5s ease-in-out 3; }
.pup-lite[data-mood="wave"] .pl-head { animation: pl-tilt .6s ease-in-out 3; }
.pup-lite[data-mood="think"] .pl-head, .pup-lite[data-mood="concerned"] .pl-head { transform: rotate(9deg); transition: transform .4s; }
.pup-lite[data-mood="sleepy"] .pl-eyes { transform: scaleY(.25); animation: none; }
@keyframes pl-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, .985); } }
@keyframes pl-blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes pl-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes pl-tilt { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-10deg); } }
@media (prefers-reduced-motion: reduce) {
  .boot-pup, .boot-bar i, .pup-lite *, #app.first-in > :not(.boot) { animation: none !important; }
  ::view-transition-old(page), ::view-transition-new(page) { animation: none; }
}

/* ---------- v19: colour-coded "how to take" labels ---------- */
.mtag { --bg: var(--ivory-2); --fg: var(--ink-2); --bd: transparent; }
.mtag[data-tone="food"]   { --bg: #E4F1DD; --fg: #2F5A26; --bd: #B9D9AA; }
.mtag[data-tone="before"] { --bg: #FDEFD3; --fg: #7A4E08; --bd: #F1D08E; }
.mtag[data-tone="water"]  { --bg: #DEEEFB; --fg: #1B5684; --bd: #A9CFEF; }
.mtag[data-tone="night"]  { --bg: #E8E4F7; --fg: #46387A; --bd: #C8BEEB; }
.mtag[data-tone="day"]    { --bg: #FFF4C9; --fg: #6E5400; --bd: #F0DB85; }
.mtag[data-tone="avoid"]  { --bg: #FCE3DF; --fg: #9A2B21; --bd: #F1B3A9; }
.mtag[data-tone="handle"] { --bg: #DCEDEA; --fg: #1E5A57; --bd: #A9D1CB; }
.mtag[data-tone="course"] { --bg: #FCE6D7; --fg: #8A4520; --bd: #F2C2A2; }

.mtags.bars { display: grid; gap: 8px; margin-top: 14px; }
.mtags.bars .mtag { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: var(--bg); color: var(--fg);
  font-weight: 800; font-size: 16px; line-height: 1.25; border-left: 5px solid var(--bd); }
.mtags.bars .mtag .ic { width: 20px; height: 20px; flex: none; }
.mtags.bars .mtag span { flex: 1; min-width: 0; }
.mtag-src { font-style: normal; font-size: 11px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; opacity: .7; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .6); flex: none; }

.mtags.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.mtags.chips .mtag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px; border-radius: 999px; background: var(--bg); color: var(--fg);
  font-weight: 800; font-size: 12.5px; line-height: 1.2; max-width: 100%; }
.mtags.chips .mtag .ic { width: 13px; height: 13px; flex: none; }

/* ---------- v20: no black flashes — in-app dialogs, Pup loader, stage cross-fades ---------- */
html { background: var(--ivory); }
::view-transition { background: var(--ivory); }
html[data-vt="stage"]::view-transition-old(root) { animation: vt-stage-out .2s cubic-bezier(.4, 0, 1, 1) both; }
html[data-vt="stage"]::view-transition-new(root) { animation: vt-stage-in .38s cubic-bezier(.2, .85, .25, 1) both; }
html[data-vt="stage"]::view-transition-old(page), html[data-vt="stage"]::view-transition-new(page),
html[data-vt="stage"]::view-transition-old(topbar), html[data-vt="stage"]::view-transition-new(topbar) { animation: none; }
@keyframes vt-stage-out { to { opacity: 0; transform: scale(.985); } }
@keyframes vt-stage-in { from { opacity: 0; transform: translateY(10px); } }

.modal.confirm-dlg { width: min(380px, calc(100% - 32px)); padding: 24px 20px 18px; text-align: center; border-radius: 26px; }
.ask-ic { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--teal-soft); color: var(--deep); animation: pop-in .32s cubic-bezier(.3, 1.4, .5, 1) both; }
.ask-ic.danger { background: var(--danger-soft); color: var(--danger); }
.ask-ic .ic { width: 26px; height: 26px; }
.ask-box h3 { margin: 0 0 6px; font-family: var(--display); font-size: 21px; line-height: 1.25; color: var(--deep); overflow-wrap: anywhere; }
.ask-box p { margin: 0 0 18px; color: var(--ink-2); font-size: 15.5px; line-height: 1.45; }
.ask-box h3:last-of-type + .ask-btns { margin-top: 16px; }
.ask-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ask-btns .btn { min-height: 50px; padding: 12px 10px; }
.btn.danger-solid { background: var(--danger); color: #fff; }
.btn.danger-solid:hover { background: #9c3a31; }

.busy { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(251, 246, 238, .82);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s ease; }
.busy.open { opacity: 1; }
.busy-card { display: grid; justify-items: center; gap: 12px; transform: translateY(8px) scale(.97); transition: transform .32s cubic-bezier(.2, .85, .25, 1); }
.busy.open .busy-card { transform: none; }
.busy-pup { width: 84px; height: 84px; animation: boot-bob 1.4s ease-in-out infinite; filter: drop-shadow(0 10px 14px rgba(60, 40, 25, .16)); }
.busy-pup svg { width: 100%; height: 100%; }
.busy p { margin: 0; font-weight: 800; color: var(--deep); font-size: 16.5px; text-align: center; padding: 0 24px; }

@media (prefers-reduced-motion: reduce) {
  html[data-vt="stage"]::view-transition-old(root), html[data-vt="stage"]::view-transition-new(root) { animation: none; }
  .busy-pup, .ask-ic { animation: none; }
}

/* ---------- v21: no black waits — video, camera, documents ---------- */
.vframe, .player { background-color: #1d3331; background-size: cover; background-position: center; }
.vload iframe { opacity: 0; }
.vframe iframe, .player iframe { transition: opacity .3s ease; }
.vspin { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: spin .8s linear infinite; z-index: 1; box-shadow: 0 0 0 999px rgba(15, 30, 29, .28); pointer-events: none; }
.vframe:not(.vload) .vspin, .player:not(.vload) .vspin { display: none; }

.cam-wait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: #cfe3e0; font-weight: 700; transition: opacity .3s ease; pointer-events: none; }
.cam-wait i { width: 40px; height: 40px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin .8s linear infinite; }
.cam.live .cam-wait { opacity: 0; }

.modal.doc-modal { max-height: calc(100dvh - 40px); }
.modal.doc-modal .modal-head h3 { margin: 0; font-family: var(--display); color: var(--deep); }
.doc-body { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.doc-body h2 { font-size: 17px; color: var(--deep); margin: 18px 0 6px; }
.doc-body a { color: var(--deep); }
.sk-line { height: 14px; border-radius: 8px; margin: 10px 0; background: linear-gradient(90deg, var(--ivory-2) 25%, #fff 50%, var(--ivory-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.sk-line.short { width: 60%; }
@media (prefers-reduced-motion: reduce) { .vspin, .cam-wait i, .sk-line { animation: none; } }

/* ---------- v22: live update from WhatsApp — the row glows once ---------- */
.tl.live-hit { animation: live-hit 1.3s ease both; border-radius: 18px; }
@keyframes live-hit { 0% { box-shadow: 0 0 0 0 rgba(107, 168, 160, .0); background: transparent; } 25% { box-shadow: 0 0 0 6px rgba(107, 168, 160, .28); background: rgba(107, 168, 160, .12); } 100% { box-shadow: 0 0 0 0 rgba(107, 168, 160, 0); background: transparent; } }
@media (prefers-reduced-motion: reduce) { .tl.live-hit { animation: none; } }
