﻿/* TOKENS Siera palette */
:root {
 /* Backgrounds */
 --bg:#F0F8F6;--surface:#FFFFFF;--surface2:#E3F2EE;--border:#C5E8E0;
 /* Text */
 --text:#1A2E2B;--mid:#3D6B62;--muted:#3B776C;--light:#A8D8D0;
 /* Brand */
 --p:#1E7268;--p1:#2A9D8F;--pm:#E3F2EE;
 /* Accent: Sunrise */
 --s:#F4A261;--sm:#FEF3EA;--sunrise:#F4A261;
 /* Urgent "stop" buttons (kick counter, contractions) — deep coral so white text stays readable */
 --hi:#C8553D;
 --rad:10px;--rad-sm:6px;
 --shadow:0 1px 4px rgba(30,114,104,.10);
}
/* THEME: Slate */
body[data-theme="slate"]{
 --bg:#EEF2F8;--surface:#FFFFFF;--surface2:#DDE6F4;--border:#B8CCE8;
 --text:#1A2340;--mid:#3A5080;--muted:#466993;--light:#B0C8E0;
 --p:#2B4A7A;--p1:#4A70B0;--pm:#DDE6F4;--s:#3A7A9A;--sm:#DCF0F8;
}
/* THEME: Spark */
body[data-theme="spark"]{
 --bg:#F5EEF8;--surface:#FFFFFF;--surface2:#EAE0F8;--border:#D0B8F0;
 --text:#251640;--mid:#5A3A90;--muted:#7552B4;--light:#C8B8E8;
 --p:#7030C0;--p1:#9A55D8;--pm:#EAE0F8;--s:#E04520;--sm:#FEE8E0;
}
/* THEME: Cloud */
body[data-theme="cloud"]{
 --bg:#EEF1F5;--surface:#FFFFFF;--surface2:#E0E6EE;--border:#BCC8D8;
 --text:#1A2430;--mid:#3A5060;--muted:#4E6B7A;--light:#B0C4D0;
 --p:#3A4A5C;--p1:#5A6E84;--pm:#E0E6EE;--s:#5A8AAA;--sm:#DCEcF4;
}

