:root {
  --cream: #f5f2ea;
  --paper: #fcfaf5;
  --ink: #202624;
  --muted: #727a73;
  --blue: #315f75;
  --blue-deep: #244b5e;
  --sage: #aebba1;
  --sage-soft: #dfe6d8;
  --sage-pale: #edf1e8;
  --burgundy: #75434e;
  --yellow: #e7c775;
  --duck: #f2d783;
  --duck-wing: #e5c365;
  --orange: #df8c4d;
  --line: rgba(32, 38, 36, .085);
  --shadow: 0 16px 44px rgba(39, 47, 43, .075);
}

* { box-sizing: border-box; }
html { background: var(--cream); }
body {
  margin: 0; min-height: 100dvh; color: var(--ink);
  background:
    radial-gradient(circle at 86% -5%, rgba(174,187,161,.28), transparent 28%),
    linear-gradient(180deg, #f8f5ee 0%, var(--cream) 58%, #f0ebe2 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, textarea, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; }
.app-shell { width: min(100%, 520px); min-height: 100dvh; margin: 0 auto; padding: env(safe-area-inset-top) 18px calc(98px + env(safe-area-inset-bottom)); }
.topbar { display:flex; align-items:center; justify-content:space-between; padding:16px 2px 20px; }
.topbar h1 { margin:2px 0 0; font-size:29px; letter-spacing:-1.2px; }
.eyebrow { font-size:10px; letter-spacing:.16em; font-weight:780; color:var(--blue); }
.muted { color: var(--muted); }
.small { font-size:12px; }
.profile-pill { width:42px; height:42px; border-radius:50%; border:1px solid var(--line); background:rgba(252,250,245,.88); color:var(--ink); font-weight:760; box-shadow:0 7px 18px rgba(42,48,43,.06); }
.screen { display:none; animation:rise .26s ease both; }
.screen.active { display:block; }
@keyframes rise { from { opacity:0; transform:translateY(5px);} to {opacity:1; transform:none;} }
.card { background:rgba(252,250,245,.88); border:1px solid rgba(255,255,255,.76); box-shadow:var(--shadow); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px); }

.room-card { position:relative; overflow:hidden; border-radius:32px; padding:24px 21px 19px; }
.room-glow { position:absolute; border-radius:50%; pointer-events:none; }
.glow-one { width:215px; height:215px; right:-82px; top:-103px; background:rgba(174,187,161,.4); }
.glow-two { width:155px; height:155px; left:-76px; bottom:-82px; background:rgba(49,95,117,.075); }
.room-head { position:relative; z-index:2; display:grid; grid-template-columns:1fr auto; gap:12px; align-items:start; }
.room-head h2, .page-title h2 { margin:5px 0 8px; font-size:29px; line-height:1.02; letter-spacing:-1.25px; }
.room-head p { margin:0; line-height:1.45; max-width:285px; }
.countdown-chip { border:0; min-width:74px; max-width:96px; padding:9px 9px 8px; border-radius:17px; background:rgba(255,255,255,.55); color:var(--blue-deep); text-align:center; box-shadow:inset 0 0 0 1px rgba(49,95,117,.08); }
.countdown-chip span { display:block; }
.countdown-number { font-size:21px; font-weight:800; letter-spacing:-.7px; line-height:1.05; }
.countdown-chip span:last-child { font-size:9px; line-height:1.2; font-weight:700; margin-top:3px; color:#708079; }

.duck-scene { position:relative; min-height:192px; display:grid; grid-template-columns:1fr 42px 1fr; align-items:end; z-index:1; padding:10px 0 2px; }
.duck-person { display:flex; flex-direction:column; align-items:center; gap:2px; transition:transform .45s cubic-bezier(.2,.8,.2,1.2); }
.duck-person strong { font-size:12px; }
.duck-status { font-size:10px; color:var(--muted); min-height:12px; }
.duck-svg { width:112px; height:104px; overflow:visible; filter:drop-shadow(0 9px 8px rgba(62,61,44,.08)); }
.duck-svg.mirror { transform:scaleX(-1); }
.duck-shadow { fill:rgba(55,64,59,.08); }
.duck-body { fill:var(--duck); }
.duck-wing { fill:var(--duck-wing); }
.duck-eye { fill:#252b29; }
.duck-beak { fill:var(--orange); }
.duck-scarf { fill:none; stroke:var(--blue); stroke-width:7; stroke-linecap:round; }
.duck-scarf-tail { fill:none; stroke:var(--blue); stroke-width:6; stroke-linecap:round; }
.duck-collar { fill:none; stroke:var(--sage); stroke-width:7; stroke-linecap:round; }
.between-ducks { align-self:center; justify-self:center; color:var(--burgundy); font-size:27px; animation:breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 0%,100% {transform:scale(.92); opacity:.62;} 50% {transform:scale(1.09); opacity:1;} }
.duck-scene[data-gesture="hug"] .duck-jasmin { transform:translateX(16px) rotate(-2deg); }
.duck-scene[data-gesture="hug"] .duck-s { transform:translateX(-16px) rotate(2deg); }
.duck-scene[data-gesture="thinking"] .duck-jasmin { transform:translateX(8px); }
.duck-scene[data-gesture="miss"] .duck-jasmin { transform:translateX(-8px); }

.quick-gestures { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.gesture-pill { min-height:42px; border:0; border-radius:14px; background:var(--sage-pale); color:var(--ink); font-size:11px; font-weight:720; display:flex; align-items:center; justify-content:center; gap:6px; }
.gesture-pill span { font-size:15px; }
.gesture-pill:active { transform:scale(.98); }

.home-checkin { margin-top:14px; border-radius:23px; padding:17px; }
.card-title-row { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.card-title-row h3 { margin:4px 0 0; font-size:18px; letter-spacing:-.35px; }
.home-checkin p { margin:8px 0 0; line-height:1.45; font-size:13px; }
.text-button { border:0; background:transparent; color:var(--blue); font-size:12px; font-weight:760; padding:4px 0; }
.section-heading { display:flex; justify-content:space-between; align-items:end; margin:30px 3px 12px; }
.section-heading h3 { margin:2px 0 0; font-size:21px; letter-spacing:-.5px; }
.timeline { display:grid; gap:8px; }
.timeline-item { display:grid; grid-template-columns:42px 1fr auto; gap:11px; align-items:center; padding:12px 13px; border-radius:18px; background:rgba(252,250,245,.72); border:1px solid rgba(255,255,255,.65); }
.timeline-symbol { width:42px; height:42px; border-radius:14px; display:grid; place-items:center; background:var(--sage-pale); font-size:20px; }
.timeline-copy b { display:block; font-size:13px; }
.timeline-copy span, .timeline-time { color:var(--muted); font-size:10px; }
.empty-timeline { display:flex; gap:13px; align-items:center; padding:16px; border-radius:20px; }
.empty-timeline .empty-symbol { width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center; border-radius:14px; background:var(--sage-pale); color:var(--burgundy); font-size:20px; }
.empty-timeline b { font-size:13px; }
.empty-timeline p { margin:3px 0 0; font-size:11px; line-height:1.4; }
.feature-card { appearance:none; width:100%; border-radius:22px; padding:16px 15px; margin-top:12px; display:grid; grid-template-columns:44px 1fr 20px; align-items:center; gap:12px; color:var(--ink); text-align:left; }
.feature-icon { width:44px; height:44px; border-radius:14px; display:grid; place-items:center; background:var(--sage-soft); color:var(--blue); font-size:21px; }
.feature-copy { display:flex; flex-direction:column; gap:3px; min-width:0; }
.feature-copy .muted { font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.feature-title { font-weight:740; font-size:15px; }
.chevron { color:#8d918a; font-size:25px; font-weight:300; }

.page-title { padding:12px 3px 20px; }
.page-title p { margin:0; line-height:1.5; max-width:410px; }
.gesture-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.gesture-card { min-height:133px; border-radius:23px; border:1px solid rgba(255,255,255,.74); padding:16px; display:flex; flex-direction:column; align-items:flex-start; text-align:left; color:var(--ink); }
.gesture-card > span { font-size:30px; margin-bottom:auto; }
.gesture-card b { font-size:14px; }
.gesture-card small { margin-top:3px; color:var(--muted); font-size:10px; line-height:1.3; }
.gesture-card:active, .choice-grid button:active, .choice-row button:active, .feature-card:active { transform:scale(.985); }
.note-heading { margin-top:32px; }
.note-paper { border-radius:27px; padding:21px; }
.note-kicker { font-family:Georgia,serif; font-style:italic; font-size:17px; color:var(--burgundy); }
textarea { width:100%; min-height:155px; border:0; resize:none; outline:none; background:transparent; padding:21px 2px 14px; color:var(--ink); font-family:Georgia,serif; font-size:21px; line-height:1.45; }
textarea::placeholder { color:#aaa89f; }
.note-footer { display:flex; justify-content:space-between; align-items:center; border-top:1px solid var(--line); padding-top:13px; }
.saved-note { margin-top:13px; border-radius:22px; padding:18px; }
.saved-note p { font-family:Georgia,serif; font-size:19px; line-height:1.5; margin:8px 0 10px; }

.primary-button, .secondary-button { min-height:52px; border-radius:17px; border:0; font-weight:730; transition:transform .12s ease, opacity .12s ease; }
.primary-button { width:100%; padding:0 18px; display:flex; align-items:center; justify-content:space-between; background:var(--blue); color:#fff; box-shadow:0 12px 25px rgba(49,95,117,.18); }
.primary-button.compact { width:auto; min-height:44px; padding:0 15px; }
.primary-button.centered { justify-content:center; }
.secondary-button { padding:0 17px; background:var(--sage-soft); color:var(--ink); }
.primary-button:active, .secondary-button:active { transform:scale(.985); }

.privacy-note { border-radius:20px; padding:13px 15px; margin-bottom:12px; display:flex; gap:10px; align-items:flex-start; }
.privacy-note > span { color:var(--blue); }
.privacy-note p { margin:0; font-size:11px; line-height:1.45; color:var(--muted); }
.privacy-note b { color:var(--ink); }
.drop-card { border-radius:28px; overflow:hidden; min-height:385px; }
.drop-empty { min-height:385px; padding:34px 25px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.drop-symbol { width:70px; height:70px; border-radius:22px; background:var(--sage-soft); color:var(--blue); display:grid; place-items:center; font-size:29px; margin-bottom:18px; }
.drop-empty h3 { margin:0 0 7px; font-size:22px; }
.drop-empty p { margin:0 0 24px; line-height:1.5; }
.upload-label { width:auto; min-width:190px; justify-content:center; }
.drop-preview { position:relative; min-height:385px; background:#202726; }
.drop-preview img { width:100%; height:385px; object-fit:cover; display:block; }
.drop-overlay { position:absolute; inset:0; display:flex; justify-content:space-between; align-items:flex-end; padding:18px; background:linear-gradient(transparent 62%, rgba(12,17,16,.52)); color:#fff; }
.mini-pill { padding:7px 10px; border-radius:999px; background:rgba(245,242,234,.88); color:var(--ink); font-size:11px; font-weight:730; }
.timer { font-size:11px; font-weight:650; }
.action-row { display:grid; grid-template-columns:1fr 1.55fr; gap:10px; margin-top:12px; }
.keep-card { margin-top:14px; border-radius:22px; padding:18px; display:grid; gap:16px; }
.keep-card h3 { margin:4px 0 5px; }
.keep-card p { margin:0; line-height:1.45; font-size:13px; }

.checkin-section { margin-bottom:26px; }
.section-label { display:flex; gap:11px; align-items:center; margin:0 3px 10px; }
.section-label > span { width:27px; height:27px; border-radius:9px; background:var(--sage-soft); display:grid; place-items:center; font-size:9px; font-weight:800; color:var(--blue); }
.section-label b { display:block; font-size:15px; }
.section-label small { display:block; color:var(--muted); font-size:10px; margin-top:2px; }
.choice-row { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.choice-row button { min-height:72px; padding:9px 3px; border:1px solid rgba(255,255,255,.72); background:rgba(252,250,245,.82); border-radius:18px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; font-size:20px; color:var(--ink); box-shadow:0 9px 24px rgba(39,47,43,.045); }
.choice-row button span { font-size:10px; font-weight:720; }
.choice-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.choice-grid button { min-height:74px; border:1px solid rgba(255,255,255,.72); background:rgba(252,250,245,.82); border-radius:19px; padding:12px 13px; color:var(--ink); display:flex; align-items:center; gap:10px; text-align:left; box-shadow:0 9px 24px rgba(39,47,43,.045); }
.choice-grid button > span { font-size:22px; }
.choice-grid button b { font-size:12px; line-height:1.2; }
.choice-row button.selected, .choice-grid button.selected { outline:2px solid var(--blue); background:var(--sage-pale); }
.relationship-section { padding-top:3px; }
.us-grid button { min-height:78px; }
.context-card { border-radius:21px; padding:16px; margin-top:1px; }
.context-card label { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:12px; }
.context-card label span { font-size:9px; }
.context-card input { width:100%; border:0; border-bottom:1px solid var(--line); outline:none; background:transparent; padding:15px 0 10px; color:var(--ink); font-size:13px; }
.context-card input::placeholder { color:#9ba09a; }
.context-count { margin-top:6px; text-align:right; font-size:9px; color:var(--muted); }
.save-checkin { margin-top:12px; }
.checkin-saved { margin-top:13px; border-radius:22px; padding:18px; }
.checkin-saved h3 { margin:5px 0 5px; font-size:18px; }
.checkin-saved p { margin:0; font-size:12px; line-height:1.45; }

.bottom-nav { position:fixed; left:50%; bottom:max(10px, env(safe-area-inset-bottom)); transform:translateX(-50%); width:min(calc(100% - 28px),492px); min-height:70px; padding:7px 8px; display:grid; grid-template-columns:repeat(4,1fr); gap:4px; background:rgba(250,247,240,.9); border:1px solid rgba(255,255,255,.86); border-radius:25px; box-shadow:0 15px 45px rgba(39,47,43,.16); backdrop-filter:blur(22px); -webkit-backdrop-filter:blur(22px); z-index:20; }
.nav-item { border:0; background:transparent; border-radius:18px; color:#858a83; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; }
.nav-item span { font-size:20px; line-height:1; }
.nav-item small { font-size:10px; font-weight:700; }
.nav-item.active { background:var(--sage-soft); color:var(--blue-deep); }

.sheet-backdrop { position:fixed; inset:0; z-index:60; background:rgba(25,31,29,.28); backdrop-filter:blur(7px); -webkit-backdrop-filter:blur(7px); display:flex; align-items:flex-end; justify-content:center; padding:14px; }
.bottom-sheet { width:min(100%,500px); border-radius:28px 28px 24px 24px; padding:10px 20px calc(17px + env(safe-area-inset-bottom)); background:var(--paper); box-shadow:0 -20px 65px rgba(25,31,29,.16); animation:sheetUp .27s ease both; }
@keyframes sheetUp { from {transform:translateY(25px); opacity:.7;} to {transform:none; opacity:1;} }
.sheet-handle { width:38px; height:4px; margin:0 auto 20px; border-radius:3px; background:#d8d6cf; }
.bottom-sheet h3 { margin:5px 0 18px; font-size:23px; letter-spacing:-.7px; }
.field-label { display:block; font-size:10px; font-weight:750; color:var(--muted); margin-bottom:12px; }
.field-label input { display:block; width:100%; margin-top:6px; min-height:49px; border:1px solid var(--line); border-radius:14px; background:#f5f2ea; color:var(--ink); padding:0 13px; outline:none; }
.sheet-close { width:100%; min-height:42px; margin-top:7px; border:0; background:transparent; color:var(--muted); font-size:12px; font-weight:700; }

.toast { position:fixed; left:50%; bottom:calc(96px + env(safe-area-inset-bottom)); transform:translate(-50%,16px); width:min(calc(100% - 42px),430px); padding:13px 16px; border-radius:16px; background:#1d2927; color:#fff; font-size:13px; text-align:center; opacity:0; pointer-events:none; transition:.25s ease; z-index:80; box-shadow:0 16px 35px rgba(0,0,0,.18); }
.toast.show { opacity:1; transform:translate(-50%,0); }
.hidden { display:none !important; }

@media (max-width:380px) {
  .duck-svg { width:96px; }
  .room-head { grid-template-columns:1fr 78px; }
  .gesture-grid { grid-template-columns:1fr; }
}
@media (min-width:700px) {
  body { padding:28px 0; }
  .app-shell { min-height:calc(100dvh - 56px); border-radius:36px; overflow:hidden; box-shadow:0 25px 90px rgba(45,50,45,.12); background:rgba(245,242,234,.46); }
}
