/* Ervin Central — built on the Catan companion's design system (Cinzel headlines with a gradient key
   word, mono eyebrows, glass cards, choice pills, stat tiles with a hero, hex motifs, ambient motion),
   recast in green. Layout ideas from DAKboard family boards. */

:root {
  --bg: #050b08;
  --s1: #08110c;
  --s2: #0b1610;
  --card: rgba(255, 255, 255, 0.028);
  --card-hi: rgba(255, 255, 255, 0.05);
  --hair: rgba(255, 255, 255, 0.06);
  --hair2: rgba(255, 255, 255, 0.11);
  --t0: #eef8f1;
  --t1: #dbe8df;
  --t2: #b3c6b9;
  --t3: #86998c;
  --t4: #677a6d;

  --acc: #4ade80;
  --acc-light: #86efac;
  --acc-rgb: 74, 222, 128;
  --lime: #c8f04e;
  --mint: #5eead4;
  --blue: #6ea8fe;
  --purple: #b07eff;
  --amber: #f0b03e;
  --red: #ef6f6f;
  --coin: #f5c542;
  --coin-rgb: 245, 197, 66;

  --display: 'Cinzel', 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;

  --r: 12px;
  --r-lg: 22px;
  --glide: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --glow: 0 0 32px rgba(var(--acc-rgb), 0.22);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  --tap: 48px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--t1);
  font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
b { color: var(--t0); font-weight: 700; }
code { font: 12px var(--mono); color: var(--acc-light); background: rgba(var(--acc-rgb), 0.08); padding: 2px 6px; border-radius: 6px; }

/* ---- Background: ambient light, hex field, fireflies -------------------------------------- */

.bg-ambient, .bg-hex, .fireflies { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bg-ambient {
  background:
    radial-gradient(ellipse 70% 45% at 8% 0%, rgba(var(--acc-rgb), 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 50% 38% at 96% 8%, rgba(200, 240, 78, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 88% 100%, rgba(94, 234, 212, 0.07) 0%, transparent 55%);
  animation: ambientDrift 26s ease-in-out infinite alternate;
}
.bg-hex {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97'%3E%3Cpath d='M28 0L56 16.17V48.5L28 64.67L0 48.5V16.17Z M28 64.67V97' fill='none' stroke='rgba(74,222,128,0.06)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 56px 97px;
  -webkit-mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, 0.35) 50%, transparent 85%);
  mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, 0.35) 50%, transparent 85%);
}
.fireflies i {
  position: absolute; width: var(--s); height: var(--s); border-radius: 50%;
  background: #d9f99d; box-shadow: 0 0 10px 3px rgba(190, 242, 100, 0.45); opacity: 0;
  animation: firefly var(--t) linear var(--d) infinite;
}
@keyframes firefly {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: var(--o); }
  30% { opacity: calc(var(--o) * 0.3); }
  45% { opacity: var(--o); }
  50% { transform: translate(calc(var(--dx) * 0.6), -28vh); }
  88% { opacity: calc(var(--o) * 0.8); }
  100% { transform: translate(var(--dx), -58vh); opacity: 0; }
}
@keyframes ambientDrift { to { transform: translate(-14px, 10px) scale(1.03); } }

/* ---- Top nav (sticky, follows the page) ----------------------------------------------------- */

.topnav {
  position: sticky; top: 0; z-index: 50;
  padding: calc(14px + var(--safe-t)) 28px 14px;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: padding 0.35s var(--glide), background 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.topnav.scrolled {
  padding-top: calc(8px + var(--safe-t)); padding-bottom: 8px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom-color: rgba(var(--acc-rgb), 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.tn-inner { max-width: 1440px; margin: 0 auto; display: flex; align-items: center; gap: 20px; }

.brand { display: flex; align-items: center; gap: 11px; flex: none; animation: logoIn 0.6s var(--glide) both; }
.brand-hex { width: 40px; height: 40px; border-radius: 11px; transition: width 0.35s var(--glide), height 0.35s var(--glide), border-radius 0.35s; box-shadow: 0 0 0 1px rgba(var(--acc-rgb), 0.35), 0 0 18px rgba(var(--acc-rgb), 0.25); }
.scrolled .brand-hex { width: 32px; height: 32px; border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font: 800 21px var(--display); letter-spacing: 0.04em; color: var(--t0); white-space: nowrap; transition: font-size 0.35s var(--glide); }
.scrolled .brand-name { font-size: 18px; }
.brand-name em { font-style: normal; color: var(--acc); }
.brand-sub { font: 700 10px var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--t4); margin-top: 3px; transition: opacity 0.3s; }
.scrolled .brand-sub { opacity: 0; height: 0; margin: 0; }

.tabs {
  position: relative; display: flex; gap: 2px; padding: 4px; margin: 0 auto;
  border-radius: 999px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--hair2);
}
.tabs a {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: 999px;
  font-weight: 800; font-size: 16px; color: var(--t3); white-space: nowrap;
  transition: color 0.25s;
}
.tabs a svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tabs a:active { transform: scale(0.96); }
.tabs a.on { color: var(--acc-light); }
/* Calendar and School tabs show on computers only; phones get just Home and Chores. */
@media (max-width: 1023px) { .tabs a.desk-tab { display: none; } }
@media (min-width: 1440px) { .tabs a { padding: 0 30px; } } /* big screens: the roomy pills */
.tab-glider {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: var(--w, 0); transform: translateX(var(--x, 0));
  border-radius: 999px; background: rgba(var(--acc-rgb), 0.14); border: 1px solid var(--acc); box-shadow: var(--glow);
  transition: transform 0.5s var(--spring), width 0.5s var(--spring), opacity 0.2s;
}
.tabs em {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center;
  font: 800 11px var(--sans); font-style: normal; color: #1a1200; background: var(--amber);
  animation: blink 2.4s ease-in-out infinite;
}
.tabs em[hidden] { display: none; }

.tn-right { display: flex; align-items: center; gap: 10px; flex: none; }
.tn-wx { font-weight: 700; color: var(--t2); font-size: 15px; white-space: nowrap; }
.tn-clock { font: 800 20px var(--sans); color: var(--t0); font-variant-numeric: tabular-nums; }
.tn-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 17px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hair2); transition: all 0.2s var(--glide);
}
.tn-btn:active { transform: scale(0.92); }
.admin-link { display: none; }
body.parent .admin-link { display: grid; }
@media (min-width: 1024px) { .admin-link { display: grid; } } /* computers: ⚙︎ Parent management always, left of ↻ */
.refresh-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--acc-light); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.refresh-btn.spin svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sync-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 3px rgba(var(--acc-rgb), 0.2); }
.sync-dot.warn { background: var(--amber); box-shadow: 0 0 0 3px rgba(240, 176, 62, 0.2); animation: blink 1.2s infinite; }
.sync-dot.err { background: var(--red); box-shadow: 0 0 0 3px rgba(239, 111, 111, 0.25); }
.sync-dot[hidden] { display: none; }

/* ---- Page frame ------------------------------------------------------------------------------ */

.page { position: relative; z-index: 1; max-width: 1440px; margin: 0 auto; padding: 6px 28px calc(60px + var(--safe-b)); }
.view { display: flex; flex-direction: column; gap: 16px; }