*{box-sizing:border-box;margin:0;padding:0}
html{min-height:100%;min-height:-webkit-fill-available;overscroll-behavior:none}
body{min-height:100%;min-height:-webkit-fill-available;overflow-anchor:none;-webkit-overflow-scrolling:touch;background:var(--bg);color:var(--text);font-family:'Inter',system-ui,sans-serif;font-size:14px;line-height:1.65}
button{cursor:pointer;font-family:inherit;font-size:13px}
input,textarea,select{font-family:inherit;font-size:13px;background:var(--bg);border:1px solid var(--border);border-radius:var(--rad-sm);padding:7px 10px;color:var(--text);width:100%}
input:focus,textarea:focus,select:focus{outline:2px solid var(--p);border-color:transparent}
/* Tick boxes and round buttons keep their natural size (the rule above made them full width) */
input[type=checkbox],input[type=radio]{width:auto;padding:0}
textarea{resize:vertical;min-height:60px}
.btn{display:inline-flex;align-items:center;gap:5px;padding:7px 14px;border-radius:var(--rad-sm);border:none;font-weight:500;transition:opacity .15s}
.btn-primary{background:var(--p);color:#fff}.btn-primary:hover{opacity:.88}
.btn-ghost{background:transparent;border:1px solid var(--border);color:var(--mid)}.btn-ghost:hover{background:var(--surface2)}
.btn-sm{padding:4px 10px;font-size:12px}
.btn-danger{background:#dc2626;color:#fff}.btn-danger:hover{opacity:.88}
.tag{display:inline-block;padding:2px 8px;border-radius:20px;font-size:12px;font-weight:500;background:var(--pm);color:var(--p)}
.tag-premium{background:#FEF3C7;color:#92400E}

/* AUTH */
#authScreen{position:fixed;inset:0;z-index:500;overflow-y:auto;display:flex;align-items:flex-start;justify-content:center;padding:40px 20px;background:var(--bg)}
.auth-box{background:var(--surface);border-radius:16px;padding:36px;width:100%;max-width:380px;box-shadow:0 4px 24px rgba(0,0,0,.12)}
.auth-logo{font-family:'Fraunces',serif;font-size:1.8rem;color:var(--p);text-align:center;margin-bottom:6px}
.auth-sub{text-align:center;color:var(--muted);font-size:13px;margin-bottom:28px}
.auth-box h2{font-size:1.1rem;margin-bottom:18px}
.field{margin-bottom:12px}
.field label{display:block;font-size:12px;font-weight:500;color:var(--mid);margin-bottom:4px}
.auth-toggle{text-align:center;margin-top:16px;font-size:13px;color:var(--muted)}
.auth-toggle a{color:var(--p);text-decoration:none;font-weight:500}
.auth-err{color:#dc2626;font-size:12px;margin-top:8px;text-align:center}

/* HEADER */
#appRoot{display:none}
.hdr{background:var(--surface);border-bottom:1px solid var(--border);padding:13px 24px;display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;z-index:40}
.hdr-logo{font-family:'Fraunces',serif;font-size:1.35rem;color:var(--p);letter-spacing:-.02em}
.hdr-right{display:flex;align-items:center;gap:8px}
.hdr-greeting{font-size:13px;color:var(--muted)}
.icon-btn{background:none;border:none;padding:6px;border-radius:var(--rad-sm);color:var(--mid);font-size:16px;line-height:1}
.icon-btn:hover{background:var(--surface2)}
.premium-chip{background:var(--pm);color:var(--p);font-size:12px;font-weight:600;padding:3px 9px;border-radius:20px;cursor:pointer}
.premium-chip.active{background:#FEF3C7;color:#92400E}

/* QUICK NAV */
.quick-nav{display:flex;gap:6px;padding:10px 16px;overflow-x:auto;scrollbar-width:none;background:var(--surface);border-bottom:1px solid var(--border)}
.quick-nav::-webkit-scrollbar{display:none}
.nav-pill{white-space:nowrap;padding:5px 12px;border-radius:20px;border:1px solid var(--border);background:var(--surface);color:var(--mid);font-size:12px;font-weight:500;text-decoration:none}
.nav-pill:hover{background:var(--pm);color:var(--p);border-color:var(--p1)}

/* BANNER */
#banner{padding:0 16px}
.banner-item{background:var(--pm);border-left:3px solid var(--p);border-radius:0 var(--rad-sm) var(--rad-sm) 0;padding:8px 12px;font-size:13px;margin-top:8px;display:flex;justify-content:space-between;align-items:center}
.banner-item button{background:none;border:none;color:var(--muted);font-size:16px;line-height:1;padding:0 2px}

/* GRID - 2 column clean layout */
.grid{display:grid;grid-template-columns:repeat(2,1fr);grid-auto-flow:row dense;gap:20px;padding:20px 24px;max-width:1100px;margin:0 auto}
.span-1{grid-column:span 1}
.span-2{grid-column:span 2}
@media(max-width:720px){.span-1,.span-2{grid-column:span 2}}

/* CARD */
.card{background:var(--surface);border-radius:14px;border:1px solid var(--border);overflow:hidden;box-shadow:0 2px 8px rgba(30,114,104,.07)}
.card-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 0}
.card-title{font-weight:600;font-size:.95rem;display:flex;align-items:center;gap:7px;color:var(--text);letter-spacing:-.01em}
.card-body{padding:16px 20px 20px}
.card-body>*+*{margin-top:12px}
.section-label{font-size:12px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);margin:12px 0 6px}
.empty{color:var(--muted);font-size:13px;padding:10px 0}
.muted{color:var(--muted)}
.row{display:flex;gap:8px;align-items:flex-start}
.row-between{display:flex;justify-content:space-between;align-items:center}

/* LISTS */
.item-row{display:flex;align-items:flex-start;gap:8px;padding:6px 0;border-bottom:1px solid var(--border)}
.item-row:last-child{border-bottom:none}
.item-check{width:16px;height:16px;border:1.5px solid var(--border);border-radius:3px;flex-shrink:0;margin-top:2px;cursor:pointer;accent-color:var(--p)}
.item-del{background:none;border:none;color:var(--muted);font-size:15px;line-height:1;margin-left:auto;flex-shrink:0}
.item-del:hover{color:#dc2626}
.done-text{text-decoration:line-through;color:var(--muted)}

/* MOOD */
.mood-stars{display:flex;gap:6px;margin:8px 0}
.mood-star{font-size:12px;font-weight:500;cursor:pointer;padding:4px 10px;border-radius:20px;border:1px solid var(--border);opacity:.6;background:var(--surface2);transition:.15s}.mood-star.on{opacity:1;background:var(--pm);border-color:var(--p);color:var(--p)}

/* PROGRESS BAR */
.prog-wrap{height:8px;background:var(--surface2);border-radius:4px;overflow:hidden;margin:4px 0}
.prog-bar{height:100%;background:var(--p);border-radius:4px;transition:width .4s}

/* VISION BOARD */
.vision-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:6px;margin-top:8px}
.vision-img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:var(--rad-sm);cursor:pointer}
.vision-placeholder{aspect-ratio:1;background:var(--surface2);border-radius:var(--rad-sm);display:flex;align-items:center;justify-content:center;font-size:22px;cursor:pointer;border:2px dashed var(--border)}

/* PREMIUM GATE */
.premium-gate{background:var(--surface2);border-radius:var(--rad);padding:20px;text-align:center;border:2px dashed var(--border)}
.premium-gate h4{font-size:.95rem;margin-bottom:6px}
.premium-gate p{font-size:13px;color:var(--muted);margin-bottom:14px}

/* SETTINGS OVERLAY */
#settingsOverlay{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:60;display:flex;align-items:flex-end;justify-content:center}
.settings-panel{background:var(--surface);border-radius:20px 20px 0 0;width:100%;max-width:520px;max-height:85vh;overflow-y:auto;padding:24px 24px 140px} /* extra bottom room so the last buttons scroll clear of the bottom nav + Suggest/+ buttons */
.settings-panel h3{font-size:1.05rem;font-weight:600;margin-bottom:18px}
.settings-section{margin-bottom:22px}
.settings-section h4{font-size:.8rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:10px}
.theme-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.theme-opt{border:2px solid var(--border);border-radius:var(--rad-sm);padding:10px 6px;text-align:center;cursor:pointer;font-size:12px;font-weight:500}
.theme-opt.active{border-color:var(--p);background:var(--pm)}
.theme-swatch{width:28px;height:28px;border-radius:50%;margin:0 auto 5px}
.module-list{display:flex;flex-direction:column;gap:8px}
.module-group{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-top:10px}
.module-group:first-child{margin-top:0}
.card-hide-btn{background:none;border:1px solid var(--border);border-radius:99px;padding:3px 10px;font-size:12px;color:var(--muted);cursor:pointer;font-family:inherit}
.module-row{display:flex;align-items:center;justify-content:space-between;font-size:13px}
.toggle{position:relative;width:40px;height:22px}
.toggle input{opacity:0;width:0;height:0}
.toggle-track{position:absolute;inset:0;background:var(--border);border-radius:11px;transition:.2s;cursor:pointer}
.toggle input:checked+.toggle-track{background:var(--p)}
.toggle-track::before{content:'';position:absolute;width:16px;height:16px;border-radius:50%;background:#fff;top:3px;left:3px;transition:.2s}
.toggle input:checked+.toggle-track::before{transform:translateX(18px)}

/* SOCIAL AUTH */
.social-divider{position:relative;text-align:center;margin:14px 0}
.social-divider::before{content:'';position:absolute;top:50%;left:0;right:0;height:1px;background:var(--border)}
.social-divider span{background:var(--surface);padding:0 10px;font-size:12px;color:var(--muted);position:relative}
.social-row{display:flex;gap:8px;margin-bottom:4px}
.btn-social{flex:1;justify-content:center;gap:6px;padding:8px 10px;border:1px solid var(--border);background:var(--surface);border-radius:var(--rad-sm);font-size:13px;display:inline-flex;align-items:center;cursor:pointer;color:var(--text);font-family:inherit;transition:background .15s}
.btn-social:hover{background:var(--surface2)}

/* REVIEW MODAL */
#reviewModal{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:80;display:none;align-items:center;justify-content:center;padding:20px}
.review-box{background:var(--surface);border-radius:16px;padding:28px;max-width:340px;width:100%;text-align:center}

/* SHARE MODAL */
#shareGrocModal{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:80;display:none;align-items:center;justify-content:center;padding:20px}
.share-box{background:var(--surface);border-radius:16px;padding:24px;max-width:360px;width:100%}

/* PREMIUM MODAL */
#premiumModal{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:70;display:flex;align-items:center;justify-content:center;padding:20px}
.premium-box{background:var(--surface);border-radius:16px;padding:28px;max-width:420px;width:100%}
.premium-box h3{font-family:'Fraunces',serif;font-size:1.4rem;color:var(--p);margin-bottom:6px}
.premium-box .price{font-size:1.8rem;font-weight:700;margin:14px 0 4px}
.premium-box .price small{font-size:.9rem;font-weight:400;color:var(--muted)}
.feature-list{list-style:none;margin:12px 0 20px}
.feature-list li{padding:4px 0;font-size:13px;display:flex;gap:8px}
.feature-list li::before{content:'-';color:var(--p);font-weight:700;flex-shrink:0}

/* Calendar tab buttons */
.cal-tab-btn{padding:4px 12px;border-radius:6px;border:none;background:transparent;font-size:12px;font-weight:500;cursor:pointer;color:var(--muted);transition:.15s}
.cal-tab-btn.active{background:var(--surface);color:var(--p);font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,.1)}
/* Form label utility */
.flbl{display:block;font-size:12px;font-weight:500;color:var(--mid);margin-bottom:4px}
/* Polish: better button */
.btn{display:inline-flex;align-items:center;gap:5px;padding:8px 16px;border-radius:8px;border:none;font-weight:500;transition:opacity .15s,background .15s;white-space:nowrap}
.btn-primary{background:var(--p);color:#fff}.btn-primary:hover{opacity:.88}
.btn-ghost{background:transparent;border:1px solid var(--border);color:var(--mid)}.btn-ghost:hover{background:var(--surface2);border-color:var(--p1)}
.btn-sm{padding:5px 11px;font-size:12px;border-radius:6px}
/* Polish: header gradient */
.hdr{background:var(--surface);border-bottom:1px solid var(--border);padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;z-index:40;box-shadow:0 1px 6px rgba(30,114,104,.06)}
/* Polish: quick nav */
.quick-nav{display:flex;gap:6px;padding:10px 24px;overflow-x:auto;scrollbar-width:none;background:var(--surface);border-bottom:1px solid var(--border)}
.nav-pill{white-space:nowrap;padding:5px 14px;border-radius:20px;border:1px solid var(--border);background:var(--surface);color:var(--mid);font-size:12px;font-weight:500;text-decoration:none;transition:.15s}
.nav-pill:hover{background:var(--pm);color:var(--p);border-color:var(--p1)}
/* Polish: premium gate */
.premium-gate{background:linear-gradient(135deg,var(--surface2),var(--pm));border-radius:12px;padding:24px;text-align:center;border:2px dashed var(--border)}
/* Polish: inputs */
input,textarea,select{font-family:inherit;font-size:13px;background:var(--surface);border:1.5px solid var(--border);border-radius:8px;padding:8px 11px;color:var(--text);width:100%;transition:border-color .15s}
input:focus,textarea:focus,select:focus{outline:none;border-color:var(--p);box-shadow:0 0 0 3px rgba(42,157,143,.12)}
.cyc-tab{flex:1;padding:4px 6px;border:none;border-radius:7px;background:transparent;font-size:12px;font-weight:500;cursor:pointer;color:var(--muted);transition:.15s}
.cyc-tab.active{background:var(--surface);color:var(--p);font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,.1)}
.fmc-tab{flex:1;padding:6px 10px;border:none;border-radius:8px;background:transparent;font-size:12px;font-weight:500;cursor:pointer;color:var(--muted);transition:.15s}
.fmc-tab.active{background:var(--surface);color:var(--p);font-weight:600;box-shadow:0 1px 4px rgba(0,0,0,.1)}
/* Cycle Tracker on computers: daily log full-width on top, overview + insights side by side below
   (the old 3 skinny columns left a big empty gap under "How heavy is your flow") */
@media(min-width:721px){ .cyc-cols{align-items:start} .cyc-cols>.cyc-log{grid-column:1/-1;order:-1} }
/* Computer: cycle overview on the left, history + insights on the right, contraception full width (no empty half, 20 Oct) */
@media(min-width:721px){ .cyc-cols>div:first-child:not(.cyc-log){grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;column-gap:20px;align-items:start} .cyc-cols>div:first-child:not(.cyc-log)>#cycleStats{grid-column:1;grid-row:1/span 30} .cyc-cols>div:first-child:not(.cyc-log)>:not(#cycleStats){grid-column:2} .cyc-cols>div:last-child:not(.cyc-log){grid-column:1/-1} }
@media(max-width:720px){
 .col-stack{grid-template-columns:1fr!important;}
 .cyc-tab{font-size:12px;padding:4px 2px;}
}
/* ONBOARDING */
#onboardingOverlay{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:200;display:none;align-items:center;justify-content:center;padding:20px}
.onboard-card{background:var(--surface);border-radius:20px;width:100%;max-width:480px;overflow:hidden;box-shadow:0 8px 32px rgba(0,0,0,.22);max-height:92vh;display:flex;flex-direction:column}
.onboard-hdr{background:linear-gradient(135deg,#1E7268,#2A9D8F 60%,#48C9B8);padding:24px;text-align:center;color:white}
.onboard-body{padding:28px;overflow-y:auto;flex:1}
.life-stage-pill{display:flex;align-items:center;gap:10px;padding:11px 14px;border-radius:9px;border:1.5px solid var(--border);cursor:pointer;background:var(--surface);transition:.15s;margin:0}
.life-stage-pill:hover{border-color:var(--p);background:var(--pm)}
/* RECIPE BOX */
.recipe-cat-chip{font-size:11px;padding:2px 8px;border-radius:10px;font-weight:500}
/* MORNING DASHBOARD */
.morning-greeting{font-family:'Fraunces',serif;font-size:1.55rem;color:var(--p);line-height:1.2;margin-bottom:2px}
.morning-date{font-size:13px;color:var(--muted);margin-bottom:16px}
.morning-quote{font-style:italic;color:var(--mid);font-size:13px;line-height:1.65;background:linear-gradient(135deg,#FFF9F0,#F0FBF9);border-left:3px solid var(--s);padding:10px 14px;border-radius:0 8px 8px 0;margin-top:4px}
.morning-widget{background:var(--surface2);border-radius:10px;padding:12px 14px;margin-bottom:10px}
.morning-widget-hdr{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:8px}
.morning-mood-row{display:flex;gap:6px;flex-wrap:wrap}
.morning-mood-btn{padding:8px 14px;border-radius:20px;border:1.5px solid var(--border);background:var(--surface);font-size:13px;cursor:pointer;transition:.15s;white-space:nowrap;min-height:44px;touch-action:manipulation}
.morning-mood-btn.selected{border-color:var(--p);background:var(--pm)}
.morning-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media(max-width:520px){.morning-grid{grid-template-columns:1fr}}
.morning-mini{background:var(--surface);border-radius:8px;padding:10px 12px;font-size:12px}
.morning-mini-lbl{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:4px}
/* BUDGET EXTRAS */
.cat-prog-bar{height:8px;background:var(--surface2);border-radius:4px;overflow:hidden;margin:3px 0}
.cat-prog-fill{height:100%;border-radius:4px;transition:width .4s}
/* TOUR SLIDES */
.tour-slide{display:none}.tour-slide.active{display:block}
.tour-mockup{background:var(--surface2);border-radius:12px;padding:16px;text-align:center;font-size:12px;color:var(--muted);margin:14px 0}
/* BOTTOM NAV */
.bottom-nav{position:fixed;bottom:0;left:0;right:0;background:var(--surface);border-top:1px solid var(--border);display:flex;z-index:100;padding-bottom:env(safe-area-inset-bottom,0);transform:translateZ(0);-webkit-transform:translateZ(0)}/* own layer: stops iPhones leaving the bar mid-screen after scrolling (Kay, 17 Oct) */
.bottom-nav-btn{flex:1;display:flex;flex-direction:column;align-items:center;padding:8px 4px 6px;background:none;border:none;cursor:pointer;color:var(--muted);font-size:11px;gap:2px;transition:color .15s}
.bottom-nav-btn.active{color:var(--p)}
.bottom-nav-btn .nav-icon{font-size:20px;line-height:1}
.bottom-nav-btn .nav-label{font-weight:500}
.app-content{padding-bottom:70px;overflow-anchor:none}

/* Sliders + checkboxes + radios in brand colour (was browser-default blue) — 10 Oct */
input[type=range],input[type=checkbox],input[type=radio]{accent-color:var(--p)}

/* Calendar ⋯ menu + add chooser (10 Oct) */
.cal-menu-item{display:block;width:100%;text-align:left;background:none;border:none;padding:9px 12px;border-radius:8px;font-size:13px;color:var(--text);cursor:pointer;font-family:inherit}
.cal-menu-item:hover{background:var(--surface2)}
.cal-add-btn{display:flex;align-items:center;gap:8px;padding:12px;border-radius:12px;border:1.5px solid var(--border);background:var(--surface);font-size:14px;font-weight:600;color:var(--text);cursor:pointer;font-family:inherit}
.cal-add-btn:hover{border-color:var(--p);background:var(--pm)}

/* Fill My Cup: gentle wave + falling drop (10 Oct) */
.fmc-wave{animation:fmcWave 3.2s linear infinite}
@keyframes fmcWave{from{transform:translateX(0)}to{transform:translateX(-55px)}}
.fmc-drop{position:absolute;left:50%;top:-14px;transform:translateX(-50%);font-size:18px;opacity:0;pointer-events:none}
.fmc-drop.go{animation:fmcDrop .9s ease-in}
@keyframes fmcDrop{0%{opacity:0;top:-24px}25%{opacity:1}100%{opacity:0;top:60px}}
@media (prefers-reduced-motion:reduce){.fmc-wave,.fmc-drop.go{animation:none}}

/* iPhones zoom the whole page when you tap a box with text under 16px — keep every typing box at 16px on phones (12 Oct 2026) */
@media (max-width: 640px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
  select,
  textarea { font-size: 16px !important; }
}

/* The hidden attribute always hides, even on buttons with their own display style */
[hidden] { display: none !important; }

/* Phones (12 Oct text-size pass): let crowded rows fit instead of spilling past the card edge */
@media (max-width: 640px) {
  .card-head { flex-wrap: wrap; row-gap: 6px; }
  .card [style*="display:grid"] > * { min-width: 0; }
  .card [style*="display:grid"] input, .card [style*="display:grid"] select { width: 100%; max-width: 100%; min-width: 0; }
  .card [style*="grid-template-columns:2fr 1fr 1fr 1fr"] { grid-template-columns: 1fr 1fr !important; }
}
/* Very small phones (e.g. iPhone SE 1st gen, 320px): let buttons and tab rows wrap */
@media (max-width: 360px) {
  .card-head > div { flex-wrap: wrap; }
  .card .btn { white-space: normal; text-align: center; }
  .cyc-tab { padding-left: 8px !important; padding-right: 8px !important; }
}

/* Phones: keep "Siera Life" on one line — the hidden header greeting was still taking up space (13 Oct 2026) */
.hdr-logo{white-space:nowrap;flex-shrink:0}
@media (max-width:560px){.hdr-greeting{display:none}}

/* Settings is its own page (14 Oct 2026): hidden on My Day, shown alone when the ⚙️ gear is tapped */
body:not(.settings-page) #card-settings{display:none!important}
body.settings-page #mainGrid > :not(#card-settings){display:none!important}
body.settings-page #card-settings{display:block!important} /* ⚙️ opens from any tab (Kay found it only worked from My Day, 16 Nov) */
body.settings-page #quickNav{display:none!important}

/* iPhone Home Screen app (16 Oct 2026): the status bar is see-through ("black-translucent"), so the app draws
   underneath the clock/battery. Push the top bar and full-screen pages down below it, otherwise the logo sits
   under the time and tapping ⚙️ opens the iPhone's own notifications instead of Settings. */
.hdr{padding-top:calc(14px + env(safe-area-inset-top,0px))}
#authScreen,#onboardingOverlay,#previewScreen,#settingsOverlay{padding-top:env(safe-area-inset-top,0px)}
#printOverlayBar{padding-top:calc(12px + env(safe-area-inset-top,0px))!important}

/* iPhone date/time boxes have a built-in minimum width, so in two-column rows they spilled into the box
   beside them (Ash: Friendship birthday overlapping "Check in", 16 Oct 2026). Let them shrink to their column. */
input[type="date"],input[type="time"],input[type="month"],input[type="datetime-local"]{min-width:0;max-width:100%}
[style*="grid-template-columns"] > *{min-width:0}

/* Quick-add rows (Holiday ideas, Gift planner and others): the main text box could shrink to a sliver on phones
   ("Destination" showed as "D", Kay 16 Oct). Keep it at least ~160px; the other boxes wrap onto the next line. */
.row > input[type="text"][style*="flex:1"],.row > input:not([type])[style*="flex:1"]{flex:1 1 160px !important;min-width:140px}

/* "Hide" on every card (16 Oct): keep the title on the left and any badges + Hide neatly on the right */
.card-head{gap:8px}
.card-head > .card-title{margin-right:auto}
.card-head .card-hide-btn{flex-shrink:0;opacity:.75}

/* Fewer, deeper sections (16 Oct): tabs inside a card, and the moved-in cards sit flat inside it */
.combo-tabs{display:flex;gap:6px;flex-wrap:wrap;padding:12px 20px 0}
.combo-tab{border:1px solid var(--border);background:var(--surface);color:var(--mid);border-radius:99px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit}
.combo-tab.on{background:var(--p);border-color:var(--p);color:#fff}
.combo-holder{min-width:0}
.combo-part{border:none!important;box-shadow:none!important;background:transparent!important;margin:0!important;border-radius:0!important}
.combo-part > .card-head .card-title,.combo-part .card-hide-btn{display:none!important}
.combo-part > .card-head:not(:has(select,input,button:not(.card-hide-btn))){display:none}

/* Stronger iPhone fix (17 Oct, Ash: task Priority box overlapping the date box): boxes inside two-column rows
   always fill exactly their own column, and iPhone date boxes drop their built-in width. */
[style*="grid-template-columns"] > * > input,[style*="grid-template-columns"] > * > select{width:100%;max-width:100%;box-sizing:border-box}
input[type="date"],input[type="time"]{-webkit-appearance:none;appearance:none;display:block;min-height:40px}

/* Room at the bottom of every tab (tester, 20 Oct): the menu bar, ✨ Suggest and + buttons float over the last
   card, so leave enough space to scroll the last box up above them. */
#mainGrid{padding-bottom:calc(170px + env(safe-area-inset-bottom,0px))!important}

/* ── Easy to use (20 Oct): thumb-sized buttons on phones and tablets ──
   Small chips, tabs and the little − delete buttons were 15–27px tall; a thumb needs about 36px+. */
@media (pointer:coarse){
 #appRoot button,#appRoot select,#settingsOverlay button,#fabSheet button{min-height:36px}
 #appRoot .item-del{min-width:36px;min-height:36px;display:inline-flex;align-items:center;justify-content:center;font-size:18px;margin-right:-8px}
 #appRoot input[type=checkbox]{min-width:20px;min-height:20px}
 #appRoot .cyc-tab{padding-top:8px;padding-bottom:8px}
}
/* Text size (Settings → Look & layout): scales the main area like zooming in, so layouts still fit */
body[data-text="lg"] #mainGrid,body[data-text="lg"] #quickNav{zoom:1.12}
body[data-text="xl"] #mainGrid,body[data-text="xl"] #quickNav{zoom:1.25}
body[data-text] #mainGrid{line-height:1.75}
/* Bigger text: the pill tab rows (period log, Fill My Cup…) swipe sideways instead of spilling out; calendar header wraps */
body[data-text] #mainGrid div[style*="display:flex;gap:2px;background:var(--surface2)"]{overflow-x:auto;scrollbar-width:none}
body[data-text] #mainGrid div[style*="display:flex;gap:2px;background:var(--surface2)"]>button{flex-shrink:0}
body[data-text] #card-calendar div[style*="display:flex;align-items:center;gap:4px"]{flex-wrap:wrap}
/* Tidier My Day top box (20 Oct): plain labels, one "Today" list, small tiles two across, extras folded */
.md-label{font-size:13px;font-weight:600;color:var(--text);margin-bottom:8px}
.md-alert{border:1px solid;border-radius:10px;padding:9px 12px;cursor:pointer}
.md-row{display:flex;align-items:center;gap:10px;padding:8px 2px;border-top:1px solid var(--border);cursor:pointer;font-size:13px}
.md-label+.md-row{border-top:none;padding-top:2px}
.md-ic{flex-shrink:0;width:20px;text-align:center}
.md-tx{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.md-side{flex-shrink:0;font-size:12px;font-weight:600;color:var(--mid)}
.md-tiles{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}
.md-tile{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:10px 12px;cursor:pointer;min-width:0}
.md-tile-lbl{font-size:12px;color:var(--mid);margin-bottom:2px}
.md-tile-big{font-size:15px;font-weight:700;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.md-tile-sm{font-size:12px;color:var(--muted)}
.md-more{background:var(--surface2);border-radius:10px;padding:10px 14px}
.md-more>summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--p);list-style-position:inside}
/* Mood: five buttons in one row, emoji on top of the word */
#morningBody .morning-mood-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
#morningBody .morning-mood-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:8px 2px;border-radius:14px;font-size:12px;white-space:nowrap;line-height:1.2;min-width:0;overflow:hidden;text-overflow:ellipsis}
#morningBody .md-emo{font-size:20px;line-height:1}
body[data-text] #morningBody .morning-mood-row{grid-template-columns:repeat(3,minmax(0,1fr))}
/* THEME: Night (20 Oct) — dark mode, easy on the eyes at night. Bright teal buttons use dark text. */
body[data-theme="night"]{
 color-scheme:dark;
 --bg:#0E1716;--surface:#16211F;--surface2:#1E2D2A;--border:#2E4541;
 --text:#E8F3F0;--mid:#B9D4CD;--muted:#93B8B0;--light:#5C7D76;
 --p:#4FC3B2;--p1:#48C9B8;--pm:#1B3532;--s:#F4A261;--sm:#3A2A1E;--hi:#E07A5F;
 --shadow:0 1px 4px rgba(0,0,0,.45);
}
body[data-theme="night"] .btn-primary,body[data-theme="night"] .combo-tab.on{color:#0E1716}
body[data-theme="night"] .tag-premium,body[data-theme="night"] .premium-chip.active{background:#3A2E12;color:#F6D58A}
body[data-theme="night"] .morning-quote{background:var(--surface2)}
body[data-theme="night"] .btn-danger{background:#E05A4F;color:#0E1716}
body[data-theme="night"] .auth-err{color:#F38B82}
body[data-theme="night"] img{filter:brightness(.92)}
/* Night: anything drawn as white words on the bright teal gets dark words instead (readable) */
body[data-theme="night"] [style*="background:var(--p)"][style*="color:#fff" i],body[data-theme="night"] [style*="background:var(--p)"][style*="color:white"],body[data-theme="night"] [style*="background: var(--p)"][style*="color: rgb(255, 255, 255)"],body[data-theme="night"] [style*="background:var(--p1)"][style*="color:#fff" i],body[data-theme="night"] [style*="background: var(--p1)"][style*="color: rgb(255, 255, 255)"],body[data-theme="night"] [style*="background-color: var(--p)"][style*="color: rgb(255, 255, 255)"]{color:#0E1716!important}
/* Meal plan on a big screen (tester, 21 Oct): the 7 days sit side by side, like a wall planner. Phones keep the up-and-down list. */
@media(min-width:900px){
 .meal-week{flex-direction:row!important;align-items:stretch}
 .meal-week>div{flex:1 1 0;min-width:0;padding:10px 8px!important}
 .meal-week .mw-lbl{display:none}
 .meal-week>div>div[style*="display:flex;gap:6px;flex-wrap:wrap"]{flex-direction:column}
}
/* 🌿 Keep it simple (testers, 2 Nov: "a super minimalist option with headings and bare essentials").
   Hides the tips & ideas extras; everything you've saved and every section stays. Settings → Look & layout. */
body[data-simple="1"] .md-more:not(.keep),
body[data-simple="1"] #tabIntro,
body[data-simple="1"] #fitnessCycleRec,
body[data-simple="1"] .sl-extra{display:none!important}

/* 🌿 Calmer new home (newhome.js, 16 Nov 2026): Today sections, More tiles, Favourites stars */
body.nh .nh-sec{background:var(--surface2);border-radius:14px;padding:10px 12px;margin-bottom:8px}
body.nh .nh-sec[role=button]{cursor:pointer}
body.nh .nh-lab{display:flex;align-items:center;gap:4px;font-size:12px;font-weight:700;letter-spacing:.03em;color:var(--mid);margin-bottom:4px}
body.nh .nh-go{margin-left:auto;color:var(--p);font-size:15px;font-weight:600}
body.nh .nh-line{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:14px;color:var(--text);padding:3px 0;line-height:1.4}
body.nh .nh-line>span:first-child{display:flex;align-items:center;gap:8px;min-width:0}
body.nh .nh-side{font-size:12px;color:var(--mid);white-space:nowrap;flex-shrink:0}
body.nh .nh-tap{cursor:pointer}
body.nh .nh-calm,body.nh .nh-more{font-size:13px;color:var(--mid)}
body.nh .nh-link{background:none;border:none;padding:0;font:inherit;font-weight:600;color:var(--p);cursor:pointer}
body.nh .nh-tick{flex:0 0 22px;width:22px;height:22px;min-width:22px;min-height:0;max-height:22px;box-sizing:border-box;line-height:0;border-radius:50%;border:2px solid var(--p);background:var(--surface);cursor:pointer;padding:0}
body.nh .nh-tick:hover{background:var(--pm)}
body.nh .nh-tile{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:var(--surface2);border:1px solid var(--border);border-radius:16px;padding:14px;margin-bottom:8px;cursor:pointer;font-family:inherit}
body.nh .nh-tile-ic{font-size:24px;line-height:1}
body.nh .nh-tile-tx{flex:1;min-width:0}
body.nh .nh-tile-n{display:block;font-size:15px;font-weight:600;color:var(--text)}
body.nh .nh-tile-l{display:block;font-size:12.5px;color:var(--mid)}
body.nh .nh-tile-go{color:var(--p);font-size:20px}
body.nh .nh-chip{display:flex;align-items:center;gap:8px;text-align:left;border:1px solid var(--border);background:var(--surface);border-radius:14px;padding:8px 12px;cursor:pointer;font-family:inherit}
body.nh .nh-back{background:none;border:none;color:var(--p);font-size:14px;font-weight:600;cursor:pointer;font-family:inherit;padding:4px 8px 4px 0}
body.nh #nhBack{display:flex;align-items:center;gap:8px;padding:8px 6px;position:sticky;top:0;z-index:20;background:var(--bg)}
body.nh .nh-back-t{font-size:15px;font-weight:600;color:var(--text)}
body.nh .nh-star{background:none;border:none;font-size:20px;line-height:1;color:var(--muted);cursor:pointer;padding:2px 4px;flex-shrink:0}
body.nh .nh-star.on{color:#E9A23B}
body.nh .nh-fav-head{display:flex;flex-direction:column;gap:2px;padding:2px 4px 4px}
body.nh .nh-suggest{background:var(--pm);border-radius:14px;padding:12px 14px;font-size:13.5px;color:var(--text);margin-top:8px}
body.nh #addMoreCard{display:none}
body.nh #quickNav{display:none}
body.nh .nh-intro{background:var(--pm);border:1px solid var(--border);border-radius:14px;padding:12px 14px;margin-bottom:10px}
body.nh .nh-intro-l{font-size:13.5px;color:var(--text);line-height:1.5;margin:2px 0}
body.nh .nh-moments{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0 10px}
body.nh .nh-mo{font-family:inherit;font-size:13px;padding:6px 12px;border-radius:99px;border:1.5px solid var(--border);background:var(--surface);color:var(--text);cursor:pointer;min-height:0}
body.nh .nh-mo.on{border-color:var(--p);background:var(--pm);color:var(--p);font-weight:600}
.nh-qa-toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(84px + env(safe-area-inset-bottom));z-index:9000;display:flex;flex-wrap:wrap;align-items:center;gap:8px;max-width:calc(100% - 32px);background:#1A2E2B;color:#fff;border-radius:14px;padding:10px 14px;font-size:13.5px;box-shadow:0 6px 24px rgba(0,0,0,.2)}
.nh-qa-toast button{background:rgba(255,255,255,.14);border:none;color:#fff;font:inherit;font-weight:600;border-radius:99px;padding:5px 11px;cursor:pointer}
body.nh .nh-qa{padding-bottom:4px}
body.nh .nh-qa-bar{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:var(--surface);border:1.5px dashed var(--p);border-radius:14px;padding:10px 12px;margin-bottom:8px;cursor:pointer;font-family:inherit;font-size:14px}
body.nh .nh-qa-plus{width:30px;height:30px;min-width:30px;border-radius:50%;background:var(--p);color:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:700}
body.nh .nh-xl{display:block;width:100%;margin-top:4px;padding:11px;border-radius:12px;border:1.5px solid var(--p);background:var(--surface);color:var(--p);font:inherit;font-weight:600;font-size:14px;cursor:pointer}
body.nh .nh-grp{font-size:12px;font-weight:700;letter-spacing:.04em;color:var(--mid);margin:14px 2px 6px}
body.nh .nh-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body.nh .nh-sm{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:84px;padding:12px 6px 10px;background:var(--surface2);border:1px solid var(--border);border-radius:14px;cursor:pointer;text-align:center}
body.nh .nh-sm-ic{font-size:24px;line-height:1}
body.nh .nh-sm-n{font-size:12.5px;font-weight:600;color:var(--text);line-height:1.25}
body.nh .nh-sm-star{position:absolute;top:2px;right:2px;background:none;border:none;font-size:16px;line-height:1;color:var(--muted);cursor:pointer;padding:6px;min-height:0}
body.nh .nh-sm-star.on{color:#E9A23B}
body.nh .nh-cal{display:block;margin-top:6px;font-size:13px}
/* 🧩 Tile pages (nhtiles.js) */
body.nh .nh-tl-head{display:flex;align-items:center;justify-content:space-between;gap:8px;font-family:Fraunces,Georgia,serif;font-size:1.25rem;font-weight:600;color:var(--text)}
body.nh .nh-tl-sub{font-size:12.5px;color:var(--muted);margin:2px 0 8px}
body.nh #savedToast{bottom:calc(84px + env(safe-area-inset-bottom,0px))!important} /* sat on top of the bottom tabs */
body.nh .nh-tl-head > span{min-width:0}
body.nh .nh-arr{flex-shrink:0;white-space:nowrap;font-family:Inter,sans-serif;font-size:12px;font-weight:600;color:var(--p);background:var(--pm);border:none;border-radius:99px;padding:6px 12px;cursor:pointer;min-height:0}
body.nh .nh-tlgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body.nh .nh-tl{position:relative;display:flex;flex-direction:column;gap:3px;min-height:104px;padding:14px 12px 12px;background:var(--surface2);border:1px solid var(--border);border-radius:18px;cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;transition:transform .15s}
body.nh .nh-tl.dragging{transition:none}
body.nh .nh-tl-ic{font-size:26px;line-height:1;margin-bottom:4px}
body.nh .nh-tl-n{font-size:14px;font-weight:700;color:var(--text);line-height:1.25}
body.nh .nh-tl-l{font-size:12.5px;color:var(--mid);line-height:1.35;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
body.nh .nh-tl .nh-sm-star{top:4px;right:4px}
body.nh .nh-tlgrid.arranging .nh-tl{touch-action:none;animation:nhWiggle .32s ease-in-out infinite alternate;cursor:grab}
body.nh .nh-tlgrid.arranging .nh-tl:nth-child(2n){animation-delay:.12s}
body.nh .nh-tlgrid.arranging .nh-sm-star{display:none}
body.nh .nh-tl.dragging{animation:none;z-index:5;box-shadow:0 8px 24px rgba(0,0,0,.18);cursor:grabbing}
@keyframes nhWiggle{from{transform:rotate(-1deg)}to{transform:rotate(1deg)}}
@media (prefers-reduced-motion:reduce){body.nh .nh-tlgrid.arranging .nh-tl{animation:none;outline:2px dashed var(--p)}}
body.nh .nh-edit-today{display:block;margin:14px auto 2px;font-size:12.5px;color:var(--muted)}
body.nh .nh-search{display:flex;align-items:center;gap:10px;width:100%;margin:0 0 4px;padding:11px 14px;background:var(--surface);border:1px solid var(--border);border-radius:14px;font:inherit;font-size:14px;color:var(--muted);text-align:left;cursor:text;min-height:44px}
body.nh .nh-search:hover{border-color:var(--p)}
body.nh .nh-win{display:flex;align-items:center;gap:10px;padding:10px 12px;margin-top:6px;background:var(--surface);border:1px solid var(--border);border-radius:12px;cursor:pointer}
body.nh .nh-win.done{background:var(--pm);border-color:transparent;cursor:default}
body.nh .nh-win-ic{width:28px;height:28px;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:18px;border-radius:50%}
body.nh .nh-win.done .nh-win-ic{background:var(--p);color:#fff;font-size:14px;font-weight:700}
body.nh .nh-win-t{display:block;font-size:14px;font-weight:600;color:var(--text)}
body.nh .nh-win-w{display:block;font-size:12px;color:var(--muted)}
body.nh .nh-np{background:var(--surface2);border:1px solid var(--border);border-radius:16px;padding:10px 12px;box-shadow:0 2px 10px rgba(0,0,0,.06)}
body.nh .nh-np-app{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:600;letter-spacing:.3px;color:var(--muted)}
body.nh .nh-np-ic{width:18px;height:18px;border-radius:5px;background:linear-gradient(145deg,#1E7268,#2A9D8F 55%,#48C9B8);color:#fff;font-family:Fraunces,Georgia,serif;font-size:11px;display:flex;align-items:center;justify-content:center}
body.nh .nh-np-t{font-size:14px;font-weight:700;color:var(--text);margin-top:4px}
body.nh .nh-np-b{font-size:13px;color:var(--mid)}
/* Bigger tap areas (16 Nov thorough check): stars were 25px wide, easy to open the tile by mistake. Same look, 44px to tap. */
body.nh #appRoot .nh-sm-star{min-width:44px;min-height:44px;display:flex;align-items:flex-start;justify-content:flex-end;padding:8px 8px 0 0}
body.nh .nh-tl .nh-sm-star{top:0;right:0}
body.nh .card-header .icon-btn,body.nh .card-head .icon-btn{min-width:40px;min-height:40px}
body.nh .nh-links{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:6px}body.nh .nh-links .nh-cal{margin-top:0;min-height:36px}
body.nh .nh-mo-lab{font-size:12px;font-weight:600;color:var(--muted);margin:12px 0 6px}
/* Simple drag (Kay, 16 Nov): no wiggle. The held tile lifts and follows the finger; the others make room. */
body.nh .nh-tlgrid.holding .nh-tl{touch-action:none}
body.nh .nh-tlgrid.holding .nh-sm-star{visibility:hidden}
body.nh .nh-tl.dragging{box-shadow:0 10px 28px rgba(26,46,43,.22);border-color:var(--p);opacity:.97}
/* Search you type straight into (16 Nov) */
body.nh .nh-searchwrap{margin:0 0 4px}
body.nh .nh-search input{flex:1;min-width:0;border:none;background:transparent;font:inherit;font-size:15px;color:var(--text);padding:0;outline:none;min-height:0}
body.nh .nh-search input::-webkit-search-cancel-button{display:none}
body.nh .nh-search:focus-within{border-color:var(--p)}
body.nh .nh-search-x{display:none;background:none;border:none;font-size:20px;color:var(--muted);cursor:pointer;padding:0 4px;min-height:0}
body.nh .nh-searchwrap.open .nh-search-x{display:block}
body.nh .nh-search-res:empty{display:none}
body.nh .nh-search-res{background:var(--surface);border:1px solid var(--border);border-radius:14px;margin-top:6px;padding:4px 8px;max-height:60vh;overflow-y:auto}
body.nh .nh-searchwrap:not(.open) .nh-search-res{display:none}
