/* Sama-sama: warm kitchen-table theme. All look-and-feel tokens live here. */
:root{
  --bg:#FBF4EE; --surface:#fff; --ink:#2B1D18; --muted:#7A6A62; --line:#EADFD6; --chip:#F3E9E0;
  /* Three colours: one bright (terracotta, for action) and two calm (sage and lavender). */
  --accent:#C8553D; --action:#BF4B34; --action-hover:#A93F2A; --accent-soft:#F8E0D8; --accent-deep:#9C3A27;
  --sage:#5F8F7B;
  --lavender:#9A86B8; --lavender-soft:#F0EAF7; --lavender-line:#DDD2EC;
  --ok:#3E7A53; --note:#F0EAF7;
  --radius:20px; --shadow:0 1px 2px rgba(43,29,24,.06),0 8px 24px rgba(43,29,24,.05);
  --serif:'Fraunces',Georgia,serif; --sans:'DM Sans',system-ui,sans-serif; --hand:'Caveat',cursive;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--sans);font-size:15px;line-height:1.4;-webkit-tap-highlight-color:transparent}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;cursor:pointer}
h1,h2{font-family:var(--serif);font-weight:700;letter-spacing:-.02em;margin:0;line-height:1.1}
h1{font-size:30px}
.app{max-width:480px;margin:0 auto;min-height:100vh;min-height:100dvh;padding:22px 18px 170px;position:relative}
.app.warm{background:linear-gradient(165deg,#FDE8DC 0%,#FBF4EE 42%,#F3E6F7 100%);min-height:100dvh}
.stack{display:flex;flex-direction:column;gap:14px}
.row{display:flex;align-items:center;gap:12px}
.between{justify-content:space-between}
.muted{color:var(--muted);font-size:14px}
.lab{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:700}
.hand{font-family:var(--hand);font-weight:700}
.card{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);border:1px solid var(--line)}
.pad{padding:14px}
.note-card{background:var(--lavender-soft);border-radius:var(--radius);border:1px solid var(--lavender-line);padding:14px}
.chips{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.chip{background:var(--chip);color:var(--ink);border-radius:99px;padding:7px 16px;font-size:14px;font-weight:500;border:0}
.chip.on{background:var(--ink);color:var(--bg);font-weight:700}
.pill{background:var(--accent-soft);border-radius:99px;padding:3px 10px;font-size:12px;font-weight:700;color:var(--accent-deep);white-space:nowrap}
.emoji{font-size:24px;line-height:1}
.emoji-box{width:52px;height:52px;border-radius:16px;background:var(--chip);display:grid;place-items:center;font-size:28px;flex:none}
/* avatars */
.av{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;color:#fff;font-weight:700;font-size:13px;flex:none;border:2px solid var(--bg)}
.av-terracotta{background:var(--accent)} .av-sage{background:var(--sage)}
.av-pair{display:inline-flex} .av-pair .av+.av{margin-left:-8px}
.av.sm{width:24px;height:24px;font-size:11px}
.av.lg{width:30px;height:30px}
.av.dash{background:transparent;color:var(--muted);border:2px dashed var(--muted)}
/* item rows */
.item{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
.item .body{flex:1;min-width:0}
.item .title{font-weight:700}
.item .meta{font-size:13px;color:var(--muted)}
.check{width:26px;height:26px;border-radius:50%;border:2px solid var(--muted);background:transparent;flex:none;padding:0;display:grid;place-items:center}
.check.done{background:var(--sage);border-color:var(--sage)}
.check svg{width:14px;height:14px;stroke:#fff;fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.list{display:flex;flex-direction:column;gap:8px}
.group{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);border:1px solid var(--line);padding:4px 14px}
.group .line{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.group .line:last-child{border-bottom:0}
/* nav + fab */
.nav{position:fixed;left:12px;right:12px;bottom:12px;max-width:456px;margin:0 auto;height:64px;background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:0 8px 24px rgba(43,29,24,.10);display:grid;grid-template-columns:repeat(4,1fr);z-index:20;padding-bottom:env(safe-area-inset-bottom)}
.nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:12px;color:var(--muted)}
.nav a.on{color:var(--accent);font-weight:700}
.nav svg,.back svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.fab{position:fixed;right:max(20px,calc(50% - 220px));bottom:90px;display:inline-flex;align-items:center;gap:8px;background:var(--btn,var(--action));color:#fff;border-radius:99px;padding:14px 20px;font-weight:700;box-shadow:0 8px 20px var(--btn-shadow,rgba(191,75,52,.32));z-index:19;border:0}
.fab svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2.4;stroke-linecap:round}
.btn{display:block;width:100%;text-align:center;font-weight:700;color:#fff;background:var(--btn,var(--action));border:0;border-radius:16px;padding:14px;min-height:50px}
.btn:active{background:var(--btn-hover,var(--action-hover))}
.btn.ghost{background:var(--chip);color:var(--ink)}
.btn.ghost:active{background:var(--line)}
.btn.google{display:flex;align-items:center;justify-content:center;gap:10px}
.btn.sm{display:inline-block;width:auto;padding:7px 16px;min-height:0;border-radius:99px;font-size:13px}
.back{display:inline-flex;align-items:center;gap:6px;font-size:14px;color:var(--muted);width:max-content}
.back svg{width:18px;height:18px}
/* forms */
input[type=text],input[type=search],input[type=date],input[type=time],input[type=number],input[type=url],select,textarea{width:100%;font:inherit;color:var(--ink);background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px;min-height:48px}
input[type=text]:focus,input[type=search]:focus,input[type=date]:focus,input[type=time]:focus,input[type=number]:focus,select:focus,textarea:focus{outline:2px solid var(--ink);outline-offset:0;border-color:var(--ink)}
.opts{display:flex;gap:8px;flex-wrap:wrap}
.opts input{position:absolute;opacity:0;pointer-events:none}
.opts label{background:var(--chip);border-radius:99px;padding:7px 14px;font-size:14px;cursor:pointer;min-height:36px;display:inline-flex;align-items:center}
.opts input:checked+label{background:var(--ink);color:var(--bg);font-weight:700}
.opts input:focus-visible+label{outline:2px solid var(--accent)}
.emoji-pick label{font-size:22px;padding:4px 10px}
/* bottom sheet */
/* The sheet is part of a scrolling overlay (not pinned to the screen), so every field and button can be scrolled to,
   also when the phone keyboard is open. */
#sheet-slot:not(:empty){position:fixed;inset:0;z-index:30;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;padding-top:8dvh;-webkit-overflow-scrolling:touch}
body:has(#sheet-slot > .sheet){overflow:hidden}
.scrim{position:fixed;inset:0;background:rgba(43,29,24,.45);z-index:30;animation:fade .2s ease}
#sheet-slot .scrim{z-index:0}
.sheet{position:relative;z-index:1;flex:none;width:100%;margin:auto auto 0;max-width:480px;background:#fff;border-radius:28px 28px 0 0;padding:12px 18px calc(32px + env(safe-area-inset-bottom));animation:up .25s ease}
.sheet .grab{width:40px;height:4px;border-radius:99px;background:var(--line);margin:0 auto 12px}
@keyframes up{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
@keyframes fade{from{opacity:0}to{opacity:1}}
/* calendar */
.cal{display:grid;grid-template-columns:repeat(7,1fr);row-gap:6px;text-align:center}
.cal .dow{font-size:12px;color:var(--muted);font-weight:700}
.cal .d{display:grid;place-items:center;width:32px;height:32px;margin:0 auto;border-radius:50%}
.cal .d.today{background:var(--ink);color:var(--bg);font-weight:700}
.cal .dot{display:block;width:5px;height:5px;border-radius:50%;margin:1px auto 0;background:var(--accent)}
.cal .nodot{display:block;height:6px}
.big{font-family:var(--serif);font-weight:700;font-size:34px;letter-spacing:-.02em;line-height:1}
.kv{display:flex;justify-content:space-between;font-size:14px;gap:12px}
.kv span:first-child{color:var(--muted)}
.toast{position:fixed;left:12px;right:12px;bottom:88px;max-width:456px;margin:0 auto;background:var(--ink);color:var(--bg);border-radius:16px;padding:12px 16px;z-index:40;display:flex;justify-content:space-between;align-items:center;animation:up .25s ease}
.toast a,.toast button{color:var(--bg);font-weight:700;text-decoration:underline;background:none;border:0}
.empty{text-align:center;color:var(--muted);padding:28px 8px}
.empty .big-emoji{font-size:44px;display:block;margin-bottom:6px}
.code{font-family:'DM Mono',ui-monospace,monospace;font-size:40px;letter-spacing:.18em;padding-left:.18em;text-align:center}
.hide{display:none}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* search, calendar card, memories */
.search{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:0 16px;min-height:50px}
.search svg{width:20px;height:20px;stroke:var(--muted);fill:none;stroke-width:2;stroke-linecap:round;flex:none}
.search input{border:0;outline:0;background:transparent;font:inherit;color:var(--ink);width:100%;padding:12px 0;min-height:48px;-webkit-appearance:none}
.search input::placeholder{color:var(--muted)}
.cal-card{padding:14px 12px 10px}
.cal-head{padding:0 6px 8px}
.cal-head h2{font-size:20px}
.cal-nav{font-size:26px;line-height:1;width:36px;height:36px;display:grid;place-items:center;color:var(--ink)}
.cal .dow{padding-bottom:6px}
.cal .d{width:34px;height:34px;font-size:15px}
.cal .dot.calm{background:var(--lavender)}
.memories{text-align:center;color:var(--accent);font-size:22px;margin-top:6px}
.kvs{border-top:1px solid var(--line);padding-top:10px;display:flex;flex-direction:column;gap:8px}
.kv{font-size:15px}
.kv span:first-child{color:var(--muted)}
.accent{color:var(--accent)}
/* add sheet */
button.emoji-box{border:0;padding:0;cursor:pointer}
.title-input{border:2px solid var(--ink)!important;border-radius:16px!important;font-size:16px}
.opt-btn{background:var(--chip);border:0;border-radius:99px;padding:7px 14px;font-size:14px;min-height:36px;color:var(--ink)}
.hide{display:none!important}
.intro .line{align-items:flex-start;padding:14px 0}
.intro .emoji{font-size:28px}
/* invite card */
.invite-card{display:flex;flex-direction:column;gap:6px}
.icon-btn{position:relative;display:inline-grid;place-items:center;width:44px;height:44px;margin:-10px -8px 0 0;border:0;background:transparent;color:var(--muted);border-radius:50%}
.icon-btn svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.icon-btn .copied{position:absolute;right:46px;top:50%;transform:translateY(-50%);background:var(--ink);color:var(--bg);border-radius:99px;padding:4px 10px;font-size:12px;font-weight:700;white-space:nowrap}
.copy-hint{text-align:center;margin:0}
/* stepper */
.dots{display:flex;gap:6px;justify-content:center}
.dots span{width:6px;height:6px;border-radius:99px;background:var(--line);transition:width .2s}
.dots span.on{width:20px;background:var(--ink)}
.steps-nav .btn{flex:1;width:auto}
.steps-nav .btn.ghost{flex:0 0 33%}
/* trips */
.cal .d.trip:not(.today){background:var(--lavender-soft);color:var(--ink)}
details summary{list-style:none}
details summary::-webkit-details-marker{display:none}
/* photos */
.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.photo{position:relative;aspect-ratio:1;border-radius:12px;overflow:hidden;background:var(--chip)}
.photo img{width:100%;height:100%;object-fit:cover;display:block}
.photo-x{position:absolute;top:4px;right:4px;width:30px;height:30px;border:0;border-radius:50%;background:rgba(43,29,24,.6);color:#fff;font-size:20px;line-height:1;display:grid;place-items:center;padding:0}
/* today's moment pop-up */
.moment{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(340px,calc(100vw - 40px));max-height:80dvh;overflow:auto;background:#fff;border-radius:28px;padding:26px 22px 20px;text-align:center;z-index:41;box-shadow:0 24px 60px rgba(43,29,24,.3);animation:pop .28s ease;display:flex;flex-direction:column;gap:14px}
.moment-row{display:flex;flex-direction:column;gap:6px;align-items:center}
.moment-emoji{font-size:52px;line-height:1}
.moment h2{font-size:22px}
.moment-text{font-size:26px;color:var(--accent)}
@keyframes pop{from{transform:translate(-50%,-46%) scale(.94);opacity:0}to{transform:translate(-50%,-50%) scale(1);opacity:1}}
/* cozy: each tab has its own soft tone, drawn from the three colours */
body:has(.tone-sage){background:linear-gradient(180deg,#E2EEE7 0,#FBF4EE 380px) no-repeat,var(--bg)}
body:has(.tone-lavender){background:linear-gradient(180deg,#ECE5F5 0,#FBF4EE 380px) no-repeat,var(--bg)}
body:has(.tone-peach){background:linear-gradient(180deg,#FDE6DA 0,#FBF4EE 380px) no-repeat,var(--bg)}
.app.tone-sage,.app.tone-lavender,.app.tone-peach{background:transparent}
.tone-sage .chip.on{background:var(--sage)} .tone-lavender .chip.on{background:#7C6A9C} .tone-peach .chip.on{background:var(--action)}
.tone-sage .chip.on,.tone-lavender .chip.on,.tone-peach .chip.on{color:#fff}
.tone-sage .lab{color:#4C7766} .tone-lavender .lab{color:#6E5D8E} .tone-peach .lab{color:#9C3A27}
.sub{font-size:22px;color:var(--accent);margin:2px 0 0}
/* who it is for: a coloured edge on every row (terracotta, sage, or lavender for both of you) */
.item{border-left:5px solid var(--lavender)}
.item.own-terracotta{border-left-color:var(--accent)} .item.own-sage{border-left-color:var(--sage)}
/* friendlier empty states */
.empty{padding:34px 12px}
.empty .big-emoji{display:grid;place-items:center;width:84px;height:84px;margin:0 auto 12px;border-radius:50%;background:rgba(255,255,255,.75);font-size:42px;box-shadow:0 6px 18px rgba(43,29,24,.08)}
.plan-quick .btn.sm{min-height:44px;padding:0 20px}
/* plan page: day strip */
.day-strip{display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x proximity;padding:2px 2px 6px;margin:0 -2px;scrollbar-width:none}
.day-strip::-webkit-scrollbar{display:none}
.day-pill{position:relative;flex:none;scroll-snap-align:center;min-width:72px;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 14px;border:0;border-radius:18px;background:rgba(255,255,255,.8);color:var(--ink);font-size:12px;box-shadow:var(--shadow)}
.day-pill b{font-size:15px}
.day-pill.on{background:#7C6A9C;color:#fff}
.day-pill .pip{position:absolute;top:6px;right:8px;width:6px;height:6px;border-radius:50%;background:var(--accent)}
.day-pill.on .pip{background:#fff}
/* photo viewer */
.day-pill.photos{background:rgba(255,255,255,.8)} .day-pill.photos.on{background:var(--sage)}
.lightbox{position:fixed;inset:0;background:rgba(20,12,9,.96);z-index:60;display:flex;flex-direction:column;color:#fff}
.lb-top,.lb-bottom{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;padding-top:max(12px,env(safe-area-inset-top))}
.lb-bottom{justify-content:center;padding-bottom:max(16px,env(safe-area-inset-bottom))}
.lb-top button{background:none;border:0;color:#fff;font-size:34px;line-height:1;width:44px;height:44px}
.lb-stage{flex:1;display:flex;align-items:center;justify-content:center;position:relative;min-height:0}
.lb-stage img{max-width:100%;max-height:100%;object-fit:contain}
.lb-nav{position:absolute;top:50%;transform:translateY(-50%);background:rgba(255,255,255,.14);border:0;color:#fff;font-size:34px;width:44px;height:64px;border-radius:14px;z-index:1}
.lb-nav[data-lb-prev]{left:6px} .lb-nav[data-lb-next]{right:6px}
/* tappable calendar days */
.cal .daybtn{background:none;border:0;padding:4px 0;width:100%;min-height:44px;cursor:pointer;color:inherit;font:inherit}
.cal .daybtn:active .d{background:var(--lavender-soft)}

/* simple warm decoration: tiny inline SVGs as page backgrounds (no extra requests, no animation, no blur) */
body:has(.tone-sage){background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100' fill='none' stroke='%235F8F7B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' opacity='.45'%3E%3Cpath d='M14 92C34 70 56 52 98 14'/%3E%3Cpath d='M34 72c-8-2-14-8-16-16 9 0 15 5 16 16z'/%3E%3Cpath d='M50 58c-3-8-1-15 5-21 4 8 2 16-5 21z'/%3E%3Cpath d='M66 44c-8 0-15-4-19-11 9-1 16 3 19 11z'/%3E%3Cpath d='M80 32c-2-8 1-15 8-19 3 8 0 15-8 19z'/%3E%3C/svg%3E") no-repeat right 14px top 22px/108px 90px,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' preserveAspectRatio='none'%3E%3Cpath d='M0 70C60 40 120 40 200 66S340 92 400 54V120H0Z' fill='%235F8F7B' fill-opacity='.22'/%3E%3Cpath d='M0 94C70 70 140 74 220 92S350 108 400 88V120H0Z' fill='%235F8F7B' fill-opacity='.18'/%3E%3C/svg%3E") no-repeat left bottom/100% 210px,linear-gradient(180deg,#E2EEE7 0,#FBF4EE 380px) no-repeat,var(--bg)}
body:has(.tone-lavender){background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100' fill='none' stroke='%239A86B8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' opacity='.5'%3E%3Cpath d='M32 14v22M21 25h22'/%3E%3Cpath d='M88 38v14M81 45h14'/%3E%3Cpath d='M64 70v10M59 75h10'/%3E%3Ccircle cx='100' cy='16' r='3'/%3E%3Ccircle cx='18' cy='62' r='2.5'/%3E%3Ccircle cx='84' cy='84' r='2.5'/%3E%3C/svg%3E") no-repeat right 14px top 22px/108px 90px,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' preserveAspectRatio='none'%3E%3Cpath d='M0 70C60 40 120 40 200 66S340 92 400 54V120H0Z' fill='%239A86B8' fill-opacity='.22'/%3E%3Cpath d='M0 94C70 70 140 74 220 92S350 108 400 88V120H0Z' fill='%239A86B8' fill-opacity='.18'/%3E%3C/svg%3E") no-repeat left bottom/100% 210px,linear-gradient(180deg,#ECE5F5 0,#FBF4EE 380px) no-repeat,var(--bg)}
body:has(.tone-peach){background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100' fill='none' stroke='%23C8553D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' opacity='.4'%3E%3Cpath d='M34 52c-12-9-12-22-3-22 4 0 7 3 7 7 0-4 3-7 7-7 9 0 9 13-11 22z' transform='translate(2 2)'/%3E%3Cpath d='M92 30c-8-6-8-15-2-15 3 0 5 2 5 5 0-3 2-5 5-5 6 0 6 9-8 15z'/%3E%3Cpath d='M78 82c-6-4-6-11-1-11 2 0 4 2 4 4 0-2 2-4 4-4 5 0 5 7-7 11z'/%3E%3C/svg%3E") no-repeat right 14px top 22px/108px 90px,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' preserveAspectRatio='none'%3E%3Cpath d='M0 70C60 40 120 40 200 66S340 92 400 54V120H0Z' fill='%23C8553D' fill-opacity='.22'/%3E%3Cpath d='M0 94C70 70 140 74 220 92S350 108 400 88V120H0Z' fill='%23C8553D' fill-opacity='.18'/%3E%3C/svg%3E") no-repeat left bottom/100% 210px,linear-gradient(180deg,#FDE6DA 0,#FBF4EE 380px) no-repeat,var(--bg)}
.linkish{background:none;border:0;color:var(--muted);text-decoration:underline;font-size:13px;min-height:44px;padding:0 12px;cursor:pointer}
/* each Things sub-tab gets its own motif */
body:has(.sub-ideas){background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100' fill='none' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' stroke='%23C8553D' opacity='.45'%3E%3Cpath d='M60 18a20 20 0 0 0-10 37c4 3 5 6 5 10h10c0-4 1-7 5-10A20 20 0 0 0 60 18z'/%3E%3Cpath d='M54 72h12M56 78h8'/%3E%3Cpath d='M60 4v6M31 16l4 4M89 16l-4 4M18 42h6M96 42h6'/%3E%3Cpath d='M104 72v10M99 77h10'/%3E%3C/svg%3E") no-repeat right 14px top 22px/108px 90px,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' preserveAspectRatio='none'%3E%3Cpath d='M0 70C60 40 120 40 200 66S340 92 400 54V120H0Z' fill='%23C8553D' fill-opacity='.22'/%3E%3Cpath d='M0 94C70 70 140 74 220 92S350 108 400 88V120H0Z' fill='%23C8553D' fill-opacity='.18'/%3E%3C/svg%3E") no-repeat left bottom/100% 210px,linear-gradient(180deg,#FDE6DA 0,#FBF4EE 380px) no-repeat,var(--bg)}
body:has(.sub-plans){background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100' fill='none' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' stroke='%235F8F7B' opacity='.5'%3E%3Cpath d='M44 52L108 14L86 78L64 62Z'/%3E%3Cpath d='M64 62L108 14'/%3E%3Cpath d='M64 62v14l8-8' /%3E%3Cpath d='M6 88C20 74 34 92 46 78' stroke-dasharray='4 6'/%3E%3Ccircle cx='10' cy='30' r='2.5'/%3E%3Cpath d='M26 14v8M22 18h8'/%3E%3C/svg%3E") no-repeat right 14px top 22px/108px 90px,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' preserveAspectRatio='none'%3E%3Cpath d='M0 70C60 40 120 40 200 66S340 92 400 54V120H0Z' fill='%235F8F7B' fill-opacity='.22'/%3E%3Cpath d='M0 94C70 70 140 74 220 92S350 108 400 88V120H0Z' fill='%235F8F7B' fill-opacity='.18'/%3E%3C/svg%3E") no-repeat left bottom/100% 210px,linear-gradient(180deg,#E2EEE7 0,#FBF4EE 380px) no-repeat,var(--bg)}
body:has(.sub-memories){background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100' fill='none' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' stroke='%239A86B8' opacity='.55'%3E%3Cg transform='rotate(8 62 47)'%3E%3Crect x='34' y='12' width='56' height='68' rx='5'/%3E%3Crect x='41' y='19' width='42' height='38' rx='3'/%3E%3C/g%3E%3Cpath d='M60 46c-9-7-9-16-2-16 3 0 5 2 5 5 0-3 2-5 5-5 7 0 7 9-8 16z' transform='translate(2 2) rotate(8 62 47)'/%3E%3Cpath d='M16 28v8M12 32h8'/%3E%3Ccircle cx='104' cy='88' r='2.5'/%3E%3C/svg%3E") no-repeat right 14px top 22px/108px 90px,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' preserveAspectRatio='none'%3E%3Cpath d='M0 70C60 40 120 40 200 66S340 92 400 54V120H0Z' fill='%239A86B8' fill-opacity='.22'/%3E%3Cpath d='M0 94C70 70 140 74 220 92S350 108 400 88V120H0Z' fill='%239A86B8' fill-opacity='.18'/%3E%3C/svg%3E") no-repeat left bottom/100% 210px,linear-gradient(180deg,#ECE5F5 0,#FBF4EE 380px) no-repeat,var(--bg)}
.sub-ideas .chip.on{background:var(--action)} .sub-memories .chip.on{background:#7C6A9C}

/* Home: a cosy house motif, the peach-to-lavender glow, and a soft wave */
body:has(.warm){background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100' fill='none' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' opacity='.5'%3E%3Cg stroke='%23C8553D'%3E%3Cpath d='M22 50L60 18l38 32'/%3E%3Cpath d='M30 44v38h60V44'/%3E%3Cpath d='M60 70c-8-6-8-14-2-14 2 0 3 1 4 3 1-2 2-3 4-3 6 0 6 8-6 14z' transform='translate(-2 -4)'/%3E%3Cpath d='M82 24V12h8v20'/%3E%3C/g%3E%3Cg stroke='%239A86B8'%3E%3Cpath d='M104 62v8M100 66h8'/%3E%3Cpath d='M14 28v6M11 31h6'/%3E%3Ccircle cx='108' cy='30' r='2.5'/%3E%3C/g%3E%3C/svg%3E") no-repeat right 12px top 64px/104px 88px,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' preserveAspectRatio='none'%3E%3Cpath d='M0 70C60 40 120 40 200 66S340 92 400 54V120H0Z' fill='%23C8553D' fill-opacity='.22'/%3E%3Cpath d='M0 94C70 70 140 74 220 92S350 108 400 88V120H0Z' fill='%23C8553D' fill-opacity='.18'/%3E%3C/svg%3E") no-repeat left bottom/100% 210px,linear-gradient(165deg,#FDE8DC 0%,#FBF4EE 42%,#F3E6F7 100%) no-repeat,var(--bg)}
.app.warm{background:transparent}
.countdown{align-items:center}
.countdown .count{display:flex;flex-direction:column;align-items:center;background:#fff;border-radius:16px;padding:6px 12px;line-height:1.1}
.countdown .count b{font-family:var(--serif);font-size:26px;color:var(--accent)}
.countdown .count span{font-size:11px;color:var(--muted)}
.calm-card{align-items:center;gap:14px}
.calm-badge{display:grid;place-items:center;flex:none;width:46px;height:46px;border-radius:50%;background:var(--lavender-soft);font-size:22px}
/* viewer caption */
.lb-caption{min-height:44px;padding:6px 18px;text-align:center;font-family:var(--hand);font-size:24px;display:flex;gap:8px;align-items:center;justify-content:center}
.lb-caption.empty{opacity:0;min-height:8px}
.lb-caption input{flex:1;color:var(--ink)}
.lb-bottom{gap:10px}
.filebtn{cursor:pointer}
/* memories as polaroid folders */
.polaroid-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px 14px;padding:4px 2px}
.polaroid{display:flex;flex-direction:column;gap:2px;background:#fff;padding:10px 10px 12px;border-radius:6px;box-shadow:0 4px 14px rgba(43,29,24,.12);transform:rotate(-1.4deg);font-size:14px}
.polaroid:nth-child(even){transform:rotate(1.3deg)}
.polaroid .frame{aspect-ratio:1;background:var(--lavender-soft);display:grid;place-items:center;overflow:hidden;margin-bottom:8px}
.polaroid .frame img{width:100%;height:100%;object-fit:cover;display:block}
.polaroid .ph-emoji{font-size:44px}
.polaroid b{font-family:var(--hand);font-size:21px;line-height:1.05;font-weight:700}
.polaroid .muted{font-size:12px}
/* each add sheet has its own accent and a small motif, so you can tell what you are adding */
.sheet.sheet-thing{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100' fill='none' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' stroke='%235F8F7B' opacity='.5'%3E%3Cpath d='M14 92C34 70 56 52 98 14'/%3E%3Cpath d='M34 72c-8-2-14-8-16-16 9 0 15 5 16 16z'/%3E%3Cpath d='M50 58c-3-8-1-15 5-21 4 8 2 16-5 21z'/%3E%3Cpath d='M66 44c-8 0-15-4-19-11 9-1 16 3 19 11z'/%3E%3Cpath d='M80 32c-2-8 1-15 8-19 3 8 0 15-8 19z'/%3E%3C/svg%3E") no-repeat right 14px top 12px/74px 62px,linear-gradient(180deg,#E7F1EB 0,#fff 150px),#fff}
.sheet.sheet-thing .opts input:checked+label{background:var(--sage)}
.sheet.sheet-idea{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100' fill='none' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' stroke='%23C8553D' opacity='.45'%3E%3Cpath d='M60 18a20 20 0 0 0-10 37c4 3 5 6 5 10h10c0-4 1-7 5-10A20 20 0 0 0 60 18z'/%3E%3Cpath d='M54 72h12M56 78h8'/%3E%3Cpath d='M60 4v6M31 16l4 4M89 16l-4 4M18 42h6M96 42h6'/%3E%3Cpath d='M104 72v10M99 77h10'/%3E%3C/svg%3E") no-repeat right 14px top 12px/74px 62px,linear-gradient(180deg,#FDE6DA 0,#fff 150px),#fff}
.sheet.sheet-idea .opts input:checked+label{background:var(--action)}
.sheet.sheet-plan{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100' fill='none' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' stroke='%239A86B8' opacity='.55'%3E%3Cpath d='M44 52L108 14L86 78L64 62Z'/%3E%3Cpath d='M64 62L108 14'/%3E%3Cpath d='M6 88C20 74 34 92 46 78' stroke-dasharray='4 6'/%3E%3Cpath d='M26 14v8M22 18h8'/%3E%3C/svg%3E") no-repeat right 14px top 12px/74px 62px,linear-gradient(180deg,#ECE5F5 0,#fff 150px),#fff}
.sheet.sheet-plan .opts input:checked+label{background:#7C6A9C}
.sheet.sheet-memory{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100' fill='none' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' stroke='%239A86B8' opacity='.55'%3E%3Cg transform='rotate(8 62 47)'%3E%3Crect x='34' y='12' width='56' height='68' rx='5'/%3E%3Crect x='41' y='19' width='42' height='38' rx='3'/%3E%3C/g%3E%3Cpath d='M16 28v8M12 32h8'/%3E%3C/svg%3E") no-repeat right 14px top 12px/74px 62px,linear-gradient(180deg,#ECE5F5 0,#fff 150px),#fff}
.sheet.sheet-memory .opts input:checked+label{background:#7C6A9C}
.sheet.sheet-date{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100' fill='none' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' stroke='%239A86B8' opacity='.5'%3E%3Cpath d='M32 14v22M21 25h22'/%3E%3Cpath d='M88 38v14M81 45h14'/%3E%3Ccircle cx='100' cy='16' r='3'/%3E%3C/svg%3E") no-repeat right 14px top 12px/74px 62px,linear-gradient(180deg,#ECE5F5 0,#fff 150px),#fff}
.sheet.sheet-date .opts input:checked+label{background:#7C6A9C}
.sheet h2{max-width:70%}

/* ideas are sticky notes, plans are tickets, things stay a checklist */
.idea-card{position:relative;background:linear-gradient(160deg,#FFF3EC 0,#fff 70%);border:1.5px dashed #F0C9BC;border-radius:22px;padding:16px;display:flex;flex-direction:column;gap:12px;box-shadow:var(--shadow)}
.idea-card .badge{display:grid;place-items:center;flex:none;width:46px;height:46px;border-radius:50%;background:#fff;box-shadow:0 2px 8px rgba(200,85,61,.18);font-size:24px}
.idea-card .idea-title{font-size:17px;font-weight:700;line-height:1.2}
.ticket{display:flex;align-items:stretch;background:#fff;border-radius:18px;border:1px solid var(--line);box-shadow:var(--shadow);overflow:hidden}
.ticket .main{flex:1;display:flex;align-items:center;gap:12px;padding:14px 14px}
.ticket .stub{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:10px 12px;min-width:84px;border-left:2px dashed #CFE0D6;background:#F1F7F3;font-size:12px;text-align:center}
.ticket .stub b{font-family:var(--serif);font-size:20px;color:#4C7766}

/* buttons follow the theme of the screen or sheet they are on (white text stays readable on each) */
.app.tone-sage,.sheet.sheet-thing{--btn:#4C7766;--btn-hover:#3F6455;--btn-shadow:rgba(76,119,102,.32)}
.app.tone-lavender,.sheet.sheet-plan,.sheet.sheet-memory,.sheet.sheet-date{--btn:#7C6A9C;--btn-hover:#6A5A88;--btn-shadow:rgba(124,106,156,.32)}
.app.tone-peach,.sheet.sheet-idea{--btn:#BF4B34;--btn-hover:#A93F2A;--btn-shadow:rgba(191,75,52,.32)}
/* plan day card: no gaps for empty placeholders */
.day-card [data-photo-grid]:empty,.day-card [data-photo-status]:empty{display:none}
/* song clips */
.clip{position:relative;flex:none;width:96px;aspect-ratio:4/3;border-radius:14px;overflow:hidden;background:var(--lavender-soft,#F0EAF7);display:block}
.clip-play{all:unset;display:block;width:100%;height:100%;cursor:pointer}
.clip img{width:100%;height:100%;object-fit:cover;display:block}
.clip-btn{position:absolute;inset:0;display:grid;place-items:center;font-size:22px;color:#fff;text-shadow:0 1px 6px rgba(0,0,0,.5)}
.clip-tag{position:absolute;left:6px;bottom:5px;font-size:11px;font-weight:700;color:#fff;background:rgba(43,29,24,.65);padding:1px 7px;border-radius:99px}
.day-memory.playing{flex-wrap:wrap}
.clip.playing{width:100%;aspect-ratio:16/9;background:#000}
.pick{all:unset;box-sizing:border-box;display:flex;gap:10px;align-items:center;padding:6px;border-radius:12px;background:#fff;border:1px solid var(--line);cursor:pointer;min-height:48px}
.pick img{width:72px;height:54px;object-fit:cover;border-radius:8px;flex:none}
.pick span{min-width:0;font-size:14px;line-height:1.25}
.pick small{color:var(--muted)}
input[type=search]{-webkit-appearance:none;appearance:none}
input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;display:none}
/* clip slider */
.clip-time{font-family:var(--serif,Fraunces,serif);font-size:26px;font-weight:700;color:#5b4a7a;text-align:center}
input[type=range]{width:100%;accent-color:#7C6A9C;height:36px}