.page-hero { display: flex; align-items: flex-end; gap: 20px; padding: 22px 2px 6px; animation: fadeUp 0.55s var(--glide) both; }
.eyebrow { font: 700 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--acc-light); margin-bottom: 8px; }
.headline { margin: 0; font: 800 clamp(30px, 4vw, 48px)/1.08 var(--display); letter-spacing: 0.01em; color: var(--t0); }
.headline em {
  font-style: normal;
  background: linear-gradient(120deg, var(--acc-light), var(--lime) 45%, var(--acc) 70%, var(--mint));
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shine 7s ease-in-out infinite alternate;
}
.lede { margin: 10px 0 0; max-width: 720px; color: var(--t3); font-size: 15.5px; }
.lede b { color: var(--t1); }
.legend { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-weight: 600; color: var(--t2); }
.pdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--acc)); box-shadow: 0 0 8px var(--c, var(--acc)); flex: none; }

/* ---- Cards ----------------------------------------------------------------------------------- */

.card {
  position: relative; min-width: 0; display: flex; flex-direction: column; gap: 14px;
  background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 20px 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s, transform 0.25s var(--glide), box-shadow 0.25s;
  animation: cardIn 0.5s var(--glide) backwards; animation-delay: calc(var(--i, 0) * 70ms);
}
.card:hover { border-color: var(--hair2); }

.sh { display: flex; align-items: center; gap: 11px; }
.hexdot {
  width: 14px; height: 16px; flex: none; background: var(--c);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  filter: drop-shadow(0 0 6px var(--c));
}
.sh-text { min-width: 0; }
.sh-eyebrow { font: 700 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--t4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh h2 { margin: 0; font: 700 19px/1.2 var(--display); letter-spacing: 0.03em; color: var(--t0); }
.badge {
  margin-left: auto; font: 800 11.5px var(--sans); padding: 4px 10px; border-radius: 99px; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.sh-more { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--t3); padding: 8px 12px; border-radius: 99px; border: 1px solid var(--hair2); transition: all 0.2s; white-space: nowrap; }
.sh-more:active, .sh-more:hover { color: var(--acc-light); border-color: rgba(var(--acc-rgb), 0.45); }
.badge + .sh-more { margin-left: 6px; }

.stat-row { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-tile {
  flex: 1 1 110px; min-height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 10px; text-align: center; border-radius: var(--r); background: rgba(255, 255, 255, 0.02); border: 1px solid var(--hair);
}
.stat-tile .sv { font: 800 24px/1.1 var(--sans); color: var(--c, var(--t0)); font-variant-numeric: tabular-nums; }
.stat-tile .sl { font: 800 10px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--t3); }
.stat-tile .ss { font-size: 11px; color: var(--t4); }
.stat-tile.hero { background: color-mix(in srgb, var(--c, var(--acc)) 10%, transparent); border-color: color-mix(in srgb, var(--c, var(--acc)) 38%, transparent); box-shadow: inset 0 0 26px color-mix(in srgb, var(--c, var(--acc)) 10%, transparent); }
.stat-tile.hero .sv { font-size: 32px; color: var(--c, var(--acc)); }
.stat-tile.hero .sl { color: color-mix(in srgb, var(--c, var(--acc)) 85%, white); }

.chip {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px;
  color: color-mix(in srgb, var(--c) 75%, white); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
}
.empty { margin: 0; color: var(--t4); font-size: 14px; padding: 4px 0; }
.muted { margin: 0; color: var(--t3); font-size: 14px; }
.muted.small { font-size: 12px; color: var(--t4); }
.footnote { margin: 0; text-align: center; color: var(--t4); font: 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.row-dots { display: flex; gap: 4px; flex: none; }

.avatar {
  --sz: 38px; width: var(--sz); height: calc(var(--sz) * 1.1); flex: none; display: inline-grid; place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 70%, white), var(--c));
}
.avatar > span {
  width: calc(100% - 4px); height: calc(100% - 4px); display: grid; place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: color-mix(in srgb, var(--c) 22%, #07120c); font-size: calc(var(--sz) * 0.5); line-height: 1;
}
.avatar img { width: 66%; height: 66%; object-fit: contain; }
.avatar.xs { --sz: 22px; }
.avatar.sm { --sz: 30px; }
.avatar.lg { --sz: 54px; }
.avatar.xl { --sz: 78px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 18px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600; font-size: 14.5px; color: var(--t3); transition: all 0.2s var(--glide); white-space: nowrap;
}
.choice-pill:active { transform: scale(0.95); }
.choice-pill.selected {
  color: color-mix(in srgb, var(--c, var(--acc)) 70%, white);
  background: color-mix(in srgb, var(--c, var(--acc)) 14%, transparent); border-color: var(--c, var(--acc));
  box-shadow: 0 0 20px color-mix(in srgb, var(--c, var(--acc)) 20%, transparent);
}
.choice-pill .pdot { width: 8px; height: 8px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.nav-arrows { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.icon-btn {
  width: var(--tap); height: var(--tap); border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: var(--t2); flex: none;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); transition: all 0.2s var(--glide);
}
.icon-btn:active { transform: scale(0.9); border-color: var(--acc); }
.icon-btn.sm { width: 34px; height: 34px; font-size: 13px; }

.btn {
  min-height: 46px; padding: 0 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 700; font-size: 14.5px; color: var(--t1); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hair2);
  transition: all 0.2s var(--glide); position: relative; overflow: hidden;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.4; }
.btn.ghost { background: transparent; }
.btn.ok { color: var(--acc-light); background: rgba(var(--acc-rgb), 0.14); border-color: rgba(var(--acc-rgb), 0.55); }
.btn.ok::after { content: ""; position: absolute; top: 0; bottom: 0; left: -80%; width: 40%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent); animation: shimmer 3.2s ease-in-out infinite; }
.btn.danger { color: #ff9a9a; background: rgba(239, 111, 111, 0.12); border-color: rgba(239, 111, 111, 0.5); }
.btn.wide { width: 100%; }

.bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.bar > span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--c, var(--acc)); animation: grow 1s var(--glide) backwards 0.2s; }
.bar.coin > span { background: linear-gradient(90deg, var(--c), var(--coin)); }

.ring { position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; }
.ring-bg { stroke: rgba(255, 255, 255, 0.07); }
.ring-fg { stroke: var(--c); stroke-linecap: round; stroke-dashoffset: var(--off); filter: drop-shadow(0 0 6px var(--c)); animation: ringIn 1.1s var(--glide) backwards 0.15s; transition: stroke-dashoffset 0.6s var(--spring); }
.ring-in { position: absolute; inset: 0; display: grid; place-items: center; }

.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.cols.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* Motion */
.anim-fade-up { animation: fadeUp 0.55s var(--glide) both; }
.anim-card { animation: cardIn 0.5s var(--glide) backwards; animation-delay: calc(var(--i, 0) * 90ms); }
.anim-row { animation: rowIn 0.35s var(--glide) backwards; animation-delay: calc(var(--i, 0) * 45ms + 150ms); }
.view.settled .card, .view.settled .anim-row, .view.settled .anim-card, .view.settled .anim-fade-up, .view.settled .tile,
.view.settled .page-hero, .view.settled .bar > span, .view.settled .ring-fg, .view.settled .spark span, .view.settled .fc,
.view.settled .wk-day, .view.settled .mo-cell { animation: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(0.99); } }
@keyframes rowIn { from { opacity: 0; transform: translateX(-10px); } }
@keyframes logoIn { from { opacity: 0; transform: translateX(-14px); } }
@keyframes shine { from { background-position: 100% 50%; } to { background-position: 0% 50%; } }
@keyframes shimmer { 0%, 55% { left: -80%; } 85%, 100% { left: 130%; } }
@keyframes blink { 50% { opacity: 0.35; } }
@keyframes grow { from { width: 0; } }
@keyframes ringIn { from { stroke-dashoffset: var(--full); } }
@keyframes pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ---- Home ------------------------------------------------------------------------------------ */

