@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--bg:#f8f5fc;--surface:#fff;--ink:#332640;--muted:#8d8099;--accent:#9673bc;--accent-dark:#73508f;--tint:#eee6f6;--line:#eae3ef;--menstrual:#d794b1;--follicular:#b5a0d7;--ovulation:#dfc694;--luteal:#a5b9af;--radius:28px}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'DM Sans',system-ui,sans-serif;-webkit-tap-highlight-color:transparent}button,input,textarea,select{font:inherit}button{cursor:pointer;color:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:4px}svg{fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;width:24px;height:24px}button{border:0}header{display:flex;align-items:center;justify-content:space-between;padding:27px 30px 10px}.app{max-width:600px;min-height:100svh;margin:auto;background:var(--bg)}.wordmark{text-decoration:none;color:var(--ink);display:flex;align-items:center;gap:9px;font-family:Manrope,system-ui,sans-serif;font-size:19px;font-weight:800;letter-spacing:-.8px}.brandmark{color:var(--accent);font-size:31px;font-weight:400}.beta{font-size:10px;letter-spacing:.2px;font-weight:500;border-left:1px solid #d9cde5;padding-left:10px;color:var(--muted);margin-left:3px}.icon-button{display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--line);background:transparent;border-radius:50%;color:#887492}.companion{position:relative;padding:20px 30px 16px}.greeting span{font-size:10px;letter-spacing:2px;font-weight:600;color:var(--muted);text-transform:uppercase}.greeting h1{font-family:Manrope,system-ui,sans-serif;font-size:25px;line-height:1.36;font-weight:500;letter-spacing:-1px;margin:10px 0}.mood-button{position:absolute;right:30px;top:66px;display:flex;align-items:center;gap:6px;background:white;border:1px solid var(--line);border-radius:30px;padding:8px 10px;font-size:10px;color:var(--accent-dark);box-shadow:0 3px 9px #442b5410}#mood-face{font-size:18px;line-height:1}.chevron{font-size:14px}.fluff-stage{position:relative;margin:-9px auto 0;width:min(100%,350px);height:285px;display:flex;justify-content:center;align-items:center;isolation:isolate}.fluff-stage img{position:relative;z-index:1;width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply;transition:opacity .15s;user-select:none;-webkit-user-drag:none;animation:arrive .5s ease}.companion-caption{display:flex;align-items:center;justify-content:center;gap:7px;font-size:11px;color:#93849d;margin-top:1px;min-height:17px}.status-dot{width:5px;height:5px;background:var(--accent);border-radius:50%}.cycle-section{background:#fff;border-radius:36px 36px 0 0;padding:23px 27px 6px;border-top:1px solid #f0eaf5}.section-line{display:flex;justify-content:space-between;align-items:center}.eyebrow{font-size:9px;font-weight:700;letter-spacing:2.3px;color:var(--muted)}.text-button{font-size:11px;font-weight:600;color:var(--accent-dark);background:var(--tint);border-radius:20px;padding:9px 13px}.text-button span{padding-left:4px}.arch-wrap{position:relative;margin:0 auto;max-width:420px;height:215px}.cycle-arch{width:100%;height:100%;overflow:visible;stroke-width:9}.track{stroke:#f0ebf5}.arch-content{position:absolute;bottom:5px;left:16%;right:16%;text-align:center}.phase-kicker{font-size:8px;font-weight:700;letter-spacing:1.2px;color:var(--muted)}.arch-content h2{font-family:Manrope,system-ui,sans-serif;font-size:28px;font-weight:500;letter-spacing:-1px;margin:7px 0}.arch-content p{font-size:11px;color:var(--muted);line-height:1.65;margin:0}.phase-legend{display:flex;justify-content:center;gap:13px;margin:13px 0 24px;font-size:8px;color:var(--muted)}.phase-legend span{display:flex;align-items:center;gap:4px}.phase-legend i{width:5px;height:5px;border-radius:50%}.quick-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.quick-actions button{padding:0 0 10px;background:transparent;display:flex;flex-direction:column;align-items:center}.action-icon{width:49px;height:49px;display:grid;place-items:center;background:#f7f3fa;border-radius:17px;color:var(--accent-dark);border:1px solid #eee7f4;transition:transform .2s,background .2s}.quick-actions button:hover .action-icon{transform:translateY(-3px);background:var(--tint)}.quick-actions strong{font-size:10px;font-weight:500;margin-top:10px;white-space:nowrap}.quick-actions small{font-size:8px;color:var(--muted);margin-top:4px;white-space:nowrap}.quiet-note{text-align:center;color:#b1a5ba;font-size:9px;margin:18px 0 10px}footer{padding:20px 27px;display:flex;justify-content:space-between;align-items:center;background:white;color:#b0a3b9;font-size:8px}footer>span{letter-spacing:1.4px}footer button{background:none;display:flex;gap:5px;align-items:center;color:#a596af;font-size:8px;padding:0}footer svg{width:12px;height:12px}dialog{position:fixed;inset:auto 0 0;width:min(100%,600px);max-height:90svh;border:0;border-radius:29px 29px 0 0;padding:12px 25px 30px;margin:0 auto;background:#fff;color:var(--ink);box-shadow:0 -12px 80px #31213e25;overflow-y:auto}dialog::backdrop{background:#28153355;backdrop-filter:blur(5px)}.sheet-handle{margin:0 auto 12px;width:32px;height:4px;border-radius:4px;background:var(--line)}.sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.sheet-head h2{font-family:Manrope,system-ui,sans-serif;font-size:22px;font-weight:600;letter-spacing:-.6px;margin:8px 0}.close{font-size:25px;background:var(--bg);border-radius:50%;width:34px;height:34px;color:var(--muted)}.intro{color:var(--muted);font-size:13px;line-height:1.65;margin:8px 0 20px}.moods{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:10px 0 20px}.mood-choice{background:#faf8fc;border:1px solid var(--line);border-radius:17px;padding:9px 6px 12px;font-size:11px;display:flex;flex-direction:column;align-items:center;gap:3px}.mood-choice img{width:75px;height:75px;object-fit:contain;mix-blend-mode:multiply}.mood-choice.selected,.chip.selected{background:var(--tint);border-color:var(--accent);color:var(--accent-dark)}.primary{display:block;width:100%;background:var(--accent-dark);color:white;border-radius:15px;padding:14px;border:0;font-weight:600;font-size:13px;margin-top:17px}.secondary{background:var(--bg);color:var(--accent-dark);border-radius:12px;padding:10px 15px;font-size:12px;border:1px solid var(--line)}label{font-size:12px;display:block;margin:16px 0 8px;font-weight:600}input,textarea,select{width:100%;padding:13px;border-radius:12px;border:1px solid var(--line);background:#fcfafd;color:var(--ink);min-width:0}textarea{resize:vertical;min-height:80px}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.chips{display:flex;flex-wrap:wrap;gap:8px}.chip{padding:10px 13px;border-radius:14px;background:#faf8fc;border:1px solid var(--line);font-size:12px}.small-note{font-size:11px;color:var(--muted);line-height:1.6}.sheet-content h3,#sheet-content h3{font-size:13px;margin:23px 0 11px}.info-box{background:var(--bg);border-radius:18px;padding:18px;margin:15px 0;font-size:13px;line-height:1.7}.info-big{font-size:36px;font-family:Manrope,system-ui,sans-serif;letter-spacing:-1.5px}.calendar-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px;font-size:15px}.calendar-head button{width:35px;height:35px;border-radius:50%;background:var(--bg)}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.dow{text-align:center;font-size:10px;color:var(--muted);padding:5px}.day{position:relative;aspect-ratio:1;border-radius:13px;border:1px solid transparent;background:none;font-size:13px}.day.period{background:#f5dce6;color:#964b6a}.calendar-grid .day.predicted{border:1px dotted #d7a4b9}.day.today{font-weight:700;box-shadow:inset 0 0 0 1px var(--accent)}.day.active{background:var(--accent-dark);color:white}.day:disabled{opacity:.3;cursor:default}.day.logged:after{position:absolute;bottom:5px;left:calc(50% - 2px);content:'';width:4px;height:4px;border-radius:50%;background:var(--accent)}.cal-key{display:flex;gap:15px;font-size:10px;color:var(--muted);margin:16px 0 20px}.cal-key span::before{content:'';display:inline-block;width:10px;height:10px;margin-right:5px;vertical-align:middle;box-sizing:border-box;border-radius:3px}.cal-key .logged-key::before{background:var(--menstrual);border-radius:50%}.cal-key .estimated-key::before{border:1px dotted #d7a4b9}.cal-key .spotting-key::before{border:1px solid #e580a2}.date-detail{border-top:1px solid var(--line);padding-top:16px}.date-detail h3{margin:0 0 12px!important}.row-buttons{display:flex;gap:8px;flex-wrap:wrap}.delete{color:#a65576;background:none;padding:10px 0;font-size:11px}.symptom-day{display:flex;justify-content:space-between;align-items:center;font-size:12px}.symptom-day input{width:auto;max-width:175px}.log-summary{font-size:12px;line-height:1.8;color:var(--muted)}#toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);background:var(--ink);color:#fff;padding:12px 20px;border-radius:30px;font-size:12px;opacity:0;transition:.2s;pointer-events:none;z-index:99;max-width:90%;text-align:center}#toast.show{transform:translate(-50%,0);opacity:1}.phase-list{display:grid;gap:10px}.phase-list div{border-left:3px solid var(--line);padding:8px 13px;font-size:12px}.phase-list b{display:block;margin-bottom:3px}.phase-list span{color:var(--muted);line-height:1.5}a{color:var(--accent-dark)}@keyframes arrive{from{opacity:.5;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@media(min-width:700px){body{padding:26px 0}.app{border:1px solid #e6dcef;border-radius:35px;overflow:hidden;box-shadow:0 20px 90px #59366f10;max-width:465px;min-height:0}.fluff-stage{height:290px;width:350px}.companion{padding-top:22px}dialog{bottom:25px;border-radius:28px;max-width:465px;max-height:85svh}}@media(max-width:380px){header{padding:20px 22px 7px}.companion{padding:14px 22px}.greeting h1{font-size:22px}.fluff-stage{height:240px;width:290px}.mood-button{right:22px;top:62px}.cycle-section{padding:20px 20px 6px}.arch-wrap{height:190px}.arch-content h2{font-size:25px}.phase-legend{gap:9px}.quiet-note{font-size:8px}footer{padding:16px 22px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* Luna Kahuna home. Exact square chart geometry keeps the cycle a circle. */
:root{--bg:#e1fafa;--ink:#244b55;--muted:#647d85;--accent:#54b8c1;--accent-dark:#226f7b;--tint:#e2f5f5;--line:#d4e7e8}
body{background:var(--bg);padding:0}.app{width:100%;max-width:500px;min-height:100svh;border:0;border-radius:0;box-shadow:none;background:var(--bg);overflow:visible}header{height:76px;padding:max(16px,env(safe-area-inset-top)) 22px 8px;position:absolute;top:0;left:0;right:0;z-index:2;max-width:500px;margin:auto}.wordmark{width:42px;height:42px}.mood-button{position:static;display:flex;align-items:center;gap:10px;min-height:44px;padding:6px 13px;border:1px solid #ffffffc0;background:#ffffff70;box-shadow:0 2px 6px #247d8c20;border-radius:26px;color:#226f7b}.mood-button #mood-face{font-size:28px}.chevron{font-size:22px}.companion{height:50svh;min-height:250px;padding:80px 22px 0;display:flex;align-items:flex-end;justify-content:center}.fluff-stage{height:auto;aspect-ratio:1;width:min(68vw,29svh,310px);margin:0 auto 16px}.fluff-stage img{width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply;animation:none}.cycle-section{padding:0 10px max(18px,env(safe-area-inset-bottom));border:0;border-radius:0;background:transparent}.arch-wrap{width:min(100%,43svh);height:auto;aspect-ratio:1;max-width:none;margin:0 auto;isolation:isolate}.cycle-arch{position:absolute;inset:0;width:100%;height:100%;stroke-width:25;overflow:visible;pointer-events:none}.track{stroke:#ffffff65}#segments path{stroke-linecap:butt;filter:drop-shadow(0 1px 1px #ffffffa0)}#marker{filter:drop-shadow(0 2px 2px #345b6133)}.quick-actions{position:absolute;inset:0;display:block}.quick-actions button{position:absolute;width:23%;aspect-ratio:1;min-width:44px;min-height:44px;padding:0;background:none;border-radius:50%;transform:translate(-50%,-50%);display:grid;place-items:center;transition:filter .2s}.quick-actions button:hover{filter:brightness(1.05)}.quick-actions button:active{scale:.96}.quick-actions button img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 4px #296a7a20);user-select:none}.quick-actions button:nth-child(1){left:36%;top:29%}.quick-actions button:nth-child(2){left:64%;top:29%}.quick-actions button:nth-child(3){left:26%;top:51%}.quick-actions button:nth-child(4){left:74%;top:51%}.quick-actions button:nth-child(5){left:36%;top:73%}.quick-actions button:nth-child(6){left:64%;top:73%}.yellow-face{font-size:44px;line-height:1.3}.mood-choice{min-height:88px;justify-content:center}.moods{margin:8px 0;gap:12px}.wheel-wrap{position:relative;width:min(100%,260px);aspect-ratio:1;margin:20px auto}.wheel-wrap canvas{width:100%;height:100%;border-radius:50%;touch-action:none;box-shadow:0 0 0 1px #00000015}.wheel-wrap #wheel-point{position:absolute;width:17px;height:17px;transform:translate(-50%,-50%);border:3px solid white;box-shadow:0 0 0 1px #345b61;pointer-events:none;border-radius:50%}.color-presets{margin:20px 0}.swatch{width:34px;height:34px;border-radius:50%;border:1px solid #b3c9cc;min-height:34px}#bg-native{padding:3px;height:45px}#brightness{accent-color:var(--accent-dark);padding:8px 0}#reset-background{display:block;margin:14px auto}.close{background:#edf6f6}.info-box{background:#f1f8f8}.mood-choice,.chip{background:#f5fafb}.secondary{background:#eef7f7}.small-note{color:#657c83}dialog{color:#244b55}input,textarea,select{background:#f8fcfc;color:#244b55}a{color:#226f7b}
@media(min-width:700px){body{padding:0}.app{max-width:465px;border:0;border-radius:0;min-height:100svh;box-shadow:none}.companion{height:50svh;padding-top:80px}.fluff-stage{height:auto;width:min(68vw,29svh,310px)}dialog{bottom:20px;max-width:465px;border-radius:28px}}
@media(max-height:640px){.companion{min-height:220px}.arch-wrap{width:min(100%,290px)}}

/* Approved Luna Kahuna wordmark; keep its natural proportions. */
header .wordmark{width:clamp(120px,32vw,150px);height:auto;max-height:90px;object-fit:contain;align-self:flex-start}

/* Raise the companion and its contact shadow together. */
.fluff-stage{transform:translateY(-20px)}
.fluff-stage img[src$="wave-happy-transparent.png"]{mix-blend-mode:normal}

/* Standalone menu art has no bubble backing or added shadow. */
.quick-actions button img{filter:none}

/* One hue shift shared by brand artwork; white remains neutral. */
:root{--art-hue:0deg}
header .wordmark,.quick-actions button img,#cycle-art,#marker{filter:hue-rotate(var(--art-hue))}
#cycle-art{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#art-color{width:100%;height:46px;padding:4px}
.art-preview{display:flex;justify-content:center;gap:20px;margin:15px 0}
.art-preview img{width:64px;height:64px;object-fit:contain;filter:hue-rotate(var(--art-hue))}

/* Larger cycle with smaller, outlined menu controls. */
.arch-wrap{width:min(100%,500px)}
.quick-actions button{width:21%;border:1.5px solid transparent;background:none;padding:0}
.quick-actions button::before{content:'';position:absolute;inset:0;border:1.5px solid #087e90;border-radius:50%;filter:hue-rotate(var(--art-hue));pointer-events:none}
.quick-actions button img{width:67%;height:67%;object-fit:contain}

.mood-outline{display:block;width:44px;height:44px;fill:none;stroke:#087e90;stroke-width:1.6;filter:hue-rotate(var(--art-hue))}
#mood-face .mood-outline{width:29px;height:29px}
.mood-choice{display:grid;place-items:center}

/* Quiet full-screen shoreline; all existing controls stay above the artwork. */
.app{position:relative;isolation:isolate}
.app::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:url('assets/backgrounds/shoreline-approved-fast.webp') center top/cover no-repeat;opacity:var(--scene-opacity,1)}

/* Thin ombré cycle: only the period-start seam is divided. */
#cycle-art{inset:2.5%;width:95%;height:95%;border-radius:50%;-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 13px),#000 calc(100% - 12px),#000 calc(100% - 1px),transparent 100%);mask:radial-gradient(farthest-side,transparent calc(100% - 13px),#000 calc(100% - 12px),#000 calc(100% - 1px),transparent 100%)}
.quick-actions{pointer-events:none}.quick-actions button{pointer-events:auto}
#ring-phase-targets path{pointer-events:stroke;cursor:pointer}
#ring-phase-targets path:focus-visible{outline:none;stroke:transparent}
#marker{pointer-events:none}


/* Restore the original companion geometry, including its reserved space. */
.companion{height:50svh}
.fluff-stage{width:min(68vw,29svh,310px);transform:translateY(-5px)}
#cycle-art{inset:2.5%;width:95%;height:95%;mask:none;-webkit-mask:none;background:url(assets/cycle-ring-54.png) center/contain no-repeat}

/* Enlarge only the painted companion, without changing its layout box. */
.fluff-stage img{transform:scale(1.25);transform-origin:50% 90%}
/* Anchor the home screen to the viewport; sheets keep their own scrolling. */
html{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
body{position:fixed;inset:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
.app{height:100dvh;min-height:0;overflow:hidden;touch-action:none}
.arch-wrap{max-width:calc(50dvh - max(18px,env(safe-area-inset-bottom)))}
dialog{touch-action:pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}

/* One portrait coordinate system; the entire scene scales together. */
.app{position:absolute;left:50%;top:50%;width:390px;max-width:none;height:844px;min-height:0;margin:0;transform:translate(-50%,-50%) scale(var(--scene-scale,1));transform-origin:center;overflow:hidden}
.app header{height:76px;padding:16px 22px 8px;max-width:none}
.app header .wordmark{width:124.8px}
.app .companion{height:422px;min-height:0;padding:80px 22px 0}
.app .fluff-stage{width:244.76px;height:auto;margin:0 auto 16px;transform:translateY(-5px)}
.app .cycle-section{padding:0 10px 34px}
.app .arch-wrap{width:370px;max-width:none;height:370px;margin:0 auto}
.app .arch-wrap{transform:translateY(25px)}
.app::before{background-position:center top;background-size:cover}

/* Add 10px to background width, scaling both axes evenly about its center. */
.app::before{transform:scale(1.0256410256);transform-origin:center}

/* The viewport clips the scene; the background can bleed beyond its frame. */
.app{overflow:visible;background:transparent}
.app::before{transform:scale(var(--background-scale,1.0256410256));transform-origin:center;background-position:center top}

/* Phase hit regions stay invisible for touch, focus and activation. */
#ring-phase-targets path,#ring-phase-targets path:focus,#ring-phase-targets path:active{stroke:transparent;fill:none;outline:none;-webkit-tap-highlight-color:transparent}

.app::before{background-image:var(--scene-image,url('assets/backgrounds/shoreline-approved-fast.webp'))}
.background-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0 24px}
.background-choice{padding:5px;background:#f3f7f7;border:2px solid transparent;border-radius:14px;overflow:hidden}
.background-choice img{display:block;width:100%;aspect-ratio:9/16;object-fit:cover;border-radius:8px}
.background-choice span{display:block;font-size:11px;line-height:1.3;padding:7px 2px;min-height:35px}
.background-choice.selected{border-color:#087e90;background:#e0f4f3}

/* Name occupies the existing gap without moving the character or ring. */
.companion-name{position:absolute;left:20px;right:20px;bottom:0;text-align:center;font-family:Georgia,"Times New Roman",serif;font-style:italic;font-weight:600;font-size:25px;line-height:30px;letter-spacing:.4px;color:#087e90;filter:hue-rotate(var(--art-hue));text-shadow:0 1px 3px #ffffffb0;pointer-events:none}

/* Move the companion, name and wheel as one group within the fixed scene. */
.app>main{transform:translateY(40px)}

/* Recolor by luminance with the selected palette; retain alpha and whites. */
header .wordmark,.quick-actions button img,#cycle-art,.art-preview img{filter:url(#artwork-palette)}
#marker{filter:none}
.quick-actions button::before{border-color:var(--art-primary,#087e90);filter:none}
.mood-outline{stroke:var(--art-primary,#087e90);filter:none}
.companion-name{color:var(--art-primary,#087e90);filter:none}
.background-choice.selected{border-color:var(--art-primary,#087e90)}
.art-preview{align-items:center;gap:16px}

/* No glow, halo or center wash on home-screen artwork. */
header .wordmark,.quick-actions button img,#cycle-art{filter:url(#artwork-palette)}
.quick-actions button,.quick-actions button:hover,.quick-actions button:active,#marker,.quick-actions button::before{filter:none;box-shadow:none}
.companion-name{text-shadow:none;filter:none;-webkit-text-stroke:0}

/* Glow follows the rendered logo silhouette outside the image canvas. */
.app header{overflow:visible}
.logo-glow{display:block;align-self:flex-start;flex:0 0 auto;width:124.8px;overflow:visible;filter:drop-shadow(0 0 2px #ffffffd9) drop-shadow(0 0 7px #ffffff99)}
.logo-glow .wordmark{display:block}
.mood-choice{grid-template-rows:44px auto;gap:7px;padding:12px 8px;min-height:94px}
.mood-label{font-size:12px;font-weight:600;line-height:1.3;color:#244b55;text-align:center}

/* Quiet ambient pools sit behind the brand, independent of its silhouette. */
.logo-glow{position:relative;isolation:isolate;filter:none;overflow:visible}
.logo-glow::before{content:'';position:absolute;z-index:-1;inset:-14px -20px;pointer-events:none;background:radial-gradient(ellipse at center,#ffffff70 0%,#ffffff45 40%,#ffffff18 65%,transparent 82%);filter:blur(5px)}
header .logo-glow .wordmark{filter:url(#artwork-palette) url(#brand-outline)}
.companion-name{isolation:isolate;-webkit-text-stroke:.35px #19333ccc;paint-order:stroke fill;text-shadow:none}
.companion-name::before{content:'';position:absolute;z-index:-1;left:50%;top:50%;width:140px;height:58px;transform:translate(-50%,-50%);pointer-events:none;background:radial-gradient(ellipse at center,#ffffff70 0%,#ffffff40 40%,#ffffff14 65%,transparent 82%);filter:blur(5px)}

/* Logo-only contrast treatment: cream edge over a feathered light backdrop. */
header .logo-glow .wordmark{filter:url(#artwork-palette) url(#logo-cream-outline)}
.logo-glow::before{inset:-12px -18px;background:radial-gradient(ellipse at center,#ffffffc7 0%,#ffffff99 42%,#ffffff33 70%,transparent 100%);filter:blur(6px)}

/* Cream borders alone; no ambient glow behind the logo or name. */
.logo-glow{filter:none}
.logo-glow::before,.companion-name::before{content:none;display:none}
.companion-name{-webkit-text-stroke:.75px #fffbee;paint-order:stroke fill;text-shadow:none;filter:none}

/* Matching crisp cream edges for cycle and menu artwork, without glow. */
#cycle-art,.quick-actions button img{filter:url(#artwork-palette) url(#logo-cream-outline)}
.quick-actions button::before{box-shadow:0 0 0 .75px #fffbee,inset 0 0 0 .75px #fffbee}
#marker{filter:url(#logo-cream-outline)}

/* App surfaces behave like controls, without long-press text/image selection. */
html,body,body *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea,[contenteditable="true"]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
img,svg{-webkit-user-drag:none}

/* A milky mood pill remains legible over detailed backgrounds. */
.app .mood-button{background:rgba(255,255,255,.92);border-color:rgba(255,255,255,.96)}

/* Expandable check-in categories keep the full catalogue manageable on a phone. */
.symptom-category{border-bottom:1px solid var(--line);padding:14px 0}
.symptom-category summary{cursor:pointer;font-weight:600;min-height:32px;padding:5px 0;color:var(--ink)}
.symptom-category .chips{margin:12px 0 4px;gap:8px}
.symptom-category .chip{min-height:44px;padding:10px 14px;line-height:1.4}
.symptom-category label{margin-top:16px}

.family-button{position:fixed;bottom:max(12px,env(safe-area-inset-bottom));right:14px;z-index:5;max-width:45vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#fffffff0;border:1px solid #b3c9cc;border-radius:24px;padding:7px 12px;font-size:11px;color:#244b55}
.family-list{display:grid;gap:12px;margin:20px 0}.family-card{border:1px solid var(--line);border-radius:16px;padding:14px;display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}.family-card strong,.family-card span{display:block}.family-card span{font-size:12px;color:#657c83}.family-card .secondary{min-height:40px;padding:8px 12px;margin:0}.family-check{display:flex;align-items:center;gap:12px;padding:8px 0;font-size:13px}.family-check input{width:20px;height:20px;flex-shrink:0;accent-color:#226f7b}#sheet-content>.secondary{display:block;margin-top:12px}#invite-code,#accept-code{font-family:monospace;font-size:14px;overflow-wrap:anywhere}.family-readonly [data-open="customize"],.family-readonly #mood-button{pointer-events:none;opacity:.55}.family-readonly #day-period,.family-readonly #next-log,.family-readonly #settings-form{display:none}

.family-locked .app{visibility:hidden}

.customize-sticky{position:sticky;top:0;z-index:4;background:white;padding:0 0 12px}.customize-sticky select{margin:0;width:100%;min-height:44px}.friend-choice{display:grid;gap:12px;justify-items:center;background:#eef7f7;border:1px solid #226f7b;border-radius:20px;padding:18px;margin:16px 0;width:100%;font-weight:600}.friend-choice img{width:180px;height:180px;object-fit:contain}

.customize-sheet .sheet-head{position:sticky;top:-12px;height:56px;margin:0;z-index:6;background:white}.customize-sheet .customize-sticky{top:44px;padding-top:8px}

/* Profile identity replaces the header wordmark; the symbol anchors the lower left. */
header .family-button{position:static;inset:auto;z-index:auto;display:block;max-width:210px;padding:8px 0;margin:0;background:none;border:0;border-radius:0;overflow:hidden;text-overflow:ellipsis;text-align:left;color:var(--art-primary,#087e90);font-family:Georgia,'Times New Roman',serif;font-style:italic;font-weight:600;font-size:25px;line-height:1.25;-webkit-text-stroke:.75px #fffbee;paint-order:stroke fill;text-shadow:none;filter:none}


/* A faint, palette-matched symbol sits inside the cycle, behind the menu controls. */
.cycle-assembly>.cycle-watermark{position:absolute;inset:9%;display:block;width:82%;height:82%;object-fit:contain;opacity:.14;z-index:-1;pointer-events:none;filter:url(#artwork-palette)}
/* Profile and mood controls share the same milky pill treatment. */
header .family-button{height:44px;min-height:44px;max-width:210px;padding:8px 16px;background:rgba(255,255,255,.92);border:1px solid rgba(255,255,255,.96);border-radius:26px;font-family:'DM Sans',system-ui,sans-serif;font-style:normal;font-weight:600;font-size:17px;line-height:1.3;-webkit-text-stroke:0;paint-order:normal;text-shadow:none;box-shadow:0 2px 6px #247d8c20;color:var(--art-primary,#087e90)}

/* Keep both header pills equal regardless of their text or emoji metrics. */
header .mood-button{height:44px;min-height:44px}

/* Equipped choices carry a consistent green corner check. */
.background-choice,.friend-choice{position:relative}
.background-choice.selected::after,.friend-choice.selected::after{content:'✓';position:absolute;top:8px;right:8px;width:24px;height:24px;display:grid;place-items:center;border-radius:50%;background:#238847;color:white;font:700 16px/1 system-ui,sans-serif;box-shadow:0 0 0 2px white;pointer-events:none}

.family-device #parent-dashboard{display:none}.family-device #family-button{pointer-events:none;cursor:default}#child-device-code,#device-code{font-family:monospace;font-size:16px;letter-spacing:1px}

/* Friend artwork retains its original colors and fits the established stage. */
.app .fluff-stage img{mix-blend-mode:normal}
.friend-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.friend-gallery .friend-choice{margin:0;padding:12px 8px;width:100%;font-size:13px}
.friend-gallery .friend-choice img{width:100%;height:auto;aspect-ratio:1;object-fit:contain}

/* Silent heart burst reused from Hatchling Habits DragonLoveBurst. */
.dragon-love-burst {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 52%;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.dragon-love-burst i {
  position: absolute;
  left: 0;
  top: 0;
  color: #ff72ba;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  opacity: 0;
  text-shadow:
    0 0 4px #fff,
    0 0 10px #ff7fc8,
    0 0 17px #e94ca8;
  animation: dragon-love-pop 1s cubic-bezier(0.12, 0.72, 0.2, 1)
    var(--love-delay) forwards;
}
.dragon-love-burst i.love-heart {
  animation-name: dragon-love-heart-upright;
}
.dragon-love-burst i:nth-child(5n + 1) {
  color: #ffb4dc;
  font-size: 27px;
}
.dragon-love-burst i:nth-child(5n + 2) {
  color: #ff4fa5;
  font-size: 23px;
}
.dragon-love-burst i:nth-child(5n + 3) {
  color: #ffe0f1;
  font-size: 17px;
}
.dragon-love-burst i:nth-child(5n + 4) {
  color: #fff1a8;
  font-size: 13px;
}
@keyframes dragon-love-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.1) rotate(0);
  }
  10% {
    opacity: 1;
  }
  45% {
    opacity: 1;
    transform: translate(
        calc(-50% + var(--love-mid-x)),
        calc(-50% + var(--love-mid-y))
      )
      scale(1.25) rotate(calc(var(--love-turn) * 0.42));
  }
  78% {
    opacity: 0.92;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--love-x)), calc(-50% + var(--love-y)))
      scale(0.35) rotate(var(--love-turn));
  }
}
@keyframes dragon-love-heart-upright {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.1);
  }
  10% {
    opacity: 1;
  }
  45% {
    opacity: 1;
    transform: translate(
        calc(-50% + var(--love-mid-x)),
        calc(-50% + var(--love-mid-y))
      )
      scale(1.25);
  }
  78% {
    opacity: 0.92;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--love-x)), calc(-50% + var(--love-y)))
      scale(0.35);
  }
}
@media (prefers-reduced-motion: reduce) {
  .dragon-love-burst i {
    animation-duration: 0.22s;
    animation-delay: 0s;
  }
}


.friend-reactions{position:absolute;inset:0;z-index:8;pointer-events:none;overflow:visible}
#character{cursor:pointer;touch-action:manipulation}
#character:focus-visible{outline:2px solid var(--accent-dark);outline-offset:4px;border-radius:24px}
.friend-lightning{position:absolute;width:1px;height:1px}
.friend-lightning-bolt{position:absolute;left:0;top:0;width:10px;height:29px;opacity:0;filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 4px #8fdbff) drop-shadow(0 0 7px #67c9ff);animation:friend-lightning-burst .62s cubic-bezier(.15,.7,.25,1) var(--bolt-delay) both}
.friend-lightning-bolt svg{width:100%;height:100%;overflow:visible;fill:none;stroke:none}
.friend-lightning-bolt .lightning-shape{fill:#c6f1ff;stroke:#f4fcff;stroke-width:.6;stroke-linejoin:round}
.lightning-sparks{fill:#fff;stroke:#dbf7ff;stroke-width:1;stroke-linecap:round;animation:lightning-sparkle .48s steps(1,end) var(--bolt-delay) both}
@keyframes friend-lightning-burst{0%{opacity:0;transform:translate(-50%,-50%) rotate(var(--bolt-angle)) scale(.1,.3)}10%{opacity:1}19%{opacity:.4}27%{opacity:1;transform:translate(calc(-50% + var(--bolt-x)*.65),calc(-50% + var(--bolt-y)*.65)) rotate(var(--bolt-angle)) scale(.85,1.25)}38%{opacity:.5}45%{opacity:1}62%{opacity:.75;transform:translate(calc(-50% + var(--bolt-x)),calc(-50% + var(--bolt-y))) rotate(var(--bolt-angle)) scale(1,1)}100%{opacity:0;transform:translate(calc(-50% + var(--bolt-x)*1.12),calc(-50% + var(--bolt-y)*1.12)) rotate(var(--bolt-angle)) scale(.25,.55)}}
@keyframes lightning-sparkle{0%,18%,43%,72%,100%{opacity:0}8%,29%,56%{opacity:1}}
.friend-rain{position:absolute;width:8px;height:14px;opacity:0;animation:friend-rain-fall var(--rain-duration,.75s) ease-in var(--rain-delay) forwards;filter:drop-shadow(0 1px 1px #ffffff90)}
.friend-rain svg{display:block;width:100%;height:100%;fill:#71c6e5;stroke:#e9faff;stroke-width:.8}
@keyframes friend-rain-fall{0%{opacity:0;transform:translateY(0)}12%{opacity:.9}99%{opacity:.9}100%{opacity:0;transform:translateY(var(--rain-fall))}}
.friend-rain-splash{position:absolute;width:1px;height:1px}
.splash-particle{position:absolute;left:0;top:0;width:3px;height:4px;border-radius:50%;background:#b8ecff;box-shadow:0 0 2px #e5faff;opacity:0;animation:friend-splash-burst .3s ease-out var(--splash-delay) both}
.splash-sparkle{width:5px;height:5px;border-radius:0;background:#f3fdff;clip-path:polygon(50% 0,63% 37%,100% 50%,63% 63%,50% 100%,37% 63%,0 50%,37% 37%)}
@keyframes friend-splash-burst{0%{opacity:0;transform:translate(-50%,-50%) scale(.15)}15%{opacity:1}62%{opacity:1;transform:translate(calc(-50% + var(--splash-x)*.75),calc(-50% + var(--splash-y))) scale(1)}100%{opacity:0;transform:translate(calc(-50% + var(--splash-x)),calc(-50% + var(--splash-y) + 5px)) scale(.15)}}
.match-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:22px}.match-actions button{width:auto;min-width:100px;margin:0}
@media(prefers-reduced-motion:reduce){.friend-reactions i,.friend-reactions .friend-rain,.splash-particle,.friend-lightning-bolt,.lightning-sparks{animation-duration:.22s!important;animation-delay:0s!important}.friend-rain{--rain-fall:12px!important}}
/* Main-screen entrance grows around the final ring center, without reflow. */
.cycle-assembly{position:absolute;inset:0;isolation:isolate;transform-origin:50% 50%}
.scene-enter .cycle-assembly{will-change:transform,opacity;animation:cycle-arrive 1.05s cubic-bezier(.2,.65,.3,1) both}
.scene-enter .quick-actions button{animation:menu-arrive .32s cubic-bezier(.18,.9,.32,1.25) both;animation-delay:var(--entry-delay)}
.scene-enter .quick-actions button:nth-child(1){--entry-delay:1.10s}
.scene-enter .quick-actions button:nth-child(2){--entry-delay:1.24s}
.scene-enter .quick-actions button:nth-child(4){--entry-delay:1.38s}
.scene-enter .quick-actions button:nth-child(6){--entry-delay:1.52s}
.scene-enter .quick-actions button:nth-child(5){--entry-delay:1.66s}
.scene-enter .quick-actions button:nth-child(3){--entry-delay:1.80s}
@keyframes cycle-arrive{from{opacity:0;transform:translateZ(0) scale(.015) rotate(-300deg)}to{opacity:1;transform:translateZ(0) scale(1) rotate(0)}}
@keyframes menu-arrive{0%{opacity:0;transform:translate(-50%,-50%) scale(.25)}80%{opacity:1;transform:translate(-50%,-50%) scale(1.08)}100%{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@media(prefers-reduced-motion:reduce){.scene-enter .cycle-assembly,.scene-enter .quick-actions button{animation:none!important}}
/* Individual motion properties preserve the friend's established artwork scale. */
.scene-enter #character,#character.friend-enter{animation:friend-settle .78s ease-in-out both}
@keyframes friend-settle{
  0%{opacity:0;translate:0 -9px;rotate:-3deg}
  22%{opacity:1;translate:0 1px;rotate:3.5deg}
  45%{translate:0 -2px;rotate:-2deg}
  67%{translate:0 0;rotate:1deg}
  84%{rotate:-.4deg}
  100%{opacity:1;translate:0 0;rotate:0deg}
}
@media(prefers-reduced-motion:reduce){.scene-enter #character,#character.friend-enter{animation:none!important}}

/* Keep profile and mood pills just inside the portrait scene edges. */
.app header{padding-left:2px;padding-right:2px}

/* Fit the new upload’s transparent margins to the unchanged flower track. */
#cycle-art{inset:-4.0225%;width:108.045%;height:108.045%}
#marker{filter:none}

.symptom-checklist{display:grid;gap:0;margin-top:12px}.symptom-item{padding:12px 0;border-bottom:1px solid var(--line,#dce8e9)}.symptom-item:last-child{border:0}.symptom-item-head{display:flex;gap:12px;align-items:center;justify-content:space-between}.symptom-check{display:flex;align-items:center;gap:10px;margin:0;flex:1;font-weight:500}.symptom-check input{width:21px;height:21px;flex:0 0 21px;padding:0;accent-color:var(--art-primary,#087e90)}.symptom-graph{width:36px;min-height:36px;padding:7px;background:#eef7f7;color:#226f7b;border:1px solid #d4e4e5;border-radius:10px;flex-shrink:0}.symptom-graph svg{width:20px;height:20px;display:block}.symptom-graph:disabled{opacity:.3;cursor:default}.symptom-slider{display:flex;align-items:center;gap:9px;margin:7px 0 0 31px;font-size:12px;color:#657c83}.symptom-slider input[type=range]{width:100%;flex:1;min-width:0;padding:0;height:30px;accent-color:var(--art-primary,#087e90);touch-action:pan-y}.symptom-slider input:disabled{opacity:.3}.symptom-slider output{min-width:36px;text-align:right;font-variant-numeric:tabular-nums}#symptom-chart{width:min(94vw,620px);max-height:85dvh;padding:22px;border-radius:24px;overflow-y:auto}#symptom-chart::backdrop{background:#12343e65}.symptom-chart-layout{display:flex;gap:6px}.symptom-y-axis{width:18px;flex:0 0 18px;display:flex;flex-direction:column;justify-content:space-between;height:144px;margin-top:28px;font-size:12px;text-align:right;color:#45636a}.symptom-chart-scroll{overflow-x:auto;overflow-y:hidden;touch-action:pan-x;overscroll-behavior-x:contain;min-width:0;flex:1;-webkit-overflow-scrolling:touch}.symptom-chart-scroll svg{display:block;max-width:none;touch-action:pan-x}.symptom-chart-scroll text{font:11px system-ui;fill:#45636a}.symptom-chart-scroll .chart-year{font-size:9px}.chart-period-key{font-size:11px;color:#657c83;display:flex;gap:7px;align-items:center}.chart-period-key span{background:#f6b5cd;width:13px;height:13px;flex-shrink:0;border-radius:3px}.chart-values{font-size:13px;margin-top:16px}.chart-values li{padding:4px 0}

/* Check-in controls stay above an independently scrolling symptom list. */
#sheet.checkin-sheet[open]{display:flex;flex-direction:column;height:85svh;overflow:hidden}#sheet.checkin-sheet>.sheet-handle,#sheet.checkin-sheet>.sheet-head{flex-shrink:0}#sheet.checkin-sheet #sheet-content{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.checkin-fixed{flex-shrink:0;padding:0 0 14px;border-bottom:1px solid #d4e4e5;gap:12px;background:white}.checkin-fixed .checkin-save{margin:0;padding:10px 24px;min-height:44px;width:auto}.checkin-fixed input{min-width:0;max-width:175px;flex:0 1 175px}.checkin-scroll{overflow-y:auto;min-height:0;flex:1;touch-action:pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:10px}
/* Explicit plot sizing overrides the app's 24px icon SVG rule. */
#symptom-chart{touch-action:pan-x pan-y}#symptom-chart-content{min-width:0}.symptom-chart-window{font-size:11px;color:#657c83;margin:4px 0 16px}.symptom-chart-layout{gap:0}.symptom-y-axis{position:relative;height:200px;width:24px;flex:0 0 24px;border-right:1px solid #244b55;margin:0;display:block}.symptom-y-axis span{position:absolute;right:7px;transform:translateY(-50%);line-height:14px;font-size:12px}.symptom-chart-scroll{padding:0;touch-action:pan-x}.symptom-chart-canvas{min-width:100%}.symptom-chart-scroll svg.symptom-dot-plot{width:100%;height:200px;max-width:none;display:block;stroke-width:0;overflow:visible}.symptom-date-grid{display:grid;grid-template-columns:repeat(var(--chart-days),minmax(0,1fr));height:24px}.symptom-date-cell{font-size:7px;line-height:24px;text-align:center;white-space:nowrap;color:#45636a;border-right:1px solid #e6eeee}.symptom-date-cell.symptom-period-band{background:#f6b5cd}

.phase-list>div.current-cycle-phase{position:relative;border:2px solid var(--art-primary,#087e90)!important;border-radius:16px;padding:14px 18px;margin-top:12px;margin-bottom:12px}.phase-indicator-flower{position:absolute;right:-10px;top:-16px;width:38px;height:38px;object-fit:contain;filter:none;pointer-events:none}

.profile-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0 22px}.profile-character-card{position:relative;border:1px solid #d4e4e5;border-radius:20px;background:#f8fcfc;overflow:hidden;min-width:0}.profile-card-open{display:flex;flex-direction:column;text-align:left;width:100%;height:100%;padding:16px 12px 26px;background:transparent}.profile-card-heading{padding-right:28px;min-height:48px;max-width:100%}.profile-card-heading strong{display:block;font-size:17px;overflow-wrap:anywhere}.profile-card-heading span{display:block;font-size:12px;color:#657c83;margin-top:3px}.profile-card-open img{display:block;width:100%;aspect-ratio:1;object-fit:contain;margin-top:10px}.profile-card-share,.profile-card-edit{position:absolute;width:36px;height:36px;display:grid;place-items:center;border-radius:50%;background:#ffffffd9;color:#226f7b;padding:8px}.profile-card-share{right:6px;top:7px}.profile-card-edit{right:6px;bottom:6px}.profile-card-share svg,.profile-card-edit svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6}.share-recipient{border:1px solid #d4e4e5;border-radius:16px;padding:14px;margin:12px 0}.share-recipient summary{font-size:13px;font-weight:600;overflow-wrap:anywhere}.share-checklist{margin:12px 0}.share-checklist .family-check{margin:0}.quick-actions button[hidden]{display:none!important}.family-hide-phase #marker,.family-hide-phase #ring-phase-targets{display:none!important}

.share-recipient-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;font-weight:600}.share-recipient-heading>span{min-width:0;overflow-wrap:anywhere}.share-recipient-edit{flex:none;display:grid;place-items:center;width:32px;height:32px;padding:7px;border-radius:50%;background:#edf6f6;color:#226f7b}.share-recipient-edit svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6}
#marker image,.phase-indicator-flower{filter:drop-shadow(.5px 0 0 #fff) drop-shadow(-.5px 0 0 #fff) drop-shadow(0 .5px 0 #fff) drop-shadow(0 -.5px 0 #fff)}

.quick-actions button[data-open="bleeding"]{left:50%;top:51%;width:21%}.scene-enter .quick-actions button[data-open="bleeding"]{--entry-delay:1.94s}.bleeding-confirm,.bleeding-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}.bleeding-confirm button,.bleeding-options button{margin:0;min-height:50px}.calendar-grid .day.spotting{border:1px solid #e580a2;background:transparent;color:var(--ink)}.symptom-date-cell.symptom-spotting-day{border:1px solid #e580a2;background:transparent;box-sizing:border-box}

/* Floating dialogs share the selected artwork palette; bleeding markers retain their pink. */
dialog{
 --accent:var(--art-primary,#087e90);--accent-dark:var(--art-primary,#087e90);
 --ink:color-mix(in srgb,var(--art-primary,#087e90) 42%,#17212a);
 --muted:color-mix(in srgb,var(--art-primary,#087e90) 28%,#6e747a);
 --bg:color-mix(in srgb,var(--art-primary,#087e90) 6%,white);
 --tint:color-mix(in srgb,var(--art-primary,#087e90) 11%,white);
 --line:color-mix(in srgb,var(--art-primary,#087e90) 22%,white);
 inset:0;margin:auto;width:min(94vw,465px);max-width:calc(100vw - 24px);
 height:fit-content;max-height:calc(100dvh - 40px);border-radius:24px;padding:22px;
 color:var(--ink);box-shadow:0 18px 70px #14212a35;
}
dialog[open]{animation:modal-appear .16s ease-out}
dialog .sheet-handle{display:none}
dialog .primary{background:var(--art-primary,#087e90);color:var(--art-button-ink,#fff)}
dialog .secondary,dialog .chip,dialog .mood-choice,dialog .friend-choice,dialog .symptom-graph,dialog .share-recipient-edit{background:var(--bg);color:var(--accent-dark);border-color:var(--line)}
dialog .close{background:var(--tint);color:var(--accent-dark)}
dialog input,dialog textarea,dialog select{background:var(--bg);color:var(--ink);border-color:var(--line);accent-color:var(--art-primary,#087e90)}
dialog .info-box,dialog .profile-character-card,dialog .background-choice{background:var(--bg);border-color:var(--line)}
dialog .mood-choice.selected,dialog .chip.selected,dialog .background-choice.selected,dialog .friend-choice.selected{background:var(--tint);border-color:var(--art-primary,#087e90)}
dialog .profile-card-share,dialog .profile-card-edit{background:white;color:var(--art-primary,#087e90)}
dialog .share-recipient,dialog .checkin-fixed{border-color:var(--line)}
dialog .small-note,dialog .intro,dialog .family-card span,dialog .profile-card-heading span,dialog .symptom-slider,dialog .symptom-y-axis{color:var(--muted)}
dialog .delete{color:var(--accent-dark)}
dialog .phase-list>div:not(:first-child){border-color:var(--art-primary,#087e90)!important}
dialog.customize-sheet .sheet-head{top:0;background:white}
dialog.customize-sheet .customize-sticky{top:56px}
dialog .day.active:not(.spotting):not(.period){color:var(--art-button-ink,#fff)}
@keyframes modal-appear{from{opacity:0;transform:scale(.98)}to{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){dialog[open]{animation:none}}

dialog .family-check input{accent-color:var(--art-primary,#087e90)}
dialog .calendar-grid .day.period{background:#f5dcea;color:#a94a6b}
dialog .calendar-grid .day.period.active{box-shadow:inset 0 0 0 1px #a94a6b}

/* Native-resolution cream outline is baked after palette recoloring. */
#marker image,.phase-indicator-flower{filter:none}
.phase-indicator-flower{width:calc(38px * var(--plumeria-canvas-scale,1));height:calc(38px * var(--plumeria-canvas-scale,1));right:calc(-10px - 19px * (var(--plumeria-canvas-scale,1) - 1));top:calc(-16px - 19px * (var(--plumeria-canvas-scale,1) - 1))}

/* Keep customization art inside its own viewport, below the fixed controls. */
#sheet.customize-sheet[open]{display:flex;flex-direction:column;height:calc(100dvh - 40px);overflow:hidden;padding-bottom:30px}
#sheet.customize-sheet>.sheet-head{position:relative;top:auto;flex-shrink:0;background:white;z-index:6;margin-bottom:12px}
#sheet.customize-sheet #sheet-content{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
#sheet.customize-sheet .customize-sticky{position:relative;top:auto;flex-shrink:0;background:white;padding:0 0 12px;z-index:4}
#sheet.customize-sheet #customize-backgrounds,#sheet.customize-sheet #customize-friends{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:16px}
#sheet.customize-sheet [hidden]{display:none!important}

/* Native browser chrome follows the selected scene’s top edge. */
html,body{background-color:var(--status-bar-color,var(--bg))}

.device-profile-card{display:flex;align-items:center;gap:18px;padding:14px 18px;margin:4px 0 22px;border:2px solid var(--accent-dark);background:var(--tint);border-radius:20px}.device-profile-card img{width:112px;height:112px;object-fit:contain}.device-profile-card span{display:block;font-size:10px;letter-spacing:1.5px;color:var(--muted)}.device-profile-card strong{display:block;font-size:24px;line-height:1.25;overflow-wrap:anywhere}.device-profile-card>div{min-width:0}#family-button:disabled{opacity:1;cursor:default}

.profile-send-phone{position:relative;z-index:2;margin:0 12px 12px!important;width:calc(100% - 24px);font-size:13px;padding:10px!important}.device-install-help{margin:18px 0;line-height:1.6}.device-install-help summary{font-weight:600;cursor:pointer}.row-buttons a.secondary{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;text-align:center}#device-link-error{color:#a02640;line-height:1.5}
.profile-character-card{display:flex;flex-direction:column}.profile-card-open{height:auto;flex:1}.profile-send-phone{margin-right:48px!important;width:calc(100% - 60px);min-height:44px;line-height:1.3}
.settings-hub{display:grid;gap:12px;margin-top:18px}.settings-hub-card{border:1.5px solid var(--line);border-radius:20px;background:var(--tint);overflow:hidden}.settings-hub-card>summary{display:flex;align-items:center;gap:13px;padding:18px 14px;list-style:none;cursor:pointer}.settings-hub-card>summary::-webkit-details-marker{display:none}.settings-hub-icon{display:grid;place-items:center;flex:0 0 44px;width:44px;height:48px;font-size:25px;background:var(--surface);border:1px solid var(--line);border-radius:14px}.settings-hub-card strong{display:block;font-size:19px;line-height:1.25}.settings-hub-card small{display:block;font-size:12px;line-height:1.4;margin-top:5px;color:var(--muted)}.settings-hub-chevron{margin-left:auto;font-size:24px;color:var(--accent-dark)}.settings-hub-card[open] .settings-hub-chevron{transform:rotate(180deg)}.settings-hub-content{padding:0 14px 14px}.settings-hub-content button{width:100%;margin:6px 0}.settings-share-profile{border-top:1px solid var(--line);padding:12px 0}.settings-share-profile .device-profile-card{padding:8px;margin-bottom:8px;gap:10px}.settings-share-profile .device-profile-card img{width:70px;height:70px}.settings-share-profile .device-profile-card strong{font-size:19px}.settings-share-profile .row-buttons{flex-wrap:wrap}.settings-profiles{margin:0!important}

.settings-sharing-divider{border:0;border-top:1px solid var(--line);margin:18px 0 14px}.child-send-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}.child-send-options a{min-height:46px}
.profile-card-heading{padding-right:0}.profile-card-tools{display:flex;justify-content:flex-end;gap:6px;padding:0 9px 10px}.profile-card-tools button{display:grid;place-items:center;width:36px!important;min-height:36px;padding:8px!important;margin:0!important;border:1px solid var(--line);border-radius:50%;color:var(--accent-dark);background:var(--surface)}.profile-card-tools svg{width:18px;height:18px;stroke-width:1.8}.profile-delete-choices{display:grid;grid-template-columns:1fr 1.5fr;gap:12px;align-items:center}.profile-delete-choices button{margin:0}#delete-profile-yes{background:transparent;border:1px solid var(--line);font-size:14px}.settings-share-profile .profile-card-open{padding-bottom:10px}

/* Keep mood feedback visible with Reduce Motion: short fades, no travel.
   The site's older universal animation:none!important otherwise hides every
   particle permanently because their resting opacity is zero. */
@media(prefers-reduced-motion:reduce){
 .friend-reactions .dragon-love-burst i,
 .friend-reactions .friend-rain,
 .friend-reactions .splash-particle,
 .friend-reactions .friend-lightning-bolt,
 .friend-reactions .lightning-sparks{animation-name:friend-feedback-fade!important;animation-duration:.45s!important;animation-timing-function:linear!important;animation-fill-mode:both!important}
 .friend-reactions .dragon-love-burst i{transform:translate(calc(-50% + var(--love-mid-x)),calc(-50% + var(--love-mid-y)))}
 .friend-reactions .friend-lightning-bolt{transform:translate(calc(-50% + var(--bolt-x)*.65),calc(-50% + var(--bolt-y)*.65)) rotate(var(--bolt-angle))}
 .friend-reactions .splash-particle{transform:translate(var(--splash-x),var(--splash-y))}
}
@keyframes friend-feedback-fade{0%,100%{opacity:0}20%,70%{opacity:1}}

/* A received profile is read-only without fading its current mood indicator. */
.family-readonly .app #mood-button{opacity:1;background:rgba(255,255,255,.96);border-color:white;cursor:default}
.family-readonly #mood-button .chevron{display:none}
.quick-actions button[hidden]{display:none!important}

/* Furious: a hot flash, expanding shockwave and flying embers. */
.friend-explosion,.friend-anxiety{position:absolute;width:1px;height:1px}
.explosion-flash{position:absolute;width:100px;height:100px;left:-50px;top:-50px;background:radial-gradient(circle,#fffbea 0 15%,#ffe766 28%,#ffe43b 49%,#ffe43b00 72%);animation:explosion-flash .65s ease-out both}
.explosion-ring{position:absolute;left:-25px;top:-25px;width:50px;height:50px;border:5px solid #ffcf58;border-radius:50%;box-shadow:0 0 16px #ffe65a;animation:explosion-shockwave .8s ease-out both}
.explosion-ember{position:absolute;width:3px;height:3px;border-radius:50%;background:#fffde1;box-shadow:0 0 3px #fffbe0,0 0 7px #ffe94a,0 0 12px #ffe12c}
.explosion-ember:nth-child(3n){width:2px;height:2px;background:#fffac0}
@keyframes explosion-flash{0%{opacity:0;transform:scale(.12)}9%{opacity:1}35%{opacity:.9;transform:scale(1.45)}100%{opacity:0;transform:scale(2)}}
@keyframes explosion-shockwave{0%{opacity:1;transform:scale(.15)}100%{opacity:0;transform:scale(4.8);border-width:1px}}
@keyframes explosion-ember{0%{opacity:1;transform:translate(-50%,-50%) scale(.2)}20%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--fx-x)),calc(-50% + var(--fx-y))) rotate(var(--fx-angle)) scale(.15)}}
/* Anxiety: short yellow rays repeatedly dart outward around the head. */
.anxiety-ray{position:absolute;width:21px;height:3px;border-radius:3px;background:#ffdc32;box-shadow:0 0 2px #fff9d0,0 0 4px #e7b600;animation:anxiety-ray .31s ease-out var(--fx-delay) 4 both}
@keyframes anxiety-ray{0%{opacity:0;transform:translate(calc(-50% + var(--ray-start-x)),calc(-50% + var(--ray-start-y))) rotate(var(--fx-angle)) scaleX(.4)}15%{opacity:1}70%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--fx-x)),calc(-50% + var(--fx-y))) rotate(var(--fx-angle)) scaleX(.8)}}

.explosion-cloud{position:absolute;left:-29px;top:-29px;width:58px;height:58px;border-radius:48%;background:radial-gradient(circle at 35% 30%,#fff5db 0%,#e8cfb3 45%,#aa958e 80%);box-shadow:12px 4px 0 -6px #d4bba5,-10px 8px 0 -5px #ead8c0;animation:explosion-cloud 1.35s ease-out var(--cloud-delay) both}
@keyframes explosion-cloud{0%{opacity:0;transform:scale(.1)}12%{opacity:.88}40%{opacity:.7;transform:translate(var(--cloud-x),var(--cloud-y)) scale(1.1)}100%{opacity:0;transform:translate(calc(var(--cloud-x)*1.35),calc(var(--cloud-y) - 20px)) scale(1.4)}}
.explosion-spark{position:absolute;width:3px;height:3px;border-radius:50%;background:#fffef0;box-shadow:0 0 3px #fff,0 0 7px #fff065,0 0 13px #ffe22d}
.explosion-spark::before,.explosion-ember::before{content:"";position:absolute;right:50%;top:50%;width:18px;height:1.5px;transform:translateY(-50%);border-radius:100%;background:linear-gradient(90deg,#ffed4400,#ffe93d88,#fffbdc);box-shadow:0 0 3px #ffe23c88}
.explosion-ember::before{width:11px;height:1px}
/* Ballistic flight: outward velocity plus increasing gravity, with tumbling embers. */
.explosion-spark,.explosion-ember{animation:explosion-firework 1.35s linear var(--fx-delay) both}
.explosion-spark::after,.explosion-ember::after{content:"";position:absolute;left:50%;top:50%;width:7px;height:7px;background:#fffde6;clip-path:polygon(50% 0,60% 38%,100% 50%,60% 60%,50% 100%,40% 60%,0 50%,40% 38%);filter:drop-shadow(0 0 4px #fff0a0);animation:explosion-twinkle .17s steps(2,end) var(--fx-delay) 8 alternate both}
.explosion-spark:nth-child(2n)::after,.explosion-ember:nth-child(2n)::after{animation-duration:.23s;width:5px;height:5px}
@keyframes explosion-twinkle{0%{opacity:.15;transform:translate(-50%,-50%) scale(.25) rotate(0deg)}100%{opacity:1;transform:translate(-50%,-50%) scale(1.1) rotate(90deg)}}
@keyframes explosion-firework{
0%{opacity:0;transform:translate(-50%,-50%) rotate(var(--fx-angle)) scale(.25)}
8%{opacity:1}
25%{opacity:1;transform:translate(calc(-50% + var(--fx-x)*.25),calc(-50% + var(--fx-y)*.25 + var(--fx-gravity)*.0625)) rotate(calc(var(--fx-angle) + var(--fx-spin)*.25)) scale(1)}
50%{opacity:.95;transform:translate(calc(-50% + var(--fx-x)*.5),calc(-50% + var(--fx-y)*.5 + var(--fx-gravity)*.25)) rotate(calc(var(--fx-angle) + var(--fx-spin)*.5)) scale(.8)}
75%{opacity:.7;transform:translate(calc(-50% + var(--fx-x)*.75),calc(-50% + var(--fx-y)*.75 + var(--fx-gravity)*.5625)) rotate(calc(var(--fx-angle) + var(--fx-spin)*.75)) scale(.5)}
100%{opacity:0;transform:translate(calc(-50% + var(--fx-x)),calc(-50% + var(--fx-y) + var(--fx-gravity))) rotate(calc(var(--fx-angle) + var(--fx-spin))) scale(.1)}
}

/* Relaxed: airy ribbons sweep in from the left, curl, then trail off right. */
.friend-breeze{position:absolute;pointer-events:none}
.friend-breeze svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 0 3px #d9fff8)}
.breeze-wisp{fill:none;stroke:#f2fffa;stroke-width:2.1;stroke-linecap:round;stroke-dasharray:40 1000;stroke-dashoffset:50;opacity:0;animation:friend-breeze-sweep 2.25s cubic-bezier(.35,.1,.25,1) both;vector-effect:non-scaling-stroke}
.breeze-wisp:nth-child(2){stroke:#c9eee2;stroke-width:1.3;animation-delay:.16s}
.breeze-wisp:nth-child(3){stroke:#fffdf0;stroke-width:1;animation-delay:.3s}
@keyframes friend-breeze-sweep{0%{stroke-dashoffset:50;opacity:0}12%{opacity:.8}65%{opacity:.85}87%{opacity:.55}100%{stroke-dashoffset:-1000;opacity:0}}

.breeze-plumeria{opacity:0;animation:breeze-flower-fade 2.25s linear both;filter:drop-shadow(0 0 1px #fff8ce)}
@keyframes breeze-flower-fade{0%{opacity:0}12%{opacity:.95}83%{opacity:.95}100%{opacity:0}}

.breeze-long-wisp{stroke:#f5fff5;stroke-width:1.4;stroke-dasharray:155 1000;animation-delay:.11s;animation-duration:2.48s}

.device-settings{margin:20px 0;padding:16px;border-radius:18px;background:var(--tint,#e2f5f5)}.device-toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0}.device-toggle input{width:24px;height:24px;flex:0 0 24px;accent-color:var(--accent-dark,#226f7b)}.device-settings input[type=time]{width:100%;min-height:44px}.device-settings [role=status]{font-size:.9rem;line-height:1.5}.device-settings button:disabled{opacity:.55}

/* Keep device settings compact; extra choices appear after opting in. */
.device-settings .device-toggle{margin:0;min-height:52px;gap:12px}
.device-settings .device-toggle input[role=switch]{appearance:none;-webkit-appearance:none;position:relative;width:44px!important;height:26px!important;min-height:0;padding:0;margin:0;flex:0 0 44px;border:0;border-radius:20px;background:#aaa;cursor:pointer}
.device-settings .device-toggle input[role=switch]::after{content:"";position:absolute;left:3px;top:3px;width:20px;height:20px;border-radius:50%;background:white;transition:transform .15s}
.device-settings .device-toggle input[role=switch]:checked{background:var(--accent-dark,#752286)}
.device-settings .device-toggle input[role=switch]:checked::after{transform:translateX(18px)}
.device-settings .device-toggle input[role=switch]:disabled{opacity:.45;cursor:default}
.device-settings .device-toggle input[role=switch]:focus-visible{outline:3px solid var(--accent-dark,#752286);outline-offset:3px}
.device-settings [hidden]{display:none!important}
.device-settings .device-time{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0}
.device-settings .device-time input[type=time]{width:auto;max-width:55%;min-height:42px;margin:0;padding:6px 10px}
.device-settings hr{margin:12px 0;border:0;border-top:1px solid #b99cbd}
.device-settings [role=status]:empty{display:none}
.device-settings .device-details{margin-top:4px}
.device-settings .device-details summary{font-size:.85rem;cursor:pointer}
.device-settings .device-details p{margin:10px 0}
.device-health-actions{display:flex;flex-wrap:wrap;gap:8px}

button.companion-name{pointer-events:auto;cursor:pointer;border:0;background:transparent;padding:0;margin:0;width:auto;min-height:36px;border-radius:8px}button.companion-name:disabled{opacity:1;cursor:default}button.companion-name:focus-visible{outline:2px solid var(--accent-dark);outline-offset:3px}

.settings-hub-content.device-settings{margin:0;border-radius:0;background:transparent;padding:4px 16px 18px}
/* Symptom reports */
.report-heading{display:flex;align-items:center;gap:12px;justify-content:space-between}.report-heading h3{margin:0}.chart-share.secondary{width:auto;flex-shrink:0;padding:9px 12px;margin:0;font-size:14px;min-height:40px}#symptom-chart .sheet-head h2{flex:1}#symptom-chart .sheet-head{gap:8px}.collective-symptoms{border-top:1px solid var(--line);padding-top:24px;margin-top:28px;padding-bottom:12px}.collective-plot{display:block;width:100%;height:auto;min-height:160px;background:#fffdfb;border-radius:12px}.report-legend{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.report-legend button{display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:12px;background:white;color:#244b55;padding:6px 8px;font-size:12px;min-height:34px}.report-legend button[aria-pressed=true]{outline:2px solid var(--art-primary,#087e90)}.report-legend span{width:9px;height:9px;border-radius:50%;flex-shrink:0}.report-range{width:min(92vw,440px);max-height:85dvh;border:0;border-radius:24px;padding:24px;color:var(--ink);background:white}.report-range .form-row>div{min-width:0}.report-range input{box-sizing:border-box;min-width:0;width:100%}.report-range .close{flex-shrink:0}.report-status:not(:empty){margin:16px 0}.family-readonly [data-report-share]{pointer-events:auto;opacity:1}
/* The tour sits in the browser's top layer, above open settings/check-in dialogs. */
#luna-tour-replay{position:fixed;right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));width:36px;height:36px;border-radius:50%;border:1px solid #ffffffa6;background:#ffffffd9;font-size:19px;z-index:50;padding:0;box-shadow:0 2px 8px #0002}.family-locked #luna-tour-replay,.app-loading #luna-tour-replay,body:has(dialog[open]:not(.luna-guided-tour)) #luna-tour-replay{visibility:hidden}.luna-guided-tour{position:fixed;inset:0;margin:0;padding:0;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;background:transparent;color:white;overflow:hidden;box-sizing:border-box}.luna-guided-tour::backdrop{background:#10252f65;backdrop-filter:none;-webkit-backdrop-filter:none}.tour-pointer{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.tour-highlight{fill:none;stroke:white;stroke-width:3;filter:drop-shadow(0 0 3px #0008)}.tour-arrow{fill:none;stroke:white;stroke-width:2.5}.tour-bubble{position:absolute;background:#fffdfb;color:#244b55;border-radius:20px;padding:18px;box-sizing:border-box;box-shadow:0 6px 30px #0003;text-align:left;pointer-events:none}.tour-bubble strong{font-size:19px}.tour-bubble p{font-size:16px;line-height:1.4;margin:8px 0 12px}.tour-bubble small{font-size:12px;opacity:.7}.tour-progress{position:absolute;top:max(12px,env(safe-area-inset-top));left:16px;right:105px;display:flex;flex-direction:column;gap:5px;align-items:flex-start;font:12px system-ui;color:white;text-shadow:0 1px 3px #000}.tour-dots{display:flex;flex-wrap:wrap;gap:4px;max-width:230px}.tour-dots i{width:5px;height:5px;border-radius:50%;background:#ffffff65}.tour-dots i.done{background:white}.tour-dots i.current{background:#ffde86;outline:2px solid #fff9}.tour-skip{position:absolute;top:max(8px,env(safe-area-inset-top));right:8px;border:1px solid #fff8;border-radius:20px;padding:8px 10px;background:#244b55;color:white;font-size:12px;z-index:2}.tour-plumeria-preview{position:absolute;top:0;left:calc(50% - 22px);width:44px;height:44px;object-fit:contain;pointer-events:none}

.main-welcoming #luna-tour-replay{visibility:hidden}

/* Tour controls and cards follow the same artwork palette as the menu icons. */
#luna-tour-replay{width:40px;height:40px;border:0;background:transparent;box-shadow:none;color:var(--art-primary,#087e90);display:grid;place-items:center}
#luna-tour-replay svg{width:36px;height:36px;filter:drop-shadow(0 1px 2px #17212a66)}
.tour-topbar{position:absolute;top:max(12px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:calc(100% - 32px);display:flex;flex-direction:column;align-items:center;gap:8px;z-index:3}
.tour-progress{position:static;display:flex;align-items:center;gap:6px;color:var(--art-primary,#087e90);text-shadow:0 1px 2px #fff;line-height:1.2}
.tour-dots{justify-content:center;max-width:100%;padding:5px 8px;border-radius:12px;background:#fffbeee8}
.tour-dots i{background:color-mix(in srgb,var(--art-primary,#087e90) 25%,white)}
.tour-dots i.done{background:var(--art-primary,#087e90)}
.tour-dots i.current{background:var(--art-primary,#087e90);outline:2px solid var(--art-primary,#087e90);outline-offset:1px}
.tour-actions{display:flex;align-items:center;justify-content:center;gap:8px}
.tour-skip,.tour-back{position:static;border:1px solid var(--art-primary,#087e90);border-radius:22px;padding:9px 14px;background:var(--art-primary,#087e90);color:var(--art-button-ink,#fff);font-size:13px;min-height:40px;box-shadow:0 1px 5px #0002}
.tour-back{width:40px;padding:0;font-size:21px}.tour-back:disabled{opacity:.45;cursor:default}
.tour-bubble{background:var(--tint);border:1px solid var(--line);color:var(--ink)}
.tour-bubble strong{color:var(--art-primary,#087e90)}
.tour-bubble small{color:var(--muted);opacity:1}
.tour-highlight,.tour-arrow{stroke:var(--tint,#e2f5f5);filter:none}

/* The original poster scales as one unit. No ring or text is repositioned. */
#sheet.phase-poster-sheet[open]{display:flex;flex-direction:column;width:min(96vw,600px);height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 16px);max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 16px);padding:10px 12px 12px;overflow:hidden;background:white}
#sheet.phase-poster-sheet .sheet-head{flex:0 0 auto;margin:0 0 4px;min-height:36px}
#sheet.phase-poster-sheet .sheet-head h2{font-size:22px;margin:0}
#sheet.phase-poster-sheet #sheet-content{display:flex;flex:1 1 0;min-height:0;overflow:hidden;align-items:center;justify-content:center}
.cycle-phase-poster{display:block;width:100%;height:100%;min-height:0;max-width:100%;max-height:100%;stroke:none;fill:none;flex:1 1 auto}
.cycle-phase-poster .phase-indicator-flower{position:static;width:82px;height:82px;filter:none;pointer-events:none}

.collective-symptoms .collective-plot{background:transparent;border-radius:0}

/* Full-bleed artwork is independent from the original safe-area composition. */
body{isolation:isolate}
body::before{content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;background-image:var(--scene-image,url('assets/backgrounds/shoreline-approved-fast.webp'));background-position:center center;background-size:cover;background-repeat:no-repeat;opacity:var(--scene-opacity,1)}
.app{top:var(--scene-center-y,50%);background:transparent}
.app::before{display:none}
html.luna-native .app header{top:0!important}

.date-detail-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px}.date-detail-heading h3{margin:0!important}.cycle-day-label{font-size:13px;font-weight:600;color:var(--accent-dark);white-space:nowrap}.next-period-summary{display:flex;align-items:center;justify-content:space-between;gap:18px}.current-cycle-day{display:flex;flex:0 0 auto;flex-direction:column;align-items:center;padding:6px 12px;border-left:1px solid var(--line);font-size:12px}.current-cycle-day strong{font-size:38px;font-weight:500;line-height:1.3}#marker{pointer-events:all;cursor:pointer;outline:none}#marker image{pointer-events:none}

.calendar-day-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:10px}.calendar-day-actions .secondary{width:100%;min-width:0;min-height:44px;margin:0;padding:10px 5px;font-size:12px;line-height:1.25}.calendar-period-choice{display:block;width:100%;margin:10px 0}

#sheet .checkin-fixed{justify-content:center}#sheet .checkin-fixed input{flex:0 1 190px;text-align:center;margin-inline:auto}.calendar-symptom-hint{font-size:10px;margin:8px 0 16px}.calendar-grid .day{touch-action:manipulation}

.day-symptom-list{padding-left:22px;margin:16px 0 24px}.day-symptom-list li{padding:10px 4px;border-bottom:1px solid var(--line);line-height:1.5}.day-symptom-list li::marker{color:var(--accent-dark)}.day-symptom-intensity{float:right;color:var(--muted);font-size:.9em;margin-left:14px}

.created-alert-row{padding:14px 0;border-bottom:1px solid var(--tint)}
.created-alert-row small{display:block;font-weight:400;margin-top:5px}
.created-alert-row .device-toggle{margin:0 0 8px}
.alert-suggestion-bank{margin:16px 0}
.alert-suggestion-bank button{display:block;margin:10px 0;width:100%;text-align:left}
#alert-editor select,#alert-editor input:not([type=checkbox]){width:100%;box-sizing:border-box}
#alert-suggestions .small-note{margin:12px 0}
.profile-header-controls{position:relative}
#home-alerts{position:absolute;top:calc(100% + 5px);left:4px;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #fff;border-radius:50%;background:#fffffff0;color:var(--art-primary,#087e90)}
.family-readonly #home-alerts{pointer-events:auto}
.alert-recipient-group h4{margin:16px 0 0}
.created-alert-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 0;border-bottom:1px solid var(--tint)}
.alert-row-edit{flex:1;min-width:0;text-align:left;padding:6px 0;background:none;border:0;color:inherit;overflow-wrap:anywhere}
.created-alert-row small{margin-top:2px}
.created-alert-row input{flex:none}
.alert-name-row,.alert-clock{display:flex;align-items:center;gap:8px}
.alert-name-row input{flex:1;min-width:0}
.alert-name-row button{flex:none;margin:0}
#alert-time-row{border:0;padding:0;margin:0;min-width:0}
#alert-editor #alert-time-row select{width:auto;min-width:0}
.alert-recipient-group summary{cursor:pointer;font-weight:700;padding:10px 0}
.device-settings .created-alert-row.device-toggle{padding:8px 0;margin:0;border-bottom:0}
.device-settings .created-alert-row+.created-alert-row{border-top:1px solid var(--line)}
.alert-picker-dialog{width:min(88vw,420px);max-height:min(68dvh,550px);padding:18px;border:1px solid var(--line);border-radius:22px;background:white;color:var(--ink);overflow:hidden}
.alert-picker-dialog[open]{display:flex;flex-direction:column;gap:10px}
.alert-picker-dialog::backdrop{background:#0005}
.alert-picker-dialog header{position:static;height:auto;padding:0;max-width:none;margin:0}
.alert-picker-dialog header h3{margin:0}
.alert-picker-dialog header button{margin:0}
.alert-picker-options{overflow:auto;overscroll-behavior:contain;min-height:0}
.alert-picker-options>button,.alert-picker-options details button{display:block;width:100%;margin:4px 0}
.alert-picker-options button[aria-pressed=true]{border-color:var(--accent-dark)}
#alert-editor select[hidden]{display:none}
.alert-picker-trigger,#alert-recipient{width:100%;text-align:left}
.alert-clock .alert-picker-trigger{width:auto;min-width:0;flex:1}
@media(max-width:650px){
 html.luna-landing-embed dialog{
  width:min(calc(100% - 20px),465px);
  max-width:calc(100% - 20px);
  max-height:calc(100% - 22px);
  padding:clamp(12px,4vw,22px);
 }
 html.luna-landing-embed #sheet.customize-sheet[open]{height:calc(100% - 22px)}
}
