:root{--ink:#20251f;--muted:#747a70;--paper:#f7f4ed;--card:#fff;--line:#e8e4da;--green:#244e3b;--soft-green:#e5eee7;--shadow:0 14px 40px rgba(39,47,39,.07)}
[data-theme="coastal"]{--ink:#1d292e;--muted:#6e7b7e;--paper:#f1f6f7;--line:#dce7e9;--green:#24566a;--soft-green:#deedf1;--shadow:0 14px 40px rgba(32,74,86,.07)}[data-theme="heather"]{--ink:#2d242b;--muted:#7d7079;--paper:#f8f2f6;--line:#e8dce4;--green:#68405d;--soft-green:#f0e3ec;--shadow:0 14px 40px rgba(82,48,73,.07)}[data-theme="terracotta"]{--ink:#30251f;--muted:#817268;--paper:#faf4ec;--line:#eaded2;--green:#874d3c;--soft-green:#f3e4da;--shadow:0 14px 40px rgba(111,64,45,.07)}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:"DM Sans",sans-serif}.app-shell{max-width:1180px;margin:auto;padding:0 28px 80px}.topbar{height:80px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;font:800 20px Manrope}.brand-mark{display:grid;place-items:center;width:34px;height:34px;background:var(--green);border-radius:50% 50% 45% 55%;color:#fff}.top-actions{display:flex;gap:10px;align-items:center}.icon-button,.avatar{border:1px solid var(--line);background:#fff;width:40px;height:40px;border-radius:50%;cursor:pointer;font-weight:700}.avatar{background:#e5d7c5;color:#5b4635}.greeting{display:flex;justify-content:space-between;align-items:flex-end;padding:46px 0 30px}.eyebrow{font:700 11px Manrope;letter-spacing:.16em;color:#898d83;margin:0 0 8px}.greeting h1{font:800 clamp(30px,4vw,46px) Manrope;margin:0;letter-spacing:-.04em}.subhead{color:var(--muted);font-size:16px;margin:8px 0 0}.puppy-chip{display:flex;align-items:center;gap:12px;border:1px solid var(--line);background:#fff;border-radius:18px;padding:9px 13px 9px 9px;cursor:pointer;box-shadow:0 5px 20px rgba(30,40,30,.04)}.puppy-avatar{width:46px;height:46px;display:grid;place-items:center;background:#f0dfca;border-radius:13px;font-size:25px}.puppy-chip strong,.puppy-chip small{display:block;text-align:left}.puppy-chip small{color:var(--muted);margin-top:2px}.chevron{color:#858b81;margin-left:5px}.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.summary-card{position:relative;min-height:154px;padding:20px;border-radius:20px;background:var(--card);box-shadow:var(--shadow);overflow:hidden}.summary-card:after{content:"";position:absolute;width:80px;height:80px;border-radius:50%;right:-28px;top:-28px;background:var(--tint)}.summary-card .card-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--tint);color:var(--tone);margin-bottom:16px}.summary-card strong{font:800 25px Manrope;margin-right:9px}.summary-card div span{font-size:13px;color:var(--muted)}.summary-card small{display:block;color:var(--tone);margin-top:10px}.accent-lilac{--tint:#eee9f7;--tone:#71618d}.accent-peach{--tint:#fae8d9;--tone:#a15f3f}.accent-mint{--tint:#e1eee5;--tone:#467358}.accent-blue{--tint:#e1ecf2;--tone:#4a7187}.quick-section{margin-top:48px}.section-heading{display:flex;justify-content:space-between;align-items:end;margin-bottom:18px}.section-heading h2,.insights h2{font:800 22px Manrope;margin:0;letter-spacing:-.02em}.text-button{border:0;background:none;color:var(--green);font-weight:700;cursor:pointer}.quick-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:10px}.quick-button{background:#fff;border:1px solid transparent;border-radius:17px;padding:17px 8px 14px;display:flex;flex-direction:column;align-items:center;gap:9px;cursor:pointer;font-weight:600;color:var(--ink);box-shadow:0 8px 24px rgba(40,48,40,.045);transition:.18s}.quick-button:hover{transform:translateY(-3px);border-color:#cfd9ce;box-shadow:var(--shadow)}.quick-icon{display:grid;place-items:center;width:39px;height:39px;border-radius:12px;font-size:16px}.yellow{background:#fcf0bd;color:#d7b534}.brown{background:#eadccf;color:#8d6747}.coral{background:#f9dfd6;color:#bd674c}.blue{background:#dfeefa;color:#5b91b5}.purple{background:#ece6f6;color:#75648f}.orange{background:#fae8c8;color:#c18b32}.green{background:#deeee3;color:#4c835f}.pink{background:#f5e1e7;color:#b4657b}.content-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,.8fr);gap:34px;margin-top:52px}.compact{padding-bottom:16px;border-bottom:1px solid var(--line)}.filter-button{border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px 12px;color:var(--muted)}.timeline{min-height:260px}.event{display:grid;grid-template-columns:64px 42px 1fr auto;gap:13px;align-items:center;padding:15px 0;border-bottom:1px solid var(--line)}.event-time{font-size:13px;color:var(--muted)}.event-icon{width:40px;height:40px;border-radius:12px;display:grid;place-items:center}.event-copy strong{display:block}.event-copy span{display:block;color:var(--muted);font-size:13px;margin-top:3px}.event-meta{text-align:right;color:#92978e;font-size:12px}.delete-event{opacity:0;border:0;background:none;color:#a4746a;cursor:pointer;margin-top:4px}.event:hover .delete-event{opacity:1}.empty-state{text-align:center;padding:55px 20px;color:var(--muted)}.empty-state span{font-size:36px;display:block;margin-bottom:10px}.insights{background:#edf1e9;padding:27px;border-radius:23px;align-self:start}.insight-card{background:rgba(255,255,255,.7);border-radius:15px;padding:15px;margin-top:12px}.insight-card strong{display:block;font-size:14px;margin-bottom:5px}.insight-card p{color:#687166;font-size:13px;line-height:1.5;margin:0}.disclaimer{font-size:11px;line-height:1.5;color:#81897e;margin:18px 2px 0}.floating-add{position:fixed;right:28px;bottom:28px;width:56px;height:56px;border:0;border-radius:50%;background:var(--green);color:#fff;font-size:27px;box-shadow:0 10px 25px rgba(36,78,59,.3);cursor:pointer}.toast{position:fixed;bottom:30px;left:50%;transform:translate(-50%,20px);background:#243128;color:#fff;padding:12px 18px;border-radius:12px;opacity:0;pointer-events:none;transition:.25s}.toast.show{opacity:1;transform:translate(-50%,0)}dialog{border:0;border-radius:24px;padding:0;width:min(580px,calc(100% - 30px));box-shadow:0 24px 80px rgba(20,30,20,.25)}dialog::backdrop{background:rgba(28,34,29,.45);backdrop-filter:blur(3px)}dialog form{padding:28px}.dialog-head{display:flex;justify-content:space-between;align-items:start}.dialog-head h2{font:800 23px Manrope;margin:0}.dialog-close{border:0;background:#f0f0ec;width:32px;height:32px;border-radius:50%;font-size:20px;cursor:pointer}.type-picker{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:24px 0}.type-option{border:1px solid var(--line);background:#fff;padding:10px 5px;border-radius:10px;cursor:pointer;text-transform:capitalize}.type-option.active{background:var(--soft-green);border-color:#829d89;color:var(--green);font-weight:700}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}label{display:block;font-size:12px;font-weight:700;color:#596057;margin:13px 0}input,select,textarea{display:block;width:100%;border:1px solid #dedfd9;border-radius:10px;padding:11px 12px;margin-top:7px;font:inherit;color:var(--ink);background:#fff}textarea{resize:vertical}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.primary-button,.secondary-button{border:0;border-radius:11px;padding:11px 18px;font-weight:700;cursor:pointer}.primary-button{background:var(--green);color:white}.secondary-button{background:#eeeee9;color:#555}.small-dialog{max-width:430px}
@media(max-width:850px){.summary-grid{grid-template-columns:1fr 1fr}.quick-grid{grid-template-columns:repeat(4,1fr)}.content-grid{grid-template-columns:1fr}.greeting{align-items:start}.puppy-chip{margin-top:2px}.floating-add{bottom:18px}}
@media(max-width:540px){.app-shell{padding:0 16px 80px}.topbar{height:65px}.greeting{display:block;padding:30px 0 24px}.puppy-chip{margin-top:22px}.summary-grid{gap:9px}.summary-card{min-height:145px;padding:16px}.summary-card strong{display:block;font-size:22px}.quick-grid{grid-template-columns:repeat(4,1fr)}.quick-button{font-size:12px;padding:13px 4px}.content-grid{margin-top:38px}.event{grid-template-columns:51px 38px 1fr}.event-meta{display:none}.form-row{grid-template-columns:1fr}.type-picker{grid-template-columns:repeat(3,1fr)}}
.event-actions{display:flex;justify-content:flex-end;gap:5px;margin-top:4px}.edit-event,.delete-event{opacity:1;border:0;background:none;cursor:pointer;padding:2px 3px;font:600 12px "DM Sans",sans-serif}.edit-event{color:#3f7358}.delete-event{color:#a4746a}.edit-event:hover,.delete-event:hover{text-decoration:underline}
@media(max-width:540px){.event-meta{display:flex;grid-column:3;justify-content:space-between;align-items:center;text-align:left}.event-actions{margin-top:0}.event{align-items:start}}

/* Touch and responsive refinements */
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}body{min-width:320px;overflow-x:hidden;padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}button,input,select,textarea{-webkit-tap-highlight-color:transparent}button,button *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}button{touch-action:manipulation}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(36,78,59,.28);outline-offset:2px}.icon-button,.avatar{min-width:44px;min-height:44px}.puppy-chip,.filter-button,.text-button,.primary-button,.secondary-button,.dialog-close,.edit-event,.delete-event{min-height:44px}.quick-button{min-height:104px;touch-action:manipulation}.type-option{min-height:48px}.edit-event,.delete-event{min-width:44px;padding:8px 6px}.floating-add{right:max(20px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));min-width:56px;min-height:56px}.toast{bottom:max(28px,env(safe-area-inset-bottom));max-width:calc(100vw - 32px);text-align:center;z-index:20}dialog{max-height:calc(100dvh - 24px);overflow:auto}dialog form{padding-bottom:max(28px,env(safe-area-inset-bottom))}input,select,textarea{min-height:46px;font-size:16px}.dialog-actions{position:sticky;bottom:-28px;background:linear-gradient(transparent 0,#fff 18px);padding-top:25px;padding-bottom:2px}.event-copy{min-width:0}.event-copy span{overflow-wrap:anywhere}

@media (hover:none) and (pointer:coarse){.quick-button:hover{transform:none}.quick-button:active,.type-option:active{transform:scale(.97)}.delete-event{opacity:1}}

@media(max-width:1024px){.app-shell{padding-left:22px;padding-right:22px}.summary-grid{grid-template-columns:repeat(2,1fr)}.quick-grid{grid-template-columns:repeat(4,1fr)}.content-grid{grid-template-columns:minmax(0,1.45fr) minmax(260px,.8fr);gap:24px}}

@media(max-width:760px){.app-shell{padding-left:16px;padding-right:16px;padding-bottom:100px}.topbar{height:68px}.greeting{display:block;padding:30px 0 24px}.greeting h1{font-size:clamp(30px,8.5vw,40px)}.puppy-chip{width:100%;margin-top:22px}.puppy-chip .chevron{margin-left:auto}.summary-grid{gap:10px}.summary-card{min-height:142px;padding:17px}.quick-section{margin-top:38px}.quick-grid{gap:8px}.content-grid{grid-template-columns:1fr;margin-top:40px}.section-heading{align-items:center}.event{grid-template-columns:54px 40px minmax(0,1fr);gap:10px}.event-meta{display:flex;grid-column:3;justify-content:space-between;align-items:center;text-align:left;gap:8px}.event-actions{flex-shrink:0;margin:0}.floating-add{display:grid;place-items:center}.insights{padding:22px}}

@media(max-width:420px){.app-shell{padding-left:13px;padding-right:13px}.brand{font-size:18px}.greeting{padding-top:25px}.summary-grid{grid-template-columns:1fr 1fr}.summary-card{min-height:136px;padding:15px}.summary-card div span{display:block;margin-top:2px}.summary-card small{font-size:11px}.quick-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.quick-button{min-height:92px;padding:11px 2px;font-size:11px}.quick-icon{width:36px;height:36px}.section-heading h2,.insights h2{font-size:20px}.text-button{padding-left:8px;font-size:12px}.event{grid-template-columns:46px 38px minmax(0,1fr);gap:8px}.event-time{font-size:12px}.event-icon{width:38px;height:38px}.event-meta{grid-column:2/4;margin-top:-2px}.type-picker{grid-template-columns:repeat(2,1fr)}dialog form{padding:22px 17px}.dialog-actions{bottom:-22px;margin-left:-2px;margin-right:-2px}.primary-button,.secondary-button{flex:1;padding-left:10px;padding-right:10px}}

@media(orientation:landscape) and (max-height:560px){dialog{max-height:calc(100dvh - 12px)}dialog form{padding-top:18px}.type-picker{margin:14px 0}.dialog-head .eyebrow{display:none}.form-row label,label{margin-top:8px;margin-bottom:8px}}
.brand{min-height:44px}.dialog-close{min-width:44px}
.brand-mark svg{width:22px;height:22px;fill:#fff;transform:rotate(-5deg)}.brand-mark.large-mark{width:54px;height:54px}.brand-mark.large-mark svg{width:32px;height:32px}
.brand-mark svg{transform:none}
.sync-status{font-size:12px;color:#7d8379}.sync-status.online{color:#397252}.sync-status.error{color:#a65347}.locked-dialog::backdrop{background:rgba(28,34,29,.72)}.locked-dialog form{padding:34px}.auth-logo{display:flex;justify-content:center;margin-bottom:20px}.locked-dialog h2{font:800 25px Manrope;margin:0 0 8px;text-align:center}.locked-dialog .eyebrow{text-align:center}.auth-copy{text-align:center;color:var(--muted);font-size:14px;line-height:1.5;margin:0 0 20px}.form-error{min-height:18px;color:#a2453c;font-size:13px;margin:9px 0}.full-button{width:100%;min-height:48px}.auth-switch{display:block;margin:10px auto 0}.auth-legal{max-width:330px;margin:14px auto 0;color:var(--muted);font-size:10px;line-height:1.5;text-align:center}.auth-legal a{color:var(--green);font-weight:700}.app-shell.is-loading{opacity:.55;pointer-events:none}@media(max-width:540px){.sync-status{display:none}.locked-dialog form{padding:28px 19px}}
.danger-text{color:#9b4f46}
.google-button{display:flex;align-items:center;justify-content:center;gap:11px;width:100%;min-height:48px;border:1px solid #d8dcd7;border-radius:11px;background:#fff;color:#30352f;font:700 14px "DM Sans",sans-serif;cursor:pointer}.google-button:hover{background:#f8f9f7}.google-mark{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;font:800 16px Arial;color:#4285f4}.auth-divider{display:flex;align-items:center;gap:12px;color:#949990;font-size:11px;margin:17px 0 5px}.auth-divider:before,.auth-divider:after{content:"";height:1px;background:#e2e3de;flex:1}
.pack-header-button{min-height:40px;border:1px solid var(--line);background:#fff;border-radius:20px;padding:0 14px;font-weight:700;color:var(--green);cursor:pointer}.onboarding-wrap{padding:32px}.onboarding-tabs{display:grid;grid-template-columns:1fr 1fr;background:#efefe9;border-radius:12px;padding:4px;margin:22px 0}.onboarding-tabs button{min-height:44px;border:0;background:transparent;border-radius:9px;font-weight:700;color:#777d74;cursor:pointer}.onboarding-tabs button.active{background:#fff;color:var(--green);box-shadow:0 3px 10px rgba(30,40,30,.08)}.invite-preview,.generated-invite{background:#edf3ed;border-radius:13px;padding:14px;margin:14px 0}.invite-preview strong{display:block;margin-bottom:4px}.invite-preview span{font-size:13px;color:var(--muted)}.left-copy{text-align:left;margin-top:14px}.generated-invite{margin-top:18px}.generated-invite input{font-size:13px}
.management-section{margin-top:24px}.management-heading{display:flex;align-items:center;justify-content:space-between}.management-heading h3,#inviteForm>h3{font:800 16px Manrope;margin:0}.management-heading span,.muted-line{font-size:12px;color:var(--muted)}.member-list,.invite-list{margin-top:8px}.member-row,.pending-invite{display:flex;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid var(--line)}.member-avatar{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border-radius:50%;background:#e6eee7;color:var(--green);font-weight:800}.member-identity{min-width:0;flex:1}.member-identity strong,.member-identity small,.pending-invite strong,.pending-invite small{display:block}.member-identity small,.pending-invite small{color:var(--muted);text-transform:capitalize;font-size:11px;margin-top:2px}.member-role{width:auto;min-height:40px;margin:0;padding:7px}.remove-member,.pending-invite button{min-height:40px;border:0;background:none;color:#a24e45;font-weight:700;cursor:pointer}.former-member{opacity:.58}.management-divider{height:1px;background:var(--line);margin:26px 0}.pending-invite div{flex:1;min-width:0}.pending-invite strong{overflow:hidden;text-overflow:ellipsis}@media(max-width:540px){.member-row{flex-wrap:wrap}.member-role{margin-left:48px}.remove-member{margin-left:auto}}
.sync-status.online:before,.sync-status.error:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px;background:currentColor}
.filter-button{width:auto;min-width:132px;min-height:44px;margin:0;padding:9px 34px 9px 12px;font-size:13px;cursor:pointer}
.rhythm-section{margin-bottom:38px}.rhythm-chart{width:100%;min-height:190px}.rhythm-chart svg{display:block;width:100%;height:auto;overflow:visible}.rhythm-grid{stroke:#e4e1d8;stroke-width:1}.rhythm-lane{stroke:#d6d5cd;stroke-width:1.5}.rhythm-axis,.rhythm-label,.rhythm-now-label{fill:#7b8177;font:500 11px "DM Sans",sans-serif}.rhythm-label{font-weight:700}.rhythm-now{stroke:#244e3b;stroke-width:1.5;stroke-dasharray:3 4;opacity:.55}.rhythm-now-label{fill:#244e3b;font-weight:700}.rhythm-event{cursor:pointer;outline:none}.rhythm-event:focus .rhythm-mark{stroke:#244e3b;stroke-width:3}.rhythm-mark{stroke:#fff;stroke-width:2}.rhythm-mark-core{fill:#fff;pointer-events:none}.rhythm-mark.pee{fill:#d7b534}.rhythm-mark.poo{fill:#8d6747}.rhythm-mark.meal{fill:#bd674c}.rhythm-mark.water{fill:#5b91b5}.rhythm-mark.sleep{fill:#75648f}.rhythm-mark.wake{fill:#c18b32}.rhythm-mark.training{fill:#4c835f}.rhythm-mark.play{fill:#b4657b}.rhythm-detail{min-height:20px;margin:8px 0 0;color:var(--muted);font-size:12px}.rhythm-detail strong{color:var(--ink)}.rhythm-empty{display:grid;place-items:center;min-height:170px;color:var(--muted);font-size:13px;border-bottom:1px solid var(--line)}@media(max-width:540px){.rhythm-section{margin-bottom:30px}.rhythm-chart{margin-left:-3px;width:calc(100% + 3px)}.rhythm-label,.rhythm-axis{font-size:10px}}
@media(max-width:540px){.rhythm-chart{overflow-x:auto;min-height:218px;scrollbar-width:thin;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}.rhythm-chart svg{width:680px;max-width:none}.rhythm-label,.rhythm-axis{font-size:12px}.rhythm-detail:after{content:" · Swipe chart for the full day";color:#92978e}}
@media(max-width:540px){.rhythm-viewport{position:relative;width:100%;max-width:100%;overflow:hidden;border:1px solid var(--line);border-radius:17px;background:rgba(255,255,255,.55)}.rhythm-viewport:before,.rhythm-viewport:after{content:"";position:absolute;z-index:2;top:0;bottom:0;width:16px;pointer-events:none}.rhythm-viewport:before{left:0;background:linear-gradient(90deg,rgba(247,244,237,.9),transparent)}.rhythm-viewport:after{right:0;background:linear-gradient(270deg,rgba(247,244,237,.9),transparent)}.rhythm-chart{box-sizing:border-box;width:100%;max-width:100%;margin:0;padding:9px 12px 2px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}.rhythm-chart::-webkit-scrollbar{display:none}.rhythm-chart svg{width:680px;max-width:none}.rhythm-empty{min-height:190px;padding:0 20px;text-align:center}}
@media(max-width:540px){.content-grid{grid-template-columns:minmax(0,1fr)}.timeline-section,.rhythm-section,.rhythm-viewport,.rhythm-chart{min-width:0}.rhythm-viewport{inline-size:100%;max-inline-size:100%;contain:inline-size}.rhythm-chart{inline-size:100%;max-inline-size:100%;overflow-x:scroll;overflow-y:hidden;touch-action:pan-x;overscroll-behavior-inline:contain}.rhythm-chart svg{display:block;inline-size:680px;min-inline-size:680px;max-inline-size:none}.app-shell,main{max-width:100%;overflow-x:clip}}
html,body{max-width:100%;overflow-x:hidden}@media(max-width:540px){body{position:relative;width:100%}.app-shell,.content-grid,.timeline-section,.rhythm-section{width:100%;max-width:100%}.rhythm-viewport{width:calc(100vw - 32px);max-width:calc(100vw - 32px);contain:layout inline-size paint}.rhythm-chart{width:100%;max-width:100%}}
.rhythm-mobile-labels{display:none}@media(max-width:540px){.rhythm-mobile-labels{position:absolute;z-index:3;left:0;top:25px;display:grid;grid-template-rows:repeat(5,40px);width:84px;padding-left:10px;pointer-events:none;background:linear-gradient(90deg,rgba(247,244,237,1) 0%,rgba(247,244,237,.96) 72%,rgba(247,244,237,0) 100%)}.rhythm-mobile-labels span{display:flex;align-items:center;color:#656d63;font:700 11px "DM Sans",sans-serif;white-space:nowrap}.rhythm-viewport:before{display:none}}
@media(max-width:540px){.rhythm-chart .rhythm-label{display:none}}
.day-navigator{display:flex;align-items:center;justify-content:center;gap:9px;margin:0 0 22px}.day-arrow{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--green);font-size:19px;cursor:pointer}.day-arrow:disabled{opacity:.35;cursor:default}.day-picker{position:relative;display:flex;align-items:center;gap:8px;min-height:44px;margin:0;padding:4px 7px 4px 13px;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--green)}.day-picker span{font-size:12px;font-weight:800}.day-date-display{display:none}.day-picker input{width:138px;min-height:36px;margin:0;padding:5px 7px;border:0;background:#f6f5f0;font-size:14px}.back-today{min-height:44px;border:0;border-radius:12px;background:var(--soft-green);color:var(--green);padding:0 13px;font-weight:800;cursor:pointer}.quick-section.history-mode{opacity:.48}.quick-section.history-mode:after{content:"Return to today to log new events";display:block;margin-top:12px;color:var(--muted);font-size:12px}.quick-button:disabled,.text-button:disabled{cursor:not-allowed;transform:none}@media(max-width:600px){.day-navigator{flex-wrap:wrap;margin-bottom:18px}.day-picker{order:1}.day-arrow{order:1}.back-today{order:2;flex-basis:100%;margin:0 25%}.day-picker input{width:128px}}
@media(max-width:760px){.content-grid{row-gap:0}.timeline-section{display:contents}.rhythm-section{grid-row:1;margin-bottom:26px}.insights{grid-row:2;margin-bottom:34px}.timeline-section>.section-heading{grid-row:3}.timeline-section>.timeline{grid-row:4}}
.theme-picker{border:0;padding:0;margin:20px 0 0}.theme-picker legend{font-size:12px;font-weight:800;color:#596057;margin-bottom:8px}.theme-option{display:flex;align-items:center;gap:11px;min-height:54px;margin:6px 0;padding:7px 9px;border:1px solid var(--line);border-radius:12px;background:var(--card);cursor:pointer}.theme-option:has(input:checked){border-color:var(--green);box-shadow:0 0 0 2px var(--soft-green)}.theme-option input{width:18px;min-height:18px;margin:0;accent-color:var(--green)}.theme-option>span:last-child{min-width:0}.theme-option strong,.theme-option small{display:block}.theme-option small{color:var(--muted);font-size:11px;margin-top:2px}.theme-swatches{display:flex;flex:0 0 auto}.theme-swatches i{width:18px;height:30px;border:2px solid #fff;margin-left:-5px}.theme-swatches i:first-child{margin-left:0;border-radius:9px 0 0 9px}.theme-swatches i:last-child{border-radius:0 9px 9px 0}.forest-swatches i:nth-child(1){background:#244e3b}.forest-swatches i:nth-child(2){background:#e5eee7}.forest-swatches i:nth-child(3){background:#f7f4ed}.coastal-swatches i:nth-child(1){background:#24566a}.coastal-swatches i:nth-child(2){background:#deedf1}.coastal-swatches i:nth-child(3){background:#f1f6f7}.heather-swatches i:nth-child(1){background:#68405d}.heather-swatches i:nth-child(2){background:#f0e3ec}.heather-swatches i:nth-child(3){background:#f8f2f6}.terracotta-swatches i:nth-child(1){background:#874d3c}.terracotta-swatches i:nth-child(2){background:#f3e4da}.terracotta-swatches i:nth-child(3){background:#faf4ec}
.insights{background:var(--soft-green)}.rhythm-now{stroke:var(--green)}.rhythm-now-label{fill:var(--green)}@media(max-width:540px){.rhythm-viewport:after{background:linear-gradient(270deg,var(--paper),transparent)}.rhythm-mobile-labels{background:linear-gradient(90deg,var(--paper) 0%,var(--paper) 72%,transparent)}}
.teal{background:#d9f0eb;color:#278679}.rhythm-mark.wake{fill:#278679}
#rhythmChart .rhythm-mark.wake{fill:#278679!important}
.lime{background:#e2f5da;color:#63b84c}#rhythmChart .rhythm-mark.wake{fill:#63b84c!important}
.app-view{display:none}.app-view.is-active{display:block;animation:view-in .18s ease-out}.view-stack{max-width:980px;margin:0 auto}.view-stack>.app-view,.quick-section.app-view{margin-top:44px}.activity-section{min-width:0}.insights.app-view{max-width:760px;margin-left:auto;margin-right:auto}.app-shell{padding-bottom:130px}.bottom-nav{position:fixed;z-index:15;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);display:grid;grid-template-columns:repeat(5,1fr);width:min(650px,calc(100% - 32px));padding:7px;border:1px solid var(--line);border-radius:24px;background:rgba(255,255,255,.94);box-shadow:0 15px 45px rgba(30,45,35,.18);backdrop-filter:blur(14px)}.bottom-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:54px;border:0;border-radius:17px;background:transparent;color:var(--muted);font:700 10px "DM Sans",sans-serif;cursor:pointer;touch-action:manipulation}.bottom-tab svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.bottom-tab.is-active{background:var(--soft-green);color:var(--green)}.bottom-tab.is-active svg{stroke-width:2.2}.floating-add{bottom:max(104px,calc(env(safe-area-inset-bottom) + 88px))}.toast{bottom:max(108px,calc(env(safe-area-inset-bottom) + 92px))}@keyframes view-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.app-view.is-active{animation:none}}@media(max-width:600px){.bottom-nav{left:0;bottom:0;transform:none;width:100%;padding:6px 7px max(6px,env(safe-area-inset-bottom));border-width:1px 0 0;border-radius:20px 20px 0 0}.bottom-tab{min-height:52px;font-size:9px}.bottom-tab svg{width:21px;height:21px}.app-shell{padding-bottom:110px}.view-stack>.app-view,.quick-section.app-view{margin-top:30px}.floating-add{bottom:max(82px,calc(env(safe-area-inset-bottom) + 70px))}.toast{bottom:max(86px,calc(env(safe-area-inset-bottom) + 74px))}}
[hidden]{display:none!important}
.pet-context{max-width:980px;margin:22px auto 0}.global-pet-switcher{width:100%;margin:0;padding:10px 13px 10px 10px;border-radius:20px}.global-pet-switcher .chevron{margin-left:8px}.pet-context-label{margin-left:auto;padding:6px 9px;border-radius:999px;background:var(--soft-green);color:var(--green);font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.pet-dialog-content{padding:28px}.pet-list{display:grid;gap:8px;margin-top:22px}.pet-list-item{display:flex;align-items:center;gap:12px;width:100%;min-height:68px;padding:9px 12px;border:1px solid var(--line);border-radius:15px;background:#fff;color:var(--ink);cursor:pointer;text-align:left}.pet-list-item.is-active{border-color:var(--green);box-shadow:0 0 0 2px var(--soft-green)}.pet-list-avatar{display:grid;place-items:center;width:45px;height:45px;flex:0 0 45px;border-radius:13px;background:#f0dfca;font-size:24px}.pet-list-copy{min-width:0;flex:1}.pet-list-copy strong,.pet-list-copy small{display:block}.pet-list-copy small{margin-top:3px;color:var(--muted);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pet-list-check{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--soft-green);color:var(--green);font-weight:900}.pet-dialog-actions{display:flex;gap:9px;margin-top:18px}.pet-dialog-actions button{flex:1}.pet-dialog-content #addPetForm{padding:0}.pet-dialog-content #addPetForm h3{font:800 17px Manrope;margin:0}.pet-dialog-content #addPetForm .dialog-actions{bottom:0}@media(max-width:600px){.pet-context{margin-top:14px}.global-pet-switcher{border-radius:17px}.pet-context-label{font-size:9px}.pet-dialog-content{padding:22px 17px max(22px,env(safe-area-inset-bottom))}.pet-dialog-actions{flex-direction:column}.pet-dialog-actions button{width:100%}}
.profile-export{width:100%;margin-top:18px;min-height:46px}.sync-status:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px;background:currentColor}@media(max-width:540px){.sync-status{display:inline-flex;align-items:center;font-size:0;min-width:14px}.sync-status:before{width:9px;height:9px;margin:0}.top-actions{gap:8px}}
@media(min-width:860px){.floating-add{left:calc(50% + 341px);right:auto;bottom:max(24px,env(safe-area-inset-bottom))}}
.field-hint{display:block;margin-top:6px;color:var(--muted);font-size:11px;font-weight:500;line-height:1.4}
.profile-role{display:inline-flex;align-items:center;min-height:28px;margin:-5px 0 5px;padding:5px 10px;border-radius:999px;background:var(--soft-green);color:var(--green);font-size:11px;font-weight:800}
.member-permission-note{margin:17px 0 0;padding:13px 14px;border-radius:13px;background:var(--soft-green);color:var(--muted);font-size:12px;line-height:1.55}.member-permission-note:before{content:"i";display:inline-grid;place-items:center;width:20px;height:20px;margin-right:7px;border-radius:50%;background:var(--green);color:#fff;font-weight:800;font-style:normal;vertical-align:middle}
.summary-card .card-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.summary-card .card-icon svg.filled-icon{fill:currentColor;stroke:none}
.app-loading{position:fixed;z-index:100;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;background:var(--paper);color:var(--green)}.loading-paw{display:grid;place-items:center;width:78px;height:78px;border-radius:28px;background:var(--green);box-shadow:0 16px 40px rgba(36,78,59,.2);animation:loading-pulse 1.6s ease-in-out infinite}.loading-paw svg{width:43px;height:43px;fill:#fff}.app-loading strong{font:800 14px Manrope;letter-spacing:.03em}@keyframes loading-pulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(.96);opacity:.82}}@media(prefers-reduced-motion:reduce){.loading-paw{animation:none}}
body:not([data-workspace-state="ready"]):not([data-workspace-state="loading"]) .app-shell main{visibility:hidden}body:not([data-workspace-state="ready"]) .top-actions,body:not([data-workspace-state="ready"]) .pet-context,body:not([data-workspace-state="ready"]) .bottom-nav,body:not([data-workspace-state="ready"]) .floating-add{display:none!important}
.rhythm-scale{min-width:118px}.aggregate-cell.toilet{fill:#d7b534}.aggregate-cell.food{fill:#5b91b5}.aggregate-cell.sleep{fill:#75648f}.aggregate-cell.activity{fill:#4c835f}.aggregate-count{fill:#fff;font:800 11px "DM Sans",sans-serif;pointer-events:none}.rhythm-viewport.aggregate-view .rhythm-chart{overflow-x:auto}.rhythm-viewport.aggregate-view .rhythm-chart svg{max-width:none}@media(max-width:540px){.rhythm-scale{min-width:106px}.rhythm-viewport.aggregate-view .rhythm-chart svg{width:auto;min-width:680px}.rhythm-section .section-heading{gap:12px}.rhythm-section .section-heading>div{min-width:0}.rhythm-section .section-heading h2{white-space:normal}}
@media(max-width:540px){.rhythm-viewport.aggregate-view .rhythm-mobile-labels{top:23px;grid-template-rows:repeat(5,42px)}}
.rhythm-hit{fill:transparent;stroke:none;pointer-events:all}.rhythm-detail.has-event{display:flex;align-items:center;justify-content:space-between;gap:12px}.rhythm-detail>span{min-width:0}.rhythm-edit-button{flex:0 0 auto;min-height:40px;border:0;border-radius:10px;padding:8px 12px;background:var(--soft-green);color:var(--green);font:800 12px "DM Sans",sans-serif;cursor:pointer;touch-action:manipulation}
@media(max-width:600px){#eventDialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px);border-radius:20px}#eventDialog form{padding:18px 16px max(12px,env(safe-area-inset-bottom))}.type-picker{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:16px 0}.type-option{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:58px;padding:6px 2px;font-size:11px;line-height:1.15}.type-option.active{box-shadow:inset 0 0 0 1px currentColor}#eventForm .form-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#eventForm label{margin:9px 0}#eventForm input,#eventForm select,#eventForm textarea{margin-top:5px;padding:9px 10px}#eventForm textarea{min-height:76px;max-height:110px}#eventForm .dialog-actions{bottom:calc(-1 * max(12px,env(safe-area-inset-bottom)));margin:14px -16px 0;padding:18px 16px max(12px,env(safe-area-inset-bottom));background:linear-gradient(transparent 0,#fff 12px)}#eventForm .dialog-head h2{font-size:21px}.rhythm-detail.has-event{align-items:flex-start}.rhythm-edit-button{min-height:44px}}
@media(max-width:350px){.type-picker{grid-template-columns:repeat(2,minmax(0,1fr))}#eventForm .form-row{grid-template-columns:1fr}}
@media(max-height:650px) and (orientation:landscape){#eventDialog{max-height:calc(100dvh - 8px)}#eventDialog form{padding-top:12px}.type-picker{grid-template-columns:repeat(8,minmax(0,1fr));margin:10px 0}.type-option{min-height:48px}.dialog-head .eyebrow{display:none}}
html{color-scheme:light}button{font-family:inherit}.type-option,.dialog-close{-webkit-appearance:none;appearance:none;color:var(--ink)}.type-option.active{color:var(--green)}
.insight-summary{max-width:620px;margin:8px 0 20px;color:var(--muted);font-size:14px;line-height:1.55}.insight-card{background:rgba(255,255,255,.72);border:1px solid rgba(255,255,255,.7);border-radius:17px;padding:18px}.insight-card:first-child{background:#fff;box-shadow:0 10px 28px rgba(30,50,35,.07)}.insight-label{display:block;margin-bottom:7px;color:var(--green);font:800 9px Manrope;letter-spacing:.14em}.insight-card strong{font:800 15px Manrope;margin-bottom:6px}.insight-card p{line-height:1.58}
.quick-groups{display:grid;gap:22px}.quick-group h3{margin:0 0 9px;color:var(--muted);font:800 11px Manrope;letter-spacing:.08em;text-transform:uppercase}.quick-group .quick-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.quick-button.is-active-walk,.quick-button.is-active-sleep{background:var(--soft-green);border-color:var(--green);color:var(--green)}.quick-button.is-active-sleep{box-shadow:0 0 0 2px var(--soft-green),var(--shadow)}.quick-button.is-ready-to-wake{border-color:#63b84c;box-shadow:0 0 0 2px rgba(99,184,76,.16)}.event-details{margin:12px 0;padding:14px;border-radius:14px;background:var(--soft-green)}.detail-checks{display:flex;flex-wrap:wrap;gap:8px 18px}.detail-checks label{display:flex;align-items:center;gap:7px;margin:5px 0}.detail-checks input{display:inline-block;width:20px;min-height:20px;margin:0;accent-color:var(--green)}.toast.has-actions{display:flex;align-items:center;gap:10px;pointer-events:auto}.toast.has-actions button{border:0;background:transparent;color:#d8f1df;padding:5px 2px;font-weight:800;cursor:pointer}.toast.has-actions button:last-child{color:#f4d3ca}.rhythm-mark.walk{fill:#4c835f}.rhythm-mark.vomit{fill:#bd674c}.rhythm-mark.medication{fill:#5b91b5}.rhythm-mark.health{fill:#c18b32}.aggregate-cell.health{fill:#bd674c}.sleep-check-content{padding:30px;text-align:center}.sleep-check-icon{display:grid;place-items:center;width:58px;height:58px;margin:0 auto 18px;border-radius:18px;background:#ece6f6;color:#75648f;font-size:24px}.sleep-check-content h2{font:800 23px Manrope;margin:0 0 9px}.sleep-check-content .auth-copy{margin-bottom:22px}.sleep-check-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.sleep-check-actions button{min-height:48px;padding:10px 12px}
@media(max-width:600px){.quick-section.app-view{margin-top:clamp(18px,3dvh,28px)}.quick-section .section-heading{margin-bottom:clamp(12px,2dvh,17px)}.quick-groups{gap:clamp(13px,2.1dvh,20px)}.quick-group h3{margin-bottom:clamp(6px,1dvh,9px)}.quick-group .quick-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(6px,1.1dvh,9px)}.quick-group .quick-button{min-height:clamp(76px,9.6dvh,90px);padding:clamp(7px,1.1dvh,10px) 4px;border-radius:clamp(16px,2.1dvh,19px);gap:clamp(5px,.8dvh,8px);font-size:clamp(10px,3vw,12px);line-height:1.12}.quick-group .quick-icon{width:clamp(34px,4.5dvh,40px);height:clamp(34px,4.5dvh,40px);border-radius:11px}.toast.has-actions{gap:8px;font-size:12px}.toast.has-actions button{font-size:12px}.event-details{padding:10px}.detail-checks{gap:4px 12px}}
@media(max-width:420px){.quick-section .section-heading{align-items:flex-start;gap:8px}.quick-section .section-heading h2{font-size:clamp(18px,5.4vw,21px)}.quick-section .text-button{margin-top:2px;padding-left:4px;white-space:nowrap;font-size:11px}.quick-group .quick-button{min-height:clamp(72px,9.4dvh,84px)}.quick-group .quick-icon{width:clamp(32px,4.4dvh,37px);height:clamp(32px,4.4dvh,37px)}}
@media(max-width:350px){.quick-group .quick-grid{gap:5px}.quick-group .quick-button{min-height:70px;padding-left:2px;padding-right:2px;font-size:9.5px}.quick-group .quick-icon{width:31px;height:31px}.quick-groups{gap:11px}}
@media(max-width:600px) and (max-height:800px){body[data-active-view="log"] .topbar{height:58px}body[data-active-view="log"] .pet-context{margin-top:8px}body[data-active-view="log"] .global-pet-switcher{padding:6px 10px 6px 7px}body[data-active-view="log"] .global-pet-switcher .puppy-avatar{width:40px;height:40px;font-size:22px}body[data-active-view="log"] .quick-section.app-view{margin-top:12px}body[data-active-view="log"] .quick-section .section-heading{margin-bottom:9px}body[data-active-view="log"] .quick-groups{gap:9px}body[data-active-view="log"] .quick-group h3{margin-bottom:5px}body[data-active-view="log"] .quick-group .quick-grid{gap:5px}body[data-active-view="log"] .quick-group .quick-button{min-height:68px;padding-top:6px;padding-bottom:6px;gap:4px;border-radius:15px}body[data-active-view="log"] .quick-group .quick-icon{width:31px;height:31px}body[data-active-view="log"] .floating-add{width:52px;height:52px;min-width:52px;min-height:52px}}
@media(max-width:600px) and (max-height:700px){body[data-active-view="log"] .topbar{height:54px}body[data-active-view="log"] .pet-context{margin-top:6px}body[data-active-view="log"] .global-pet-switcher{padding-top:4px;padding-bottom:4px}body[data-active-view="log"] .global-pet-switcher .puppy-avatar{width:36px;height:36px;font-size:20px}body[data-active-view="log"] .quick-section.app-view{margin-top:8px}body[data-active-view="log"] .quick-section .section-heading{margin-bottom:6px}body[data-active-view="log"] .quick-groups{gap:7px}body[data-active-view="log"] .quick-group .quick-button{min-height:64px;padding-top:4px;padding-bottom:4px;gap:3px;font-size:9.5px}body[data-active-view="log"] .quick-group .quick-icon{width:29px;height:29px}}
@media(max-width:420px){.sleep-check-content{padding:24px 18px max(20px,env(safe-area-inset-bottom))}.sleep-check-actions{grid-template-columns:1fr}.sleep-check-actions .primary-button{order:-1}}
.account-actions{margin:20px 0 4px;padding:15px;border:1px solid #ead6d2;border-radius:14px;background:#fff8f6}.account-actions>strong{display:block;font:800 13px Manrope}.account-actions p{margin:5px 0 12px;color:var(--muted);font-size:12px;line-height:1.45}.account-actions a{color:var(--green);font-size:11px;font-weight:700}.profile-legal-links{display:flex;flex-wrap:wrap;gap:6px 14px;margin:0 0 14px}.danger-button{min-height:44px;border:0;border-radius:11px;padding:11px 18px;background:#a64e45;color:#fff;font-weight:800;cursor:pointer;touch-action:manipulation}.danger-button:disabled{opacity:.45;cursor:not-allowed}.account-actions .danger-button{width:100%}.deletion-summary{margin:18px 0;padding:14px;border-radius:14px;background:#fff5f2;color:var(--muted);font-size:12px;line-height:1.5}.deletion-summary p{margin:0 0 8px;color:var(--ink);font-weight:600}.deletion-summary ul{margin:0;padding-left:18px}.deletion-summary li+li{margin-top:6px}#deleteAccountDialog .dialog-actions{align-items:stretch}#deleteAccountDialog .dialog-actions button{flex:1}.policy-page{width:min(760px,100%);min-height:100dvh;margin:0 auto;padding:34px 20px 60px}.policy-brand{width:max-content;margin:0 0 24px}.policy-brand .brand-mark{font-size:18px}.policy-card{padding:clamp(24px,5vw,48px);border:1px solid var(--line);border-radius:24px;background:#fff;box-shadow:var(--shadow)}.policy-card h1{margin:0 0 15px;font:800 clamp(28px,6vw,42px) Manrope;letter-spacing:-.04em}.policy-card h2{margin:27px 0 8px;font:800 18px Manrope}.policy-card p,.policy-card li{color:var(--muted);font-size:15px;line-height:1.65}.policy-card ol{padding-left:22px}.policy-action{display:inline-flex;align-items:center;justify-content:center;min-height:48px;margin-top:18px;text-decoration:none}@media(max-width:420px){#deleteAccountDialog form{padding:20px 16px}.deletion-summary{margin-top:14px;padding:12px}#deleteAccountDialog .dialog-actions{flex-direction:column-reverse}.policy-page{padding:22px 13px 44px}.policy-card{padding:23px 18px;border-radius:20px}}

/* Shared responsive dialog system */
body:has(dialog[open]){overflow:hidden}

/* Android 15+ always draws edge-to-edge. Capacitor 8 injects the measured
   system-bar insets as CSS variables, including on older WebView versions
   where env(safe-area-inset-*) is unreliable. This is native-only so the PWA
   retains its existing layout. */
html.capacitor-native{
  --pawprint-safe-top:var(--safe-area-inset-top,env(safe-area-inset-top,0px));
  --pawprint-safe-bottom:var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px));
  --pawprint-safe-left:var(--safe-area-inset-left,env(safe-area-inset-left,0px));
  --pawprint-safe-right:var(--safe-area-inset-right,env(safe-area-inset-right,0px));
}
html.capacitor-native body{
  padding-top:var(--pawprint-safe-top);
  padding-left:var(--pawprint-safe-left);
  padding-right:var(--pawprint-safe-right);
}
@media(max-width:600px){
  html.capacitor-native .bottom-nav{
    padding-bottom:max(6px,var(--pawprint-safe-bottom));
  }
  html.capacitor-native .floating-add{
    bottom:max(82px,calc(var(--pawprint-safe-bottom) + 70px));
  }
  html.capacitor-native .toast{
    bottom:max(86px,calc(var(--pawprint-safe-bottom) + 74px));
  }
}
dialog{box-sizing:border-box;max-width:calc(100vw - 32px);max-height:calc(100dvh - 64px);margin:auto;overflow:hidden;background:#fff;color:var(--ink);overscroll-behavior:contain}
dialog[open]{display:flex;flex-direction:column}
dialog>form,dialog>.pet-dialog-content,dialog>.onboarding-wrap,dialog>.sleep-check-content{width:100%;max-height:inherit;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#eventDialog{width:min(680px,calc(100vw - 48px));max-width:680px}
#packSettingsDialog{width:min(640px,calc(100vw - 48px));max-width:640px}
#nameDialog,#petDialog,#packDialog{width:min(520px,calc(100vw - 48px));max-width:520px}
#deleteAccountDialog,#deleteEventDialog{width:min(500px,calc(100vw - 48px));max-width:500px}
#authDialog{width:min(460px,calc(100vw - 48px));max-width:460px}
#sleepCheckDialog{width:min(440px,calc(100vw - 48px));max-width:440px}
.dialog-head{position:sticky;z-index:6;top:-28px;margin:-28px -28px 16px;padding:28px 28px 14px;background:linear-gradient(#fff 82%,rgba(255,255,255,.94))}
.dialog-head>div{min-width:0}.dialog-head h2{overflow-wrap:anywhere}
.dialog-actions{z-index:5;bottom:-28px;margin:20px -28px -28px;padding:18px 28px max(20px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fff;box-shadow:0 -12px 24px rgba(30,40,30,.045)}
.dialog-actions button{min-width:0}
.form-row{min-width:0}.form-row>label{min-width:0}.form-row input,.form-row select{min-width:0}
.event-datetime-row>label{min-width:0;overflow:hidden}
dialog input[type="date"],dialog input[type="time"]{box-sizing:border-box;inline-size:100%;min-inline-size:0;max-inline-size:100%;height:48px;line-height:1.25;text-align:left;color-scheme:light}
@supports (-webkit-touch-callout:none){
  dialog input[type="date"],dialog input[type="time"]{-webkit-appearance:none;appearance:none;padding-inline:12px;text-align:left}
  dialog input[type="date"]::-webkit-date-and-time-value,dialog input[type="time"]::-webkit-date-and-time-value{display:block;min-width:0;margin:0;text-align:left}
  dialog input[type="date"]::-webkit-calendar-picker-indicator,dialog input[type="time"]::-webkit-calendar-picker-indicator{margin:0}
}
#packSettingsDialog .member-role{max-width:190px}
#packSettingsDialog .pending-invite strong{overflow-wrap:anywhere}

@media(max-width:600px){
  dialog,#eventDialog,#packSettingsDialog,#nameDialog,#petDialog,#packDialog,#deleteAccountDialog,#deleteEventDialog,#authDialog,#sleepCheckDialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:20px}
  dialog form{padding:20px 16px max(16px,env(safe-area-inset-bottom))}
  .pet-dialog-content,.onboarding-wrap{padding:20px 16px max(16px,env(safe-area-inset-bottom))}
  .dialog-head{top:-20px;margin:-20px -16px 14px;padding:20px 16px 12px}
  .dialog-head h2{font-size:21px;line-height:1.15}
  .dialog-actions,#eventForm .dialog-actions{bottom:calc(-1 * max(16px,env(safe-area-inset-bottom)));margin:16px -16px calc(-1 * max(16px,env(safe-area-inset-bottom)));padding:14px 16px max(16px,env(safe-area-inset-bottom));background:#fff}
  .type-picker{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:14px 0}
  .type-option{min-height:56px;padding:6px 2px;font-size:10.5px;line-height:1.1;overflow-wrap:anywhere}
  #eventForm .form-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  #eventForm input,#eventForm select,#eventForm textarea{min-width:0}
  #nameDialog .dialog-actions{display:grid;grid-template-columns:1fr 1fr}
  #nameDialog .dialog-actions .primary-button{grid-column:1/-1;grid-row:1}
  #packSettingsDialog .member-role{width:min(190px,calc(100% - 48px));max-width:calc(100% - 48px);margin-left:48px}
}
@media(max-width:360px){
  dialog,#eventDialog,#packSettingsDialog,#nameDialog,#petDialog,#packDialog,#deleteAccountDialog,#deleteEventDialog,#authDialog,#sleepCheckDialog{width:calc(100vw - 12px);max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px);border-radius:17px}
  dialog form,.pet-dialog-content,.onboarding-wrap{padding-left:13px;padding-right:13px}
  .dialog-head{margin-left:-13px;margin-right:-13px;padding-left:13px;padding-right:13px}
  .dialog-actions,#eventForm .dialog-actions{margin-left:-13px;margin-right:-13px;padding-left:13px;padding-right:13px}
  .type-picker{gap:5px}.type-option{font-size:10px}
  #eventForm .form-row{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-height:650px) and (orientation:landscape){
  dialog,#eventDialog,#packSettingsDialog,#nameDialog,#petDialog,#packDialog,#deleteAccountDialog,#deleteEventDialog,#authDialog,#sleepCheckDialog{max-height:calc(100dvh - 8px)}
  dialog form,.pet-dialog-content,.onboarding-wrap{padding-top:14px}
  .dialog-head{top:-14px;margin-top:-14px;padding-top:14px}
  .dialog-actions,#eventForm .dialog-actions{padding-top:10px}
  .locked-dialog form{padding-top:18px}.auth-logo{margin-bottom:10px}
}

/* Compact the native Android welcome view without reducing touch targets.
   Wider tablet layouts and the browser/PWA keep their existing spacing. */
@media(max-width:600px){
  html.capacitor-native body[data-active-view="welcome"] .topbar{height:58px}
  html.capacitor-native body[data-active-view="welcome"] .brand{font-size:18px}
  html.capacitor-native body[data-active-view="welcome"] .brand-mark{width:32px;height:32px}
  html.capacitor-native body[data-active-view="welcome"] .top-actions{gap:6px}
  html.capacitor-native body[data-active-view="welcome"] .pet-context{margin-top:8px}
  html.capacitor-native body[data-active-view="welcome"] .global-pet-switcher{padding:7px 10px 7px 7px}
  html.capacitor-native body[data-active-view="welcome"] .global-pet-switcher .puppy-avatar{width:42px;height:42px;font-size:23px}
  html.capacitor-native body[data-active-view="welcome"] .greeting{padding:17px 0 14px}
  html.capacitor-native body[data-active-view="welcome"] .greeting h1{font-size:clamp(30px,8vw,34px);line-height:1.06}
  html.capacitor-native body[data-active-view="welcome"] .greeting .subhead{margin-top:5px;font-size:15px}
  html.capacitor-native body[data-active-view="welcome"] .day-navigator{gap:7px;margin-bottom:12px}
  html.capacitor-native body[data-active-view="welcome"] .day-picker{
    box-sizing:border-box;
    width:clamp(182px,50vw,202px);
    min-width:0;
    padding-right:34px;
  }
  html.capacitor-native body[data-active-view="welcome"] .day-date-display{
    display:block;
    min-width:78px;
    margin-left:auto;
    color:var(--ink);
    font-size:14px;
    font-weight:700;
    line-height:1;
    white-space:nowrap;
    font-variant-numeric:tabular-nums;
  }
  html.capacitor-native body[data-active-view="welcome"] .day-picker input{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    min-height:0;
    margin:0;
    padding:0;
    opacity:0;
    cursor:pointer;
  }
  html.capacitor-native body[data-active-view="welcome"] .day-picker::after{
    content:"";
    position:absolute;
    top:50%;
    right:14px;
    width:7px;
    height:7px;
    border-right:2px solid var(--muted);
    border-bottom:2px solid var(--muted);
    transform:translateY(-70%) rotate(45deg);
    pointer-events:none;
  }
  html.capacitor-native body[data-active-view="welcome"] .day-picker:focus-within{
    outline:3px solid rgba(36,78,59,.26);
    outline-offset:2px;
  }
  html.capacitor-native body[data-active-view="welcome"] .summary-grid{gap:8px}
  html.capacitor-native body[data-active-view="welcome"] .summary-card{min-height:124px;padding:13px}
  html.capacitor-native body[data-active-view="welcome"] .summary-card .card-icon{width:32px;height:32px;margin-bottom:10px}
  html.capacitor-native body[data-active-view="welcome"] .summary-card strong{font-size:21px}
  html.capacitor-native body[data-active-view="welcome"] .summary-card small{margin-top:6px;line-height:1.35}
}

/* Dialogs render in the browser's top layer, outside the padded body. Keep
   every native modal inside Android's status and navigation bar safe area. */
html.capacitor-native dialog{
  inset-block-start:calc(var(--pawprint-safe-top) + 8px);
  inset-block-end:calc(var(--pawprint-safe-bottom) + 8px);
  max-height:calc(100dvh - var(--pawprint-safe-top) - var(--pawprint-safe-bottom) - 16px)!important;
  margin-block:auto;
}

/* Keep mobile rhythm events behind the fixed lane-label gutter. The longer
   Food & water label previously extended into the transparent part of it. */
@media(max-width:540px){
  .rhythm-mobile-labels{
    z-index:4;
    width:112px;
    padding-right:20px;
    background:linear-gradient(90deg,var(--paper) 0%,var(--paper) 82%,transparent 100%);
  }
  .rhythm-mobile-labels span{position:relative;z-index:1}
}

/* The global form rule makes selects full-width. Give the Rhythm scale a
   bounded responsive width and leave room for its focus ring at the edge. */
.rhythm-scale{
  box-sizing:border-box;
  width:clamp(104px,30vw,128px);
  min-width:104px;
  max-width:128px;
  flex:0 0 auto;
  margin-inline-end:5px;
}