/* The banner shows the time and weather, so the top bar doesn't repeat them on Home. */
body[data-route="home"] .tn-clock, body[data-route="home"] .tn-wx { display: none; }

.home-hero {
  position: relative; margin-top: 14px; min-height: clamp(210px, 30vw, 340px); border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid rgba(var(--acc-rgb), 0.22); box-shadow: var(--shadow), 0 0 60px rgba(var(--acc-rgb), 0.08);
}
.scene-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hh-overlay {
  position: relative; flex: 1; padding: 18px 22px 10px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  background: linear-gradient(rgba(3, 9, 6, 0.62), rgba(3, 9, 6, 0.25) 70%, transparent); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}
.hh-greet { min-width: 0; }
.hh-greet .eyebrow { margin-bottom: 6px; }
.hh-greet .headline { font-size: clamp(26px, 4vw, 48px); line-height: 1.02; }
.hh-now { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: none; }
.big-clock { font: 900 clamp(40px, 6vw, 80px)/0.95 var(--sans); color: #f3fff7; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; text-shadow: 0 6px 30px rgba(0, 0, 0, 0.5); }
.big-clock small { font-size: 0.3em; font-weight: 800; letter-spacing: 0.08em; margin-left: 5px; color: var(--acc-light); text-transform: uppercase; }
.big-clock .colon { animation: blink 2s steps(1) infinite; }
.hh-wx { display: flex; flex-direction: column; align-items: flex-end; margin-top: 6px; }
.hh-temp { display: flex; align-items: center; gap: 6px; font: 800 clamp(20px, 2.6vw, 30px) var(--sans); color: #f3fff7; }
.wx-i { font-size: 1.1em; line-height: 1; }
.hh-sky { font: 800 clamp(14px, 1.6vw, 18px) var(--sans); color: var(--acc-light); letter-spacing: 0.01em; }
/* Weather pills, then what to wear, along the bottom of the banner (over the grass). */
.hh-facts { position: relative; display: flex; flex-wrap: wrap; gap: 5px; padding: 0 22px 8px; }
.hh-fact { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; color: #e8fff1; background: rgba(3, 9, 6, 0.45); border: 1px solid rgba(255, 255, 255, 0.1); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hh-fact:first-child { color: var(--acc-light); }
.hh-wear {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 22px 14px;
  background: linear-gradient(transparent, rgba(3, 9, 6, 0.72) 45%); border-top: 1px solid rgba(var(--acc-rgb), 0.18);
}
.hh-wear[hidden] { display: none; }
.hh-wear-l { display: flex; flex-direction: column; font: 700 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--acc-light); margin-right: 4px; }
.hh-wear-l small { font-size: 9px; letter-spacing: 0.06em; color: var(--t3); }
.wear-it { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px 4px 8px; border-radius: 99px; font-weight: 700; font-size: 14px; color: var(--t0); background: rgba(var(--acc-rgb), 0.16); border: 1px solid rgba(var(--acc-rgb), 0.35); }

.star { fill: #e8fff1; animation: twinkle 3.2s ease-in-out infinite; animation-delay: var(--d); }
.fly { fill: #d9f99d; filter: drop-shadow(0 0 4px #bef264); transform-box: fill-box; animation: flyfloat 5s ease-in-out infinite alternate; animation-delay: var(--d); }
.cloud { fill: rgba(255, 255, 255, 0.07); animation: drift 70s linear infinite; animation-delay: var(--d); }
.cloud.slow { animation-duration: 110s; }
.pulse { transform-box: fill-box; transform-origin: center; animation: pulse 5s ease-in-out infinite alternate; }
.win { fill: #10251b; }
.win.on { fill: #fcd34d; filter: drop-shadow(0 0 6px rgba(252, 211, 77, 0.75)); animation: flicker 7s infinite; animation-delay: var(--d, 0s); }
@keyframes twinkle { 50% { opacity: 0.25; } }
@keyframes flyfloat { to { transform: translate(var(--dx), var(--dy)); opacity: 0.15; } }
@keyframes drift { from { transform: translateX(-180px); } to { transform: translateX(720px); } }
@keyframes pulse { to { transform: scale(1.14); opacity: 0.75; } }
@keyframes flicker { 0%, 48%, 52%, 100% { opacity: 1; } 50% { opacity: 0.8; } }

/* Weather over the scene (see scene.js skyKind) */
.cloud.puffy { fill: rgba(235, 250, 242, 0.13); }
.cloud.heavy { fill: rgba(150, 170, 160, 0.22); animation-duration: 140s; }
.cloud.heavy.slow { animation-duration: 190s; }
.sky-fog .cloud.heavy { fill: rgba(200, 215, 208, 0.1); }
.veiled { opacity: 0.3; }
.sky-rain .veiled, .sky-storm .veiled, .sky-snow .veiled, .sky-fog .veiled { opacity: 0.12; }
.rain line { stroke: rgba(190, 225, 255, 0.45); stroke-width: 1.2; stroke-linecap: round; animation: rainfall var(--t) linear infinite; animation-delay: var(--d); }
.sky-storm .rain line { stroke: rgba(190, 225, 255, 0.6); }
.snow circle { fill: #f3fff7; opacity: 0.85; animation: snowfall var(--t) linear infinite; animation-delay: var(--d); }
.snowcap { fill: #e8f5ec; opacity: 0.8; }
.fog rect { fill: rgba(220, 236, 229, 0.09); animation: fogdrift 36s ease-in-out infinite alternate; animation-delay: var(--d); }
.lightning { fill: #f5fbff; opacity: 0; animation: lightning 9s infinite; }
@keyframes rainfall { from { transform: translate(24px, -320px); } to { transform: translate(0, 0); } }
@keyframes snowfall { from { transform: translate(calc(var(--dx) * -1), -320px); } 50% { transform: translate(var(--dx), -160px); } to { transform: translate(calc(var(--dx) * -1), 0); } }
@keyframes fogdrift { from { transform: translateX(-60px); } to { transform: translateX(60px); } }
@keyframes lightning { 0%, 90%, 92%, 95%, 100% { opacity: 0; } 91% { opacity: 0.4; } 93.5% { opacity: 0.25; } }

.wi { font-size: 20px; line-height: 1; }

.fc-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fc {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--hair); animation: cardIn 0.45s var(--glide) backwards; animation-delay: calc(var(--i) * 50ms + 200ms);
}
.fc.today { border-color: rgba(var(--acc-rgb), 0.45); background: rgba(var(--acc-rgb), 0.07); }
.fc-d { font: 700 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--t3); }
.fc.today .fc-d { color: var(--acc-light); }
.fc-i { font-size: 28px; line-height: 1.2; }
.fc-t { font-size: 14px; color: var(--t3); }
.fc-t b { font-size: 16px; }
.fc-r { font-size: 11px; color: var(--acc-light); font-weight: 700; min-height: 15px; }
.fc-l { font-size: 11.5px; font-weight: 700; color: var(--t2); text-align: center; line-height: 1.2; }

.board { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; align-items: start; margin-top: 16px; }
.today-card { grid-column: span 8; grid-row: span 3; }
.sleep-card, .coming-card, .wx-card { grid-column: span 4; }
.cd-card { grid-column: span 12; }

/* Today: each girl's day, then a peek at tomorrow */
.td-family { display: flex; flex-wrap: wrap; gap: 6px; }
.td-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.td-kid { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 18px; background: color-mix(in srgb, var(--c) 6%, transparent); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); min-width: 0; }
.td-head { display: flex; align-items: center; gap: 10px; font: 800 19px var(--display); color: var(--t0); letter-spacing: 0.03em; min-height: 44px; }
.td-know { display: flex; flex-wrap: wrap; gap: 6px; }
.td-row { display: grid; grid-template-columns: 62px 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.18); border-left: 3px solid var(--c); }
.td-row.past { opacity: 0.45; }
.td-row.next { background: color-mix(in srgb, var(--c) 16%, rgba(0, 0, 0, 0.2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
.td-row.on { background: color-mix(in srgb, var(--acc) 16%, rgba(0, 0, 0, 0.2)); }
.td-t { font-weight: 700; font-size: 13px; color: var(--t2); font-variant-numeric: tabular-nums; }
.td-i { font-size: 20px; text-align: center; }
.td-main { display: flex; flex-direction: column; min-width: 0; }
.td-main b { font-weight: 700; color: var(--t0); font-size: 15px; line-height: 1.25; }
.td-main small { font-size: 12px; color: var(--t3); }
.td-in { font: 700 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--t3); text-align: right; white-space: nowrap; }
.td-in b { display: block; font: 900 17px var(--sans); letter-spacing: 0; color: var(--t0); font-variant-numeric: tabular-nums; }
.td-in.now { color: var(--acc-light); font-size: 11px; }
.td-free { font-size: 13px; color: var(--t4); padding: 2px 2px 4px; }
.td-lunch { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(var(--acc-rgb), 0.08); border: 1px solid rgba(var(--acc-rgb), 0.28); }
.td-lunch:empty { display: none; }
.td-lunch .sh-more { margin-left: auto; }
.ls { font-size: 12px; color: var(--t3); margin-top: 2px; }
.td-tomorrow { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--hair); }
.tm-kid { display: flex; align-items: flex-start; gap: 10px; }
.tm-bits { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; padding-top: 2px; }

/* The whole Tonight card takes the color of tonight's house (Dad blue, Mom pink); the weekend and
   week-of-nights chips inside keep each night's own parent color. */
.sleep-card {
  background: radial-gradient(ellipse at 15% 0%, color-mix(in srgb, var(--c) 42%, transparent), transparent 75%),
    linear-gradient(160deg, color-mix(in srgb, var(--c) 26%, #07120c), color-mix(in srgb, var(--c) 12%, #050b08));
  border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: var(--shadow), 0 0 40px color-mix(in srgb, var(--c) 18%, transparent);
}
.sleep-card .sh-eyebrow, .sleep-card .sn-sub { color: color-mix(in srgb, var(--c) 45%, white); }
.sleep-now { display: flex; align-items: center; gap: 14px; }
.sn-icon { font-size: 50px; line-height: 1; filter: drop-shadow(0 0 16px color-mix(in srgb, var(--c) 60%, transparent)); animation: bob 3s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(-3px) rotate(-6deg); } to { transform: translateY(3px) rotate(6deg); } }
.sn-place { font: 800 32px/1.05 var(--display); color: var(--c); letter-spacing: 0.02em; }
.sn-sub { font-size: 13px; color: var(--t3); font-weight: 600; }
.nights { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.night { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; border-radius: 10px; background: color-mix(in srgb, var(--c) 16%, rgba(0, 0, 0, 0.35)); border-bottom: 3px solid var(--c); animation: rowIn 0.35s var(--glide) backwards; animation-delay: calc(var(--i) * 45ms + 150ms); }
.night.today { background: color-mix(in srgb, var(--c) 22%, transparent); }
.nt-d { font: 700 9.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--t3); }
.night.today .nt-d { color: var(--t0); }
.nt-i { font-size: 17px; }
.nt-l { font-size: 10px; font-weight: 700; color: var(--t2); }
.weekends { display: flex; flex-direction: column; gap: 6px; }
.wkd { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--t2); padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--c) 16%, rgba(0, 0, 0, 0.35)); border-left: 3px solid var(--c); }
.wkd b { font: 700 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--t3); width: 92px; }
.wkd i { font-style: normal; margin-left: auto; color: var(--t4); font-size: 12px; }
.ev.holiday, .agl-item.holiday, .ev.birthday, .agl-item.birthday { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 18%, transparent), transparent); }


.cu-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--hair); }
.sh + .cu-row { border-top: 0; }
.cu-date { width: 46px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 5px 0; border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.cu-dow { font: 700 9.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--t3); }
.cu-day { font: 800 19px/1 var(--display); color: var(--t0); }
.cu-main { flex: 1; min-width: 0; }
.cu-title { font-weight: 700; color: var(--t0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-sub { font-size: 12.5px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-row.game .cu-date { box-shadow: 0 0 14px color-mix(in srgb, var(--c) 25%, transparent); }

.wk-sleep, .agl-sleep { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--c); padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c) 12%, transparent); align-self: flex-start; }
.mo-sleep { position: absolute; left: 8px; right: 8px; bottom: 5px; height: 3px; border-radius: 3px; background: var(--c); opacity: 0.7; }
.ev.game, .agl-item.game { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }


