
:root{--family-bg:#dfeadb;--family-light:#f7fbf3;--family-tint:#d4e3cd;--family-accent:#548063;--family-ink:#294637}
body{background:radial-gradient(ellipse at 13% 0%,var(--family-light),transparent 48rem),linear-gradient(150deg,var(--family-bg),var(--family-tint));background-attachment:fixed;min-height:100vh}
h1,.brand strong,.home-hero h1{color:var(--family-ink);letter-spacing:.025em}
.card,.panel,.garden-card,.stat,.metric,.goal-card,dialog{border-radius:23px;border-color:color-mix(in srgb,var(--family-accent) 24%,white);background:linear-gradient(155deg,#fff,var(--family-light));box-shadow:inset 0 1px 1px #fff,0 2px 0 color-mix(in srgb,var(--family-accent) 23%,transparent),0 8px 18px #35224512}
button:not(.day),.button,.home-shortcuts a{border-radius:17px;box-shadow:inset 0 1px 0 #ffffff73,0 2px 0 color-mix(in srgb,var(--family-accent) 25%,transparent)}
button.primary,.primary:link{background:linear-gradient(155deg,var(--family-accent),var(--family-ink));color:white}
input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea{border-radius:13px}
progress{accent-color:var(--family-ink);border-radius:999px}
.family-tile,.family-bear{display:block;object-fit:contain;border-radius:20%;flex:none}
.family-tile{width:38px;height:38px;mix-blend-mode:multiply}
h2 .family-tile{display:inline-block;vertical-align:middle;margin-right:5px}
.family-bear{width:clamp(70px,24vw,150px);height:auto}
nav a{border-radius:15px;color:var(--family-ink)}
nav a[aria-current="page"]{background:var(--family-tint);color:var(--family-ink)}
nav a:is([href="#calendar"],[href="#savings"],[href="#report"],[href="#settings"],[href="#ic"]) :is(svg,.sticker){display:none}
nav a::before{background-position:center;background-size:contain;background-repeat:no-repeat;border-radius:8px}
nav a:is([href="#calendar"],[href="#savings"],[href="#report"],[href="#settings"],[href="#ic"])::before{content:"";display:block;width:30px;height:30px;mix-blend-mode:multiply}
nav a[href="#calendar"]::before{background-image:url("family-calendar.png")}
nav a[href="#savings"]::before{background-image:url("family-savings.png")}
nav a[href="#report"]::before{background-image:url("family-review.png")}
nav a[href="#settings"]::before{background-image:url("family-settings.png")}
nav a[href="#ic"]::before{background-image:url("family-icoca.png")}
.weekday:nth-child(1){color:#aa304e}.weekday:nth-child(7){color:#295994}
.day{border-radius:13px}
button.day[aria-current="date"]{background:#294637;color:white;border-color:#294637}
button.day[aria-current="date"] small{color:#fff}
@media(max-width:520px){nav a:is([href="#calendar"],[href="#savings"],[href="#report"],[href="#settings"],[href="#ic"])::before{width:26px;height:26px}.family-tile{width:32px;height:32px}}

.balance-home{background:radial-gradient(ellipse at 100% 0%,#66876e,transparent 74%),var(--hero)}
.balance-home .balance-bear{border:1px solid #fff3;box-shadow:0 4px 12px #162c2266}
.calendar-grid .day:nth-child(7n+1)>span{color:#aa304e}
.calendar-grid .day:nth-child(7n)>span{color:#295994}
.calendar-grid .day[aria-current="date"]>span{color:white}
button.day[aria-pressed="true"]{outline:2px solid #547762;outline-offset:-2px}
:root[data-theme=navy]{--family-bg:#e1eaf6;--family-light:#f6f9ff;--family-tint:#d6e3f4;--family-ink:#223f68}
:root[data-theme=slate]{--family-bg:#e8edf0;--family-light:#f9fafb;--family-tint:#dde3e9;--family-ink:#35454f}

.balance-home .balance-bear{border-radius:24px;object-fit:cover}
nav a[href="#home"] svg{color:var(--family-ink);filter:drop-shadow(0 2px 0 #9dae94)}
:root {
  --family-bg:#bbcfb4;
  --family-light:#fdfbf3;
  --family-tint:#ccddc4;
  --family-accent:#426b50;
  --family-ink:#234334;
}
body {
  background:radial-gradient(ellipse at 35% 0%,var(--family-light),transparent 30rem),
    linear-gradient(145deg,var(--family-tint),var(--family-bg));
  background-attachment:fixed;
}
.brand { gap:12px; }
.brand strong { font-size:clamp(22px,5vw,29px); letter-spacing:.025em; }
#main .heading { align-items:center; }
#main .heading h1 { display:flex; gap:8px; align-items:center; }
.panel,.metric,dialog {
  border:1px solid color-mix(in srgb,var(--family-ink) 18%,white);
  background:linear-gradient(155deg,#fff,var(--family-light));
  box-shadow:inset 0 1px 0 #fff,0 2px 0 #536e5628,0 7px 19px #2a51331a;
}
.gloss-icon {
  display:inline-block; width:30px; height:30px; flex:none;
  vertical-align:middle; filter:drop-shadow(0 2px 1px #253a322b);
}
nav a:is([href])::before { content:none; }
nav a:is([href]) .gloss-icon { display:block; width:30px; height:30px; }
.metric-icon .gloss-icon,.ledger-icon .gloss-icon { width:25px; height:25px; }
nav { background:linear-gradient(150deg,var(--family-light),var(--family-tint)); border-radius:22px; padding:8px; }
nav a[aria-current=page] { background:linear-gradient(#ebf3e3,var(--family-tint)); box-shadow:inset 0 1px #fff,0 2px 4px #34553c29; }
.balance-home {
  position:relative; isolation:isolate;
  grid-template-columns:minmax(0,1fr) clamp(126px,42%,290px);
  grid-template-rows:auto auto minmax(58px,auto);
  grid-template-areas:"title art" "money art" "foot art";
  align-content:center; min-height:225px;
  column-gap:8px; padding:22px 15px 16px 22px;
  background:radial-gradient(ellipse at 92% 12%,#7f9d65,transparent 62%),linear-gradient(145deg,#294c38,#385e47);
  border:1px solid #92ab83; box-shadow:inset 0 2px 2px #ffffff59, inset 0 -4px 8px #143a2950,0 8px 16px #1e442735;
}
.balance-home .balance-bear {
  align-self:end; justify-self:end; width:100%; height:auto;
  border:0; box-shadow:none; border-radius:0; object-fit:contain;
  filter:drop-shadow(0 7px 5px #162a2466);
}
.balance-home .hero-money { margin:8px 0 7px; }
.balance-home .hero-foot { justify-content:flex-start; margin-top:5px; min-width:0; }
.balance-home .balance-title { line-height:1.3; }
.balance-home .balance-title .gloss-icon { width:25px;height:25px; }
.calendar.panel { background:linear-gradient(145deg,var(--family-light),var(--family-tint)); }
.calendar-grid .day { background:#fffef7; border-color:#aabfa2; }
.calendar-grid button.day[aria-current=date] { background:#244533; border-color:#244533; }
.calendar-grid button.day[aria-current=date] :is(span,small) { color:white; }
dialog::backdrop { background:#20392e91; }
@media(max-width:760px) {
  nav { border-radius:20px 20px 0 0; padding:5px 5px calc(5px + env(safe-area-inset-bottom)); }
  nav a:is([href]) .gloss-icon { width:25px; height:25px; }
  .balance-home { min-height:194px; padding:17px 8px 14px 15px; }
}
@media(max-width:380px) {
  .balance-home { grid-template-columns:minmax(0,1fr) 41%; }
  .balance-home .hero-foot { font-size:12px; gap:3px; }
  .balance-home .hero-money { font-size:clamp(24px,8vw,33px); }
}