.lh-icon { font-size: 30px; }
.menu-week.wide { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.lk { font: 700 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--t3); }
.lm { font-weight: 800; color: var(--t0); font-size: 16.5px; line-height: 1.25; }


.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.lb-rank { width: 24px; text-align: center; font: 800 16px var(--display); color: var(--t3); }
.lb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lb-name { display: flex; justify-content: space-between; gap: 6px; font-weight: 800; color: var(--t0); }
.lb-name span { font-size: 11.5px; font-weight: 600; color: var(--t4); white-space: nowrap; }
.lb-val { font-size: 16px; color: var(--coin); white-space: nowrap; }
.lb-val b { color: var(--coin); font-size: 20px; font-weight: 900; }

.cd-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.cd {
  --c: var(--acc);
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 12px; row-gap: 1px; align-items: center;
  padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--c) 6%, transparent); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
}
.cd.kid { background: radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--c) 20%, transparent), transparent 70%), color-mix(in srgb, var(--c) 6%, transparent); border-color: color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 12%, transparent); }
.cd.birthday { --c: #ff8a99; }
.cd-i { grid-row: span 3; font-size: 32px; }
.cd-n { font: 900 30px/1 var(--sans); color: var(--c); font-variant-numeric: tabular-nums; }
.cd-l { font-weight: 800; font-size: 13px; color: var(--t0); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-s { font: 700 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--t4); }

/* ---- Calendar ---------------------------------------------------------------------------------- */

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wk-day {
  display: flex; flex-direction: column; gap: 8px; min-height: 260px; padding: 12px 8px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.02); border: 1px solid transparent;
  animation: cardIn 0.45s var(--glide) backwards; animation-delay: calc(var(--i) * 45ms + 120ms);
}
.wk-day.today { border-color: rgba(var(--acc-rgb), 0.55); background: rgba(var(--acc-rgb), 0.06); box-shadow: var(--glow); }
.wk-day.past { opacity: 0.45; }
.wk-head { display: flex; align-items: baseline; gap: 6px; padding: 0 4px; }
.wk-dow { font: 700 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--t4); }
.wk-num { font: 800 24px var(--display); color: var(--t0); }
.today .wk-num, .today .wk-dow { color: var(--acc-light); }
.wk-wx { margin-left: auto; font-size: 12px; color: var(--t3); white-space: nowrap; }
.wk-items { display: flex; flex-direction: column; gap: 6px; }
.ev { display: flex; flex-direction: column; padding: 8px 9px; border-radius: 10px; background: color-mix(in srgb, var(--c) 13%, transparent); border-left: 3px solid var(--c); }
.ev.school { background: rgba(255, 255, 255, 0.03); border-left-color: rgba(255, 255, 255, 0.14); }
.ev-t { font-size: 13px; font-weight: 700; color: var(--t0); line-height: 1.25; }
.ev-time { font-size: 11px; color: var(--t3); }
.ev-dots { display: flex; gap: 3px; margin-top: 4px; }
.ev-dots .dot { width: 7px; height: 7px; }
.ev-free { font-size: 12px; color: var(--t4); padding: 4px; }
.special { font-size: 11px; font-weight: 700; padding: 0 4px; color: color-mix(in srgb, var(--c) 75%, white); }

.agenda-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); align-items: start; }
.agl-card { gap: 8px; }
.agl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.agl-day { font: 700 19px var(--display); color: var(--t0); }
.agl-date { font: 11px var(--mono); color: var(--t4); letter-spacing: 0.06em; }
.agl-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 8%, transparent); border-left: 3px solid var(--c); }
.agl-time { width: 72px; flex: none; font-weight: 700; font-size: 13.5px; color: var(--t2); font-variant-numeric: tabular-nums; }
.agl-icon { font-size: 20px; }
.agl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.agl-title { font-weight: 700; color: var(--t0); }
.agl-sub { font-size: 12.5px; color: var(--t3); }

.mo-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mo-dow span { text-align: center; font: 700 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--t4); }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mo-cell {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-height: 112px; padding: 8px; text-align: left;
  border-radius: 14px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--hair); transition: all 0.2s var(--glide);
  animation: cardIn 0.4s var(--glide) backwards; animation-delay: calc(var(--i) * 18ms);
}
.mo-cell:active { transform: scale(0.97); border-color: var(--acc); }
.mo-cell.out { opacity: 0.35; }
.mo-cell.today { border-color: var(--acc); background: rgba(var(--acc-rgb), 0.08); box-shadow: var(--glow); }
.mo-num { font: 800 20px var(--display); color: var(--t0); }
.today .mo-num { color: var(--acc-light); }
.mo-school { position: absolute; top: 8px; right: 8px; font-size: 11px; opacity: 0.5; }
.mo-evs { display: flex; flex-direction: column; gap: 3px; }
.mo-ev { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; color: var(--t0); background: color-mix(in srgb, var(--c) 22%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mo-more { font-size: 10.5px; color: var(--t3); font-weight: 700; }
.sheet-list { display: flex; flex-direction: column; gap: 8px; text-align: left; }

/* ---- School ------------------------------------------------------------------------------------ */

.kid-banner { display: flex; align-items: center; gap: 14px; }
.kid-banner .eyebrow { margin-bottom: 2px; }
.kid-name { font: 800 26px/1.1 var(--display); color: var(--t0); }
.kid-sub { font-size: 13px; color: var(--t3); font-weight: 600; }
.specials { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.sp { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--hair); }
.sp.today { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.sp-d { font: 700 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--t4); }
.sp-v { font-size: 13px; font-weight: 700; color: var(--t0); }
.menu-week { display: flex; flex-direction: column; gap: 8px; }
.menu-day { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--hair); }
.menu-day.today { border-color: rgba(var(--acc-rgb), 0.6); background: rgba(var(--acc-rgb), 0.07); box-shadow: 0 0 24px rgba(var(--acc-rgb), 0.08); }
.md-head { display: flex; justify-content: space-between; font: 700 15px var(--display); color: var(--t0); letter-spacing: 0.03em; }
.md-date { font: 11px var(--mono); color: var(--t4); }
.menu-day.today .md-date { color: var(--acc-light); font-weight: 700; }
.meal { display: flex; flex-direction: column; gap: 4px; }
.meal.alt { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
.meal + .meal { border-top: 1px dashed var(--hair2); padding-top: 8px; }
.meal-l { font: 700 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--acc-light); }
.meal-main { font-size: 17px; font-weight: 800; color: var(--t0); }
.meal-sides { display: flex; flex-wrap: wrap; gap: 5px; }
.notes { margin: 0; padding-left: 18px; color: var(--t3); font-size: 13px; }

/* ---- Chores ------------------------------------------------------------------------------------ */

.kid-col { border-top: 3px solid var(--c); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, transparent), var(--card) 200px); }
.col-bal { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; }
.cb-l { font: 700 10px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--t4); }
.cb-v { font-size: 20px; color: var(--coin); white-space: nowrap; }
.cb-v b { color: var(--coin); font-size: 28px; font-weight: 900; }
.all-done { text-align: center; font: 700 20px var(--display); padding: 14px; border-radius: 16px; color: var(--t0); background: color-mix(in srgb, var(--c) 16%, transparent); animation: pop 0.6s var(--spring); }

.part { display: flex; flex-direction: column; gap: 10px; }
.part-l { display: flex; align-items: center; gap: 8px; font: 700 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--t3); }
.now-tag { font: 800 10px var(--sans); letter-spacing: 0.08em; padding: 3px 9px; border-radius: 99px; background: var(--acc); color: #03210f; animation: blink 2.4s infinite; }
.tiles { display: flex; flex-direction: column; gap: 8px; }
.tile {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 14px 8px 10px; text-align: left;
  border-radius: 16px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--hair2);
  transition: transform 0.25s var(--spring), background 0.3s, border-color 0.3s, box-shadow 0.3s;
  animation: cardIn 0.4s var(--glide) backwards; animation-delay: calc(var(--i) * 30ms + 120ms);
}
.tile:active { transform: scale(0.98); }
.t-icon { font-size: 26px; line-height: 1; flex: none; width: 32px; text-align: center; transition: transform 0.4s var(--spring); }
.t-title { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 700; font-size: 16px; color: var(--t0); line-height: 1.25; }
.t-title small { font-size: 12px; font-weight: 600; color: var(--t3); text-decoration: none; }
.t-coins { flex: none; display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; color: var(--coin); white-space: nowrap; }
.t-check {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 15px;
  border: 2px solid color-mix(in srgb, var(--c) 50%, transparent); transition: all 0.3s var(--spring);
}
.t-check svg { width: 18px; height: 18px; fill: none; stroke: #04140a; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 0.35s var(--glide) 0.1s; }
.tile.done { background: color-mix(in srgb, var(--c) 16%, transparent); border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 0 24px color-mix(in srgb, var(--c) 18%, transparent); }
.tile.done .t-check { background: var(--c); border-color: var(--c); box-shadow: 0 0 14px var(--c); animation: pop 0.5s var(--spring); }
.tile.done .t-check svg { stroke-dashoffset: 0; }
.tile.done .t-icon { transform: scale(0.9) rotate(-8deg); }
.tile.done .t-title { color: var(--t2); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--c) 70%, transparent); }
.tile.extra { border-style: dashed; border-color: rgba(var(--coin-rgb), 0.3); }
.tile.extra.waiting { border-color: rgba(240, 176, 62, 0.6); background: rgba(240, 176, 62, 0.07); }
.tile.extra:disabled { cursor: default; }

/* Kid tabs at the top of Chores — a slim pill bar like the top nav, each tab with her coins. Avery first
   (chores.json → kidOrder). The bar sticks under the top nav (chores.js → watchBar sets `top`); once
   it's stuck, .kid-info drops down under it as an overlay, so the list underneath doesn't jump. */
.kid-bar { position: sticky; top: 64px; z-index: 40; display: flex; flex-direction: column; align-self: stretch; }
.kid-tabs {
  align-self: flex-start; display: flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--hair2);
  background: color-mix(in srgb, var(--bg) 96%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.kid-tab {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px 0 10px; border-radius: 999px;
  font: 800 16px var(--sans); color: var(--t3); border: 1px solid transparent; white-space: nowrap; transition: all 0.25s var(--glide);
}
.kid-tab:active { transform: scale(0.96); }
.kid-tab.selected { color: var(--t0); border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: 0 0 20px color-mix(in srgb, var(--c) 22%, transparent); }
.kt-coins { display: inline-flex; align-items: center; gap: 4px; color: var(--coin); font-weight: 900; font-variant-numeric: tabular-nums; }
.kid-info {
  position: absolute; top: calc(100% + 6px); left: 0; width: max-content; max-width: 100%;
  display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 18px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity 0.25s var(--glide), transform 0.3s var(--spring);
}
.kid-bar.stuck .kid-info { opacity: 1; transform: none; }
.ki-pct { font: 800 11px var(--sans); color: var(--t0); }
.ki-main { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ki-main b { font-size: 14px; color: var(--t0); }
.ki-main small { font-size: 12px; font-weight: 600; color: var(--t3); }
.ki-jars { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ki-jars span { color: var(--h); }
.ki-jars b { color: var(--coin); }

/* The gold coin (ui.js → coin()), used everywhere a coin shows. */
.coin { display: inline-block; width: 0.86em; height: 1.04em; vertical-align: -0.16em; flex: none; filter: drop-shadow(0 0 4px rgba(var(--coin-rgb), 0.45)); }
.coin.xl { width: 46px; height: 56px; vertical-align: middle; animation: coinFlip 4s ease-in-out infinite; }
@keyframes coinFlip { 0%, 70%, 100% { transform: rotateY(0); } 85% { transform: rotateY(180deg); } }

.coin-burst {
  position: fixed; z-index: 90; transform: translate(-50%, 0); pointer-events: none;
  font: 900 28px var(--sans); color: var(--coin); text-shadow: 0 2px 16px rgba(var(--coin-rgb), 0.7);
  animation: burst 1s var(--glide) forwards;
}
@keyframes burst { 0% { opacity: 0; transform: translate(-50%, 10px) scale(0.5); } 25% { opacity: 1; transform: translate(-50%, -24px) scale(1.2); } 100% { opacity: 0; transform: translate(-50%, -96px) scale(1); } }

/* ---- Coins ------------------------------------------------------------------------------------- */


.pend-card { border-color: rgba(240, 176, 62, 0.4); box-shadow: 0 0 40px rgba(240, 176, 62, 0.06); }
.pend { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--c) 7%, transparent); border-left: 3px solid var(--c); }
.pend-i { font-size: 26px; }
.pend-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pend-t { font-weight: 700; color: var(--t0); }
.pend-s { font-size: 12.5px; color: var(--t3); }
.pend-amt { font-weight: 900; font-size: 18px; color: var(--acc); }
.pend-amt.neg, .hist-amt.neg { color: var(--red); }
.pend .btn { min-width: 48px; padding: 0 14px; }

/* Reward shop: slim rows (icon · name · price), in columns on wide screens and one list on phones. */
.shop { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.reward {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 14px 6px 10px; text-align: left;
  border-radius: 14px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--hair2); transition: transform 0.2s var(--spring);
}
.reward:active { transform: scale(0.98); }
.reward.can { border-color: rgba(var(--coin-rgb), 0.5); background: rgba(var(--coin-rgb), 0.06); box-shadow: 0 0 24px rgba(var(--coin-rgb), 0.08); }
.reward.can::after { content: ""; position: absolute; top: 0; bottom: 0; left: -80%; width: 40%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 240, 180, 0.12), transparent); animation: shimmer 4s ease-in-out infinite; }
.r-icon { flex: none; width: 32px; text-align: center; font-size: 24px; line-height: 1; }
.r-title { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; color: var(--t0); line-height: 1.25; }
.r-cost { flex: none; display: flex; align-items: center; gap: 5px; font-weight: 900; color: var(--coin); white-space: nowrap; }

.hist { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--hair); }
.sh + .hist { border-top: 0; }
.hist-i { font-size: 20px; width: 26px; text-align: center; }
.hist-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hist-t { font-weight: 600; color: var(--t0); }
.hist-s { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--t4); }
.hist-amt { font-weight: 900; color: var(--acc); font-variant-numeric: tabular-nums; }
.adj-row, .tool-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adj-row > span { font-weight: 700; color: var(--t0); margin-right: auto; }

/* ---- Admin ------------------------------------------------------------------------------------- */

.kid-card { border-top: 3px solid var(--c, var(--hair)); }
.locked { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 0; text-align: center; }
.sync-state.ok { color: var(--acc); font-weight: 700; }
.sync-state.warn { color: var(--amber); font-weight: 700; }
.sync-state.err { color: var(--red); font-weight: 700; }
input[type="text"], input[type="number"] {
  min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--hair2); background: rgba(0, 0, 0, 0.3);
  color: var(--t0); font: 600 16px var(--sans); -webkit-user-select: text; user-select: text; min-width: 0; width: 100%;
}
input:focus { outline: none; border-color: var(--acc); box-shadow: var(--glow); }
.spend { display: flex; flex-direction: column; gap: 10px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick .choice-pill { min-height: 40px; padding: 0 14px; }
.field-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; }
.field-row.custom-row { grid-template-columns: 110px 1fr; }
.connect { display: flex; flex-direction: column; gap: 10px; }
.connect label { display: flex; flex-direction: column; gap: 5px; font: 700 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--t4); }
.connect details[open] label { margin-top: 8px; }
.connect summary { cursor: pointer; }
.bin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bin-list li { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }
.bin-list code { overflow: hidden; text-overflow: ellipsis; }
.dev-l { margin: 16px 0 8px; }
.me-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.me-links li { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); background: color-mix(in srgb, var(--c) 8%, transparent); }
.me-links b { color: var(--c); }
.me-links code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--t3); }
.me-links .btn { min-height: 44px; }

/* ---- Modal, PIN, toast --------------------------------------------------------------------------- */

.modal { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; padding: 16px; background: rgba(2, 6, 4, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.modal.open { display: grid; animation: fadeIn 0.2s; }
.sheet {
  width: min(440px, 100%); max-height: 88dvh; overflow: auto; display: flex; flex-direction: column; gap: 14px; text-align: center; padding: 26px;
  background: linear-gradient(180deg, #0d1a12, #09120d); border: 1px solid rgba(var(--acc-rgb), 0.25); border-radius: 26px; box-shadow: var(--shadow), var(--glow);
  animation: sheetIn 0.4s var(--spring);
}
@keyframes sheetIn { from { transform: translateY(20px) scale(0.94); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
.sheet .eyebrow { margin: 0; }
.sheet-icon { font-size: 56px; animation: pop 0.6s var(--spring); }
.sheet-title { margin: 0; font: 800 24px var(--display); color: var(--t0); }
.sheet-sub { margin: 0; color: var(--t3); }
.who-pick { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.who-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 20px; min-width: 130px; border-radius: 20px; background: color-mix(in srgb, var(--c) 10%, transparent); border: 2px solid color-mix(in srgb, var(--c) 45%, transparent); transition: transform 0.2s var(--spring); }
.who-btn:active { transform: scale(0.94); }
.who-btn small { font-size: 12px; color: var(--t3); }
.who-btn.disabled { opacity: 0.35; }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 4px 0; }
.pin-dots span { width: 16px; height: 18px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: rgba(255, 255, 255, 0.15); transition: all 0.2s var(--spring); }
.pin-dots span.on { background: var(--acc); transform: scale(1.2); }
.pin-dots.shake { animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pinpad button { min-height: 64px; border-radius: 18px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hair2); font: 700 26px var(--sans); transition: transform 0.15s var(--spring); }
.pinpad button.pressed, .pinpad button:active { transform: scale(0.92); background: rgba(var(--acc-rgb), 0.2); border-color: var(--acc); }

.toast {
  position: fixed; left: 50%; bottom: calc(26px + var(--safe-b)); z-index: 95; transform: translate(-50%, 30px); opacity: 0; max-width: 90vw;
  padding: 14px 22px; border-radius: 999px; background: #0e1a12; border: 1px solid var(--c); box-shadow: var(--shadow), 0 0 24px color-mix(in srgb, var(--c) 30%, transparent);
  font-weight: 700; color: var(--t0); pointer-events: none; transition: all 0.4s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- Houses: a coin jar at Dad's and at Mom's (blue / pink come from the sleep schedule) ------------ */

.jars { display: flex; gap: 8px; }
.jar { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--h) 9%, transparent); border: 1px solid color-mix(in srgb, var(--h) 40%, transparent); }
.jar-l { font-weight: 700; font-size: 13px; color: var(--h); white-space: nowrap; }
.jar-v { color: var(--coin); font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jar-v b { color: var(--coin); font-size: 18px; font-weight: 900; }
.house-tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 99px; font: 700 11px var(--sans); color: var(--h); background: color-mix(in srgb, var(--h) 14%, transparent); white-space: nowrap; vertical-align: 1px; }
.house-btn .hb-icon { font-size: 34px; line-height: 1; }
.house-btn b { color: var(--c); font-size: 18px; }
.house-btn.here { background: color-mix(in srgb, var(--c) 22%, transparent); border-color: var(--c); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 30%, transparent); }
.house-btn.here small { color: var(--t1); font-weight: 700; }
.part.weekly { padding-top: 12px; border-top: 1px dashed var(--hair2); }
.part-n { margin-left: auto; font: 600 11px var(--sans); letter-spacing: 0; text-transform: none; color: var(--t4); }
.t-coins small { font-weight: 600; color: var(--t4); }

.lb-row { color: inherit; text-decoration: none; min-height: 48px; }
.lb-next { font-size: 12px; font-weight: 600; color: var(--t4); }
.td-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; font-size: 13px; font-weight: 700; color: var(--t3); }
.td-more:active, .td-more:hover { color: var(--acc-light); }
.full-cal { margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 8px; }
/* 🗺️ Map on away events (ui.js → awayMap): a small pill, with an invisible 44px tap area around it. */
.map-mini {
  position: relative; align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 3px 10px;
  border-radius: 999px; font: 800 12px var(--sans); color: var(--acc-light); background: rgba(var(--acc-rgb), 0.1); border: 1px solid rgba(var(--acc-rgb), 0.4); white-space: nowrap;
}
.map-mini::before { content: ""; position: absolute; inset: -8px -4px; }
.map-mini:active { transform: scale(0.94); }

/* Parent management · Who did what */
.log { display: flex; flex-direction: column; max-height: 520px; overflow: auto; }
.log-day { position: sticky; top: 0; z-index: 1; padding: 10px 2px 6px; font: 700 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--t3); background: #0a140e; }
.log-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid var(--hair); border-left: 3px solid var(--c); padding-left: 10px; }
.log-t { width: 64px; flex: none; font-size: 12px; font-weight: 700; color: var(--t4); font-variant-numeric: tabular-nums; }
.log-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--t1); }
.log-main small { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--t4); }
.log-amt { font-weight: 900; color: var(--acc); font-variant-numeric: tabular-nums; }
.log-amt.neg { color: var(--red); }

.site-foot { position: relative; z-index: 1; display: flex; justify-content: center; padding: 0 16px calc(28px + var(--safe-b)); margin-top: -24px; }
.parent-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 700 14px var(--sans); color: var(--t2); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--hair2); transition: transform 0.2s var(--spring), border-color 0.2s; }
.parent-btn:active { transform: scale(0.95); }
.parent-btn.on { color: var(--h); border-color: color-mix(in srgb, var(--h) 55%, transparent); background: color-mix(in srgb, var(--h) 10%, transparent); }

/* ---- Locked (a device without its key: views/lock.js) ------------------------------------------- */

body[data-route="locked"] .tabs { visibility: hidden; }
body[data-route="locked"] .admin-link, body[data-route="locked"] .site-foot, body[data-route="locked"] .sync-dot { display: none; }
.lock-card { display: grid; justify-items: center; gap: 12px; padding: 6px 2px 2px; text-align: center; }
.lock-icon { font-size: 48px; animation: pop 0.6s var(--spring); }
.lock-title { margin: 0; font: 800 22px var(--display); color: var(--t0); }
.lock-card .btn { min-height: 52px; font-size: 17px; }
.lock-gp { display: flex; align-items: center; gap: 14px; min-height: 56px; color: var(--t1); text-decoration: none; }
.lock-gp > span:nth-child(2) { flex: 1; }
.lock-gp b { display: block; font-size: 17px; color: var(--t0); }
.lock-gp small { display: block; margin-top: 2px; font-size: 14px; color: var(--t3); }
.lock-gp-i { font-size: 30px; }

/* ---- Grandparents Central ------------------------------------------------------------------------
   A page Matt sends to the grandparents: bigger type, names spelled out, no family-HQ chrome. */

body[data-route="grandparents"] .tabs { visibility: hidden; } /* keeps its space so the right side stays right */
body[data-route="grandparents"] .admin-link, body[data-route="grandparents"] .site-foot { display: none; }
.gp-next-card { border-color: color-mix(in srgb, var(--c, var(--acc)) 40%, transparent); }
.gp-next {
  display: flex; align-items: center; gap: 18px; padding: 16px 18px; border-radius: 18px;
  background: radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%), color-mix(in srgb, var(--c) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 12%, transparent);
}
.gp-next-icon { font-size: 52px; line-height: 1; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--c) 55%, transparent)); animation: bob 3s ease-in-out infinite alternate; }
.gp-next-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gp-next-title { font: 800 clamp(22px, 2.6vw, 30px)/1.15 var(--display); color: var(--t0); }
.gp-next-when { font-weight: 800; font-size: 18px; color: color-mix(in srgb, var(--c) 70%, white); }
.gp-next-sub { font-size: 16px; color: var(--t2); }
.gp-month { gap: 4px; }
.gp-month .sh { margin-bottom: 6px; }
.gp-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--hair); }
.gp-month .sh + .gp-row { border-top: 0; }
.gp-date {
  width: 58px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 7px 0; border-radius: 14px;
  background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
}
.gp-dow { font: 700 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--t2); }
.gp-day { font: 800 25px/1.05 var(--display); color: var(--t0); }
.gp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gp-title { font-weight: 800; font-size: 17.5px; color: var(--t0); line-height: 1.3; }
.gp-sub { font-size: 15px; color: var(--t2); }
.gp-kids { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.gp-acts { flex: none; display: flex; flex-direction: column; gap: 6px; }
.gp-map { text-decoration: none; }
.gp-kid { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; font-size: 13.5px; font-weight: 800; color: color-mix(in srgb, var(--c) 80%, white); background: color-mix(in srgb, var(--c) 12%, transparent); }
.gp-row.birthday .gp-date { box-shadow: 0 0 16px color-mix(in srgb, var(--c) 35%, transparent); }
.gp-add {
  flex: none; min-width: 60px; min-height: 46px; padding: 3px 10px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: 20px; color: var(--acc-light); background: rgba(var(--acc-rgb), 0.08); border: 1px solid rgba(var(--acc-rgb), 0.35); transition: transform 0.2s var(--spring);
}
.gp-add:active { transform: scale(0.92); }
.gp-add-l { font: 800 11px var(--sans); letter-spacing: 0.04em; }
.gp-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 6px 0 10px; }
.gp-foot .btn { min-height: 52px; font-size: 16px; }

/* The way in, at the bottom of the full calendar. */
.gp-link {
  display: flex; align-items: center; gap: 14px; min-height: 64px; margin-top: 4px; padding: 12px 20px; border-radius: var(--r-lg);
  background: linear-gradient(100deg, rgba(var(--acc-rgb), 0.1), transparent 70%); border: 1px solid rgba(var(--acc-rgb), 0.3);
  transition: transform 0.2s var(--spring), border-color 0.2s;
}
.gp-link:active { transform: scale(0.98); border-color: var(--acc); }
.gp-link-i { font-size: 28px; }
.gp-link-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gp-link-t b { font: 700 18px var(--display); letter-spacing: 0.03em; }
.gp-link-t small { font-size: 13px; color: var(--t3); }
.gp-link-go { font-size: 22px; color: var(--acc-light); }

/* ---- iPad portrait / small laptops -------------------------------------------------------------- */

@media (max-width: 1180px) {
  .brand-sub { display: none; }
  .tabs a { padding: 0 12px; gap: 6px; font-size: 14.5px; }
  .tn-wx { display: none; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-card, .coming-card, .cd-card { grid-column: span 2; grid-row: auto; }
  .sleep-card, .wx-card { grid-column: span 1; }
  .cd-card { grid-column: span 2; }
  .cd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .menu-week.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); }
  .cols.two { grid-template-columns: minmax(0, 1fr); }
  .tn-wx { display: none; }
}

/* ---- iPhone ------------------------------------------------------------------------------------ */

@media (max-width: 700px) {
  .topnav { padding: calc(10px + var(--safe-t)) 14px 10px; }
  .topnav.scrolled { padding-top: calc(6px + var(--safe-t)); padding-bottom: 6px; }
  /* One row: app icon · tabs · lock. The phone's own status bar has the time. */
  .tn-inner { gap: 8px; }
  .brand-text, .tn-clock, .tn-wx { display: none !important; }
  .brand-hex, .scrolled .brand-hex { width: 32px; height: 32px; border-radius: 9px; }
  body.parent .brand { display: none; } /* room for the admin gear; the Home tab goes home */
  .tn-right { gap: 6px; }
  .tabs { flex: 1; min-width: 0; margin: 0; justify-content: space-between; }
  .tabs a { flex: 1; min-width: 0; justify-content: center; padding: 0 8px; min-height: 46px; }
  .tabs em { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
  .page { padding: 2px 12px calc(32px + var(--safe-b)); }
  /* Tighter rhythm: less scrolling */
  .view, .stack, .cols, .board { gap: 10px; }
  .board { margin-top: 10px; }
  .card { padding: 14px 15px; gap: 10px; }
  .page-hero { padding-top: 14px; }
  .headline { font-size: 30px; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .today-card, .sleep-card, .coming-card, .wx-card, .cd-card { grid-column: auto; }
  .td-cols { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .home-hero { margin-top: 8px; }
  .home-hero { min-height: 157px; }
  .hh-overlay { padding: 12px 14px 6px; }
  .hh-facts { padding: 0 14px 6px; gap: 4px; }
  .hh-fact { font-size: 11.5px; padding: 2px 8px; }
  .hh-wear { padding: 8px 14px 10px; gap: 5px; }
  .wear-it { min-height: 30px; font-size: 12.5px; padding: 3px 10px 3px 6px; gap: 4px; }
  .hh-greet .headline { font-size: 20px; }
  .hh-temp { font-size: 18px; }
  .hh-sky { font-size: 13px; }
  .hh-greet .eyebrow { font-size: 10px; margin-bottom: 4px; }
  .td-kid { padding: 10px; }
  .td-row { grid-template-columns: 58px 22px minmax(0, 1fr) auto; padding: 8px; gap: 6px; }
  .week { grid-template-columns: minmax(0, 1fr); }
  .wk-day { min-height: 0; }
  .wk-day.past { display: none; }
  .mo-cell { min-height: 64px; padding: 5px; }
  .mo-ev { font-size: 0; padding: 0; height: 5px; border-radius: 3px; background: var(--c); }
  .mo-num { font-size: 15px; }
  .mo-more, .mo-school { display: none; }
  .agenda-list { grid-template-columns: minmax(0, 1fr); }
  .nav-arrows { margin-left: 0; }
  .specials { gap: 4px; }
  .sp { padding: 7px 5px; }
  .sp-v { font-size: 11px; }
  .bonus-grid { grid-template-columns: minmax(0, 1fr); }
  .big-clock { font-size: 31px; }
  .field-row { grid-template-columns: 90px 1fr; }
  .field-row .btn { grid-column: 1 / -1; }
  .cd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-week.wide { grid-template-columns: minmax(0, 1fr); }
  .cd { padding: 12px; column-gap: 8px; }
  .cd-i { font-size: 24px; }
  .cd-n { font-size: 24px; }
  /* Tonight: one compact row + a slim strip, instead of a tall card */
  .sleep-card { padding: 14px 16px; gap: 10px; }
  .sleep-card .sh { display: none; }
  .sleep-now { gap: 10px; }
  .sn-icon { font-size: 30px; }
  .sn-text { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .sn-text::before { content: "Tonight"; font: 700 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--t3); width: 100%; }
  .sn-place { font-size: 22px; }
  .weekends { flex-direction: row; gap: 6px; }
  .wkd { flex: 1; flex-wrap: wrap; gap: 2px 6px; font-size: 12px; padding: 5px 8px; }
  .wkd b { width: auto; }
  .wkd i { margin-left: 0; width: 100%; }
  .night { padding: 4px 0; }
  .nt-l { display: none; }
  .nt-i { font-size: 14px; }
  .kid-tabs { align-self: stretch; }
  .shop { grid-template-columns: minmax(0, 1fr); }
  .jar { padding: 6px 9px; gap: 4px; }
  .jar-l { font-size: 12px; }
  .jar-v b { font-size: 16px; }
  .kid-tab { flex: 1; min-width: 0; gap: 6px; padding: 0 8px; font-size: 15px; }
  .kid-info { width: auto; right: 0; }
  .tile .ht-l { display: none; }
  .t-title { font-size: 15px; }
  .col-bal { flex-direction: row; align-items: baseline; gap: 8px; margin-left: 0; width: 100%; }
  /* Grandparents Central: the nav has room for the name, since the tabs are hidden there */
  body[data-route="grandparents"] .brand-text { display: flex !important; }
  body[data-route="grandparents"] .brand-name { font-size: 18px; }
  .gp-next { gap: 10px; padding: 12px; }
  .gp-next-icon { font-size: 38px; }
  .gp-row { gap: 10px; }
  .gp-date { width: 50px; }
  .gp-day { font-size: 22px; }
  .gp-title { font-size: 16.5px; }
  .gp-sub { font-size: 14px; }
  .gp-add { min-width: 52px; }
  .gp-foot .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .fireflies { display: none; }
}
