/* =====================================================================
   Leona Aquino · design system
   "Savana & Rosé": liquid glass over soft savana/rosé light, Fraunces for
   display and numerals, the system face (SF) for text. Apple-like restraint:
   one hero entrance, short ease-out transitions, a slow drifting sky.
   ===================================================================== */

/* ---------- Fonts (self-hosted Fraunces variable: opsz + wght) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/fraunces-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/fraunces-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens: light ---------- */
:root {
  color-scheme: light;
  --bg: #f3ebe2;
  --fg: #342a26;
  --fg-2: #54463f;
  --muted: #7d6d66;
  --faint: #a3958e;
  --rose: #c56f7c;
  --rose-deep: #a9535f;
  --rose-soft: rgba(197, 111, 124, .14);
  --rose-line: rgba(197, 111, 124, .38);
  --gold: #b5852f;
  --gold-deep: #8f6720;
  --gold-soft: rgba(181, 133, 47, .14);
  --gold-line: rgba(181, 133, 47, .45);
  --plum: #8b5a8d;
  --plum-soft: rgba(139, 90, 141, .13);
  --sage: #6f8f74;
  --sage-deep: #557259;
  --sage-soft: rgba(111, 143, 116, .16);
  --glass: rgba(255, 255, 255, .50);
  --glass-strong: rgba(255, 255, 255, .74);
  --glass-line: rgba(255, 255, 255, .78);
  --glass-hi: rgba(255, 255, 255, .95);
  --spec: rgba(255, 255, 255, .55);
  --shadow: rgba(90, 55, 45, .28);
  --line: rgba(60, 40, 35, .10);
  --line-strong: rgba(60, 40, 35, .18);
  --sunken: rgba(60, 40, 35, .06);
  --sunken-strong: rgba(60, 40, 35, .14);
  --ok: #3f8a57;
  --ok-soft: rgba(63, 138, 87, .14);
  --warn: #c2652e;
  --warn-soft: rgba(194, 101, 46, .14);
  --info: #5a7ea6;
  --info-soft: rgba(90, 126, 166, .14);
  --b1: #f0c2c4;
  --b2: #ebcb9c;
  --b3: #f8ddd5;
  --b4: #dccbb7;
  --knob: #ffffff;
  --on-accent: #ffffff;
  --img-blend: multiply;
  --img-bg: transparent;
  --img-shadow: none;
  --bar: rgba(246, 239, 231, .62);
  --bar-scrolled: rgba(246, 239, 231, .80);
  --bar-line: rgba(60, 40, 35, .10);
  --tab-bg: rgba(255, 255, 255, .58);
  --lens: rgba(255, 255, 255, .92);
  --sheet-bg: rgba(250, 245, 240, .86);
  --solid: #fbf7f3;
  --ring-bg: #fbf7f3;
  --backdrop: rgba(45, 28, 22, .30);
  --toast-bg: rgba(44, 33, 29, .90);
  --toast-fg: #f7f0e9;
  --focus: #c56f7c;
  --grad: linear-gradient(120deg, #c99a45 0%, #c56f7c 100%);
  --grad-text: linear-gradient(135deg, #c08f3a 8%, #c56f7c 72%);
  --display: "Fraunces", ui-serif, Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.32, .64, 1);
  --maxw: 1120px;
  --gutter: 16px;
  --bar-h: 56px;
  --tabbar-room: 0px;
}

/* ---------- Tokens: dark (system, unless forced light) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #17120f;
    --fg: #f2eae3;
    --fg-2: #d8ccc3;
    --muted: #a8998f;
    --faint: #7a6d66;
    --rose: #e49ba6;
    --rose-deep: #f0b7bf;
    --rose-soft: rgba(228, 155, 166, .16);
    --rose-line: rgba(228, 155, 166, .42);
    --gold: #e1b35e;
    --gold-deep: #f0c877;
    --gold-soft: rgba(225, 179, 94, .16);
    --gold-line: rgba(225, 179, 94, .5);
    --plum: #cfa2d1;
    --plum-soft: rgba(207, 162, 209, .15);
  --sage: #9bb89f;
  --sage-deep: #b7cfba;
  --sage-soft: rgba(155, 184, 159, .18);
    --glass: rgba(48, 36, 32, .56);
    --glass-strong: rgba(60, 46, 41, .80);
    --glass-line: rgba(255, 255, 255, .12);
    --glass-hi: rgba(255, 255, 255, .16);
    --spec: rgba(255, 255, 255, .10);
    --shadow: rgba(0, 0, 0, .55);
    --line: rgba(255, 255, 255, .10);
    --line-strong: rgba(255, 255, 255, .17);
    --sunken: rgba(255, 255, 255, .06);
    --sunken-strong: rgba(255, 255, 255, .14);
    --ok: #7cc48f;
    --ok-soft: rgba(124, 196, 143, .16);
    --warn: #eaa070;
    --warn-soft: rgba(234, 160, 112, .16);
    --info: #90b4dc;
    --info-soft: rgba(144, 180, 220, .16);
    --b1: #5b2f36;
    --b2: #5a4220;
    --b3: #40292c;
    --b4: #2a211d;
    --knob: #f4ece6;
    --on-accent: #221816;
    --img-blend: normal;
    --img-bg: #f4ece3;
    --img-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
    --bar: rgba(26, 20, 17, .62);
    --bar-scrolled: rgba(26, 20, 17, .82);
    --bar-line: rgba(255, 255, 255, .09);
    --tab-bg: rgba(44, 34, 30, .66);
    --lens: rgba(255, 255, 255, .13);
    --sheet-bg: rgba(38, 29, 26, .90);
    --solid: #2a201c;
    --ring-bg: #2a201c;
    --backdrop: rgba(0, 0, 0, .52);
    --toast-bg: rgba(74, 60, 54, .94);
    --toast-fg: #faf3ec;
    --focus: #e49ba6;
    --grad: linear-gradient(120deg, #d9a856 0%, #e08f9c 100%);
    --grad-text: linear-gradient(135deg, #e6b765 8%, #eaa0ac 72%);
  }
}

/* ---------- Tokens: dark (forced) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17120f;
  --fg: #f2eae3;
  --fg-2: #d8ccc3;
  --muted: #a8998f;
  --faint: #7a6d66;
  --rose: #e49ba6;
  --rose-deep: #f0b7bf;
  --rose-soft: rgba(228, 155, 166, .16);
  --rose-line: rgba(228, 155, 166, .42);
  --gold: #e1b35e;
  --gold-deep: #f0c877;
  --gold-soft: rgba(225, 179, 94, .16);
  --gold-line: rgba(225, 179, 94, .5);
  --plum: #cfa2d1;
  --plum-soft: rgba(207, 162, 209, .15);
  --sage: #9bb89f;
  --sage-deep: #b7cfba;
  --sage-soft: rgba(155, 184, 159, .18);
  --glass: rgba(48, 36, 32, .56);
  --glass-strong: rgba(60, 46, 41, .80);
  --glass-line: rgba(255, 255, 255, .12);
  --glass-hi: rgba(255, 255, 255, .16);
  --spec: rgba(255, 255, 255, .10);
  --shadow: rgba(0, 0, 0, .55);
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .17);
  --sunken: rgba(255, 255, 255, .06);
  --sunken-strong: rgba(255, 255, 255, .14);
  --ok: #7cc48f;
  --ok-soft: rgba(124, 196, 143, .16);
  --warn: #eaa070;
  --warn-soft: rgba(234, 160, 112, .16);
  --info: #90b4dc;
  --info-soft: rgba(144, 180, 220, .16);
  --b1: #5b2f36;
  --b2: #5a4220;
  --b3: #40292c;
  --b4: #2a211d;
  --knob: #f4ece6;
  --on-accent: #221816;
  --img-blend: normal;
  --img-bg: #f4ece3;
  --img-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
  --bar: rgba(26, 20, 17, .62);
  --bar-scrolled: rgba(26, 20, 17, .82);
  --bar-line: rgba(255, 255, 255, .09);
  --tab-bg: rgba(44, 34, 30, .66);
  --lens: rgba(255, 255, 255, .13);
  --sheet-bg: rgba(38, 29, 26, .90);
  --solid: #2a201c;
  --ring-bg: #2a201c;
  --backdrop: rgba(0, 0, 0, .52);
  --toast-bg: rgba(74, 60, 54, .94);
  --toast-fg: #faf3ec;
  --focus: #e49ba6;
  --grad: linear-gradient(120deg, #d9a856 0%, #e08f9c 100%);
  --grad-text: linear-gradient(135deg, #e6b765 8%, #eaa0ac 72%);
}
:root[data-theme="light"] { color-scheme: light; }

@media (min-width: 700px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }
@media (min-width: 900px) { :root { --bar-h: 64px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html.has-sheet { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern";
}
img, svg, video { max-width: 100%; }
img { height: auto; }
a { color: var(--rose-deep); text-decoration-thickness: from-font; text-underline-offset: .18em; }
button { font: inherit; color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
::selection { background: var(--rose-soft); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.num { font-variant-numeric: tabular-nums lining-nums; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.noscript { padding: 40px 24px; text-align: center; font-size: 1.1rem; }

/* ---------- Icons ---------- */
.ico {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: middle;
}

/* ---------- Sky ---------- */
.sky {
  position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42% 36% at 16% 18%, var(--b1), transparent 72%),
    radial-gradient(36% 42% at 86% 12%, var(--b2), transparent 72%),
    radial-gradient(46% 40% at 72% 88%, var(--b3), transparent 72%),
    radial-gradient(36% 32% at 12% 84%, var(--b4), transparent 72%),
    var(--bg);
  animation: drift 80s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift { to { transform: translate3d(2.5%, -2%, 0) scale(1.05); } }

/* ---------- App frame ---------- */
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: clip; }
body.has-tabbar { --tabbar-room: calc(88px + max(0px, env(safe-area-inset-bottom) - 8px)); }
@media (min-width: 900px) { body.has-tabbar { --tabbar-room: 0px; } }
.page {
  flex: 1;
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 4px max(var(--gutter), env(safe-area-inset-right)) calc(56px + var(--tabbar-room)) max(var(--gutter), env(safe-area-inset-left));
  overflow-x: clip;
}
.page:focus { outline: none; }
/* No animation on .view itself: an animated ancestor becomes a stacking context / backdrop root and
   would break the multiply-blended illustrations and the glass blur. Only the hero enters. */
.view { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.view > * { min-width: 0; }
@media (min-width: 720px) { .view { gap: 24px; } }

/* =====================================================================
   Global header (Apple-style glass bar)
   ===================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 40;
  padding-top: env(safe-area-inset-top);
  background: var(--bar);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
  border-bottom: .5px solid var(--bar-line);
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease);
}
.topbar.is-scrolled { background: var(--bar-scrolled); box-shadow: 0 10px 30px -24px var(--shadow); }
.topbar-inner {
  position: relative;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  height: var(--bar-h);
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

/* Brand */
.brand {
  grid-column: 1;
  justify-self: start;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding-right: 8px;
  color: var(--fg); text-decoration: none;
  border-radius: 99px;
}
.brand-mark {
  width: 36px; height: 36px; flex: none;
  padding: 1.5px; border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 6px 14px -8px var(--rose);
  transition: transform .4s var(--spring);
}
.brand-mark img { display: block; width: 100%; height: 100%; border-radius: 50%; background: #f5ece0; }
.brand-word {
  font-family: var(--display);
  font-size: 1.4rem; font-weight: 520; line-height: 1;
  letter-spacing: -.02em;
  font-variation-settings: "opsz" 72;
  transition: opacity .25s var(--ease), transform .3s var(--ease);
}
@media (hover: hover) { .brand:hover .brand-mark { transform: rotate(-8deg) scale(1.04); } }

/* Section links (≥ 900 px) with the sliding gradient underline */
.toplinks { display: none; }
@media (min-width: 900px) {
  .toplinks { grid-column: 2; position: relative; display: flex; align-items: center; gap: 2px; height: 100%; justify-self: center; }
  .toplink {
    position: relative; display: inline-flex; align-items: center;
    height: 40px; padding: 0 13px; border-radius: 12px;
    color: var(--muted); text-decoration: none;
    font-size: .92rem; font-weight: 550; letter-spacing: -.01em; white-space: nowrap;
    transition: color .25s var(--ease), background-color .25s var(--ease);
  }
  .toplink.is-active { color: var(--fg); }
  .toplink.is-active[data-tone="rose"] { color: var(--rose-deep); }
  .toplink.is-active[data-tone="gold"] { color: var(--gold-deep); }
  .toplinks-ink {
    position: absolute; left: 0; bottom: 9px;
    width: 0; height: 2.5px; border-radius: 3px;
    background: var(--grad);
    box-shadow: 0 2px 10px var(--rose-soft);
    opacity: 0; pointer-events: none;
    transition: transform .55s var(--spring), width .55s var(--spring), opacity .3s;
  }
}
@media (min-width: 900px) and (hover: hover) {
  .toplink:hover { color: var(--fg); background: var(--sunken); }
}
@media (min-width: 1100px) { .toplink { padding: 0 15px; } }
.no-anim { transition: none !important; }

/* Compact title (< 900 px), iOS large-title behavior */
.topbar-title {
  position: absolute; left: 50%; top: 50%;
  max-width: 46%;
  margin: 0;
  font-size: 1.0625rem; font-weight: 650; letter-spacing: -.015em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translate(-50%, -35%);
  transition: opacity .25s var(--ease), transform .3s var(--ease);
  pointer-events: none;
}
.topbar.show-title .topbar-title { opacity: 1; transform: translate(-50%, -50%); }
@media (max-width: 899px) {
  .topbar.show-title .brand-word { opacity: 0; transform: translateX(-6px); }
}
@media (min-width: 900px) { .topbar-title { display: none; } }

/* Right side: sync indicator + account */
.topbar-actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 6px; }
.sync-chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 99px;
  border: 1px solid var(--glass-line); background: var(--glass-strong);
  color: var(--muted); font-size: .8rem; font-weight: 650; cursor: pointer;
  box-shadow: inset 0 1px 0 var(--glass-hi);
}
.sync-chip::after { content: ""; position: absolute; inset: -6px -2px; }
.sync-chip .ico { width: 17px; height: 17px; }
.sync-chip.is-offline { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.sync-chip.is-error { color: var(--warn); }
.sync-chip.is-pending { color: var(--gold-deep); }
.sync-chip.is-syncing .ico { animation: lift 1.4s var(--ease) infinite; }
.sync-count { font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .sync-text { display: none; } .sync-chip { padding: 0 10px; } }
/* 900–1023 px: the eight section links need the room; the chip keeps its icon (and its aria-label). */
@media (min-width: 900px) and (max-width: 1023px) { .sync-text { display: none; } .sync-chip { padding: 0 10px; } }
@keyframes lift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }

.account-btn {
  width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center; border-radius: 50%;
}
.account-initial {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad);
  color: var(--on-accent);
  font: 500 1.06rem/1 var(--display);
  box-shadow: 0 8px 18px -10px var(--rose), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .3s var(--spring);
}
@media (hover: hover) { .account-btn:hover .account-initial { transform: scale(1.06); } }
.account-btn:active .account-initial { transform: scale(.94); }

/* =====================================================================
   Floating glass tab bar (< 900 px)
   ===================================================================== */
.tabbar {
  position: fixed; z-index: 45;
  left: 50%; bottom: max(10px, calc(env(safe-area-inset-bottom) - 6px));
  width: min(560px, calc(100% - 2 * var(--gutter)));
  transform: translateX(-50%);
}
.tabbar-inner {
  position: relative;
  display: flex; align-items: stretch;
  height: 66px; padding: 6px; border-radius: 33px;
  background: var(--tab-bg);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 22px 44px -18px var(--shadow), 0 2px 8px -3px rgba(0, 0, 0, .10);
}
.tabbar-lens {
  position: absolute; top: 6px; bottom: 6px; left: 0;
  width: 0; border-radius: 27px;
  background: var(--lens);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 6px 16px -10px var(--shadow);
  opacity: 0;
  transition: transform .55s var(--spring), width .55s var(--spring), opacity .25s;
}
.tab {
  position: relative; z-index: 1;
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; background: none; border-radius: 27px; cursor: pointer;
  color: var(--muted); text-decoration: none;
  font: 650 .66rem/1 var(--body); letter-spacing: .01em;
  transition: color .25s var(--ease);
}
.tab .ico { width: 25px; height: 25px; transition: transform .35s var(--spring); }
.tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.tab.is-active { color: var(--fg); }
.tab.is-active[data-tone="rose"] { color: var(--rose-deep); }
.tab.is-active[data-tone="gold"] { color: var(--gold-deep); }
.tab.is-active .ico { transform: translateY(-1px); }
.tab:active .ico { transform: scale(.86); }
@media (min-width: 900px) { .tabbar { display: none; } }

/* "Mais" sheet */
.more-list { display: flex; flex-direction: column; gap: 8px; }
.more-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
  width: 100%; padding: 12px 14px; min-height: 64px;
  border-radius: var(--r-md); border: 1px solid var(--glass-line);
  background: var(--glass-strong); color: var(--fg); text-decoration: none; text-align: left; cursor: pointer;
  box-shadow: inset 0 1px 0 var(--glass-hi);
  transition: transform .15s var(--ease), background-color .2s;
}
.more-item:active { transform: scale(.98); }
.more-item.is-active { box-shadow: inset 0 0 0 1.5px var(--rose-line); }
.more-ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--gold-soft); color: var(--gold-deep);
}
.more-item[data-tone="rose"] .more-ico { background: var(--rose-soft); color: var(--rose-deep); }
.more-item--account .more-ico { background: var(--sunken); color: var(--fg); }
.more-text { display: flex; flex-direction: column; min-width: 0; }
.more-text b { font-weight: 650; }
.more-text small { color: var(--muted); font-size: .84rem; }
.more-chev { color: var(--faint); width: 18px; height: 18px; }

/* =====================================================================
   Large-title heroes
   ===================================================================== */
.hero {
  --glow: rgba(197, 111, 124, .34);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "head art" "body body";
  gap: 8px 16px;
  align-items: center;
  padding: 18px 2px 4px;
}
.hero--gold { --glow: rgba(196, 146, 60, .34); }
.hero-head { grid-area: head; min-width: 0; }
.hero-body { grid-area: body; min-width: 0; }
.hero-eyebrow { min-height: 1.2em; }
.hero-title {
  margin-top: 6px;
  font-family: var(--display);
  font-weight: 380;
  font-size: clamp(2.4rem, 1.4rem + 4.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -.03em;
  font-variation-settings: "opsz" 144;
}
.hero-title:focus { outline: none; }
.lead, .hero-lead {
  max-width: 60ch;
  margin-top: 12px;
  color: var(--fg-2);
  font-size: clamp(1.06rem, 1rem + .3vw, 1.2rem);
  line-height: 1.5;
  text-wrap: pretty;
}
.lead em {
  font-family: var(--display); font-style: italic; font-weight: 420;
  font-size: 1.08em; color: var(--fg);
}
.hero-lead:empty, .hero-extra:empty { display: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-art {
  grid-area: art; position: relative; margin: 0;
  width: clamp(88px, 25vw, 128px);
  justify-self: end; align-self: start;
}
.hero-art::before {
  content: ""; position: absolute; inset: -22%; z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent 75%);
  filter: blur(10px);
}
.hero-art img {
  display: block; width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 28%;
  mix-blend-mode: var(--img-blend);
  background: var(--img-bg);
  box-shadow: var(--img-shadow);
}
.hero--noart { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "body"; }
@media (min-width: 720px) {
  .hero {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, .62fr);
    grid-template-areas: "head art" "body art";
    gap: 0 48px; padding: 34px 4px 8px; align-items: start;
  }
  .hero-head { align-self: end; }
  .hero-art { width: min(100%, 290px); align-self: center; justify-self: center; }
  .hero--rev { grid-template-columns: minmax(0, .62fr) minmax(0, 1.5fr); grid-template-areas: "art head" "art body"; }
  .hero--noart { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "body"; }
}
/* The one hero entrance. fill-mode "backwards": nothing lingers once it ends (see .view note). The art
   animates the <img> itself, never an ancestor, so multiply keeps blending with the page. */
.hero.enter .hero-eyebrow, .hero.enter .hero-title, .hero.enter .hero-lead, .hero.enter .hero-extra, .hero.enter .hero-actions {
  animation: rise .7s var(--ease) backwards;
}
.hero.enter .hero-title { animation-delay: .04s; }
.hero.enter .hero-lead { animation-delay: .1s; }
.hero.enter .hero-extra { animation-delay: .16s; }
.hero.enter .hero-actions { animation-delay: .2s; }
.hero.enter .hero-art img { animation: art-in .9s var(--ease) .06s backwards; }
.hero.enter .hero-art::before { animation: glow-in 1.4s var(--ease) .1s backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes art-in { from { opacity: 0; transform: scale(.94) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes glow-in { from { opacity: 0; } }

/* Countdown / age panel (Hoje, Início) */
.hero-extra { container-type: inline-size; }
.clock {
  margin-top: 22px; padding: 18px 20px; max-width: 660px;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "stats" "tri";
  gap: 16px; border-radius: var(--r-lg);
}
@container (min-width: 600px) {
  .clock { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "main stats" "tri tri"; gap: 18px 26px; padding: 20px 24px; align-items: end; }
  .clock-stats { justify-content: flex-end; }
}
.clock-main { grid-area: main; display: flex; align-items: flex-end; gap: 12px; min-width: 0; }
.numeral {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(4.4rem, 3rem + 5vw, 6.6rem); line-height: .8;
  letter-spacing: -.05em;
  font-variation-settings: "opsz" 144;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  padding: .08em .05em .04em 0;
}
.clock-label { padding-bottom: .55em; color: var(--muted); font-size: .95rem; line-height: 1.25; }
.clock-label b { display: block; color: var(--fg); font-weight: 650; }
.clock-stats { grid-area: stats; display: flex; gap: 10px; min-width: 0; }
.mini-stat { flex: 1 1 0; min-width: 0; max-width: 210px; padding: 10px 14px; border-radius: var(--r-md); background: var(--sunken); }
.mini-stat b { display: block; font: 420 1.42rem/1.1 var(--display); letter-spacing: -.015em; white-space: nowrap; }
.mini-stat small { font: 650 .6em var(--body); color: var(--muted); letter-spacing: 0; }
.mini-stat span { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tri { grid-area: tri; min-width: 0; }
.tri-track, .tri-legend { display: grid; grid-template-columns: 14fr 14fr 11fr; gap: 5px; }
.tri--life .tri-track { grid-template-columns: 1fr; }
.tri--life .tri-legend { display: flex; justify-content: space-between; }
.tri-seg { position: relative; height: 8px; border-radius: 99px; background: var(--sunken-strong); overflow: hidden; }
.tri-seg i { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); border-radius: inherit; background: var(--grad); transition: width .9s var(--ease); }
.tri-seg:nth-child(1) i { background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--gold) 66%, var(--rose))); }
.tri-seg:nth-child(2) i { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 66%, var(--rose)), color-mix(in srgb, var(--gold) 33%, var(--rose))); }
.tri-seg:nth-child(3) i { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 33%, var(--rose)), var(--rose)); }
.tri--life .tri-seg i { background: var(--grad); }
.tri-legend { margin-top: 8px; color: var(--muted); font-size: .74rem; }
.tri-legend .is-current { color: var(--fg); font-weight: 650; }

/* Stat chips (Ludmilla, Leona, Equipe heroes) */
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.stat {
  flex: 1 1 140px; min-width: 0; max-width: 270px;
  padding: 12px 16px; border-radius: var(--r-md);
  background: var(--glass-strong); border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-hi);
}
.stat b { display: block; font: 380 2rem/1.05 var(--display); letter-spacing: -.02em; }
.stat b small { font: 650 .5em var(--body); color: var(--muted); letter-spacing: 0; }
.stat b.stat-text { padding-top: 6px; font-size: 1.12rem; font-weight: 450; line-height: 1.25; letter-spacing: -.005em; }
.stat > span { display: block; margin-top: 4px; color: var(--muted); font-size: .8rem; }
.stat.rose b { color: var(--rose-deep); }
.stat.gold b { color: var(--gold-deep); }
.stat b.stat-money { font-size: 1.5rem; line-height: 1.2; white-space: nowrap; }
@media (max-width: 559px) { .stat { max-width: none; } }

/* =====================================================================
   Glass, cards, sections
   ===================================================================== */
.glass {
  position: relative;
  background: linear-gradient(135deg, var(--spec), transparent 42%), var(--glass);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 24px 60px -30px var(--shadow);
}
.glass.tint-rose { background: linear-gradient(135deg, var(--spec), transparent 42%), linear-gradient(135deg, var(--rose-soft), transparent 62%), var(--glass); }
.glass.tint-gold { background: linear-gradient(135deg, var(--spec), transparent 42%), linear-gradient(135deg, var(--gold-soft), transparent 62%), var(--glass); }
.card { padding: 20px; min-width: 0; }
@media (min-width: 720px) { .card { padding: 24px 26px; } }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-titles { min-width: 0; }
.card-title { margin-top: 4px; font: 430 1.42rem/1.15 var(--display); letter-spacing: -.015em; }
.card-sub { margin-top: 4px; color: var(--muted); font-size: .9rem; }
.card-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.card-lead { color: var(--fg-2); }
.card-foot { margin-top: 12px; color: var(--muted); font-size: .86rem; }
.card-foot b { color: var(--fg); font-weight: 650; }
.card-note { display: flex; align-items: center; gap: 8px; margin: -4px 0 10px; padding: 8px 12px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-deep); font-size: .86rem; font-weight: 600; }
.card-note .ico { width: 18px; height: 18px; }
.card-link {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; min-height: 44px;
  color: var(--rose-deep); font-weight: 600; font-size: .92rem; text-decoration: none;
}
.card-link .ico { width: 16px; height: 16px; transition: transform .25s var(--ease); }
@media (hover: hover) { .card-link:hover .ico { transform: translateX(3px); } }
.card-cta {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 16px 20px; color: var(--fg); text-decoration: none;
}
.card-cta > .ico:first-child { width: 22px; height: 22px; color: var(--rose-deep); }
.card-cta span { display: flex; flex-direction: column; }
.card-cta small { color: var(--muted); }
.card-cta .ico:last-child { color: var(--faint); }

.eyebrow { margin: 0; font-size: .72rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.eyebrow.rose { color: var(--rose-deep); }
.eyebrow.gold { color: var(--gold-deep); }

.section { display: flex; flex-direction: column; gap: 14px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 10px 4px 0; }
.section-title { font: 420 1.75rem/1.1 var(--display); letter-spacing: -.02em; }
.section-sub { margin-top: 4px; color: var(--muted); font-size: .92rem; max-width: 70ch; }

/* Grids: an even 2-column grid; an odd last card spans both columns (ui.balanceGrid). */
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 720px) { .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } .grid2 > .span2 { grid-column: 1 / -1; } }
.people-grid, .positions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.people-grid > .card, .positions-grid > .card { grid-column: 1 / -1; }

/* =====================================================================
   Controls
   ===================================================================== */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 99px;
  border: 1px solid var(--glass-line); background: var(--glass-strong); color: var(--fg);
  font: 620 .95rem/1 var(--body); letter-spacing: -.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  -webkit-user-select: none; user-select: none;
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 6px 16px -12px var(--shadow);
  transition: transform .15s var(--ease), box-shadow .2s, background-color .2s, color .2s, opacity .2s;
}
.btn .ico { width: 18px; height: 18px; stroke-width: 2; }
@media (hover: hover) { .btn:hover { transform: translateY(-1px); } }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: default; transform: none; }
.btn.rose {
  border-color: transparent; color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rose) 88%, #fff), var(--rose));
  box-shadow: 0 10px 24px -12px var(--rose), inset 0 1px 0 rgba(255, 255, 255, .28);
}
:root[data-theme="dark"] .btn.rose { color: var(--on-accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.rose { color: var(--on-accent); } }
.btn.gold { border-color: transparent; color: var(--on-accent); background: var(--gold); box-shadow: 0 10px 24px -12px var(--gold); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); padding: 0 12px; }
@media (hover: hover) { .btn.ghost:hover { color: var(--fg); background: var(--sunken); transform: none; } }
.btn.danger { background: transparent; box-shadow: none; color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.btn.danger-solid { border-color: transparent; background: var(--warn); color: var(--on-accent); box-shadow: 0 10px 24px -14px var(--warn); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .86rem; }
.btn.sm::after { content: ""; position: absolute; inset: -4px -2px; }
.btn.ghost.sm { padding: 0 10px; }
.btn.block { width: 100%; }
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy > * { visibility: hidden; }
.btn.is-busy::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  color: var(--fg); animation: spin .8s linear infinite;
}
.btn.rose.is-busy::before, .btn.danger-solid.is-busy::before { color: var(--on-accent); }
.icon-btn {
  width: 44px; height: 44px; flex: none; padding: 0;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer;
  transition: background-color .2s, color .2s, transform .15s var(--ease);
}
.icon-btn .ico { width: 20px; height: 20px; }
@media (hover: hover) { .icon-btn:hover { background: var(--sunken); color: var(--fg); } }
.icon-btn:active { transform: scale(.92); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.round { background: var(--glass-strong); border: 1px solid var(--glass-line); color: var(--fg); box-shadow: inset 0 1px 0 var(--glass-hi); }
.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Pills */
.pill {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  height: 24px; padding: 0 10px; border-radius: 99px;
  background: var(--sunken); color: var(--muted);
  font-size: .74rem; font-weight: 650; letter-spacing: .005em; white-space: nowrap;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.late { background: var(--warn-soft); color: var(--warn); }
.pill.soon { background: var(--gold-soft); color: var(--gold-deep); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.rose { background: var(--rose-soft); color: var(--rose-deep); }
.pill.gold { background: var(--gold-soft); color: var(--gold-deep); }
.pill.outline-gold { background: transparent; color: var(--gold-deep); box-shadow: inset 0 0 0 1.5px var(--gold-line); }

/* Avatars (tones .av0–.av4; never .g0–.g4: .g2 is the two-column form row) */
.avatar {
  --s: 40px;
  position: relative; flex: none;
  width: var(--s); height: var(--s); border-radius: 50%;
  display: inline-grid; place-items: center; overflow: hidden;
  background: var(--av, var(--grad)); color: #fff;
  font: 500 calc(var(--s) * .38)/1 var(--display); letter-spacing: -.01em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  -webkit-user-select: none; user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar img.is-broken { opacity: 0; }
.avatar.av0 { --av: linear-gradient(135deg, #d6a24d, #c56f7c); }
.avatar.av1 { --av: linear-gradient(135deg, #c97a86, #94587a); }
.avatar.av2 { --av: linear-gradient(135deg, #c9a07a, #a26c54); }
.avatar.av3 { --av: linear-gradient(135deg, #9cb39d, #5e8a73); }
.avatar.av4 { --av: linear-gradient(135deg, #93a9c8, #5a7ea6); }
.avatar-stack { display: inline-flex; padding-left: 8px; }
.avatar-stack .avatar { margin-left: -8px; box-shadow: 0 0 0 2.5px var(--ring-bg); }
.avatar-more { background: var(--sunken-strong); color: var(--fg); font-family: var(--body); font-weight: 650; font-size: .8rem; }
.avatar.is-empty { --av: var(--sunken-strong); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.avatar.is-empty .ico { width: 46%; height: 46%; }

/* Progress ring */
.ring { --s: 64px; --p: 0; position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); flex: none; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.2; }
.ring-track { stroke: var(--sunken-strong); }
.ring-bar { stroke: var(--rose); stroke-linecap: round; stroke-dasharray: var(--p) 100; transition: stroke-dasharray .8s var(--ease); }
.ring.is-zero .ring-bar { opacity: 0; }
.ring-label { position: relative; font: 400 1.25rem/1 var(--display); letter-spacing: -.02em; }
.ring-label small { font: 650 .55em var(--body); color: var(--muted); }

/* Progress bar */
.progress { margin-top: 14px; }
.progress-bar { height: 8px; border-radius: 99px; background: var(--sunken); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06); }
.progress-bar i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--grad); transition: width .8s var(--ease); }
.progress-legend { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; color: var(--muted); font-size: .8rem; }

/* =====================================================================
   Lists and rows
   ===================================================================== */
.list { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px 14px; align-items: center;
  min-height: 56px; padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row.two { grid-template-columns: minmax(0, 1fr) auto; }
.row--mini { min-height: 50px; padding: 8px 0; }
.row-main {
  min-width: 0; align-self: stretch;
  display: flex; flex-direction: column; justify-content: center;
  margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left;
}
button.row-main { cursor: pointer; border-radius: 10px; }
button.row-main:focus-visible { outline-offset: 3px; }
.row-title { display: block; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.row-sub { display: block; margin-top: 2px; color: var(--muted); font-size: .86rem; line-height: 1.4; overflow-wrap: anywhere; }
.row-sub.ellipsis, .row-title.ellipsis { overflow-wrap: normal; }
.row-flight { display: flex; align-items: center; gap: 6px; color: var(--gold-deep); font-weight: 600; }
.row-flight .ico { width: 15px; height: 15px; }
.row-end {
  display: flex; flex-direction: column; align-items: flex-end; gap: 5px;
  color: var(--muted); font-size: .84rem; white-space: nowrap; text-align: right;
}
.row.done .row-title { color: var(--muted); font-weight: 500; text-decoration: line-through; text-decoration-color: var(--faint); }
.is-pending { opacity: .72; }
.empty-row { padding: 12px 0 4px; color: var(--muted); font-size: .93rem; }
.empty-row em, .empty em { font-family: var(--display); font-style: italic; font-size: 1.05em; }
.more-note { margin-top: 6px; color: var(--muted); font-size: .84rem; }
.who { display: inline-flex; align-items: center; gap: 5px; margin-right: 6px; font-weight: 650; }
.who::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.who--gold { color: var(--gold-deep); }
.who--rose { color: var(--rose-deep); }
.who:not(:last-child)::after { content: "·"; margin-left: 6px; color: var(--faint); font-weight: 400; }

/* Round check with a 44 px hit area */
.check-hit { display: grid; place-items: center; width: 44px; height: 44px; margin: -9px -6px -9px -9px; cursor: pointer; }
.check {
  appearance: none; -webkit-appearance: none;
  position: relative; flex: none;
  width: 26px; height: 26px; margin: 0;
  border-radius: 50%; border: 1.75px solid var(--sunken-strong); background: transparent; cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .25s var(--spring);
}
.check::after {
  content: ""; position: absolute; left: 7.5px; top: 3.5px; width: 6px; height: 11px;
  border: solid var(--on-accent); border-width: 0 2.2px 2.2px 0;
  transform: rotate(45deg) scale(0); transition: transform .25s var(--spring);
}
.check:checked { background: var(--ok); border-color: var(--ok); }
.check:checked::after { transform: rotate(45deg) scale(1); }
.check:active { transform: scale(.9); }
.check:disabled { opacity: .55; cursor: default; }

/* Inline add (pedidos) */
.inline-add { display: flex; gap: 8px; margin-top: 12px; }
.inline-add .input { flex: 1; min-width: 0; }
.inline-add .btn { flex: none; }
@media (max-width: 380px) { .inline-add .btn span { display: none; } .inline-add .btn { width: 48px; padding: 0; } }

/* =====================================================================
   Forms
   ===================================================================== */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { color: var(--muted); font-size: .8rem; font-weight: 650; letter-spacing: .01em; }
.field-opt { color: var(--faint); font-weight: 500; }
.field-hint { margin: 0; color: var(--faint); font-size: .8rem; line-height: 1.4; }
.field-note { padding: 10px 14px; border-radius: var(--r-sm); background: var(--sunken); color: var(--muted); font-size: .86rem; }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 380px) { .g2 { grid-template-columns: minmax(0, 1fr); } }
.input, .form input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]), .form select, .form textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: var(--sunken); color: var(--fg);
  font: 16px/1.4 var(--body);
  -webkit-appearance: none; appearance: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
select.input {
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 21px) 52%, calc(100% - 15px) 52%;
  background-size: 6px 6px; background-repeat: no-repeat;
}
.input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--rose-soft); background-color: var(--glass-strong);
}
.input::placeholder { color: var(--faint); }
input[type="date"].input, input[type="time"].input { display: block; text-align: left; }
input[type="date"].input::-webkit-date-and-time-value, input[type="time"].input::-webkit-date-and-time-value { text-align: left; }
.input:user-invalid { border-color: var(--warn); }

/* Segmented control */
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 14px; background: var(--sunken); }
.seg-opt { position: relative; flex: 1 1 0; min-width: 0; }
.seg-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg-opt span {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 8px; border-radius: 11px;
  color: var(--muted); font-size: .88rem; font-weight: 620; text-align: center; line-height: 1.15;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.seg-opt .ico { width: 17px; height: 17px; }
.seg-opt input:checked + span { background: var(--lens); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 4px 12px -6px var(--shadow); }
.seg-opt input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 1px; }

/* Switch */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; cursor: pointer; }
.switch-text { display: flex; flex-direction: column; min-width: 0; color: var(--fg); font-weight: 520; }
.switch-text small { color: var(--muted); font-size: .82rem; font-weight: 400; margin-top: 2px; }
.switch { position: relative; flex: none; width: 51px; height: 31px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--sunken-strong); transition: background-color .25s var(--ease); }
.switch i::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: var(--knob); box-shadow: 0 3px 8px rgba(0, 0, 0, .22);
  transition: transform .3s var(--spring);
}
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.switch input:disabled + i { opacity: .45; }

/* Stepper */
.stepper { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 4px; border-radius: 99px; background: var(--sunken); }
.stepper button {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--glass-strong); color: var(--fg); cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .07);
}
.stepper button:active { transform: scale(.92); }
.stepper output { min-width: 76px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }

/* Range */
.range-wrap { display: flex; align-items: center; gap: 14px; }
.range-wrap input[type="range"] { flex: 1; min-height: 32px; accent-color: var(--rose); }
.range-out { min-width: 64px; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }

/* Avatar picker */
.avatar-field { display: flex; align-items: center; gap: 18px; }
.avatar-preview { position: relative; display: grid; place-items: center; width: 96px; height: 96px; flex: none; }
.avatar-preview .avatar { box-shadow: 0 0 0 3px var(--ring-bg), 0 10px 24px -12px var(--shadow); }
.avatar-preview .ring { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; }
.avatar-preview.is-uploading .ring { opacity: 1; }
.avatar-preview .ring-label { display: none; }
.avatar-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }

/* Password with generator */
.pw-field { display: flex; gap: 8px; align-items: center; }
.pw-field .input { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-toggle {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 12px; background: none; color: var(--muted); cursor: pointer;
}

/* =====================================================================
   Sheets (dialogs; bottom sheets on phones)
   ===================================================================== */
dialog.sheet {
  max-width: none; max-height: none; width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0; inset: 0;
  background: transparent; color: var(--fg); overflow: hidden;
}
dialog.sheet[open] {
  display: flex; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}
dialog.sheet::backdrop {
  background: var(--backdrop);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  backdrop-filter: blur(8px) saturate(120%);
  animation: fade-in .3s var(--ease) backwards;
}
dialog.sheet.is-closing::backdrop { animation: fade-out .22s var(--ease) both; }
.sheet-panel {
  --drag: 0px;
  width: min(560px, 100%); max-height: min(88vh, 920px); max-height: min(88dvh, 920px);
  display: flex; flex-direction: column;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--sheet-bg);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 40px 90px -30px var(--shadow);
  animation: sheet-in .38s var(--ease) backwards;
  transition: transform .3s var(--ease);
}
.sheet--sm .sheet-panel { width: min(460px, 100%); }
.sheet--lg .sheet-panel { width: min(720px, 100%); }
dialog.sheet.is-closing .sheet-panel { animation: sheet-out .22s var(--ease) both; }
.sheet-grab { display: none; }
.sheet-head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 18px 6px 24px; touch-action: none; }
.sheet-titles { min-width: 0; padding-top: 4px; }
.sheet-title { margin-top: 2px; font: 430 1.55rem/1.15 var(--display); letter-spacing: -.02em; }
.sheet-title:focus { outline: none; }
.sheet-close { margin: -4px -6px 0 0; background: var(--sunken); }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 10px 24px 24px; }
.sheet-foot {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 14px 24px 16px; border-top: 1px solid var(--line);
}
.foot-start, .foot-end { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.foot-end { margin-left: auto; }
.del-confirm { display: inline-flex; align-items: center; gap: 6px; color: var(--warn); font-size: .88rem; font-weight: 600; }
.sheet-intro { margin-bottom: 4px; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.form-error { padding: 11px 14px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-size: .92rem; font-weight: 600; line-height: 1.4; }
.sheet-text { color: var(--fg-2); font-size: 1rem; line-height: 1.5; }
.sheet--confirm .sheet-body { padding-bottom: 8px; }
@media (max-width: 639px) {
  dialog.sheet[open] { align-items: flex-end; padding: max(28px, env(safe-area-inset-top)) 0 0; }
  .sheet-panel, .sheet--sm .sheet-panel, .sheet--lg .sheet-panel {
    width: 100%;
    max-height: calc(100vh - max(28px, env(safe-area-inset-top)));
    max-height: calc(100dvh - max(28px, env(safe-area-inset-top)));
    border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: 0;
    animation-name: sheet-up;
  }
  dialog.sheet.is-closing .sheet-panel { animation-name: sheet-down; }
  .sheet-grab { display: block; flex: none; width: 38px; height: 5px; margin: 8px auto -6px; border-radius: 99px; background: var(--sunken-strong); touch-action: none; }
  .sheet-head { padding: 16px 14px 4px 20px; }
  .sheet-body { padding: 8px 20px 20px; }
  .sheet-foot { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); }
  .sheet-body:last-child { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { from { transform: translateY(var(--drag)); } to { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* =====================================================================
   Toasts
   ===================================================================== */
.toasts {
  position: fixed; z-index: 100; left: 50%; transform: translateX(-50%);
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: min(520px, calc(100% - 2 * var(--gutter)));
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
body.has-tabbar .toasts { bottom: calc(var(--tabbar-room) + 4px); }
@media (min-width: 900px) { body.has-tabbar .toasts { bottom: calc(24px + env(safe-area-inset-bottom)); } }
/* Inside an open sheet (top layer) toasts sit at the top, clear of the sheet's buttons. */
body dialog.sheet .toasts.toasts--sheet { top: max(14px, env(safe-area-inset-top)); bottom: auto; }
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px; max-width: 100%;
  min-height: 50px; padding: 8px 8px 8px 16px; border-radius: 18px;
  background: var(--toast-bg); color: var(--toast-fg);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .4);
  font-size: .93rem; font-weight: 520;
  animation: toast-in .4s var(--spring) backwards;
}
.toast.is-leaving { animation: toast-out .24s var(--ease) both; }
.toast-ico { width: 20px; height: 20px; opacity: .9; }
.toast--ok .toast-ico { color: #9fd8ad; }
.toast--warn .toast-ico { color: #f3b48a; }
.toast-msg { flex: 1; min-width: 0; line-height: 1.35; padding: 4px 0; }
.toast-action {
  flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .16); color: inherit; font-weight: 650; font-size: .88rem; cursor: pointer;
}
.toast-x { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: inherit; opacity: .6; cursor: pointer; }
.toast-x .ico { width: 16px; height: 16px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }

/* =====================================================================
   Empty states and splash
   ===================================================================== */
.empty { display: flex; align-items: center; gap: 16px; color: var(--muted); }
.empty-art { width: 76px; height: 76px; flex: none; border-radius: 28%; object-fit: cover; mix-blend-mode: var(--img-blend); background: var(--img-bg); }
.empty-copy { min-width: 0; }
.empty-title { margin-bottom: 3px; color: var(--fg); font: 450 1.12rem/1.3 var(--display); letter-spacing: -.01em; }
.empty-text { font-size: .93rem; line-height: 1.5; }
.empty-action { margin-top: 12px; }
.empty--sm { padding: 4px 0; }
.empty--sm .empty-art { width: 60px; height: 60px; }
.empty--lg { flex-direction: column; text-align: center; padding: 26px 10px; }
.empty--lg .empty-art { width: 140px; height: 140px; }
.empty--lg .empty-title { font-size: 1.4rem; }
.people-empty { padding: 26px; }
@media (max-width: 559px) { .empty--md { flex-direction: column; text-align: center; } .empty--md .empty-action { display: flex; justify-content: center; } }

.app--splash, .app--login { justify-content: center; }
.splash { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; }
.splash-mark { width: 84px; height: 84px; padding: 2px; border-radius: 50%; background: var(--grad); box-shadow: 0 18px 40px -18px var(--rose); animation: breathe 2.6s ease-in-out infinite; }
.splash-mark img { display: block; width: 100%; height: 100%; border-radius: 50%; background: #f5ece0; }
.splash-word { font: 450 2rem/1 var(--display); letter-spacing: -.03em; }
.splash-note { max-width: 32ch; color: var(--muted); }
.splash-dots { display: inline-flex; gap: 6px; height: 12px; align-items: center; }
.splash-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--rose); opacity: .3; animation: dot 1.2s ease-in-out infinite; }
.splash-dots i:nth-child(2) { animation-delay: .15s; }
.splash-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes breathe { 50% { transform: scale(1.04); } }
@keyframes dot { 40% { opacity: 1; transform: translateY(-3px); } }

/* =====================================================================
   Hoje
   ===================================================================== */
.lu-card .card-head { margin-bottom: 10px; }
.lu-body { min-width: 0; }
.checkin { display: flex; align-items: center; gap: 16px; }
.checkin-face { font-size: 2.8rem; line-height: 1; filter: saturate(.92); }
.checkin-mood { font: 430 1.15rem/1.25 var(--display); }
.checkin-bits { margin-top: 2px; color: var(--muted); font-size: .9rem; }
.checkin-note { margin-top: 6px; color: var(--fg-2); font-family: var(--display); font-style: italic; }
.care-note {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--rose-soft); color: var(--rose-deep); font-size: .92rem; font-weight: 550; line-height: 1.45;
}
.care-note .ico { width: 19px; height: 19px; margin-top: 1px; }
.care-note.warn { background: var(--warn-soft); color: var(--warn); }
.size-card { display: flex; align-items: center; gap: 18px; }
.size-num { font: 300 3.2rem/1 var(--display); letter-spacing: -.04em; color: var(--gold-deep); white-space: nowrap; }
.size-num small { font: 650 .3em var(--body); color: var(--muted); letter-spacing: 0; }
.size-text { color: var(--fg-2); }
.size-text b { color: var(--fg); font-weight: 650; }
.team-mini { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.team-mini-text { font-size: .92rem; color: var(--fg-2); min-width: 0; }
.row--person { grid-template-columns: auto minmax(0, 1fr) auto; }
.carinho-card .card-head { margin-bottom: 8px; }
.msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.msg { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.msg:last-child { border-bottom: 0; }
.msg-head { display: flex; align-items: baseline; gap: 8px; }
.msg-head b { font-weight: 650; }
.msg-head span { color: var(--muted); font-size: .8rem; }
.msg-text { margin-top: 2px; color: var(--fg-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.msg-kind { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--rose-deep); font-size: .84rem; font-weight: 600; }
.msg-kind .ico { width: 16px; height: 16px; }

/* =====================================================================
   Ludmilla
   ===================================================================== */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 2px; border-radius: var(--r-sm); background: var(--sunken);
  color: var(--muted); font-size: .72rem; min-width: 0;
}
.day.today { background: var(--glass-strong); box-shadow: inset 0 0 0 1.5px var(--rose-line); color: var(--fg); }
.day-name { font-weight: 650; text-transform: capitalize; }
.day-face { font-size: 1.35rem; line-height: 1.1; }
.day-sleep { width: 70%; height: 4px; border-radius: 99px; background: var(--sunken-strong); overflow: hidden; }
.day-sleep i { display: block; height: 100%; width: var(--w, 0%); background: var(--rose); border-radius: inherit; }
.day-pain { white-space: nowrap; }
.moods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mood { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.mood input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mood-face {
  width: 100%; max-width: 62px; aspect-ratio: 1; display: grid; place-items: center;
  border-radius: 50%; background: var(--glass-strong); border: 1.5px solid var(--glass-line);
  font-size: 1.75rem; line-height: 1;
  transition: transform .25s var(--spring), box-shadow .2s;
}
.mood-label { color: var(--muted); font-size: .72rem; font-weight: 600; text-align: center; line-height: 1.2; }
.mood input:checked + .mood-face { box-shadow: 0 0 0 3px var(--rose); transform: scale(1.07); }
.mood input:checked ~ .mood-label { color: var(--rose-deep); }
.mood input:focus-visible + .mood-face { outline: 2.5px solid var(--focus); outline-offset: 3px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; }
.tl-item::before { content: ""; position: absolute; left: 13px; top: 0; bottom: 0; width: 2px; background: var(--line-strong); }
.tl-item:first-child::before { top: 22px; }
.tl-item:last-child::before { bottom: auto; height: 22px; }
.tl-dot {
  position: relative; z-index: 1; width: 28px; height: 28px; margin-top: -2px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--solid); box-shadow: inset 0 0 0 2px var(--line-strong); color: var(--on-accent);
}
.tl-dot .ico { width: 15px; height: 15px; stroke-width: 2.6; }
.tl-item.is-past .tl-dot { background: var(--ok); box-shadow: none; }
.tl-item.is-next .tl-dot { background: var(--grad); box-shadow: 0 0 0 5px var(--rose-soft); }
.tl-title { display: block; font-weight: 600; line-height: 1.35; }
.tl-sub { display: block; margin-top: 2px; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.tl-item.is-past .tl-title { color: var(--muted); }
.tl-end { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; color: var(--muted); font-size: .84rem; white-space: nowrap; }
.care-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.care-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
.care-ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--rose-soft); color: var(--rose-deep); }
.care-ico .ico { width: 19px; height: 19px; }
.care-list b { font-weight: 650; }
.care-list p { margin-top: 2px; color: var(--muted); font-size: .9rem; line-height: 1.45; }

/* =====================================================================
   Leona: diary
   ===================================================================== */
.t-mamada { --tone: var(--rose-deep); --tone-soft: var(--rose-soft); }
.t-fralda { --tone: var(--gold-deep); --tone-soft: var(--gold-soft); }
.t-sono { --tone: var(--info); --tone-soft: var(--info-soft); }
.t-banho { --tone: var(--ok); --tone-soft: var(--ok-soft); }
.t-remedio { --tone: var(--plum); --tone-soft: var(--plum-soft); }
.t-temperatura { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.t-nota { --tone: var(--muted); --tone-soft: var(--sunken); }
.daynav { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; margin-bottom: 16px; }
.daynav-label {
  display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 48px; min-width: 0;
  border: 0; border-radius: 14px; background: none; color: inherit; cursor: pointer; padding: 4px 6px;
}
.daynav-label b { font: 430 1.4rem/1.1 var(--display); letter-spacing: -.015em; }
.daynav-label span { color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tiles--compact, .tiles--compact.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; }
.tile {
  min-width: 0; padding: 14px 14px 12px; border-radius: var(--r-md);
  background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-hi);
}
.tile b { display: block; font: 380 1.9rem/1.05 var(--display); letter-spacing: -.02em; color: var(--tone, var(--fg)); white-space: nowrap; }
.tile span { display: block; margin-top: 4px; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.tiles--compact .tile b { font-size: 1.6rem; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 6px 0 14px; }
@media (min-width: 640px) { .quick { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.quick-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 76px; padding: 10px 4px 9px; border-radius: var(--r-md);
  border: 1px solid var(--glass-line); background: var(--glass-strong); color: var(--fg);
  font: 620 .78rem/1.1 var(--body); cursor: pointer;
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 8px 18px -14px var(--shadow);
  transition: transform .15s var(--ease), box-shadow .2s;
}
.quick-btn:active { transform: scale(.95); }
.quick-ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--tone-soft); color: var(--tone); }
.quick-ico .ico { width: 21px; height: 21px; }
.events { list-style: none; margin: 0; padding: 0; }
.ev { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 58px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--tone-soft); color: var(--tone); }
.ev-ico .ico { width: 21px; height: 21px; }
.ev-end { display: flex; align-items: center; gap: 10px; }
.ev-time { color: var(--muted); font-size: .92rem; font-weight: 600; min-width: 3.2em; text-align: right; }
.ev.is-fever .ev-ico { background: var(--warn); color: var(--on-accent); }
.ev.is-fever .row-title { color: var(--warn); }

/* =====================================================================
   Equipe
   ===================================================================== */
.person { display: flex; flex-direction: column; gap: 14px; padding: 18px; min-width: 0; }
.person.is-inactive { opacity: .6; }
.person-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.person-top .avatar { box-shadow: 0 0 0 3px var(--ring-bg), 0 0 0 4.5px var(--rose-line), 0 10px 22px -12px var(--shadow); }
.person-id { min-width: 0; }
.person-name { font: 450 1.24rem/1.15 var(--display); letter-spacing: -.012em; overflow-wrap: anywhere; }
.person-role { margin-top: 3px; font-size: .92rem; font-weight: 600; color: var(--fg-2); }
.person-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--muted); font-size: .84rem; }
.person-meta .ico { width: 15px; height: 15px; }
.person-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.contact {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: 62px; padding: 9px 4px; border-radius: var(--r-md);
  background: var(--sunken); color: var(--fg); text-decoration: none;
  font-size: .78rem; font-weight: 620;
  transition: background-color .2s, transform .15s var(--ease);
}
.contact .ico { width: 22px; height: 22px; color: var(--rose-deep); }
@media (hover: hover) { .contact:hover { background: var(--sunken-strong); } }
.contact:active { transform: scale(.96); }
.contact.is-off { opacity: .38; }
.person-phone { color: var(--muted); font-size: .86rem; text-align: center; margin-top: -4px; }
.person-note { padding: 10px 12px; border-radius: 12px; background: var(--sunken); color: var(--fg-2); font-size: .86rem; line-height: 1.45; white-space: pre-line; }
.position { display: flex; flex-direction: column; gap: 12px; padding: 20px; min-width: 0; }
.position.is-muted { opacity: .62; }
.position-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.position-titles { min-width: 0; }
.position-title { font: 450 1.2rem/1.2 var(--display); letter-spacing: -.01em; }
.position-sub { margin-top: 3px; color: var(--muted); font-size: .86rem; }
.position-cost { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.position-cost b { font-weight: 650; }
.position-cost span { color: var(--muted); font-size: .86rem; }
.position-people { display: flex; align-items: center; gap: 10px; min-height: 34px; font-size: .9rem; color: var(--fg-2); }
.position-people .ico { width: 17px; height: 17px; color: var(--muted); }
.position-block .eyebrow { margin-bottom: 4px; }
.bullets { margin: 0; padding-left: 18px; font-size: .9rem; color: var(--fg-2); }
.bullets li { margin: 3px 0; overflow-wrap: anywhere; }
.bullets li::marker { color: var(--rose); }
.position-notes { color: var(--muted); font-size: .88rem; line-height: 1.5; }
.position-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }

/* =====================================================================
   Plano
   ===================================================================== */
.plan-progress { display: flex; align-items: center; gap: 18px; max-width: 560px; margin-top: 20px; padding: 16px 20px; border-radius: var(--r-lg); }
.plan-progress-text { min-width: 0; }
.plan-progress-main { font-size: 1.05rem; }
.plan-progress-main b { font-weight: 700; }
.plan-progress-sub { margin-top: 3px; color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plan-progress-late { margin-top: 8px; }
.phases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.phase { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
.phase--empty { grid-template-columns: minmax(0, 1fr); }
.phase-rail { position: relative; display: flex; justify-content: center; }
.phase-rail::before { content: ""; position: absolute; top: 52px; bottom: -14px; width: 2px; background: var(--line-strong); }
.phase:last-child .phase-rail::before { display: none; }
.phase-node {
  position: relative; margin-top: 20px; width: 32px; height: 32px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--solid); box-shadow: inset 0 0 0 1.5px var(--line-strong), 0 6px 14px -8px var(--shadow);
  color: var(--muted); font: 500 .95rem/1 var(--display);
}
.phase-node .ico { width: 16px; height: 16px; stroke-width: 2.6; }
.phase.is-complete .phase-node { background: var(--ok); color: var(--on-accent); box-shadow: 0 6px 14px -8px var(--ok); }
.phase-card { padding: 18px 20px 6px; min-width: 0; }
@media (min-width: 720px) { .phase-card { padding: 20px 24px 8px; } }
.phase-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.phase-title { font: 430 1.32rem/1.15 var(--display); letter-spacing: -.012em; }
.phase-sub { margin-top: 2px; color: var(--muted); font-size: .82rem; }
.phase-bar { height: 4px; margin: 12px 0 2px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.phase-bar i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--grad); transition: width .7s var(--ease); }
@media (max-width: 559px) { .phase { grid-template-columns: minmax(0, 1fr); } .phase-rail { display: none; } }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
.budget { width: 100%; border-collapse: collapse; font-size: .93rem; }
.budget th, .budget td { padding: 11px 6px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.budget th { color: var(--muted); font-size: .7rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.budget .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.budget tbody tr.is-optional td { color: var(--muted); }
.budget tfoot td { border-bottom: 0; font-weight: 700; }
.budget tfoot tr.muted td { color: var(--muted); font-weight: 500; }
.cell-title { font-weight: 600; }
.cell-sub { display: none; margin-top: 2px; color: var(--muted); font-size: .78rem; }
@media (max-width: 559px) { .budget .hide-sm { display: none; } .budget .show-sm { display: block; } .budget { font-size: .88rem; } }

/* =====================================================================
   Casa
   ===================================================================== */
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rules li { position: relative; padding-left: 20px; line-height: 1.5; color: var(--fg-2); }
.rules li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }
.rules-text { display: flex; flex-direction: column; gap: 8px; white-space: pre-line; color: var(--fg-2); }
.row--contact .row-end { flex-direction: row; }
.call-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 99px;
  background: var(--rose-soft); color: var(--rose-deep); text-decoration: none; font-weight: 650; font-size: .88rem;
}
.call-btn .ico { width: 17px; height: 17px; }
.alert-card { background: linear-gradient(135deg, var(--spec), transparent 42%), linear-gradient(135deg, var(--warn-soft), transparent 70%), var(--glass); }
.alert-card .eyebrow { color: var(--warn); }
.alert-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--fg-2); }
.alert-list li::marker { color: var(--warn); }
.emergency {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 16px 20px; border-radius: var(--r-lg);
  background: var(--warn); color: #fff; text-decoration: none;
  box-shadow: 0 18px 40px -20px var(--warn);
}
.emergency span { display: flex; flex-direction: column; }
.emergency small { opacity: .88; }
.emergency .ico { width: 24px; height: 24px; }
:root[data-theme="dark"] .emergency { color: var(--on-accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .emergency { color: var(--on-accent); } }

/* =====================================================================
   Login
   ===================================================================== */
.view--login { animation: none; }
.login {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}
.login-card { width: min(420px, 100%); padding: 30px 26px 24px; border-radius: 34px; text-align: center; animation: sheet-in .6s var(--ease) backwards; }
.login-card.shake { animation: shake .45s var(--ease); }
@keyframes shake { 15%, 55% { transform: translateX(-8px); } 35%, 75% { transform: translateX(8px); } 90% { transform: translateX(-2px); } }
.login-art { position: relative; width: 132px; margin: 0 auto 16px; }
.login-art::before { content: ""; position: absolute; inset: -24%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(197, 111, 124, .36), transparent 75%); filter: blur(10px); }
.login-art img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 28%; mix-blend-mode: var(--img-blend); background: var(--img-bg); box-shadow: var(--img-shadow); }
.login-title { font: 380 2.5rem/1 var(--display); letter-spacing: -.035em; font-variation-settings: "opsz" 144; }
.login-sub { margin: 8px 0 20px; color: var(--muted); font: italic 400 1.12rem/1.3 var(--display); }
.login-msg { display: flex; align-items: center; gap: 8px; margin: -6px 0 16px; padding: 10px 14px; border-radius: 14px; background: var(--info-soft); color: var(--info); font-size: .9rem; font-weight: 550; text-align: left; }
.login-msg .ico { width: 18px; height: 18px; }
.login-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.login-error { padding: 10px 14px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); font-size: .9rem; font-weight: 550; }
.login-submit { min-height: 52px; font-size: 1.02rem; margin-top: 4px; }
.login-step { text-align: center; margin-bottom: 2px; }
.login-step-title { margin-top: 4px; font: 430 1.6rem/1.15 var(--display); letter-spacing: -.02em; }
.login-step-text { margin-top: 6px; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.login-card > .login-step-text { margin: 0 0 18px; }
.login-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; color: var(--faint); font-size: .8rem; }
.login-note .ico { width: 14px; height: 14px; }

/* =====================================================================
   Account sheet and Acessos
   ===================================================================== */
.acct { display: flex; flex-direction: column; gap: 18px; }
.acct-id { display: flex; align-items: center; gap: 14px; }
.acct-avatar { width: 58px; height: 58px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--grad); color: var(--on-accent); font: 450 1.6rem/1 var(--display); box-shadow: 0 12px 26px -14px var(--rose); }
.acct-name { font: 450 1.3rem/1.2 var(--display); letter-spacing: -.01em; }
.acct-meta { margin-top: 2px; color: var(--muted); font-size: .88rem; }
.acct-group { display: flex; flex-direction: column; gap: 10px; }
.group-label { margin: 0; color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.group-count { margin-left: 4px; color: var(--faint); }
.acct-sync { min-height: 24px; }
.sync-line { display: flex; align-items: flex-start; gap: 8px; color: var(--fg-2); font-size: .92rem; line-height: 1.45; }
.sync-line .ico { width: 18px; height: 18px; margin-top: 1px; }
.sync-line.is-ok .ico { color: var(--ok); }
.sync-line.is-warn { color: var(--warn); }
.sync-line.is-soon .ico { color: var(--gold-deep); }
.acct-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  width: 100%; min-height: 60px; padding: 10px 14px;
  border: 1px solid var(--glass-line); border-radius: var(--r-md);
  background: var(--glass-strong); color: var(--fg); text-align: left; cursor: pointer;
  box-shadow: inset 0 1px 0 var(--glass-hi);
  transition: transform .15s var(--ease);
}
.acct-row:active { transform: scale(.98); }
.acct-row-ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--gold-soft); color: var(--gold-deep); }
.acct-row-ico .ico { width: 19px; height: 19px; }
.acct-row-text { display: flex; flex-direction: column; min-width: 0; }
.acct-row-text b { font-weight: 650; }
.acct-row-text small { color: var(--muted); font-size: .82rem; }
.acct-row-chev { width: 17px; height: 17px; color: var(--faint); }
.acct-row--danger .acct-row-ico { background: var(--warn-soft); color: var(--warn); }
.acct-row--danger b { color: var(--warn); }
.acct-logout { margin-top: 2px; }
.acct-foot { color: var(--faint); font-size: .8rem; text-align: center; line-height: 1.6; }
.acct-foot em { font-family: var(--display); font-style: italic; color: var(--muted); }
.users-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 30px 0; color: var(--muted); }
.users-group { margin-top: 16px; }
.users-group .group-label { margin-bottom: 6px; }
.user-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  width: 100%; min-height: 62px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--line);
  background: none; color: inherit; text-align: left; cursor: pointer; border-radius: 0;
}
.users-list li:last-child .user-row { border-bottom: 0; }
.user-main { display: flex; flex-direction: column; min-width: 0; }
.user-main b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-main small { color: var(--muted); font-size: .84rem; }
.user-end { display: flex; align-items: center; gap: 8px; }
.user-chev { width: 17px; height: 17px; color: var(--faint); }
.user-detail { display: flex; flex-direction: column; gap: 10px; }
.user-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.user-hero .muted { margin-top: 4px; }
.invite-box {
  margin-top: 12px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--sunken); color: var(--fg); font-size: .95rem; line-height: 1.55;
  -webkit-user-select: all; user-select: all; overflow-wrap: anywhere;
}
.invite-creds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 0; }
.invite-creds div { padding: 10px 14px; border-radius: var(--r-sm); background: var(--glass-strong); border: 1px solid var(--glass-line); min-width: 0; }
.invite-creds dt { color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.invite-creds dd { margin: 2px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }

/* =====================================================================
   "Em breve" (stub views)
   ===================================================================== */
.soon-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px; }
.soon-badge { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; background: var(--rose-soft); color: var(--rose-deep); font-size: .82rem; font-weight: 650; }
.soon-badge .ico { width: 16px; height: 16px; }
.soon-text { max-width: 60ch; color: var(--fg-2); font-size: 1.04rem; line-height: 1.55; }

/* =====================================================================
   Reduced motion
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
  }
  .sky { animation: none; }
}

/* =====================================================================
   FAMILY SECTION (family-features agent)
   Álbum, viewer, Mural, Visitas, Família, Início and the family slots.
   Files: js/views/{social,viewer,album,mural,visitas,familia,inicio}.js
   Rule kept here too: no animation, opacity, transform or filter on an
   ancestor of an illustration or of a glass/blurred surface.
   ===================================================================== */

/* ---------- Shared bits ---------- */
.media-ph { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, var(--sunken-strong), var(--sunken)); color: var(--muted); }
.media-ph .ico { width: 28px; height: 28px; }
.ico-land { transform: rotate(135deg); }
.ico-takeoff { transform: rotate(45deg); }

/* Likes and comment buttons */
.like-btn, .cmt-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: 99px; background: transparent; color: var(--fg-2); cursor: pointer;
  font: 650 .92rem/1 var(--body); font-variant-numeric: tabular-nums;
  transition: background-color .2s, color .2s;
}
.like-btn .ico, .cmt-btn .ico { width: 24px; height: 24px; transition: transform .3s var(--spring); }
@media (hover: hover) { .like-btn:hover, .cmt-btn:hover { background: var(--sunken); } }
.like-btn:active .ico, .cmt-btn:active .ico { transform: scale(.86); }
.like-btn.is-liked { color: var(--rose); }
.like-btn.pop .ico { animation: like-pop .55s var(--spring); }
.like-n:empty, .cmt-btn .num:empty { display: none; }
.like-btn--lg .ico { width: 28px; height: 28px; }
@keyframes like-pop { 0% { transform: scale(.55); } 45% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* Comments (viewer, comments sheet) */
.cmts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cmt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cmt:last-child { border-bottom: 0; }
.cmt-main { min-width: 0; }
.cmt-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.cmt-head b { font-weight: 650; font-size: .94rem; }
.cmt-head time { color: var(--muted); font-size: .78rem; }
.cmt-text { margin-top: 2px; color: var(--fg-2); font-size: .95rem; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.cmt-del { width: 40px; height: 40px; margin: -6px -8px 0 0; color: var(--faint); }
.cmt-del .ico { width: 17px; height: 17px; }
.cmt-empty { list-style: none; padding: 14px 0 6px; color: var(--muted); font-size: .92rem; }
.cmt-form { display: flex; align-items: center; gap: 8px; width: 100%; }
.cmt-form .input { flex: 1; min-width: 0; min-height: 46px; padding: 10px 18px; border-radius: 99px; }
.cmt-send {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--rose); color: var(--on-accent); cursor: pointer;
  box-shadow: 0 8px 18px -10px var(--rose);
  transition: transform .15s var(--ease);
}
.cmt-send .ico { width: 20px; height: 20px; stroke-width: 2.3; }
.cmt-send:active { transform: scale(.92); }
.cmt-post { padding-bottom: 12px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.cmt-post-in { display: flex; align-items: flex-start; gap: 12px; }
.cmt-post-thumb { flex: none; width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--sunken); }
.cmt-post-text { min-width: 0; }
.cmt-post-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.cmt-post-name b { font-weight: 650; }
.cmt-post-name time { color: var(--muted); font-size: .8rem; }
.cmt-post-body { margin-top: 2px; color: var(--fg-2); font-size: .94rem; white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sheet--comments .sheet-foot .cmt-form { flex: 1; }

/* Who liked */
.likers { list-style: none; margin: 0; padding: 0; }
.liker { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; min-height: 58px; border-bottom: 1px solid var(--line); }
.liker:last-child { border-bottom: 0; }
.liker-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liker-time { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.liker-heart { width: 18px; height: 18px; color: var(--rose); }

/* ---------- Álbum ---------- */
.album-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.album-filter { flex: 0 1 380px; min-width: min(100%, 300px); }
.album-count { color: var(--muted); font-size: .9rem; }
.months { display: flex; flex-direction: column; gap: 28px; }
.month { min-width: 0; }
.month-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 12px; }
.month-title { font: 420 1.5rem/1.1 var(--display); letter-spacing: -.02em; }
@media (min-width: 720px) { .month-title { font-size: 1.75rem; } }
.month-count { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.ph-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
@media (min-width: 560px) { .ph-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } }
@media (min-width: 900px) { .ph-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; } }
.ph-cell { min-width: 0; }
.ph-tile {
  position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0;
  border: 0; border-radius: 10px; overflow: hidden; background: var(--sunken); cursor: pointer;
  box-shadow: 0 10px 24px -18px var(--shadow);
}
@media (min-width: 560px) { .ph-tile { border-radius: var(--r-sm); } }
.ph-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ph-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .3s; }
@media (hover: hover) { .ph-tile:hover .ph-img { transform: scale(1.045); } }
.ph-tile:active .ph-img { transform: scale(.97); }
.ph-tile.is-pending .ph-img, .strip-item.is-pending .strip-img { opacity: .6; }
.ph-badge {
  position: absolute; right: 6px; bottom: 6px;
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 8px 0 6px; border-radius: 99px;
  background: rgba(20, 14, 12, .55); color: #fff;
  font-size: .74rem; font-weight: 650; font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.ph-badge .ico { width: 12px; height: 12px; }
.ph-likes {
  position: absolute; left: 7px; bottom: 6px;
  display: inline-flex; align-items: center; gap: 4px;
  color: #fff; font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .55);
}
.ph-likes .ico { width: 14px; height: 14px; color: #ffc2cb; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .45)); }
.album-empty { padding: 8px 20px; }

/* Upload queue */
.upq { display: flex; flex-direction: column; gap: 12px; }
.upq-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.upq-sum { margin-top: 3px; font: 430 1.3rem/1.15 var(--display); letter-spacing: -.012em; }
.upq-total { height: 6px; }
.upq-list { list-style: none; margin: 0; padding: 0; }
.upq-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.upq-row:last-child { border-bottom: 0; }
.upq-thumb { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; overflow: hidden; background: var(--sunken); color: var(--muted); }
.upq-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upq-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.upq-title { font-weight: 600; font-size: .94rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upq-cap { color: var(--muted); font-weight: 500; }
.upq-bar { height: 6px; }
.upq-row.is-done .upq-bar i { background: var(--ok); }
.upq-status { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.upq-status.is-error { display: flex; align-items: flex-start; gap: 6px; color: var(--warn); font-weight: 600; line-height: 1.4; }
.upq-status.is-error .ico { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.upq-end { display: flex; align-items: center; gap: 4px; }
.upq-ok { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ok); }
.upq-ok .ico { width: 24px; height: 24px; }
@media (max-width: 480px) { .upq-end .btn span { display: none; } .upq-end .btn { width: 44px; padding: 0; } }

/* "Adicionar ao álbum" sheet */
.add-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 560px) { .add-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.add-cell { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--sunken); }
.add-cell img, .add-cell video { display: block; width: 100%; height: 100%; object-fit: cover; }
.add-badge { position: absolute; right: 5px; bottom: 5px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(20, 14, 12, .58); color: #fff; }
.add-badge .ico { width: 12px; height: 12px; }
.add-more { display: grid; place-items: center; background: var(--sunken-strong); }
.add-more b { font: 420 1.4rem/1 var(--display); color: var(--fg-2); }

/* ---------- Full-screen viewer ---------- */
html.has-viewer { overflow: hidden; }
dialog.sheet.viewer { --side-w: min(400px, 38vw); background: transparent; }
dialog.sheet.viewer[open] { display: block; padding: 0; }
dialog.sheet.viewer::backdrop { background: #0c0908; -webkit-backdrop-filter: none; backdrop-filter: none; animation: fade-in .25s var(--ease) backwards; }
dialog.sheet.viewer.is-closing::backdrop { animation: fade-out .2s var(--ease) both; }
.viewer-shell {
  position: fixed; inset: 0;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: #0c0908; color: #f6efe9;
  animation: viewer-in .28s var(--ease) backwards;
}
dialog.sheet.viewer.is-closing .viewer-shell { animation: fade-out .2s var(--ease) both; }
@keyframes viewer-in { from { opacity: 0; transform: scale(.985); } }
.viewer-top { position: sticky; top: 0; z-index: 6; height: 0; }
.viewer-top-in {
  position: absolute; top: 0; left: 0; right: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  pointer-events: none; transition: opacity .25s var(--ease);
}
.viewer-top-in > * { pointer-events: auto; }
.viewer-top-in > .viewer-btn { justify-self: start; }
.viewer-btn, .viewer-nav {
  display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; color: #fff; cursor: pointer;
  background: rgba(30, 22, 19, .5);
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  transition: transform .15s var(--ease), background-color .2s;
}
.viewer-btn { width: 44px; height: 44px; }
.viewer-btn .ico { width: 20px; height: 20px; }
.viewer-btn:active, .viewer-nav:active { transform: scale(.92); }
@media (hover: hover) { .viewer-btn:hover, .viewer-nav:hover { background: rgba(30, 22, 19, .7); } }
.viewer-count {
  justify-self: center; padding: 6px 12px; border-radius: 99px;
  background: rgba(30, 22, 19, .5); color: #fff; font-size: .82rem; font-weight: 650;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.viewer-count:empty { visibility: hidden; }
.viewer-top-actions { justify-self: end; display: flex; gap: 8px; }
.viewer-stage {
  position: relative; z-index: 1; overflow: hidden;
  height: max(320px, calc(100vh - 150px)); height: max(320px, calc(100dvh - 150px));
  touch-action: manipulation; color-scheme: dark;
  -webkit-user-select: none; user-select: none;
}
.viewer-media { position: absolute; inset: 0; display: grid; place-items: center; }
.viewer-ph, .viewer-img, .viewer-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.viewer-ph { filter: blur(14px); opacity: .9; transition: opacity .4s var(--ease); }
.viewer-img { opacity: 0; transition: opacity .3s var(--ease); }
.viewer-media.is-loaded .viewer-img { opacity: 1; }
.viewer-media.is-loaded .viewer-ph { opacity: 0; }
.viewer-img.is-broken { display: none; }
.viewer-video { background: #000; }
.viewer-fallback {
  position: relative; z-index: 1; display: none; align-items: center; gap: 10px;
  max-width: min(340px, calc(100% - 40px)); padding: 14px 18px; border-radius: 16px;
  background: rgba(255, 255, 255, .1); color: #f6efe9; font-size: .92rem; line-height: 1.45;
}
.viewer-fallback .ico { flex: none; width: 20px; height: 20px; color: #f3b48a; }
.viewer-media.is-broken .viewer-fallback { display: flex; }
.viewer-nav { position: absolute; top: 50%; z-index: 3; display: none; width: 48px; height: 48px; margin-top: -24px; }
.viewer-nav .ico { width: 24px; height: 24px; }
.viewer-prev { left: max(16px, env(safe-area-inset-left)); }
.viewer-next { right: 16px; }
@media (hover: hover), (min-width: 700px) { .viewer-nav { display: grid; } }
.viewer.is-bare .viewer-top-in, .viewer.is-bare .viewer-nav { opacity: 0; pointer-events: none; }
.heart-burst {
  position: absolute; z-index: 4; left: var(--x, 50%); top: var(--y, 50%);
  width: 112px; height: 112px; margin: -56px 0 0 -56px;
  color: #fff; opacity: 0; pointer-events: none;
  filter: drop-shadow(0 10px 26px rgba(197, 111, 124, .6));
}
.heart-burst .ico { width: 100%; height: 100%; }
.heart-burst.is-on { animation: heart-burst .9s var(--spring) both; }
@keyframes heart-burst {
  0% { opacity: 0; transform: scale(.2); }
  18% { opacity: 1; transform: scale(1.18); }
  32% { transform: scale(.94); }
  46% { transform: scale(1.04); }
  75% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08) translateY(-18px); }
}
.viewer-side {
  position: relative; z-index: 2; margin-top: -22px; min-height: 42vh;
  display: flex; flex-direction: column;
  border-radius: 24px 24px 0 0; background: var(--solid); color: var(--fg);
  box-shadow: 0 -16px 40px -24px rgba(0, 0, 0, .6);
}
.viewer-scroll { padding: 22px 20px 8px; }
.viewer-compose { padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.viewer-author { display: flex; align-items: center; gap: 12px; }
.viewer-who { min-width: 0; }
.viewer-name { font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.viewer-date { margin-top: 1px; color: var(--muted); font-size: .86rem; }
.viewer-caption { margin-top: 14px; font: italic 400 1.18rem/1.45 var(--display); letter-spacing: -.005em; white-space: pre-line; overflow-wrap: anywhere; }
.viewer-likes { display: flex; align-items: center; gap: 2px; margin: 14px -8px 0; padding: 2px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.viewer-likers {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 8px;
  border: 0; background: none; color: var(--fg-2); font: inherit; font-size: .9rem; text-align: left; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.viewer-likers.is-empty { display: flex; align-items: center; color: var(--muted); cursor: default; }
.viewer-cmts { margin-top: 14px; }
.viewer-cmts-title { color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
@media (min-width: 900px) {
  .viewer-shell { display: grid; grid-template-columns: minmax(0, 1fr) var(--side-w); grid-template-rows: minmax(0, 1fr); overflow: hidden; }
  .viewer-top { position: absolute; top: 0; left: 0; width: calc(100% - var(--side-w)); }
  .viewer-stage { grid-column: 1; grid-row: 1; height: auto; min-height: 0; }
  .viewer-side { grid-column: 2; grid-row: 1; margin: 0; min-height: 0; border-radius: 0; box-shadow: none; border-left: 1px solid rgba(255, 255, 255, .06); }
  .viewer-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: calc(26px + env(safe-area-inset-top)) 24px 12px; }
  .viewer-compose { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); }
}

/* ---------- Mural: composer ---------- */
.compose { display: flex; flex-direction: column; gap: 14px; }
.compose-head { display: flex; align-items: center; gap: 14px; }
.compose-titles { min-width: 0; }
.compose-title { margin-top: 3px; font: 430 1.35rem/1.15 var(--display); letter-spacing: -.015em; }
textarea.input.compose-text { min-height: 92px; resize: none; line-height: 1.5; }
.compose--sheet textarea.input.compose-text { min-height: 128px; }
.compose-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.compose-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tool {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 0 15px 0 13px;
  border: 1px solid var(--glass-line); border-radius: 99px;
  background: var(--glass-strong); color: var(--fg); cursor: pointer;
  font: 620 .9rem/1 var(--body);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 6px 14px -12px var(--shadow);
  transition: transform .15s var(--ease), opacity .2s;
}
.tool .ico { width: 19px; height: 19px; color: var(--rose-deep); }
.tool:active { transform: scale(.96); }
.tool:disabled { opacity: .45; cursor: default; transform: none; }
.compose-send { margin-left: auto; }
.compose-note { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: .8rem; }
.compose-note .ico { width: 14px; height: 14px; }
.compose-att { display: flex; flex-direction: column; gap: 10px; }
.att { position: relative; align-self: flex-start; max-width: 100%; border-radius: var(--r-md); overflow: hidden; background: var(--sunken); }
.att-img { display: block; max-width: 100%; max-height: 300px; width: auto; height: auto; }
.att--video { align-self: stretch; background: #000; }
.att-video { display: block; width: 100%; max-height: 340px; background: #000; }
.att--audio { align-self: stretch; }
.att-audio { display: flex; align-items: center; gap: 12px; padding: 12px 54px 12px 14px; }
.att-audio-ico { flex: none; width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--rose-soft); color: var(--rose-deep); }
.att-audio-main, .post-audio-main { flex: 1; min-width: 0; }
.att-audio-label { margin-bottom: 6px; color: var(--fg-2); font-size: .86rem; font-weight: 600; }
.att-audio audio, .post-audio audio { display: block; width: 100%; height: 40px; }
.att-x {
  position: absolute; top: 6px; right: 6px; width: 38px; height: 38px;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: rgba(20, 14, 12, .6); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.att-x .ico { width: 18px; height: 18px; }
.att-status { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.att-status.is-ok, .att-status.is-error { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; line-height: 1.4; }
.att-status.is-ok { color: var(--ok); }
.att-status.is-error { color: var(--warn); }
.att-status > .ico { flex: none; width: 18px; height: 18px; }
.att-bar { height: 6px; }
.rec-error { padding: 10px 6px 10px 12px; border-radius: var(--r-md); background: var(--warn-soft); }
.rec-error > span { flex: 1 1 180px; }

/* Recording bar */
.rec {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas: "dot time meter hint" "act act act act";
  align-items: center; gap: 12px 12px; padding: 14px 16px;
  border-radius: var(--r-md); border: 1px solid var(--glass-line);
  background: var(--glass-strong); box-shadow: inset 0 1px 0 var(--glass-hi);
}
.rec-dot { grid-area: dot; width: 12px; height: 12px; border-radius: 50%; background: var(--faint); }
.rec.is-live .rec-dot { background: #e0484f; animation: rec-pulse 1.2s ease-in-out infinite; }
@keyframes rec-pulse { 50% { opacity: .35; transform: scale(.8); } }
.rec-time { grid-area: time; min-width: 3.2ch; font: 450 1.35rem/1 var(--display); letter-spacing: -.01em; }
.rec-meter { grid-area: meter; display: flex; align-items: center; gap: 3px; height: 34px; min-width: 0; overflow: hidden; }
.rec-meter i { flex: 1 1 0; min-width: 2px; max-width: 5px; height: calc(var(--h, .14) * 100%); border-radius: 3px; background: var(--rose); opacity: .85; transition: height .08s linear; }
.rec.no-meter.is-live .rec-meter i { animation: meter-idle 1.3s ease-in-out infinite; }
.rec.no-meter.is-live .rec-meter i:nth-child(3n+1) { animation-delay: -.35s; }
.rec.no-meter.is-live .rec-meter i:nth-child(3n+2) { animation-delay: -.7s; }
@keyframes meter-idle { 0%, 100% { height: 18%; } 50% { height: 70%; } }
.rec-hint { grid-area: hint; color: var(--muted); font-size: .78rem; white-space: nowrap; }
.rec-actions { grid-area: act; display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 420px) { .rec { grid-template-areas: "dot time meter meter" "hint act act act"; } .rec-hint { align-self: center; } }

/* ---------- Mural: feed ---------- */
.feed { display: flex; flex-direction: column; gap: 16px; }
.feed-head:empty, .feed-more:empty { display: none; }
.feed-head .section-head { margin-top: 4px; }
.feed-more { display: flex; justify-content: center; }
.feed-empty { padding: 10px 20px; }
.post { display: flex; flex-direction: column; gap: 12px; padding: 18px 18px 10px; min-width: 0; }
@media (min-width: 720px) { .post { padding: 22px 24px 12px; } }
.post-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.post-who { min-width: 0; }
.post-name { font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.post-you, .visit-you {
  display: inline-block; margin-left: 4px; padding: 2px 8px; border-radius: 99px;
  background: var(--rose-soft); color: var(--rose-deep);
  font-size: .7rem; font-weight: 650; vertical-align: 2px; white-space: nowrap;
}
.post-meta { color: var(--muted); font-size: .84rem; }
.post-actions { display: flex; gap: 2px; margin-right: -8px; }
.post-text { color: var(--fg); font-size: 1.04rem; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.post-text.is-quote { font: italic 400 clamp(1.3rem, 1.1rem + .9vw, 1.65rem)/1.35 var(--display); letter-spacing: -.01em; }
.post-media {
  position: relative; display: block; width: 100%; aspect-ratio: var(--ar, 1); max-height: 620px;
  padding: 0; border: 0; border-radius: var(--r-md); overflow: hidden;
  background: var(--sunken); cursor: zoom-in;
}
.post-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
@media (hover: hover) { .post-media:hover img { transform: scale(1.02); } }
.post-media:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.post-media.is-video { background: #120d0b; cursor: pointer; }
.play-badge {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(20, 14, 12, .5); color: #fff;
  -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 12px 30px -12px rgba(0, 0, 0, .6);
  transition: transform .25s var(--spring);
}
.play-badge .ico { width: 28px; height: 28px; margin-left: 3px; }
@media (hover: hover) { .post-media.is-video:hover .play-badge { transform: scale(1.07); } }
.dur-badge { position: absolute; right: 10px; bottom: 10px; padding: 3px 9px; border-radius: 99px; background: rgba(20, 14, 12, .58); color: #fff; font-size: .78rem; font-weight: 650; }
.post-audio { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--rose-soft); }
.post-audio-ico { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--rose); color: var(--on-accent); }
.post-audio-ico .ico { width: 22px; height: 22px; }
.post-audio-label { margin-bottom: 6px; color: var(--rose-deep); font-size: .86rem; font-weight: 650; }
.post-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin: 0 -10px; }
.post-likers { min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .86rem; text-align: left; cursor: pointer; }
.post-cmts { list-style: none; margin: -4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mini-cmt { color: var(--fg-2); font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-cmt b { color: var(--fg); font-weight: 650; }
.post-more { align-self: flex-start; min-height: 40px; margin: -6px 0 0 -2px; padding: 0 2px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }

/* Family messages in cards (Hoje, Ludmilla, Início) */
.msg--media { grid-template-columns: auto minmax(0, 1fr) auto; }
.msg-thumb { position: relative; display: block; flex: none; align-self: center; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: var(--sunken); }
.msg-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.msg-thumb .ico { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; color: #fff; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .55)); }

/* ---------- Visitas ---------- */
.vis-bar .section-head { margin-top: 0; }
.info-card { display: flex; flex-direction: column; gap: 12px; }
.info-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.info-ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; }
.info-ico .ico { width: 24px; height: 24px; }
.info-ico.is-rose { background: var(--rose-soft); color: var(--rose-deep); }
.info-ico.is-gold { background: var(--gold-soft); color: var(--gold-deep); }
.info-titles { min-width: 0; }
.info-title { margin-top: 3px; font: 430 1.3rem/1.15 var(--display); letter-spacing: -.012em; }
.info-edit { align-self: start; margin: -6px -8px 0 0; }
.info-text { color: var(--fg-2); line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.info-addr { color: var(--fg); font: 420 1.2rem/1.35 var(--display); }
.info-foot { display: flex; align-items: flex-start; gap: 8px; margin-top: auto; padding: 10px 12px; border-radius: 12px; background: var(--sunken); color: var(--fg-2); font-size: .88rem; line-height: 1.45; }
.info-foot .ico { flex: none; width: 17px; height: 17px; margin-top: 1px; color: var(--rose-deep); }
.info-cta { display: flex; }
.amenities { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.amenity { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 99px; background: var(--gold-soft); color: var(--fg); font-size: .92rem; font-weight: 600; }
.amenity .ico { width: 20px; height: 20px; color: var(--gold-deep); }
.map-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.combinados { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.combinados li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; color: var(--fg-2); line-height: 1.5; }
.combinados .ico { width: 18px; height: 18px; margin-top: 3px; color: var(--ok); stroke-width: 2.4; }

/* Suite calendar */
.cal-card { display: flex; flex-direction: column; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cal-title { font: 430 1.2rem/1.2 var(--display); letter-spacing: -.01em; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 4px; }
.cal-dow { padding: 4px 0 6px; color: var(--muted); font-size: .72rem; font-weight: 650; text-align: center; }
.cal-cell { position: relative; height: 46px; min-width: 0; }
.cal-day { display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; color: var(--fg); font: 600 .95rem/1 var(--body); cursor: pointer; }
.cal-day::before { content: ""; position: absolute; top: 5px; bottom: 5px; left: 0; right: 0; }
.cal-day.is-start::before { left: 3px; border-top-left-radius: 99px; border-bottom-left-radius: 99px; }
.cal-day.is-end::before { right: 3px; border-top-right-radius: 99px; border-bottom-right-radius: 99px; }
.cal-day.is-booked::before { background: var(--rose); }
.cal-day.is-req::before { background: var(--gold-soft); box-shadow: inset 0 1.5px 0 var(--gold), inset 0 -1.5px 0 var(--gold); }
.cal-day.is-req.is-start::before { box-shadow: inset 0 1.5px 0 var(--gold), inset 0 -1.5px 0 var(--gold), inset 1.5px 0 0 var(--gold); }
.cal-day.is-req.is-end::before { box-shadow: inset 0 1.5px 0 var(--gold), inset 0 -1.5px 0 var(--gold), inset -1.5px 0 0 var(--gold); }
.cal-day.is-req.is-start.is-end::before { box-shadow: inset 0 0 0 1.5px var(--gold); }
.cal-num { position: relative; z-index: 1; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.cal-day.is-booked .cal-num { color: var(--on-accent); }
.cal-day.is-req .cal-num { color: var(--gold-deep); }
.cal-day.is-past { color: var(--faint); }
.cal-day.is-past::before { opacity: .5; }
.cal-day.is-today .cal-num { font-weight: 800; }
.cal-day.is-today .cal-num::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.cal-day.is-sel .cal-num { background: var(--fg); color: var(--bg); }
.cal-day:focus-visible { outline: none; }
.cal-day:focus-visible .cal-num { outline: 2.5px solid var(--focus); outline-offset: 1px; }
@media (hover: hover) { .cal-day:not(.is-sel):hover .cal-num { background: var(--sunken-strong); } .cal-day.is-booked:not(.is-sel):hover .cal-num { background: rgba(255, 255, 255, .18); } }
.cal-dots { position: absolute; left: 50%; bottom: 1px; z-index: 1; display: flex; gap: 3px; transform: translateX(-50%); }
.cal-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.cal-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--sunken); }
.cal-panel-title { font-weight: 650; }
.cal-panel .list { align-self: stretch; }
.cal-free { display: flex; align-items: center; gap: 8px; color: var(--fg-2); font-size: .9rem; }
.cal-free .ico { width: 18px; height: 18px; color: var(--ok); }
.cal-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .8rem; }
.cal-legend li { display: inline-flex; align-items: center; gap: 7px; }
.sw { display: inline-block; flex: none; width: 22px; height: 12px; border-radius: 99px; }
.sw-booked { background: var(--rose); }
.sw-req { background: var(--gold-soft); box-shadow: inset 0 0 0 1.5px var(--gold); }
.sw-dot { width: 7px; height: 7px; background: var(--gold); }

/* Visit list */
.visits { list-style: none; margin: 0; padding: 0; }
.visit { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.visit:last-child { border-bottom: 0; }
.visit-date { width: 52px; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; background: var(--gold-soft); color: var(--gold-deep); }
.visit-date b { font: 420 1.5rem/1 var(--display); }
.visit-date span { margin-top: 2px; font-size: .72rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.visit.is-mine .visit-date { background: var(--rose-soft); color: var(--rose-deep); }
.visit.is-cancelled .visit-names { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.visit.is-cancelled .visit-date { background: var(--sunken); color: var(--muted); }
.visit-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.visit-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.visit-names { font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.visit-sub { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.vflights { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.vflight { display: flex; align-items: center; gap: 8px; color: var(--fg-2); font-size: .88rem; }
.vflight b { font-weight: 650; }
.vflight .ico { flex: none; width: 16px; height: 16px; color: var(--gold-deep); }
.visit-driver { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 2px; padding: 4px 10px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); font-size: .8rem; font-weight: 650; }
.visit-driver .ico { width: 15px; height: 15px; }
.visit-driver.is-off { background: var(--sunken); color: var(--muted); }
.visit-obs { margin-top: 2px; padding: 8px 12px; border-radius: 12px; background: var(--sunken); color: var(--fg-2); font-size: .88rem; white-space: pre-line; overflow-wrap: anywhere; }
.visit-by { color: var(--faint); font-size: .8rem; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.visit-empty { list-style: none; padding: 4px 0; }
.hist { padding: 0; }
.hist-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 0 20px; color: var(--fg-2); font-weight: 650; list-style: none; cursor: pointer; }
.hist-sum::-webkit-details-marker { display: none; }
.hist-chev { color: var(--muted); transition: transform .25s var(--ease); }
.hist[open] .hist-chev { transform: rotate(180deg); }
.hist .visits { padding: 0 20px 10px; }
@media (min-width: 720px) { .hist-sum { padding: 0 26px; } .hist .visits { padding: 0 26px 12px; } }
.plan-cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; }
.plan-cta-text { flex: 1 1 320px; min-width: 0; }
.plan-cta-lead { max-width: 56ch; margin-top: 6px; color: var(--fg-2); }

/* Driver trips (Hoje card) */
.trips-wrap { margin: -2px 0 12px; padding: 12px 14px 6px; border-radius: var(--r-md); background: var(--gold-soft); }
.trips-title { display: flex; align-items: center; gap: 8px; color: var(--gold-deep); font-size: .74rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.trips-title .ico { width: 16px; height: 16px; }
.trips { list-style: none; margin: 4px 0 0; padding: 0; }
.trip { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.trip:last-child { border-bottom: 0; }
.trip-date { width: 44px; height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; background: var(--glass-strong); }
.trip-date b { color: var(--fg); font: 420 1.25rem/1 var(--display); }
.trip-date span { color: var(--gold-deep); font-size: .66rem; font-weight: 650; text-transform: uppercase; }
.trip-main { min-width: 0; }
.trip-title { display: flex; align-items: flex-start; gap: 6px; min-width: 0; font-weight: 650; line-height: 1.3; }
.trip-title .ico { margin-top: 1px; }
.trip-title span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.trip-title .ico { flex: none; width: 16px; height: 16px; color: var(--gold-deep); }
.trip-sub { color: var(--fg-2); font-size: .84rem; }
.trip.is-tentative .trip-title { color: var(--fg-2); }
@media (max-width: 480px) {
  .trip { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "date main" "date end"; align-items: start; row-gap: 6px; }
  .trip-date { grid-area: date; }
  .trip-main { grid-area: main; }
  .trip-end { grid-area: end; justify-self: start; }
}

/* Visit form */
.visit-warn { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--gold-soft); color: var(--gold-deep); font-size: .9rem; line-height: 1.45; }
.visit-warn > .ico { flex: none; width: 19px; height: 19px; margin-top: 1px; }
.visit-warn b { display: block; font-weight: 650; }
.visit-warn span { color: var(--fg-2); }
.sheet--visit .g2:not(:has(> [data-field]:not([hidden]))) { display: none; }
.sheet--visit [data-field="avisoSuite"]:not(:has(.visit-warn:not([hidden]))) { display: none; }

/* "Recebemos!" sheet */
.thanks { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 4px 0 6px; text-align: center; }
.thanks-art { width: 120px; height: 120px; border-radius: 28%; object-fit: cover; mix-blend-mode: var(--img-blend); background: var(--img-bg); box-shadow: var(--img-shadow); }
.thanks-text { max-width: 26ch; font: 430 1.3rem/1.35 var(--display); letter-spacing: -.01em; }
.thanks-list { list-style: none; margin: 0; padding: 0; align-self: stretch; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.thanks-list li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--sunken); color: var(--fg-2); font-size: .92rem; }
.thanks-list .ico { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--rose-deep); }

/* ---------- Família (pais): Mural | Visitas ---------- */
.fam-tabs { position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top) + 8px); z-index: 20; display: flex; justify-content: center; }
.fam-tabs .seg {
  width: min(420px, 100%); padding: 4px; border-radius: 16px;
  background: var(--tab-bg); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 14px 30px -20px var(--shadow);
}
.fam-tabs .seg-opt span { min-height: 42px; font-size: .95rem; }
.fam-panel { min-width: 0; }
.view-sub { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.view-sub > * { min-width: 0; }
@media (min-width: 720px) { .view-sub { gap: 24px; } }

/* ---------- Início (familia) ---------- */
.strip-card { padding-bottom: 18px; }
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(108px, 28vw, 150px); gap: 10px;
  margin: 0 -2px; padding: 2px 2px 6px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.strip::-webkit-scrollbar { display: none; }
.strip:has(> .strip-empty) { display: block; }
.strip-item { position: relative; display: block; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--sunken); scroll-snap-align: start; box-shadow: 0 12px 24px -18px var(--shadow); }
.strip-item:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.strip-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .3s; }
@media (hover: hover) { .strip-item:hover .strip-img { transform: scale(1.045); } }
.strip-empty { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--muted); font-size: .94rem; }
.strip-empty .ico { flex: none; width: 22px; height: 22px; color: var(--rose-deep); }
.lu-warm { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 480px) { .lu-warm { grid-template-columns: 108px minmax(0, 1fr); align-items: start; gap: 18px; } }
.lu-warm-art { width: 108px; margin: 0; }
.lu-warm-art img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 28%; mix-blend-mode: var(--img-blend); background: var(--img-bg); box-shadow: var(--img-shadow); }
.lu-warm-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.lu-warm-text { color: var(--fg-2); line-height: 1.55; }
.lu-warm-phase { display: flex; align-items: flex-start; gap: 8px; color: var(--rose-deep); font-size: .9rem; font-weight: 600; }
.lu-warm-phase .ico { flex: none; width: 17px; height: 17px; margin-top: 2px; }
.ini-perks { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ini-perks li { display: flex; align-items: flex-start; gap: 10px; color: var(--fg-2); font-size: .92rem; }
.ini-perks .ico { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--gold-deep); }
.ini-mine { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--glass-strong); font-size: .92rem; font-weight: 600; }
.ini-mine .ico { width: 18px; height: 18px; color: var(--rose-deep); }
.ini-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Reduced motion for the family section (the global rule above covers durations). */
@media (prefers-reduced-motion: reduce) {
  .heart-burst.is-on { animation: none; }
  .viewer-shell { animation: none; }
}
/* Family section: suite calendar beside a long visit list; double bookings. */
.vis-grid { align-items: start; }
@media (min-width: 720px) {
  .vis-grid > .cal-card { position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top) + 16px); }
  .fam-sub .vis-grid > .cal-card { top: calc(var(--bar-h) + env(safe-area-inset-top) + 80px); }
}
.cal-day.is-double .cal-num::before { content: ""; position: absolute; top: 1px; right: 1px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--solid); }
.sw-double { width: 8px; height: 8px; background: var(--gold); box-shadow: 0 0 0 2px var(--solid); }
/* Phones: the details panel overlaps the stage by 22px; keep the native video controls clear of it. */
.viewer-media[data-tipo="video"] { bottom: 22px; }
@media (min-width: 900px) { .viewer-media[data-tipo="video"] { bottom: 0; } }
/* ===================== end of FAMILY SECTION ===================== */

/* =====================================================================
   NAMES + FOOTER (integrator) · SPEC §13 and §14
   §13: names in the storybook lettering Twinkle Star (only names: header
   wordmark, "Leona Aquino" / "Ludmilla Aquino" heroes, login title, the
   Início greeting name, the splash), with a small gold→rosé sparkle.
   §14: one credit line at the end of every page and of the login.
   ===================================================================== */
@font-face {
  font-family: "Twinkle Star";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/twinkle-star-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Twinkle Star";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/twinkle-star-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root { --script: "Twinkle Star", "Snell Roundhand", "Apple Chancery", cursive; --spark-a: #e1b35e; --spark-b: #d78a96; --foot: var(--fg-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --spark-a: #ecc47a; --spark-b: #e8a0ab; --foot: var(--muted); } }
:root[data-theme="dark"] { --spark-a: #ecc47a; --spark-b: #e8a0ab; --foot: var(--muted); }

/* The four-point star raised at the top right of the last letter (ui.sparkle). */
.sparkle { display: inline-block; flex: none; width: .3em; height: .3em; margin: .08em 0 0 .03em; vertical-align: top; overflow: visible; }
.sparkle .spark-a { stop-color: var(--spark-a); }
.sparkle .spark-b { stop-color: var(--spark-b); }

/* A name, always on one line (ui.nameScript). --len = its width in em, so a size capped at
   100cqi / --len always fits the container: no wrap and no overflow from 320 px up. */
.name-script {
  display: inline-block;
  padding: 0 .06em;
  font-family: var(--script); font-style: normal; font-weight: 400;
  font-variation-settings: normal; font-synthesis: none;
  letter-spacing: 0; line-height: 1.3;
  white-space: nowrap;
}
.hero-head { container-type: inline-size; }
/* Inside a title (Início "Olá, <nome>."): a little larger than the serif around it. */
.hero-title .name-script { font-size: 1.18em; font-size: min(1.18em, calc(100cqi / var(--len, 6))); }
/* "Olá, Família." : the period tucks under the raised sparkle instead of trailing after it. */
.view--inicio .hero-title .name-script .sparkle { margin-right: -.3em; }
/* Hero titles that are a name ("Leona Aquino", "Ludmilla Aquino"). */
.hero--name .hero-title { font-size: clamp(2.5rem, 10.5vw, 4.6rem); line-height: 1.3; letter-spacing: 0; margin-top: 0; }
.hero--name .hero-title .name-script { font-size: 1em; font-size: min(1em, calc(100cqi / var(--len, 8))); }
/* Phones: the illustration sits above the name, so the name gets the whole width. */
@media (max-width: 719px) {
  .hero--name { grid-template-columns: minmax(0, 1fr); grid-template-areas: "art" "head" "body"; }
  .hero--name .hero-art { justify-self: start; width: clamp(84px, 24vw, 112px); margin: 2px 0 8px; }
}
.hero.enter .sparkle { animation: twinkle .6s var(--spring) .45s backwards; }
@keyframes twinkle {
  0% { opacity: 0; transform: scale(.2) rotate(-30deg); }
  60% { opacity: 1; transform: scale(1.25) rotate(8deg); }
  100% { opacity: 1; transform: none; }
}

/* Header wordmark */
.brand-word {
  font-family: var(--script); font-size: 30px; font-weight: 400; line-height: 1.3;
  letter-spacing: 0; font-variation-settings: normal; white-space: nowrap;
  padding: 0 .04em; transform: translateY(1px);
}
@media (max-width: 899px) {
  .topbar.show-title .brand-word { transform: translate(-6px, 1px); }
  /* No centered links on phones: the brand keeps its natural width (the compact title is positioned). */
  .topbar-inner { grid-template-columns: auto minmax(0, 1fr) auto; }
}

/* Login and splash */
.login-card { container-type: inline-size; }
.login-title { line-height: 1.2; margin-top: -2px; }
.login-title .name-script { font-size: 3.1rem; font-size: min(3.1rem, calc(100cqi / var(--len, 7))); }
.splash-word { font: 400 2.7rem/1.3 var(--script); letter-spacing: 0; }

/* §14 footer: "Criado por Leonardo Aquino · Todos os direitos reservados" */
.site-foot {
  position: relative;
  max-width: 40rem;
  margin: 52px auto 0; padding: 20px 0 0;
  text-align: center;
  /* Light: --fg-2 (not --muted) so the 12.5 px text keeps WCAG AA contrast (≈ 4.7:1) at .85 opacity. */
  color: var(--foot); opacity: .85;
  font: 400 12.5px/1.6 var(--body); letter-spacing: .02em;
}
.site-foot::before { content: ""; position: absolute; top: 0; left: 50%; width: 40px; height: 1px; margin-left: -20px; background: var(--line-strong); }
.site-foot span { white-space: nowrap; }
.site-foot b { font-weight: 600; color: var(--fg); }
.login { grid-template-rows: minmax(0, 1fr) auto; }
.login > .site-foot { margin-top: 18px; }

@media (prefers-reduced-motion: reduce) { .hero.enter .sparkle { animation: none; } }
/* ===================== end of NAMES + FOOTER ===================== */

/* =====================================================================
   CONVITES (invites agent) · SPEC-convites.md
   Guest page #convite/<token> (js/views/convite.js, reuses .login and
   .login-card) and, in Conta → Acessos (js/core/account.js), the lists
   of invitations, the "Convidar alguém" form and the link sheet.
   ===================================================================== */

/* ---------- Guest page ---------- */
.convite-card { width: min(460px, 100%); }
.convite-card [tabindex="-1"]:focus { outline: none; }
.convite-card .convite-art { width: 116px; margin-bottom: 14px; }
.convite-eyebrow { margin-bottom: 4px; }
.convite-title { font: 400 1.5rem/1.15 var(--display); letter-spacing: -.02em; }
.convite-hello { display: block; color: var(--fg-2); font: italic 400 1.35rem/1.2 var(--display); letter-spacing: -.01em; }
.convite-title .name-script { margin-top: 2px; font-size: 3rem; font-size: min(3rem, calc(100cqi / var(--len, 7))); line-height: 1.25; }
.convite-by { margin-top: 8px; color: var(--fg-2); font: italic 400 1.1rem/1.4 var(--display); text-wrap: balance; }
.convite-by b { font-weight: 600; color: var(--rose-deep); }
.convite-msg {
  position: relative; margin: 16px auto 0; max-width: 32em;
  padding: 14px 18px 12px; border-radius: 20px 20px 20px 8px;
  background: var(--rose-soft); text-align: left;
}
.convite-msg blockquote { margin: 0; color: var(--fg); font: italic 400 1.04rem/1.5 var(--display); white-space: pre-line; overflow-wrap: anywhere; }
.convite-msg blockquote::before { content: "“"; }
.convite-msg blockquote::after { content: "”"; }
.convite-msg figcaption { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--rose-deep); font-size: .84rem; font-weight: 650; }
.convite-msg figcaption .ico { width: 15px; height: 15px; }
.convite-main { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.convite-form-title { text-align: center; font: 430 1.25rem/1.2 var(--display); letter-spacing: -.015em; }
.convite-note { margin-top: 14px; color: var(--muted); font-size: .84rem; line-height: 1.45; text-wrap: balance; }
.convite-note .ico { width: 15px; height: 15px; margin: -2px 5px 0 0; }
.convite-alt { margin-top: 2px; color: var(--muted); font-size: .9rem; }
.convite-link {
  min-height: 44px; padding: 0 6px; border: 0; background: none; cursor: pointer;
  color: var(--rose-deep); font: inherit; font-weight: 650;
  text-decoration: underline; text-decoration-thickness: from-font; text-underline-offset: .18em;
}
.convite-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 0 10px; color: var(--muted); }
.convite-h { margin-top: 2px; font: 400 2rem/1.15 var(--display); letter-spacing: -.025em; font-variation-settings: "opsz" 144; }
.convite-text { margin-top: 10px; color: var(--fg-2); font-size: 1.02rem; line-height: 1.5; text-wrap: pretty; }
.convite-small { margin-top: 14px; color: var(--muted); font-size: .9rem; line-height: 1.5; text-wrap: pretty; }
.convite-signed {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 18px;
  padding: 12px 14px; border-radius: 16px; background: var(--gold-soft); color: var(--fg-2);
  text-align: left; font-size: .93rem; font-weight: 520; line-height: 1.45;
}
.convite-signed .ico { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--gold-deep); }
.convite-signed b { color: var(--fg); font-weight: 650; }
.convite-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.convite-actions .btn.ghost { min-height: 48px; }
/* An error sits right under the field it is about (views/convite.js moves it there). */
.convite-form .field + .convite-error { margin-top: -4px; }
@media (max-width: 359px) { .convite-card { padding: 24px 18px 20px; } }
/* iPad landscape and wider: greeting on the left, the form on the right, so nothing needs a scroll. */
@media (min-width: 900px) {
  .convite-card[data-state="form"] {
    width: min(900px, 100%);
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
    padding: 40px 44px 34px;
  }
  .convite-card[data-state="form"] .convite-intro { container-type: inline-size; padding-right: 40px; }
  .convite-card[data-state="form"] .convite-art { width: 172px; margin-bottom: 18px; }
  .convite-card[data-state="form"] .convite-main { margin-top: 0; padding: 6px 0 6px 40px; border-top: 0; border-left: 1px solid var(--line); }
}

/* ---------- Conta → Acessos: invitations ---------- */
.convite-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.convite-list .convite-row:last-child { border-bottom: 0; }
.convite-row-main {
  flex: 1; min-width: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  min-height: 62px; padding: 8px 4px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.convite-ico { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--rose-soft); color: var(--rose-deep); }
.convite-ico .ico { width: 20px; height: 20px; }
.convite-row.is-used .convite-ico { background: var(--ok-soft); color: var(--ok); }
.convite-row.is-old .convite-ico { background: var(--sunken); color: var(--faint); }
.convite-row.is-old .convite-row-text b { color: var(--fg-2); font-weight: 600; }
.convite-row-text { display: flex; flex-direction: column; min-width: 0; }
.convite-row-text b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convite-row-text small { color: var(--muted); font-size: .84rem; line-height: 1.4; }
.convite-copy, .convite-del { flex: none; }
@media (max-width: 479px) {
  .convite-copy { width: 44px; min-height: 44px; padding: 0; }
  .convite-copy span { display: none; }
}
/* Phones: "Nova pessoa" and "Convidar alguém" share one row in the Acessos footer. */
@media (max-width: 639px) {
  .sheet--users .sheet-foot .foot-end { flex-wrap: nowrap; width: 100%; }
  .sheet--users .sheet-foot .foot-end .btn { flex: 1 1 auto; min-width: 0; padding: 0 12px; }
}
@media (max-width: 359px) { .sheet--users .sheet-foot .foot-end .btn .ico { display: none; } }
/* The link sheet ("Convite pronto" / "Convite para <nome>") */
.convite-detail { display: flex; flex-direction: column; gap: 12px; }
.convite-detail .sheet-intro { margin-bottom: 0; }
.convite-box { padding: 12px 14px; border-radius: var(--r-md); background: var(--sunken); }
.convite-box-label { color: var(--muted); font-size: .7rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.convite-url { margin-top: 4px; color: var(--rose-deep); font: 500 .88rem/1.45 ui-monospace, "SF Mono", Menlo, monospace; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
.convite-msgtext { margin-top: 4px; color: var(--fg); font-size: .93rem; line-height: 1.5; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
.convite-acts { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.convite-act.is-primary .acct-row-ico { background: var(--rose-soft); color: var(--rose-deep); }
.convite-meta { color: var(--muted); font-size: .84rem; line-height: 1.5; overflow-wrap: anywhere; }
/* "Convidar alguém": five validity options stay on one line on small phones. */
@media (max-width: 400px) {
  .sheet--convite-form [data-field="dias"] .seg-opt span { padding: 0 2px; font-size: .8rem; }
}
/* ===================== end of CONVITES ===================== */

/* =====================================================================
   QUARTO (nursery agent) · SPEC-quarto.md
   Page #quarto (js/views/quarto.js): hero with image 01, sticky tabs,
   image grids, the viewer additions (before/after), the floor plan on
   cream paper and its zoom, the shopping list; and the Hoje card (slot
   hoje.quarto). Rule kept: no animation, opacity, transform or filter on
   an ancestor of a glass surface or of a multiply-blended illustration.
   ===================================================================== */
.nw { white-space: nowrap; }

/* ---------- Hero: image 01 instead of an illustration ---------- */
.hero--quarto .hero-art { width: clamp(104px, 31vw, 140px); }
.hero--quarto .hero-art::before { inset: -16%; }
@media (min-width: 720px) { .hero--quarto .hero-art { width: min(100%, 300px); } }
.hero-photo {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: 22px;
}
.hero-photo:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
.hero--quarto .hero-art .hero-photo img {
  aspect-ratio: 3 / 4; object-fit: cover; border-radius: 22px;
  mix-blend-mode: normal; background: var(--sunken);
  box-shadow: 0 30px 60px -30px var(--shadow), 0 0 0 1px var(--glass-line);
}
@media (min-width: 720px) { .hero-photo { border-radius: 30px; } .hero--quarto .hero-art .hero-photo img { border-radius: 30px; } }
@media (hover: hover) {
  .hero--quarto .hero-art .hero-photo img { transition: transform .6s var(--ease); }
  .hero--quarto .hero-photo:hover img { transform: translateY(-3px) scale(1.012); }
}
/* Phones: the three numbers share one row. */
@media (max-width: 559px) {
  .hero--quarto .stats { gap: 8px; }
  .hero--quarto .stat { flex: 1 1 0; padding: 10px 12px; }
  .hero--quarto .stat b { font-size: 1.6rem; }
  .hero--quarto .stat > span { font-size: .74rem; line-height: 1.3; }
}

/* ---------- Tabs (sticky under the header, like Família) ---------- */
.qt-anchor { height: 0; margin-bottom: -20px; }
@media (min-width: 720px) { .qt-anchor { margin-bottom: -24px; } }
.qt-tabs { position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top) + 8px); z-index: 20; display: flex; justify-content: center; }
.qt-tabs .seg {
  width: min(660px, 100%); padding: 4px; border-radius: 17px;
  background: var(--tab-bg); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 14px 30px -20px var(--shadow);
}
.qt-tabs .seg-opt > span { min-height: 42px; padding: 0 6px; border-radius: 13px; font-size: .93rem; }
.qt-tabs .seg-opt .qt-long, .qt-tabs .seg-opt .qt-short {
  display: inline; min-height: 0; padding: 0; border-radius: 0; background: none; box-shadow: none; color: inherit; transition: none;
}
.qt-tabs .seg-opt .qt-short { display: none; }
@media (max-width: 559px) {
  .qt-tabs .seg-opt .qt-long { display: none; }
  .qt-tabs .seg-opt .qt-short { display: inline; }
  .qt-tabs .seg-opt > span { padding: 0 2px; font-size: .86rem; }
}

/* ---------- Panels ---------- */
.qt-panel { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.qt-panel > * { min-width: 0; }
@media (min-width: 720px) { .qt-panel { gap: 24px; } }
.qt-intro { max-width: 64ch; margin: 6px 4px 0; color: var(--fg-2); font-size: 1.02rem; line-height: 1.55; text-wrap: pretty; }
.qt-intro:empty { display: none; }

/* ---------- Image grids (thumbnails only; the big image loads in the viewer) ---------- */
.qt-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
@media (min-width: 560px) { .qt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 16px; } }
@media (min-width: 900px) { .qt-grid { gap: 32px 22px; } }
.qt-grid--tour { grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 560px) { .qt-grid--tour { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; } }
@media (min-width: 1100px) { .qt-grid--tour { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; } }
.qt-cell { min-width: 0; }
.qt-empty { grid-column: 1 / -1; list-style: none; padding: 8px 20px; }
.qt-tile {
  display: flex; flex-direction: column; gap: 11px; width: 100%; padding: 0;
  border: 0; border-radius: 22px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.qt-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.qt-media {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 20px; background: var(--sunken);
  box-shadow: 0 24px 44px -28px var(--shadow), 0 0 0 1px var(--line);
}
.qt-grid--tour .qt-media { aspect-ratio: 4 / 3; }
.qt-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), opacity .3s; }
.qt-img.is-broken { opacity: 0; }
@media (hover: hover) { .qt-tile:hover .qt-img { transform: scale(1.035); } }
.qt-tile:active .qt-img { transform: scale(.985); }
.qt-step {
  position: absolute; left: 10px; top: 10px;
  padding: 5px 10px; border-radius: 99px;
  background: rgba(24, 17, 14, .5); color: #fff;
  font-size: .74rem; font-weight: 700; letter-spacing: .01em;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.qt-mine {
  position: absolute; right: 10px; top: 10px;
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: #c56f7c;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .45);
}
.qt-mine .ico { width: 17px; height: 17px; }
.qt-cap { display: flex; flex-direction: column; gap: 5px; padding: 0 4px; min-width: 0; }
.qt-title {
  font: 430 1.06rem/1.32 var(--display); letter-spacing: -.008em; color: var(--fg);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.qt-meta { display: flex; gap: 12px; color: var(--muted); font-size: .8rem; font-weight: 650; }
.qt-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.qt-meta .ico { width: 15px; height: 15px; }

/* ---------- Planta on cream paper ---------- */
.qp-card {
  --paper: #fbf7f3;
  position: relative; padding: 18px 18px 16px;
  border-radius: var(--r-lg); background: var(--paper); color: #342a26;
  box-shadow: 0 34px 70px -38px rgba(70, 45, 35, .55), 0 0 0 1px rgba(60, 40, 35, .08), inset 0 1px 0 rgba(255, 255, 255, .7);
}
@media (min-width: 720px) { .qp-card { padding: 24px 28px 20px; } }
.qp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.qp-titles { min-width: 0; }
.qp-card .eyebrow { color: #8f6720; }
.qp-title { margin-top: 4px; font: 430 1.42rem/1.15 var(--display); letter-spacing: -.015em; color: #342a26; }
.qp-card .qp-zoom { flex: none; background: rgba(255, 255, 255, .8); border-color: rgba(60, 40, 35, .12); color: #342a26; box-shadow: 0 6px 16px -12px rgba(60, 40, 35, .5); }
.qp-open { display: block; width: 100%; margin: 12px 0 0; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; }
.qp-open:focus-visible { outline: 3px solid #c56f7c; outline-offset: 4px; }
.qp-img { display: block; width: auto; max-width: 100%; height: auto; max-height: min(74vh, 900px); margin: 0 auto; border-radius: 10px; }
.qp-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; color: #7d6d66; font-size: .84rem; text-align: center; }
.qp-note .ico { flex: none; width: 15px; height: 15px; }

/* Zoom (full screen) */
dialog.sheet.qz { background: transparent; }
dialog.sheet.qz[open] { display: block; padding: 0; }
dialog.sheet.qz::backdrop { background: #0c0908; -webkit-backdrop-filter: none; backdrop-filter: none; animation: fade-in .25s var(--ease) backwards; }
dialog.sheet.qz.is-closing::backdrop { animation: fade-out .2s var(--ease) both; }
.qz-shell { position: fixed; inset: 0; overflow: hidden; background: #14100e; color: #f6efe9; animation: viewer-in .28s var(--ease) backwards; }
dialog.sheet.qz.is-closing .qz-shell { animation: fade-out .2s var(--ease) both; }
.qz-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
.qz-stage:active { cursor: grabbing; }
.qz-img {
  position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; will-change: transform;
  border-radius: 6px; box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .9);
  -webkit-user-drag: none; pointer-events: none;
}
.qz-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  pointer-events: none;
}
.qz-top > * { pointer-events: auto; }
.qz-top > .viewer-btn { justify-self: start; }
.qz-title {
  justify-self: center; padding: 7px 14px; border-radius: 99px;
  background: rgba(30, 22, 19, .55); color: #fff; font-size: .86rem; font-weight: 650; white-space: nowrap;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.qz-tools { justify-self: end; display: flex; gap: 8px; }
.qz-tools .viewer-btn:disabled { opacity: .4; cursor: default; }
.qz-hint {
  position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 2;
  width: max-content; max-width: calc(100% - 32px); transform: translateX(-50%);
  padding: 8px 14px; border-radius: 99px; background: rgba(30, 22, 19, .6); color: rgba(255, 255, 255, .88);
  font-size: .82rem; text-align: center; pointer-events: none; transition: opacity .3s var(--ease);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.qz.is-zoomed .qz-hint { opacity: 0; }
@media (max-width: 479px) { .qz-title { display: none; } }

/* ---------- Viewer additions: before / after ---------- */
@property --qv-pos { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
.qv .viewer-media { inset: 64px 12px 104px; container-type: size; }
@media (min-width: 900px) { .qv .viewer-media { inset: 70px 32px 90px; } }
.qv-frame {
  --qv-pos: 0%;
  position: relative; width: min(100cqw, calc(100cqh * var(--ar, .75))); aspect-ratio: var(--ar, .75);
  overflow: hidden; border-radius: 12px; background: #1d1714;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .85);
  transition: --qv-pos .6s var(--ease);
}
.qv-frame.is-dragging, .qv-frame.no-anim { transition: none; }
.qv-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.qv-ph, .qv-before-ph { filter: blur(16px); transform: scale(1.06); }
.qv-after, .qv-before-img { opacity: 0; transition: opacity .35s var(--ease); }
.qv-media.is-loaded .qv-after, .qv-frame.before-loaded .qv-before-img { opacity: 1; }
.qv-after.is-broken, .qv-before-img.is-broken { display: none; }
.qv-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--qv-pos)) 0 0); }
.qv-frame[data-mode="comparar"] { cursor: ew-resize; touch-action: pan-y; }
.qv-divider {
  position: absolute; top: 0; bottom: 0; left: var(--qv-pos); z-index: 2;
  width: 56px; margin-left: -28px; display: grid; place-items: center;
  cursor: ew-resize; touch-action: none; opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease);
}
.qv-divider::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px;
  background: rgba(255, 255, 255, .95); box-shadow: 0 0 14px rgba(0, 0, 0, .4);
}
.qv-knob {
  position: relative; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, .95); color: #2a1f1b;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 0, 0, .04);
  transition: transform .25s var(--spring);
}
.qv-knob .ico { width: 22px; height: 22px; stroke-width: 2.2; }
.qv-frame.is-dragging .qv-knob { transform: scale(1.08); }
.qv-frame[data-mode="comparar"] .qv-divider { opacity: 1; pointer-events: auto; }
.qv-divider:focus { outline: none; }
.qv-divider:focus-visible .qv-knob { outline: 3px solid #fff; outline-offset: 3px; }
.qv-tag {
  position: absolute; top: 12px; z-index: 1;
  padding: 5px 11px; border-radius: 99px; background: rgba(24, 17, 14, .55); color: #fff;
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.qv-tag--antes { left: 12px; }
.qv-tag--depois { right: 12px; }
.qv-frame[data-mode="comparar"] .qv-tag, .qv-frame[data-mode="antes"] .qv-tag--antes { opacity: 1; }
.qv-modes {
  position: absolute; z-index: 5; left: 50%; bottom: 40px; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 4px; border-radius: 99px;
  background: rgba(30, 22, 19, .58);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 14px 34px -14px rgba(0, 0, 0, .7);
  transition: opacity .25s var(--ease);
}
@media (min-width: 900px) { .qv-modes { bottom: 24px; } }
.qv-mode { position: relative; }
.qv-mode input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.qv-mode span {
  display: flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 99px;
  color: rgba(255, 255, 255, .84); font-size: .88rem; font-weight: 650; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.qv-mode input:checked + span { background: rgba(255, 255, 255, .95); color: #2a1f1b; }
.qv-mode input:focus-visible + span { outline: 2.5px solid #fff; outline-offset: 2px; }
@media (max-width: 359px) { .qv-mode span { padding: 0 11px; font-size: .84rem; } }
.viewer.is-bare .qv-modes { opacity: 0; pointer-events: none; }
.qv-topfav.is-on { color: #ffb7c2; }
.qv-topfav.pop .ico, .qv-heart.pop .ico { animation: like-pop .55s var(--spring); }
@media (min-width: 900px) { .qv-topfav { display: none; } }
/* Details panel */
.qv-title { margin-top: 6px; font: 430 1.42rem/1.22 var(--display); letter-spacing: -.015em; text-wrap: balance; }
.qv-sub { margin-top: 6px; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.qv-fav { display: flex; align-items: center; gap: 2px; margin: 16px -8px 0; padding: 2px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.qv-favwho { flex: 1; min-width: 0; padding: 0 8px; color: var(--fg-2); font-size: .9rem; line-height: 1.35; }
.qv-print {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  margin-top: 14px; min-height: 62px; padding: 11px 14px; border-radius: var(--r-md);
  background: var(--sunken); color: var(--fg); text-decoration: none;
  transition: background-color .2s, opacity .2s;
}
.qv-print > .ico:first-child { width: 22px; height: 22px; color: var(--gold-deep); }
.qv-print-text { display: flex; flex-direction: column; min-width: 0; }
.qv-print-text b { font-weight: 650; }
.qv-print-text small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.qv-print-go { width: 18px; height: 18px; color: var(--faint); }
.qv-print.is-busy { opacity: .55; pointer-events: none; }
@media (hover: hover) { .qv-print:hover { background: var(--sunken-strong); } }

/* ---------- Lista de compras ---------- */
.qn .card-head { margin-bottom: 12px; }
.qn-safe {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--warn-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 22%, transparent);
}
.qn-safe > .ico { width: 24px; height: 24px; margin-top: 1px; color: var(--warn); }
.qn-safe-title { color: var(--warn); font-weight: 700; letter-spacing: .005em; }
.qn-safe-text { margin-top: 3px; color: var(--fg); line-height: 1.5; text-wrap: pretty; }
.qn-list { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 7px; color: var(--fg-2); line-height: 1.5; }
.qn-list li::marker { color: var(--rose); }
@media (min-width: 900px) { .qn-list { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 36px; } }
.qn-foot { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.qn-foot .ico { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.qs { display: flex; flex-direction: column; gap: 4px; }
.qs-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 640px) { .qs-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.qs-tile {
  min-width: 0; padding: 14px 16px 13px; border-radius: var(--r-md);
  background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-hi);
}
.qs-label { color: var(--muted); font-size: .7rem; font-weight: 650; letter-spacing: .11em; text-transform: uppercase; }
.qs-value { margin-top: 6px; font: 400 1.4rem/1.25 var(--display); letter-spacing: -.015em; color: var(--fg); font-variant-numeric: lining-nums; }
.qs-tile.is-rose .qs-value { color: var(--rose-deep); }
.qs-tile.is-ok .qs-value { color: var(--ok); }
.qs-sub { margin-top: 4px; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.qs-progress { margin-top: 12px; }
.qs-progress .progress-legend b { color: var(--fg); font-weight: 650; }
.qc-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.qc-filter { flex: 0 1 440px; min-width: min(100%, 300px); }
.qc-count { color: var(--muted); font-size: .9rem; }
.qc-groups { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 720px) { .qc-groups { gap: 18px; } }
.qc-group { padding: 16px 16px 4px; }
@media (min-width: 720px) { .qc-group { padding: 20px 24px 6px; } }
.qc-ghead { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 14px; padding: 0 2px 4px; }
.qc-gtitle { font: 430 1.3rem/1.2 var(--display); letter-spacing: -.012em; }
.qc-gsub { color: var(--muted); font-size: .84rem; }
.qc-items { list-style: none; margin: 0; padding: 0; }
.qc-item { border-top: 1px solid var(--line); }
.qc-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0 8px; align-items: center; min-height: 64px; }
.qc-row .check-hit { margin: 0; }
.qc-have { width: 26px; height: 26px; justify-self: center; display: grid; place-items: center; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.qc-have .ico { width: 15px; height: 15px; stroke-width: 2.4; }
.qc-main {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; min-height: 64px; padding: 10px 0; border: 0; border-radius: 12px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.qc-main:focus-visible { outline-offset: 2px; }
.qc-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.qc-name { font-weight: 620; line-height: 1.35; overflow-wrap: anywhere; }
.qc-meta { color: var(--muted); font-size: .86rem; line-height: 1.4; }
.qc-meta > span + span::before { content: "·"; margin: 0 6px; color: var(--faint); }
.qc-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.qc-paid { display: flex; align-items: flex-start; gap: 6px; margin-top: 2px; color: var(--ok); font-size: .86rem; font-weight: 600; line-height: 1.35; }
.qc-paid .ico { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.qc-paid b { font-weight: 700; }
.qc-side { display: none; color: var(--fg-2); font-size: .9rem; font-weight: 550; text-align: right; font-variant-numeric: tabular-nums; }
.qc-chev { display: grid; place-items: center; width: 28px; color: var(--faint); transition: transform .3s var(--ease); }
.qc-chev .ico { width: 18px; height: 18px; }
.qc-item.is-open .qc-chev { transform: rotate(180deg); }
.qc-item.is-done .qc-name { color: var(--muted); font-weight: 520; text-decoration: line-through; text-decoration-color: var(--faint); }
.qc-item.is-jatem .qc-name { color: var(--fg-2); font-weight: 520; }
.qc-item.is-opt .qc-side, .qc-item.is-opt .qc-fx { color: var(--muted); font-weight: 500; }
@media (min-width: 720px) {
  .qc-main { grid-template-columns: minmax(0, 1fr) minmax(150px, auto) auto; gap: 16px; }
  .qc-side { display: block; }
  .qc-meta .qc-fx { display: none; }
  .qc-meta > span:first-child::before { content: none; }
}
.qc-detail { display: flex; flex-direction: column; gap: 12px; padding: 0 0 18px 52px; }
@media (max-width: 479px) { .qc-detail { padding-left: 0; } }
.qc-spec { color: var(--fg-2); line-height: 1.55; text-wrap: pretty; }
.qc-obs { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); color: var(--fg-2); font-size: .9rem; line-height: 1.45; }
.qc-obs .ico { flex: none; width: 17px; height: 17px; margin-top: 2px; color: var(--gold-deep); }
.qc-where-title { margin-bottom: 8px; color: var(--muted); font-size: .7rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.qc-opts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 900px) { .qc-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qc-opt { display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--sunken); }
.qc-opt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.qc-opt-head b { font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.qc-opt-price { flex: none; color: var(--fg); font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qc-opt-price.is-ask { color: var(--muted); font-weight: 550; font-style: italic; }
.qc-opt-prod { margin-top: 2px; color: var(--fg-2); font-size: .9rem; line-height: 1.4; }
.qc-opt-obs { margin-top: 4px; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.qc-opt-link {
  align-self: flex-start; margin-top: 10px;
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 40px; padding: 0 13px;
  border-radius: 99px; border: 1px solid var(--glass-line); background: var(--glass-strong);
  color: var(--rose-deep); font-size: .84rem; font-weight: 650; text-decoration: none;
  box-shadow: inset 0 1px 0 var(--glass-hi);
}
.qc-opt-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qc-opt-link .ico { flex: none; width: 15px; height: 15px; }
.qc-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.qc-note { color: var(--muted); font-size: .88rem; }
.qc-empty { padding: 10px 20px; }

/* ---------- Hoje card (slot hoje.quarto) ---------- */
.quarto-hoje { padding: 0; overflow: hidden; }
.qh { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: start; padding: 18px; }
@media (min-width: 720px) { .qh { grid-template-columns: 172px minmax(0, 1fr); gap: 26px; padding: 22px 26px; } }
.qh-media { min-width: 0; }
.qh-photo {
  position: relative; display: block; overflow: hidden; border-radius: 18px;
  background: var(--sunken); box-shadow: 0 20px 40px -24px var(--shadow), 0 0 0 1px var(--line);
}
.qh-photo img { display: block; width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .7s var(--ease); }
@media (hover: hover) { .qh-photo:hover img { transform: scale(1.03); } }
.qh-photo:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.qh-body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.qh-title { margin-top: 4px; font: 430 1.5rem/1.15 var(--display); letter-spacing: -.015em; }
.qh-title .name-script { font-size: 1.16em; line-height: 1.12; }
.qh-sub { margin-top: 3px; color: var(--muted); font-size: .9rem; }
.qh-lead { margin-top: 12px; max-width: 54ch; color: var(--fg-2); font-size: 1.02rem; line-height: 1.55; text-wrap: pretty; }
.qh-progress { width: 100%; max-width: 520px; margin-top: 14px; }
.qh-plink { color: var(--fg-2); font-weight: 600; text-decoration: none; }
.qh-plink:focus-visible { border-radius: 6px; }
@media (hover: hover) { .qh-plink:hover { color: var(--rose-deep); } }
.qh-fb { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.qh-fb-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
.qh-fb-text { padding-top: 4px; color: var(--fg); font-weight: 620; font-size: .95rem; line-height: 1.35; }
.qh-fb-thumbs { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.qh-fb-thumb {
  position: relative; display: block; width: 52px; height: 52px; overflow: hidden; border-radius: 12px;
  background: var(--sunken); box-shadow: 0 0 0 1px var(--line), 0 8px 16px -12px var(--shadow);
}
.qh-fb-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.qh-fb-thumb:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.qh-fb-badge {
  position: absolute; right: 3px; bottom: 3px; width: 20px; height: 20px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255, 255, 255, .94); color: #c56f7c; box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
}
.qh-fb-badge .ico { width: 12px; height: 12px; }
.qh-fb-more a {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px;
  background: var(--sunken-strong); color: var(--fg-2); font-weight: 650; font-size: .86rem; text-decoration: none;
}
.qh-fb-empty { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.qh-fb-empty .ico { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--rose); }
.qh-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.qh-actions .btn .ico:last-child:not(:first-child) { margin-right: -4px; }
.qh-head { min-width: 0; }
/* Wide screens (not Ludmilla's showcase): "Ver o quarto" sits at the top right, like the other cards' actions. */
@media (min-width: 720px) {
  .quarto-hoje:not(.quarto-hoje--lu) .qh-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: start; }
  .quarto-hoje:not(.quarto-hoje--lu) .qh-body > * { grid-column: 1 / -1; }
  .quarto-hoje:not(.quarto-hoje--lu) .qh-body > .qh-head { grid-column: 1; grid-row: 1; }
  .quarto-hoje:not(.quarto-hoje--lu) .qh-body > .qh-actions { grid-column: 2; grid-row: 1; margin-top: 0; }
}
/* Phones (not Ludmilla's showcase): photo + title side by side, then the feedback and the button full width. */
@media (max-width: 719px) {
  .quarto-hoje:not(.quarto-hoje--lu) .qh { grid-template-columns: 96px minmax(0, 1fr); row-gap: 0; }
  .quarto-hoje:not(.quarto-hoje--lu) .qh-body { display: contents; }
  .quarto-hoje:not(.quarto-hoje--lu) .qh-media { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .quarto-hoje:not(.quarto-hoje--lu) .qh-head { grid-column: 2; grid-row: 1; }
  .quarto-hoje:not(.quarto-hoje--lu) .qh-progress { grid-column: 2; grid-row: 2; align-self: end; margin-top: 10px; }
  .quarto-hoje:not(.quarto-hoje--lu) .qh-fb, .quarto-hoje:not(.quarto-hoje--lu) .qh-fb-empty,
  .quarto-hoje:not(.quarto-hoje--lu) .qh-actions { grid-column: 1 / -1; }
}
/* Ludmilla: the showcase (a mosaic of the room and a warmer note) */
.quarto-hoje--lu .qh { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.quarto-hoje--lu .qh-media { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; max-width: 560px; }
.quarto-hoje--lu .qh-minis { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; min-height: 0; }
.quarto-hoje--lu .qh-mini { border-radius: 14px; }
.quarto-hoje--lu .qh-mini img { aspect-ratio: auto; }
.quarto-hoje--lu .qh-title { font-size: 1.85rem; }
@media (min-width: 720px) {
  .quarto-hoje--lu .qh { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 28px; padding: 24px; align-items: center; }
  .quarto-hoje--lu .qh-title { font-size: 2.15rem; }
}
@media (min-width: 1024px) {
  .quarto-hoje--lu .qh { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 36px; padding: 26px 30px; }
  .quarto-hoje--lu .qh-photo { border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .qv-frame { transition: none; }
}
/* ===================== end of QUARTO ===================== */

/* =====================================================================
   ROUND 3 (diary agent) · SPEC-diario.md, SPEC-quarto.md revision 3, SPEC §15
   The private diary (page #diario, the "paper" writing sheet, the Hoje
   card, the print view and the photo lightbox), the family's read-only
   nursery (Início card, two tabs), the "[39] semanas e [5] dias" form and
   the Acessos note. Rule kept: no animation, opacity, transform or filter
   on an ancestor of a glass surface or of a multiply-blended illustration.
   ===================================================================== */

/* ---------- Header: "Diário" right after Leona only when there is room (≥ 1024 px) ---------- */
@media (min-width: 900px) and (max-width: 1023px) { .toplink--wide { display: none; } }
/* Nine links between 1024 and 1199 px: a little tighter, so the brand and the account keep their room. */
@media (min-width: 1024px) and (max-width: 1199px) { .toplink { padding: 0 10px; } }

/* ---------- Plano: "Idade gestacional no dia da cesárea: [39] semanas e [5] dias" ---------- */
/* A grid: the generic .form input { width: 100% } then fills an 84 px column instead of the whole row. */
.gest-row { display: grid; grid-template-columns: 84px max-content 84px max-content; align-items: center; gap: 10px; }
.gest-in { min-width: 0; text-align: center; font-weight: 650; }
.gest-word { color: var(--fg-2); font: italic 400 1.08rem/1 var(--display); white-space: nowrap; }
@media (max-width: 359px) { .gest-row { grid-template-columns: 72px max-content 72px max-content; gap: 8px; } }

/* ---------- Acessos: the other parent's account is not ours to change ---------- */
.acct-parent-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 4px; line-height: 1.5; }
.acct-parent-note .ico { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--rose-deep); }
.acct-parent-note code { padding: 1px 6px; border-radius: 6px; background: var(--sunken-strong); font: 500 .84em ui-monospace, "SF Mono", Menlo, monospace; overflow-wrap: anywhere; }

/* ---------- Início (family): "O quarto da Leona" ---------- */
.quarto-inicio { padding: 0; overflow: hidden; }
.qi { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 18px 14px 14px; color: var(--fg); text-decoration: none; }
@media (min-width: 720px) { .qi { grid-template-columns: 104px minmax(0, 1fr) auto; gap: 20px; padding: 16px 26px 16px 16px; } }
.qi:focus-visible { outline-offset: -3px; border-radius: var(--r-lg); }
.qi-media { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: var(--sunken); box-shadow: 0 14px 28px -18px var(--shadow), 0 0 0 1px var(--line); }
.qi-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
@media (hover: hover) { .qi:hover .qi-img { transform: scale(1.04); } }
.qi-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qi-title { margin-top: 2px; font: 430 1.3rem/1.15 var(--display); letter-spacing: -.012em; }
.qi-title .name-script { font-size: 1.16em; line-height: 1.1; }
.qi-sub { color: var(--muted); font-size: .9rem; }
.qi-chev { width: 20px; height: 20px; color: var(--faint); }

/* ---------- Quarto: the family's two tabs and the read-only viewer ---------- */
.qt-seg--two { width: min(360px, 100%); }
.qv--ro .viewer-side { min-height: 24vh; }
@media (min-width: 900px) { dialog.sheet.viewer.qv--ro { --side-w: min(340px, 32vw); } }

/* ---------- Hoje: "Diário para a Leona" ---------- */
.diario-hoje .card-title .name-script { font-size: 1.16em; line-height: 1.1; }
.dh-lead { color: var(--fg-2); font: italic 400 1.14rem/1.45 var(--display); text-wrap: pretty; }
.dh-excerpt { color: var(--fg-2); font: 400 1.04rem/1.55 var(--display); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dh-excerpt b { color: var(--fg); font-weight: 600; }
.dh-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dh-write { min-height: 50px; padding: 0 24px; font-size: 1.02rem; }
.dh-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; color: var(--muted); font-size: .86rem; }
.dh-stat b { margin-right: 2px; color: var(--fg); font: 450 1.1rem/1 var(--display); }

/* ---------- Diário: the page ---------- */
.dl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; }
@media (min-width: 720px) { .dl-bar { padding: 12px 18px; } }
.dl-search { position: relative; flex: 1 1 240px; min-width: min(100%, 220px); }
.dl-search-ico { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--muted); pointer-events: none; }
.dl-search .input { min-height: 44px; padding-left: 40px; border-radius: 99px; }
.dl-filter { flex: 0 1 230px; min-width: min(100%, 190px); }
.dl-keep { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
@media (max-width: 559px) { .dl-keep { width: 100%; } .dl-keep .btn { flex: 1 1 auto; } }
.dl-count { margin: -6px 4px 0; color: var(--muted); font-size: .88rem; }
.dl-count:empty { display: none; }
.dl-months { display: flex; flex-direction: column; gap: 26px; }
.dl-month-title { display: flex; align-items: baseline; gap: 10px; margin: 0 4px 12px; font: 420 1.5rem/1.1 var(--display); letter-spacing: -.02em; }
@media (min-width: 720px) { .dl-month-title { font-size: 1.75rem; } }
.dl-month-count { color: var(--muted); font: 600 .84rem var(--body); }
.dl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 720px) { .dl-list { gap: 18px; } }
.dl-entry { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 18px 18px 16px; }
@media (min-width: 720px) { .dl-entry { padding: 22px 26px 20px; } }
.dl-entry > * { max-width: 100%; }
.dl-entry.is-fav::before { content: ""; position: absolute; left: 0; top: 26px; bottom: 26px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.dl-head { align-self: stretch; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dl-date { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding-top: 6px; color: var(--muted); font-size: .86rem; }
.dl-day { color: var(--rose-deep); font-weight: 650; letter-spacing: .01em; }
.dl-ctx { padding: 2px 9px; border-radius: 99px; background: var(--sunken); color: var(--fg-2); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.dl-acts { display: flex; align-items: center; gap: 2px; margin: -6px -10px 0 0; }
.dl-fav { color: var(--muted); padding: 0 10px; }
.dl-fav.is-liked { color: var(--rose); }
.dl-fav .ico { width: 22px; height: 22px; }
.dl-edit { width: 40px; height: 40px; }
.dl-title { margin-top: 8px; font: 500 1.42rem/1.2 var(--display); letter-spacing: -.015em; text-wrap: balance; }
.dl-text { margin-top: 10px; color: var(--fg); font: 400 1.1rem/1.62 var(--display); letter-spacing: -.003em; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (min-width: 720px) { .dl-text { font-size: 1.15rem; } }
.dl-text.is-clamped { display: -webkit-box; -webkit-line-clamp: 12; -webkit-box-orient: vertical; overflow: hidden; }
.dl-more { margin: 6px 0 0 -2px; min-height: 40px; padding: 0 2px; border: 0; background: none; color: var(--rose-deep); font: inherit; font-size: .92rem; font-weight: 650; cursor: pointer; }
.dl-photo { display: block; margin-top: 14px; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: var(--sunken); cursor: zoom-in; max-width: min(100%, 420px); box-shadow: 0 16px 34px -24px var(--shadow), 0 0 0 1px var(--line); }
.dl-photo img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; transition: transform .6s var(--ease); }
@media (hover: hover) { .dl-photo:hover img { transform: scale(1.02); } }
.dl-photo:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.dl-empty { padding: 10px 20px; }

/* ---------- The writing sheet: calm paper ---------- */
:root { --paper: #fbf6ef; --paper-ink: #2d2420; --paper-line: rgba(70, 48, 40, .09); --paper-muted: #8a7a72; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --paper: #231b18; --paper-ink: #f2eae3; --paper-line: rgba(255, 255, 255, .1); --paper-muted: #a8998f; } }
:root[data-theme="dark"] { --paper: #231b18; --paper-ink: #f2eae3; --paper-line: rgba(255, 255, 255, .1); --paper-muted: #a8998f; }
dialog.sheet.sheet--diario[open] { align-items: flex-start; padding-top: max(20px, env(safe-area-inset-top)); }
.sheet--diario .sheet-panel {
  width: min(860px, 100%); max-height: calc(100vh - 36px); max-height: calc(100dvh - 36px);
  background: var(--paper); color: var(--paper-ink);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.sheet--diario .sheet-head { padding-bottom: 0; }
.sheet--diario .sheet-title { font-weight: 400; }
.sheet--diario .sheet-body { padding: 4px 30px 26px; }
@media (min-width: 720px) { .sheet--diario .sheet-body { padding: 6px 48px 32px; } }
.sheet--diario .sheet-foot { background: var(--paper); border-top-color: var(--paper-line); }
@media (max-width: 639px) {
  dialog.sheet.sheet--diario[open] { align-items: flex-end; padding-top: max(16px, env(safe-area-inset-top)); }
  .sheet--diario .sheet-panel { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  .sheet--diario .sheet-body { padding: 4px 20px 22px; }
}
.dw { position: relative; display: flex; flex-direction: column; gap: 10px; }
.dw-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; padding-bottom: 12px; border-bottom: 1px solid var(--paper-line); }
.dw-date { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.dw-date-label { color: var(--paper-muted); font-size: .72rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.dw-date-in { width: auto; min-height: 40px; padding: 6px 10px; border-radius: 10px; font-weight: 600; }
.dw-weekday { color: var(--paper-muted); font: italic 400 1.05rem/1 var(--display); }
.dw-context { color: var(--rose-deep); font-size: .8rem; font-weight: 650; letter-spacing: .04em; }
.dw-context:empty { display: none; }
.dw-title { width: 100%; margin-top: 6px; padding: 6px 0; border: 0; background: none; color: var(--paper-ink); font: 500 1.55rem/1.25 var(--display); letter-spacing: -.018em; outline: none; }
.dw-title::placeholder { color: var(--paper-muted); font-weight: 400; opacity: .75; }
.dw-prompt { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; color: var(--paper-muted); font: italic 400 1.05rem/1.4 var(--display); }
.dw-prompt-next { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 99px; background: var(--sunken); color: var(--rose-deep); font: 620 .8rem/1 var(--body); cursor: pointer; }
.dw-prompt-next .ico { width: 15px; height: 15px; }
.dw-text { width: 100%; min-height: 260px; padding: 4px 0; border: 0; background: none; resize: none; overflow: hidden; color: var(--paper-ink); font: 400 1.22rem/1.65 var(--display); letter-spacing: -.004em; outline: none; }
@media (max-width: 639px) { .dw-text { min-height: 200px; font-size: 1.15rem; } }
.dw-text::placeholder { color: var(--paper-muted); opacity: .6; }
.dw-mirror { position: absolute; left: 0; top: 0; height: auto; visibility: hidden; pointer-events: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.dw-photo { margin-top: 4px; }
.dw-photo-add { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border: 1px dashed var(--line-strong); border-radius: 99px; background: none; color: var(--fg-2); font: 600 .9rem/1 var(--body); cursor: pointer; }
.dw-photo-add .ico { width: 18px; height: 18px; color: var(--rose-deep); }
.dw-photo-add small { color: var(--faint); font-weight: 500; }
.dw-att { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: min(100%, 420px); }
.dw-att-img { display: block; max-width: 100%; max-height: 300px; width: auto; height: auto; border-radius: 16px; box-shadow: 0 16px 34px -24px var(--shadow), 0 0 0 1px var(--line); }
.dw-att.is-busy .dw-att-img { opacity: .7; }
.dw-att .att-x { top: 8px; right: 8px; }
.dw-att-bar { align-self: stretch; margin-top: 0; }
.dw-att-status { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.dw-att-status.is-error { color: var(--warn); font-weight: 600; }
.dw-att-status .ico { flex: none; width: 16px; height: 16px; }
.dw-att-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.dw-error { padding: 10px 14px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-size: .92rem; font-weight: 600; }
.dw-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--paper-line); color: var(--paper-muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.dw-lock { display: inline-flex; align-items: center; gap: 5px; }
.dw-lock .ico { width: 14px; height: 14px; }
.dw-fav { color: var(--muted); font-size: .88rem; }
.dw-fav.is-liked { color: var(--rose); }
.dw-fav .ico { width: 22px; height: 22px; }

/* ---------- One photo, full screen ---------- */
.dv .viewer-shell { display: flex; flex-direction: column; }
@media (min-width: 900px) { .dv .viewer-shell { display: flex; } .dv .viewer-top { width: 100%; } }
.dv .viewer-stage { flex: 1; height: auto; min-height: 0; cursor: zoom-out; }
.dv .viewer-media { inset: 60px 12px 12px; }
.dv-cap { flex: none; padding: 10px 20px calc(14px + env(safe-area-inset-bottom)); color: rgba(255, 255, 255, .8); font-size: .9rem; text-align: center; }
.dv-cap b { color: #fff; font-weight: 600; }

/* ---------- Print view (on screen, then the browser prints) ---------- */
html.dp-open { overflow: hidden; }
.dp {
  --fg: #2d2420; --fg-2: #4c3f39; --muted: #8a7a72; --glass-strong: rgba(255, 255, 255, .82); --glass-line: rgba(255, 255, 255, .95); --glass-hi: #fff;
  --sunken: rgba(70, 48, 40, .07); --shadow: rgba(90, 55, 45, .3);
  position: fixed; inset: 0; z-index: 95; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: #efe6dc; color: #2d2420; color-scheme: light;
}
.dp-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  background: rgba(239, 230, 220, .9); border-bottom: 1px solid rgba(70, 48, 40, .1);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.dp-bar-text { flex: 1; min-width: 0; color: #6f5f58; font-size: .86rem; line-height: 1.4; text-align: center; }
@media (max-width: 639px) { .dp-bar-text { display: none; } }
/* Phones: "Fechar" becomes icon-only (it keeps its aria-label) so "Imprimir ou salvar em PDF" fits without being cut. */
@media (max-width: 479px) {
  .dp-bar { gap: 10px; }
  .dp-bar [data-dp="close"] { flex: 0 0 auto; padding: 0 12px; }
  .dp-bar [data-dp="close"] span { display: none; }
  .dp-bar [data-dp="print"] { flex: 1 1 auto; min-width: 0; }
  .dp-bar [data-dp="print"] span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
.dp-paper {
  width: min(760px, 100%); margin: 24px auto 60px; padding: 48px 44px 60px;
  background: #fbf6ef; border-radius: 6px; font-family: var(--display);
  box-shadow: 0 30px 70px -40px rgba(70, 45, 35, .6), 0 0 0 1px rgba(70, 48, 40, .08);
}
@media (max-width: 639px) { .dp-paper { width: auto; margin: 12px 10px 40px; padding: 30px 22px 40px; } }
.dp-cover { padding-bottom: 28px; margin-bottom: 34px; border-bottom: 1px solid rgba(70, 48, 40, .14); text-align: center; }
.dp-eyebrow { color: #a9535f; font: 650 .72rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; }
.dp-h1 { margin-top: 10px; font: 380 2.6rem/1.1 var(--display); letter-spacing: -.03em; }
.dp-sub { margin-top: 10px; color: #6f5f58; font: italic 400 1.05rem/1.4 var(--display); }
.dp-entry { padding: 24px 0; border-bottom: 1px solid rgba(70, 48, 40, .1); break-inside: avoid; page-break-inside: avoid; }
.dp-entry:last-child { border-bottom: 0; }
.dp-date { color: #a9535f; font: 650 .8rem/1.4 var(--body); letter-spacing: .04em; }
.dp-ctx { color: #8a7a72; font-weight: 500; }
.dp-ctx::before { content: " · "; }
.dp-title { margin-top: 6px; font: 500 1.5rem/1.2 var(--display); letter-spacing: -.015em; }
.dp-text { margin-top: 10px; font: 400 1.1rem/1.65 var(--display); white-space: pre-wrap; overflow-wrap: anywhere; }
.dp-photo { display: block; margin-top: 14px; width: auto; height: auto; max-width: 260px; max-height: 260px; border-radius: 10px; }
.dp-empty { color: #8a7a72; font-style: italic; text-align: center; }
@media print {
  body > *:not(.dp) { display: none !important; }
  html.dp-open, html.dp-open body { height: auto !important; overflow: visible !important; background: #fff !important; }
  .dp { position: static; overflow: visible; background: #fff; }
  .dp-bar { display: none; }
  .dp-paper { width: auto; margin: 0; padding: 0; background: #fff; border-radius: 0; box-shadow: none; }
  @page { margin: 18mm; }
}
/* ===================== end of ROUND 3 ===================== */

/* =====================================================================
   ORÇAMENTO (pais only) and "Ocultar valores"
   The money of the house in one page (hero tiles, the team table, the
   nursery totals, expenses by month and by category). Amounts come from
   util.brl/brlExact, which print "R$ •••" while <html class="hide-money">.
   ===================================================================== */

/* Header: the tenth link only where it fits (≥ 1280 px). */
.toplink--xl { display: none !important; }
@media (min-width: 1280px) { .toplink--xl { display: inline-flex !important; } }
@media (min-width: 1280px) and (max-width: 1365px) { .toplink { padding: 0 11px; } }

/* "Ocultar valores" button */
.money-toggle .ico { width: 18px; height: 18px; }
.money-toggle.is-on { color: var(--gold-deep); background: var(--gold-soft); border-color: var(--gold-line); }
.hide-money .qs-value, .hide-money .orc-row-value, .hide-money .budget .r { letter-spacing: .04em; }

/* Equipe: the opcional flag on a position card (no money there any more) */
.position-flags { display: flex; flex-wrap: wrap; gap: 6px; }

/* Forms: a small heading inside a sheet ("Valores (aparecem só no Orçamento)") */
.form-section {
  margin: 8px 0 -4px; padding-top: 16px; border-top: 1px solid var(--line);
  color: var(--gold-deep); font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}

/* Plano: the link to Orçamento */
.plan-orc > .ico:first-child { color: var(--gold-deep); }
.plan-orc b { font-weight: 650; }

/* Hero tiles */
.orc-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 20px; }
@media (min-width: 640px) { .orc-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.orc-tile .qs-value { font-size: 1.32rem; }
@media (min-width: 1024px) { .orc-tile .qs-value { font-size: 1.5rem; } }
.orc-tile .qs-sub b { color: var(--fg); font-weight: 650; }
.qs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }

/* Equipe table: closed value marker */
.cell-fixed { margin-left: 4px; color: var(--muted); font-size: .78rem; }

/* Category tones (dots and bars) */
.orc-dot { display: inline-block; flex: none; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--faint); vertical-align: 1px; }
[data-tone="gold"].orc-dot, .orc-bar i[data-tone="gold"] { background: var(--gold); }
[data-tone="rose"].orc-dot, .orc-bar i[data-tone="rose"] { background: var(--rose); }
[data-tone="info"].orc-dot, .orc-bar i[data-tone="info"] { background: var(--info); }
[data-tone="plum"].orc-dot, .orc-bar i[data-tone="plum"] { background: var(--plum); }
[data-tone="ok"].orc-dot, .orc-bar i[data-tone="ok"] { background: var(--ok); }
[data-tone="muted"].orc-dot, .orc-bar i[data-tone="muted"] { background: var(--faint); }

/* Despesas: layout (categories beside the months from 960 px) */
.orc-desp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 960px) {
  .orc-desp-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 18px; }
  .orc-cats-card { grid-column: 2; grid-row: 1; position: sticky; top: 84px; }
  .orc-desp-main { grid-column: 1; grid-row: 1; }
}
.orc-desp-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* Category filter: wrapping chips (radio inputs) */
.orc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.orc-chip { position: relative; }
.orc-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.orc-chip > span {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 14px; border-radius: 99px;
  background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-hi);
  color: var(--fg-2); font-size: .9rem; font-weight: 600; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.orc-chip small { margin-left: 6px; color: var(--muted); font-size: .78rem; font-weight: 600; }
.orc-chip input:checked + span { background: var(--fg); border-color: transparent; color: var(--bg); }
.orc-chip input:checked + span small { color: inherit; opacity: .7; }
.orc-chip input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.orc-filter-sum { margin: -4px 4px 0; color: var(--muted); font-size: .9rem; }
.orc-filter-sum:empty { display: none; }
.orc-filter-sum b { color: var(--fg); font-weight: 650; }

/* Per category */
.orc-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.orc-cat-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.orc-cat-name { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 2px; min-width: 0; font-weight: 600; }
.orc-cat-name small { margin-left: 8px; color: var(--muted); font-size: .78rem; font-weight: 500; }
.orc-cat-value { font: 450 1.06rem/1.2 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.orc-bar { height: 6px; margin-top: 7px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.orc-bar i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; transition: width .6s var(--ease); }
.orc-cats-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.orc-cats-total b { color: var(--fg); font: 500 1.3rem/1.2 var(--display); }

/* Months */
.orc-months { display: flex; flex-direction: column; gap: 16px; }
.orc-month { padding: 16px 16px 6px; }
@media (min-width: 720px) { .orc-month { padding: 20px 24px 8px; } }
.orc-month-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; padding: 0 2px 8px; }
.orc-month-title { font: 430 1.3rem/1.2 var(--display); letter-spacing: -.012em; }
.orc-month-total { display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: .84rem; }
.orc-month-total b { color: var(--fg); font: 500 1.12rem/1.2 var(--display); }
.orc-rows { list-style: none; margin: 0; padding: 0; }
.orc-row { border-top: 1px solid var(--line); }
.orc-row-main {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  width: 100%; min-height: 64px; padding: 10px 2px; margin: 0;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 12px;
}
.orc-row-main:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) { .orc-row-main:hover { background: var(--sunken); } }
.orc-date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--sunken); line-height: 1; }
.orc-date b { font: 500 1.15rem/1 var(--display); }
.orc-date small { margin-top: 2px; color: var(--muted); font-size: .66rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.orc-row-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.orc-row-title { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.orc-row-sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.orc-row-cat { display: inline-flex; align-items: baseline; }
.orc-row-meta { min-width: 0; overflow-wrap: anywhere; }
.orc-row-value { font: 450 1.08rem/1.2 var(--display); font-variant-numeric: lining-nums tabular-nums; text-align: right; }
.orc-empty .empty { margin: 0 auto; }
/* ===================== end of ORÇAMENTO ===================== */
.budget .cell-note { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; font-weight: 400; }

/* =====================================================================
   On-screen keyboard (iPhone/iPad): sheets live in the visible area
   ===================================================================== */
dialog.sheet[open] { top: var(--vv-top, 0px); bottom: auto; height: var(--vv-h, 100%); }
dialog.sheet.kb-open[open] .sheet-panel { max-height: 100%; }
dialog.sheet.kb-open[open] { padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: 0; align-items: flex-end; }
dialog.sheet.kb-open .sheet-panel { animation: none; }
dialog.sheet.kb-open .sheet-foot { padding-bottom: 10px; }
dialog.sheet.kb-open .sheet-body:last-child { padding-bottom: 16px; }
@media (max-width: 639px) {
  /* Writing on a phone: the page becomes a full-height paper above the keyboard. */
  dialog.sheet.sheet--diario.kb-open[open] { padding: 0; }
  .sheet--diario.kb-open .sheet-panel { height: 100%; border-radius: 0; }
  .sheet--diario.kb-open .sheet-grab,
  .sheet--diario.kb-open .sheet-head .eyebrow,
  .sheet--diario.kb-open .dw-prompt,
  .sheet--diario.kb-open .dw-photo,
  .sheet--diario.kb-open .dw-meta { display: none; }
  .sheet--diario.kb-open .sheet-head { padding: max(10px, env(safe-area-inset-top)) 12px 2px 18px; }
  .sheet--diario.kb-open .sheet-title { font-size: 1.15rem; }
  .sheet--diario.kb-open .dw-top { padding-bottom: 6px; }
  .sheet--diario.kb-open .dw-date-in { min-height: 34px; }
  .sheet--diario.kb-open .sheet-foot { padding: 8px 14px; }
}
@media (min-width: 640px) {
  .sheet--diario.kb-open[open] { align-items: flex-start; }
}

/* =====================================================================
   SONO (SPEC-sono.md) · the Sono tab of the Leona page (#leona/sono),
   the Leona page tabs, the sleep sheet and the Hoje live line.
   Chart colors: night sleep / naps / feeds, checked with the dataviz
   palette validator (OKLCH band, chroma, CVD and normal-vision ΔE, 3:1)
   against the card surfaces of both themes. Text never wears them.
   ===================================================================== */
:root {
  --sn-night: #4f6eb7;
  --sn-day: #ab7d0c;
  --sn-feed: #af4d80;
  --sn-ring: #c99a45;
  --sn-shade: rgba(79, 110, 183, .10);
  --sn-shade-line: rgba(79, 110, 183, .28);
  --sn-night-soft: rgba(79, 110, 183, .13);
  --sn-track: rgba(60, 40, 35, .045);
  --sn-grid: rgba(60, 40, 35, .09);
  --sn-band: rgba(52, 42, 38, .07);
  --sn-band-line: rgba(52, 42, 38, .22);
  --sn-night-btn: #4f6eb7;
  --sn-night-btn-fg: #ffffff;
  --sn-day-btn: linear-gradient(180deg, #f6e1b1, #efcd8a);
  --sn-day-btn-fg: #4a3410;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sn-night: #6d88d5;
    --sn-day: #b68b22;
    --sn-feed: #c0628e;
    --sn-ring: #d9a856;
    --sn-shade: rgba(109, 136, 213, .11);
    --sn-shade-line: rgba(109, 136, 213, .30);
    --sn-night-soft: rgba(109, 136, 213, .15);
    --sn-track: rgba(255, 255, 255, .035);
    --sn-grid: rgba(255, 255, 255, .08);
    --sn-band: rgba(255, 255, 255, .06);
    --sn-band-line: rgba(255, 255, 255, .20);
    --sn-night-btn: #6d88d5;
    --sn-night-btn-fg: #141a2c;
    --sn-day-btn: linear-gradient(180deg, #e2b866, #d29f45);
    --sn-day-btn-fg: #241a0c;
  }
}
:root[data-theme="dark"] {
  --sn-night: #6d88d5;
  --sn-day: #b68b22;
  --sn-feed: #c0628e;
  --sn-ring: #d9a856;
  --sn-shade: rgba(109, 136, 213, .11);
  --sn-shade-line: rgba(109, 136, 213, .30);
  --sn-night-soft: rgba(109, 136, 213, .15);
  --sn-track: rgba(255, 255, 255, .035);
  --sn-grid: rgba(255, 255, 255, .08);
  --sn-band: rgba(255, 255, 255, .06);
  --sn-band-line: rgba(255, 255, 255, .20);
  --sn-night-btn: #6d88d5;
  --sn-night-btn-fg: #141a2c;
  --sn-day-btn: linear-gradient(180deg, #e2b866, #d29f45);
  --sn-day-btn-fg: #241a0c;
}

/* ---------- Leona page: Diário de plantão · Sono · Consultas (sticky, like the nursery tabs) ---------- */
.ln-anchor { height: 0; margin-bottom: -20px; }
@media (min-width: 720px) { .ln-anchor { margin-bottom: -24px; } }
.ln-tabs { position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top) + 8px); z-index: 20; display: flex; justify-content: center; }
.ln-tabs .seg {
  width: min(540px, 100%); padding: 4px; border-radius: 17px;
  background: var(--tab-bg); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 14px 30px -20px var(--shadow);
}
.ln-tabs .seg-opt > span { min-height: 42px; padding: 0 6px; border-radius: 13px; font-size: .93rem; }
.ln-tabs .seg-opt .ln-long, .ln-tabs .seg-opt .ln-short {
  display: inline; min-height: 0; padding: 0; border-radius: 0; background: none; box-shadow: none; color: inherit; transition: none;
}
.ln-tabs .seg-opt .ln-short { display: none; }
@media (max-width: 479px) {
  .ln-tabs .seg-opt .ln-long { display: none; }
  .ln-tabs .seg-opt .ln-short { display: inline; }
}
.ln-panel { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ln-panel > * { min-width: 0; }
@media (min-width: 720px) { .ln-panel { gap: 24px; } }

/* ---------- The tab ---------- */
.sn, .sn-track { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.sn > *, .sn-track > * { min-width: 0; }
@media (min-width: 720px) { .sn, .sn-track { gap: 24px; } }

/* ---------- Agora: the live card ---------- */
.sn-now {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main actions" "extras extras";
  gap: 14px 22px; align-items: center;
}
.sn-now.is-asleep { background: linear-gradient(135deg, var(--spec), transparent 42%), linear-gradient(135deg, var(--sn-night-soft), transparent 72%), var(--glass); }
.sn-now.is-awake { background: linear-gradient(135deg, var(--spec), transparent 42%), linear-gradient(135deg, var(--gold-soft), transparent 70%), var(--glass); }
.sn-now-main { grid-area: main; display: flex; align-items: center; gap: 18px; min-width: 0; }
.sn-now-visual { flex: none; }
.sn-now-text { min-width: 0; }
.sn-now-title { margin-top: 4px; font: 380 clamp(1.7rem, 1.25rem + 1.7vw, 2.35rem)/1.12 var(--display); letter-spacing: -.02em; font-variation-settings: "opsz" 96; }
.sn-now-title b { font-weight: 430; font-variant-numeric: lining-nums proportional-nums; }
.sn-now-sub { margin-top: 6px; color: var(--muted); font-size: .92rem; line-height: 1.4; }
.sn-now-hint { margin-top: 8px; max-width: 54ch; color: var(--fg-2); font-size: .9rem; line-height: 1.45; }
.sn-now-window { margin-top: 4px; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.sn-now-window b { color: var(--fg-2); font-weight: 650; white-space: nowrap; }
.sn-now-actions { grid-area: actions; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.sn-now-extras { grid-area: extras; display: flex; flex-direction: column; gap: 10px; }
.sn-now-extras:empty { display: none; }
.sn-now-extras .care-note { margin-top: 0; }
.sn-moon {
  width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--sn-night) 24%, transparent), color-mix(in srgb, var(--sn-night) 9%, transparent) 70%);
  color: var(--sn-night); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sn-night) 22%, transparent);
}
.sn-moon .ico { width: 38px; height: 38px; stroke-width: 1.6; }
.sn-moon--idle { color: var(--muted); background: var(--sunken); box-shadow: none; }
.sn-ring { position: relative; display: grid; place-items: center; width: 88px; height: 88px; }
.sn-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.sn-ring circle { fill: none; stroke-width: 3; }
.sn-ring-track { stroke: var(--sunken-strong); }
.sn-ring-bar { stroke: var(--sn-ring); stroke-linecap: round; transition: stroke-dasharray .8s var(--ease); }
.sn-ring-label { position: relative; display: flex; align-items: baseline; gap: 2px; }
.sn-ring-label b { font: 400 1.6rem/1 var(--display); letter-spacing: -.02em; font-variant-numeric: lining-nums proportional-nums; }
.sn-ring-label small { color: var(--muted); font: 650 .68rem var(--body); }
.btn.sn-big { min-height: 60px; padding: 0 28px; border-radius: 20px; font-size: 1.08rem; }
.btn.sn-big .ico { width: 21px; height: 21px; }
.btn.sn-btn-night { border-color: transparent; background: var(--sn-night-btn); color: var(--sn-night-btn-fg); box-shadow: 0 12px 26px -14px var(--sn-night), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn.sn-btn-day { border-color: transparent; background: var(--sn-day-btn); color: var(--sn-day-btn-fg); box-shadow: 0 12px 26px -16px var(--sn-ring), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn.sn-adjust { min-height: 44px; }
.sn-now-duty { display: flex; align-items: center; gap: 8px; color: var(--fg-2); font-size: .88rem; }
.sn-now-duty .ico { width: 17px; height: 17px; color: var(--muted); }
.sn-stale { align-items: center; flex-wrap: wrap; }
.sn-stale > span { flex: 1 1 220px; }
@media (max-width: 639px) {
  .sn-now { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "actions" "extras"; }
  .sn-now-main { gap: 14px; }
  .sn-moon, .sn-ring { width: 72px; height: 72px; }
  .sn-moon .ico { width: 32px; height: 32px; }
  .sn-ring-label b { font-size: 1.35rem; }
  .sn-now-actions { flex-direction: row; }
  .btn.sn-big { flex: 1 1 auto; }
}

/* ---------- Resumo tiles ---------- */
.sn-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sn-tile--hero { grid-column: 1 / -1; }
@media (min-width: 640px) { .sn-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1100px) { .sn-tiles { grid-template-columns: minmax(0, 1.45fr) repeat(4, minmax(0, 1fr)); } .sn-tile--hero { grid-column: auto; } }
.sn-tile {
  display: flex; flex-direction: column; min-width: 0; padding: 14px 16px 12px; border-radius: var(--r-md);
  background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-hi), 0 14px 30px -26px var(--shadow);
}
.sn-tile--hero { background: linear-gradient(135deg, var(--sn-night-soft), transparent 75%), var(--glass-strong); }
.sn-tile-label { color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.sn-tile-value { margin-top: 6px; font: 380 2rem/1.05 var(--display); letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: lining-nums proportional-nums; }
.sn-tile--hero .sn-tile-value { font-size: 2.5rem; }
.sn-tile.is-empty .sn-tile-value { color: var(--faint); }
.sn-tile-sub { margin-top: 4px; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.sn-tile-trend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: auto; padding-top: 10px;
  color: var(--fg-2); font-size: .78rem; line-height: 1.3;
}
.sn-tile-sub + .sn-tile-trend, .sn-meter + .sn-tile-trend { margin-top: 10px; border-top: 1px solid var(--line); }
.sn-trend { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-weight: 650; white-space: nowrap; }
.sn-arrow { width: 15px; height: 15px; stroke-width: 2.1; }
.sn-meter { position: relative; height: 6px; margin: 12px 6px 2px; border-radius: 99px; background: var(--sunken-strong); }
.sn-meter-band { position: absolute; top: -4px; bottom: -4px; left: var(--a); width: calc(var(--b) - var(--a)); border-radius: 99px; background: var(--sn-band); box-shadow: inset 0 0 0 1px var(--sn-band-line); }
.sn-meter-dot { position: absolute; top: 50%; left: var(--x); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--sn-night); box-shadow: 0 0 0 2px var(--solid); }

/* ---------- Chart cards ---------- */
.sn-chart-head { margin-bottom: 8px; }
.sn-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; padding: 0; list-style: none; color: var(--fg-2); font-size: .8rem; }
.sn-legend li { display: inline-flex; align-items: center; gap: 7px; }
.sn-key { display: inline-block; flex: none; width: 16px; height: 9px; border-radius: 3px; background: var(--sn-night); }
.sn-key.is-dia { background: var(--sn-day); }
.sn-key.is-feed { width: 9px; height: 9px; border-radius: 50%; background: var(--sn-feed); }
.sn-key.is-shade { height: 13px; background: var(--sn-shade); box-shadow: inset 0 0 0 1px var(--sn-shade-line); }
.sn-key.is-band { height: 13px; background: var(--sn-band); box-shadow: inset 0 0 0 1px var(--sn-band-line); }
.sn-fig { position: relative; margin: 0; min-width: 0; }
.sn-plot { min-width: 0; }
.sn-tip {
  position: absolute; z-index: 6; max-width: min(280px, 92%); padding: 7px 11px; border-radius: 11px;
  background: var(--toast-bg); color: var(--toast-fg); font-size: .8rem; font-weight: 560; line-height: 1.3;
  pointer-events: none; box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .45);
}
.sn-table { margin-top: 12px; border-top: 1px solid var(--line); }
.sn-table > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--rose-deep); font-size: .88rem; font-weight: 620; cursor: pointer; list-style: none; }
.sn-table > summary::-webkit-details-marker { display: none; }
.sn-table > summary .ico { width: 16px; height: 16px; }
.sn-table-body { min-width: 0; }
.sn-tbl { width: 100%; border-collapse: collapse; font-size: .84rem; font-variant-numeric: tabular-nums lining-nums; }
.sn-tbl th, .sn-tbl td { padding: 7px 8px 7px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.sn-tbl thead th { color: var(--muted); font-size: .74rem; font-weight: 650; }
.sn-tbl tbody th { font-weight: 600; }
.sn-tbl tfoot td { color: var(--muted); border-bottom: 0; }
.sn-grid-x { position: absolute; top: 0; bottom: 0; left: var(--x); width: 1px; background: var(--sn-grid); }
.sn-night-shade { position: absolute; top: 0; bottom: 0; left: var(--a); width: calc(var(--b) - var(--a)); background: var(--sn-shade); }
.sn-blk { position: absolute; top: 0; bottom: 0; left: var(--a); width: max(3px, calc(var(--b) - var(--a))); border-radius: 6px; background: var(--sn-night); }
.sn-blk.is-dia { background: var(--sn-day); }
.sn-blk::after { content: ""; position: absolute; inset: -6px -2px; }
.sn-blk.is-hover, .sn-feed.is-hover, .sn-col.is-hover .sn-stack, .sn-fam-bar.is-hover i { filter: brightness(1.12) saturate(1.05); }
.sn-now-line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -2px; border-radius: 2px; background: var(--fg-2); opacity: .5; }
.sn-axis { position: relative; height: 18px; margin-top: 7px; color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums lining-nums; }
.sn-axis > span { position: absolute; top: 0; left: var(--x); transform: translateX(-50%); white-space: nowrap; }
.sn-axis > .is-first { transform: none; }
.sn-axis > .is-last, .sn-axis > .sn-axis-now { transform: translateX(-100%); }
.sn-axis > .sn-axis-now { color: var(--fg-2); font-weight: 650; }
@media (max-width: 639px) { .sn-axis > .is-near { display: none; } }
.nw { white-space: nowrap; }

/* Últimas 24 horas */
.sn-tl-plot { position: relative; height: 76px; border-radius: 14px; background: var(--sn-track); overflow: hidden; }
.sn-tl-track { position: absolute; left: 0; right: 0; top: 14px; height: 30px; }
.sn-tl-feeds { position: absolute; left: 0; right: 0; bottom: 11px; height: 10px; }
.sn-feed { position: absolute; top: 0; left: var(--x); width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--sn-feed); box-shadow: 0 0 0 2px var(--solid); }
.sn-feed::after { content: ""; position: absolute; inset: -9px; }

/* Mapa do sono */
.sn-map { --gut: 76px; display: flex; flex-direction: column; gap: 5px; }
.sn-map-axis, .sn-row { display: grid; grid-template-columns: var(--gut) minmax(0, 1fr); align-items: center; }
.sn-map-axis .sn-axis { margin: 0 0 3px; }
.sn-row-label { padding-right: 10px; color: var(--muted); font-size: .78rem; font-weight: 600; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-row.is-now .sn-row-label { color: var(--fg); }
.sn-row-track { position: relative; height: 17px; border-radius: 6px; background: var(--sn-track); overflow: hidden; }
.sn-row-track .sn-blk { top: 2px; bottom: 2px; border-radius: 4px; }
.sn-row-track .sn-blk::after { display: none; }
.sn-row.is-empty .sn-row-track { background: transparent; box-shadow: inset 0 0 0 1px var(--sn-grid); }
@media (max-width: 479px) { .sn-map { --gut: 58px; } .sn-row-label { font-size: .74rem; padding-right: 8px; } }

/* Horas por dia */
.sn-bars { --gut: 36px; }
.sn-bars-plot { position: relative; height: 216px; margin: 10px 0 0 var(--gut); }
.sn-grid-y { position: absolute; left: 0; right: 0; bottom: var(--y); height: 1px; background: var(--sn-grid); }
.sn-grid-y > span { position: absolute; right: calc(100% + 8px); top: -.62em; color: var(--muted); font-size: .72rem; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.sn-band { position: absolute; left: 0; right: 0; bottom: var(--lo); height: calc(var(--hi) - var(--lo)); background: var(--sn-band); box-shadow: inset 0 1px 0 var(--sn-band-line), inset 0 -1px 0 var(--sn-band-line); }
.sn-band > span { display: none; }
.sn-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.sn-col { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; cursor: default; }
.sn-stack { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; width: min(22px, 64%); height: var(--h); }
.sn-seg { display: block; flex: 1 1 0; min-height: 0; background: var(--sn-night); }
.sn-seg.is-dia { background: var(--sn-day); }
.sn-stack > .sn-seg:first-child { border-radius: 4px 4px 0 0; }
.sn-col.is-partial .sn-stack { opacity: .45; }
.sn-col-value { position: absolute; bottom: calc(var(--h) + 5px); left: 50%; transform: translateX(-50%); color: var(--fg-2); font-size: .72rem; font-weight: 650; white-space: nowrap; font-variant-numeric: lining-nums; }
.sn-bars-x { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); margin: 6px 0 0 var(--gut); color: var(--muted); font-size: .72rem; text-align: center; font-variant-numeric: tabular-nums lining-nums; }
.sn-bars-x .is-today { color: var(--fg); font-weight: 700; }
@media (max-width: 479px) { .sn-bars { --gut: 32px; } .sn-bars-plot { height: 184px; } }

/* ---------- Rotina da noite and Cochilos ---------- */
.sn-steps { list-style: none; margin: 0; padding: 0; }
.sn-step { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 52px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.sn-step:last-child { border-bottom: 0; }
.sn-step-n { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-soft); color: var(--gold-deep); font-size: .82rem; font-weight: 700; }
.sn-step-main { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
button.sn-step-main { min-height: 44px; align-items: center; border-radius: 10px; cursor: pointer; }
.sn-step-text { font-weight: 560; line-height: 1.35; overflow-wrap: anywhere; }
.sn-step-time { color: var(--muted); font-size: .86rem; font-weight: 600; white-space: nowrap; }
.sn-step-tools { display: flex; align-items: center; }
.sn-step-tools .icon-btn .ico { width: 18px; height: 18px; }
.sn-step-del { color: var(--warn); }
.sn-steps-empty { display: none; }
.sn-step-add { margin-top: 12px; }
.sn-sugg { padding: 14px 16px 16px; border-radius: var(--r-md); background: var(--gold-soft); }
.sn-sugg-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--fg-2); font-size: .88rem; line-height: 1.4; }
.sn-sugg-list { display: flex; flex-direction: column; gap: 4px; margin: 12px 0 0; padding-left: 22px; color: var(--fg-2); }
.sn-sugg-list li::marker { color: var(--gold-deep); font-weight: 700; }
.sn-sugg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- Plantões da noite ---------- */
.sn-week { list-style: none; margin: 0; padding: 0; }
.sn-night { border-bottom: 1px solid var(--line); }
.sn-night:last-child { border-bottom: 0; }
.sn-night-main {
  width: 100%; display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; grid-template-areas: "day shifts chev" "day track chev";
  align-items: center; gap: 6px 14px; min-height: 64px; margin: 0; padding: 10px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left;
}
div.sn-night-main { grid-template-columns: 104px minmax(0, 1fr); grid-template-areas: "day shifts" "day track"; }
button.sn-night-main { border-radius: 12px; cursor: pointer; }
.sn-night-day { grid-area: day; display: flex; flex-direction: column; min-width: 0; }
.sn-night-day b { font-weight: 650; }
.sn-night-day small { color: var(--muted); font-size: .78rem; }
.sn-night-shifts { grid-area: shifts; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.sn-shift { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 11px; border-radius: 99px; background: var(--sunken); color: var(--fg); font-size: .84rem; font-weight: 600; line-height: 1.25; }
.sn-shift .num { color: var(--muted); font-weight: 650; white-space: nowrap; }
.sn-shift.is-none { padding: 0; background: none; color: var(--faint); font-weight: 500; }
.sn-night-track { grid-area: track; position: relative; height: 4px; border-radius: 99px; background: var(--sunken-strong); overflow: hidden; }
.sn-night-track i { position: absolute; top: 0; bottom: 0; left: var(--a); width: calc(var(--b) - var(--a)); background: var(--sn-night); opacity: .8; }
.sn-night.is-open .sn-night-track { opacity: .6; }
.sn-night-chev { grid-area: chev; width: 18px; height: 18px; color: var(--faint); }
@media (max-width: 479px) {
  .sn-night-main { grid-template-columns: 80px minmax(0, 1fr) auto; gap: 6px 10px; }
  div.sn-night-main { grid-template-columns: 80px minmax(0, 1fr); }
}

/* The roster sheet of one night */
.pl-sec + .pl-sec { margin-top: 22px; }
.pl-h { margin: 4px 0 8px; color: var(--muted); font-size: .74rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.pl-list { list-style: none; margin: 0 0 12px; padding: 0; }
.pl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.pl-row-main { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 54px; margin: 0; padding: 6px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
button.pl-row-main { border-radius: 10px; cursor: pointer; }
.pl-time { color: var(--fg-2); font-weight: 650; white-space: nowrap; }
.pl-who { display: flex; flex-direction: column; min-width: 0; }
.pl-who b { font-weight: 620; overflow-wrap: anywhere; }
.pl-who small { color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.pl-empty { padding: 4px 0 12px; color: var(--muted); }
.pl-models { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.pl-model {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 64px; margin: 0; padding: 12px 14px; border-radius: var(--r-md);
  border: 1px solid var(--glass-line); background: var(--glass-strong); color: inherit; font: inherit; text-align: left; cursor: pointer;
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 8px 18px -16px var(--shadow); transition: transform .15s var(--ease);
}
.pl-model:active { transform: scale(.98); }
.pl-model b { font-size: .92rem; font-weight: 650; line-height: 1.3; }
.pl-model small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.pl-note { margin-top: 10px; color: var(--muted); font-size: .82rem; }

/* ---------- Sono da família (pais) ---------- */
.sn-fam-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.sn-fam-person { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-hi); }
.sn-fam-text { min-width: 0; }
.sn-fam-name { color: var(--fg-2); font-size: .86rem; font-weight: 650; }
.sn-fam-value { font: 400 1.5rem/1.15 var(--display); letter-spacing: -.015em; font-variant-numeric: lining-nums proportional-nums; }
.sn-fam-face { font-size: 1.05rem; vertical-align: 2px; }
.sn-fam-sub { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.avatar.sn-av-mae { --av: linear-gradient(135deg, #e3a3ad, #c56f7c); }
.avatar.sn-av-pai { --av: linear-gradient(135deg, #93a9dc, #4f6eb7); }
.sn-fam-care { margin-top: 12px; }
.sn-log { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; padding: 16px; border-radius: var(--r-md); background: var(--sunken); }
.sn-log-title { font: 430 1.2rem/1.2 var(--display); letter-spacing: -.01em; }
.sn-log-hint { margin-top: -6px; color: var(--muted); font-size: .86rem; }
.sn-log-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.sn-log-stepper { align-self: center; background: var(--glass-strong); }
.sn-log-stepper output { min-width: 72px; font-size: 1.05rem; }
.sn-faces { flex: 1 1 280px; min-width: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.sn-face { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; }
.sn-face input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sn-face-ico {
  width: 100%; max-width: 50px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  background: var(--glass-strong); border: 1.5px solid var(--glass-line); font-size: 1.45rem; line-height: 1;
  transition: transform .25s var(--spring), box-shadow .2s;
}
.sn-face input:checked + .sn-face-ico { box-shadow: 0 0 0 3px var(--rose); transform: scale(1.06); }
.sn-face input:focus-visible + .sn-face-ico { outline: 2.5px solid var(--focus); outline-offset: 3px; }
.sn-face-label { color: var(--muted); font-size: .7rem; font-weight: 600; text-align: center; }
.sn-face input:checked ~ .sn-face-label { color: var(--rose-deep); }
.sn-log-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sn-log-saved { color: var(--muted); font-size: .84rem; }
.sn-log-saved:empty { display: none; }
.sn-fam-week { position: relative; margin-top: 18px; }
.sn-fam-week-title { margin-bottom: 10px; color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.sn-fam-week-title span { font-weight: 500; letter-spacing: .02em; text-transform: none; }
.sn-fam-chart { display: flex; flex-direction: column; gap: 10px; }
.sn-fam-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: end; gap: 8px; }
.sn-fam-row-label { display: flex; flex-direction: column; padding-bottom: 2px; min-width: 0; }
.sn-fam-row-label b { color: var(--fg-2); font-size: .84rem; font-weight: 650; }
.sn-fam-row-label small { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.sn-fam-plot { position: relative; height: 58px; box-shadow: inset 0 -1px 0 var(--line-strong); }
.sn-fam-guide { position: absolute; left: 0; right: 0; bottom: var(--y); height: 1px; background: var(--sn-band-line); opacity: .7; }
.sn-fam-bars { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; height: 100%; align-items: end; }
.sn-fam-bar { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.sn-fam-bar i { display: block; width: min(20px, 70%); height: var(--h); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--sn-night); }
.sn-fam-bar.is-checkin i { background: color-mix(in srgb, var(--sn-night) 62%, transparent); }
.sn-fam-bar.is-empty i { height: 2px; border-radius: 2px; background: var(--sunken-strong); }
.sn-fam-days .sn-fam-bars { height: auto; }
.sn-fam-days .sn-fam-bars span { color: var(--muted); font-size: .72rem; text-align: center; }
.sn-fam-days .sn-fam-bars .is-today { color: var(--fg); font-weight: 700; }
.avatar.sn-av { font-family: var(--body); font-weight: 650; font-size: .95rem; letter-spacing: .01em; }
.avatar.sn-av-leona { background: #f3e6d2; box-shadow: inset 0 0 0 1px rgba(181, 133, 47, .35); }
@media (max-width: 479px) { .sn-fam-row { grid-template-columns: 78px minmax(0, 1fr); } .sn-fam-bars { gap: 4px; } }

/* ---------- Referências and Sono seguro ---------- */
.card.sn-ref { padding: 0; }
.sn-ref-sum { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px; list-style: none; cursor: pointer; border-radius: var(--r-lg); }
.sn-ref-sum::-webkit-details-marker { display: none; }
.sn-ref-titles { display: flex; flex-direction: column; min-width: 0; }
.sn-ref-chev { flex: none; margin-top: 6px; color: var(--muted); transition: transform .25s var(--ease); }
.sn-ref[open] .sn-ref-chev { transform: rotate(180deg); }
.sn-ref-body { padding: 0 20px 20px; }
/* A closed <details> keeps its content measurable in Chrome (content-visibility): hide it for real. */
.sn-ref:not([open]) > .sn-ref-body, .sn-table:not([open]) > .sn-table-body { display: none; }
@media (min-width: 720px) { .sn-ref-sum { padding: 24px 26px; } .sn-ref-body { padding: 0 26px 24px; } }
.sn-ref-h { margin: 10px 0 8px; color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.sn-ref-h:first-child { margin-top: 0; }
.sn-ref-p { margin-bottom: 8px; color: var(--fg-2); font-size: .88rem; line-height: 1.5; }
.sn-ref-tbl { margin-bottom: 14px; }
.sn-ref-tbl tr.is-now th, .sn-ref-tbl tr.is-now td { color: var(--fg); font-weight: 650; }
.sn-ref-tbl .pill { margin-left: 6px; vertical-align: 1px; }
.sn-ref-src { margin-top: 12px; color: var(--muted); font-size: .8rem; line-height: 1.55; overflow-wrap: anywhere; }
.sn-ref-disc { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--sunken); color: var(--fg-2); font-size: .84rem; line-height: 1.45; }
.sn-safe { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.sn-safe li { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 12px; }
.sn-safe-ico { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.sn-safe-ico .ico { width: 16px; height: 16px; stroke-width: 2.4; }
.sn-safe b { display: block; font-weight: 650; line-height: 1.35; }
.sn-safe small { display: block; margin-top: 2px; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.sn-disclaimer { display: flex; align-items: flex-start; gap: 8px; margin: -6px 6px 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.sn-disclaimer .ico { flex: none; width: 17px; height: 17px; margin-top: 1px; }

/* ---------- Before the birth ---------- */
.card.sn-pre { padding: 26px 22px 24px; }
.sn-pre .empty--lg { padding: 4px 10px 20px; }
.sn-pre-list { list-style: none; display: grid; gap: 10px; max-width: 640px; margin: 0 auto; padding: 0; }
@media (min-width: 900px) { .sn-pre-list { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sn-pre-list li { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: start; gap: 12px; padding: 14px; border-radius: var(--r-md); background: var(--sunken); }
.sn-pre-list .ico { width: 38px; height: 38px; padding: 9px; border-radius: 50%; background: var(--sn-night-soft); color: var(--sn-night); }
.sn-pre-list b { display: block; font-weight: 650; }
.sn-pre-list small { display: block; margin-top: 2px; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.sn-pre-note { max-width: 560px; margin: 18px auto 0; color: var(--fg-2); font-size: .92rem; text-align: center; text-wrap: pretty; }

/* ---------- The sleep sheet: where she slept, how she fell asleep ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 99px; background: var(--sunken); color: var(--fg-2); font-size: .92rem; font-weight: 600; transition: background-color .2s, color .2s, box-shadow .2s; }
.chip input:checked + span { background: var(--lens); color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--sn-night), 0 4px 12px -6px var(--shadow); }
.chip input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 2px; }

/* ---------- Hoje: the live line of the Leona card (after the birth) ---------- */
.sn-hoje { margin-bottom: 14px; padding: 10px 12px 10px 10px; border-radius: var(--r-md); background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-hi); }
.sn-hoje.is-asleep { background: linear-gradient(135deg, var(--sn-night-soft), transparent 80%), var(--glass-strong); }
.sn-hoje-live { display: flex; align-items: center; gap: 10px; }
.sn-hoje-ico { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-soft); color: var(--gold-deep); }
.sn-hoje.is-asleep .sn-hoje-ico { background: var(--sn-night-soft); color: var(--sn-night); }
.sn-hoje-ico .ico { width: 19px; height: 19px; }
.sn-hoje-text { flex: 1; min-width: 0; font-size: .95rem; line-height: 1.3; }
.sn-hoje-text b { font-weight: 650; }
.sn-hoje-text span { color: var(--muted); }
.sn-hoje-night { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--fg-2); font-size: .86rem; line-height: 1.4; }
.sn-hoje-night .ico { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--muted); }
.sn-hoje-night b { font-weight: 620; }
.sn-hoje-night a { font-weight: 620; }
/* ===================== end of SONO ===================== */

/* =====================================================================
   AGENDA + AVISOS NO CELULAR (SPEC-agenda.md)
   The Agenda page (hero with the next event, the push card, the month
   calendar with Monday first and dots per person, the day groups with
   event cards, map and phone rows, the "Passados" collapsible), the event
   sheet (period segmented, reminder chips) and the "Avisos no celular"
   section of the account sheet. Rule kept: no animation, opacity,
   transform or filter on an ancestor of a glass surface.
   ===================================================================== */

/* ---------- Header: "Agenda" right after Leona for pais only from 1100 px (the team's header is shorter) ---------- */
@media (min-width: 900px) and (max-width: 1099px) { .role-pais .toplink--lg { display: none; } }
/* Ten or eleven links from 1100 px: tighter padding keeps the brand and the account clear (at 1366 px the eleven
   links with the regular 15 px padding would run into the brand). */
@media (min-width: 1100px) { .role-pais .toplink { padding: 0 10px; } }
@media (min-width: 1400px) { .role-pais .toplink { padding: 0 13px; } }

/* ---------- Who dots and chips ---------- */
.who--sage { color: var(--sage-deep); }
.ag-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.q-gold, .ag-cal .cal-dots i.q-gold { background: var(--gold); }
.q-rose, .ag-cal .cal-dots i.q-rose { background: var(--rose); }
.q-sage, .ag-cal .cal-dots i.q-sage { background: var(--sage); }
.ag-chip { display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; min-height: 24px; border-radius: 99px; background: var(--sunken); color: var(--fg-2); font-size: .78rem; font-weight: 620; letter-spacing: .01em; white-space: nowrap; }
.ag-chip .ico { width: 13px; height: 13px; stroke-width: 2.1; }
.ag-chip--when { background: var(--gold-soft); color: var(--gold-deep); font-variant-numeric: tabular-nums; }

/* ---------- Hero: the next event in large type ---------- */
.hero--agenda .hero-lead em { font-style: italic; }
.ag-next { margin-top: 16px; padding: 16px 20px 18px; border-radius: var(--r-md); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-hi), 0 18px 40px -30px var(--shadow); }
.ag-next-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.ag-next-rel { font: 380 clamp(1.9rem, 4.2vw, 2.5rem)/1.05 var(--display); letter-spacing: -.025em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ag-next-day { color: var(--muted); font-size: .86rem; font-weight: 550; }
.ag-next-title { margin-top: 6px; font: 450 1.22rem/1.3 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.ag-next-sub { margin-top: 4px; color: var(--muted); font-size: .9rem; line-height: 1.45; }

/* ---------- Layout: calendar beside the list from 900 px ---------- */
.ag-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.ag-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (min-width: 900px) {
  .ag-layout { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 24px; }
  .ag-layout > .ag-cal { position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top) + 16px); }
}
.ag-cal .cal-title { font-size: 1.25rem; }
.ag-cal .cal-day.has-ev .cal-num { font-weight: 750; }
.ag-cal .cal-day.is-past.has-ev { color: var(--muted); }
.ag-cal .cal-dots { bottom: 2px; }
.ag-legend { margin-top: 12px; }
.ag-daypanel .list { margin-top: 2px; }
.ag-daypanel > .btn { margin-top: 4px; }
.ag-daypanel .cal-free .ico { color: var(--gold); }

/* ---------- The day groups ---------- */
.ag-head { margin-bottom: 4px; }
.ag-group { margin-top: 18px; }
.ag-group:first-of-type { margin-top: 0; }
.ag-head + .ag-group { margin-top: 10px; }
.ag-group-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0 4px 10px; font: 450 1.15rem/1.3 var(--display); letter-spacing: -.01em; }
.ag-group-title small { color: var(--muted); font: 500 .84rem/1.3 var(--body); }
.ag-group[data-day] .ag-group-title span::first-letter { text-transform: uppercase; }
.ag-evs { display: flex; flex-direction: column; gap: 12px; }
.ag-ev {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px;
  padding: 16px 18px 16px 14px; border-radius: var(--r-md);
  background: var(--glass); border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 14px 34px -28px var(--shadow);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
}
.ag-ev.is-done { opacity: .72; }
.ag-ev.is-pending { opacity: .6; }
.ag-ev-time { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 8px 4px; border-radius: var(--r-sm); background: var(--gold-soft); color: var(--gold-deep); text-align: center; }
.ag-ev-time b { font: 600 1.05rem/1.1 var(--body); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ag-ev-time small { font-size: .74rem; font-weight: 600; opacity: .8; font-variant-numeric: tabular-nums; }
.ag-ev.is-late .ag-ev-time { background: var(--warn-soft); color: var(--warn); }
.ag-ev.is-done .ag-ev-time { background: var(--ok-soft); color: var(--ok); }
.ag-ev-body { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ag-ev-main { position: relative; display: flex; flex-direction: column; gap: 6px; width: 100%; margin: 0; padding: 0 28px 0 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.ag-ev-main:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 4px; }
.ag-ev-title { font: 600 1.05rem/1.3 var(--body); letter-spacing: -.005em; overflow-wrap: anywhere; }
.ag-ev.is-done .ag-ev-title { text-decoration: line-through; text-decoration-color: var(--faint); color: var(--muted); }
.ag-ev-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.ag-ev-chips .who { margin-right: 0; font-size: .86rem; }
.ag-ev-chips .who::after { display: none; }
.ag-ev-sub { color: var(--muted); font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.ag-ev-chev { position: absolute; right: 0; top: 2px; width: 18px; height: 18px; color: var(--faint); }
.ag-addr { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--fg-2); font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.ag-addr .ico { flex: none; width: 17px; height: 17px; margin-top: 2px; color: var(--rose-deep); }
.ag-maps, .ag-phone { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ag-maps .btn, .ag-phone .btn { min-height: 38px; }
.ag-phone-num { color: var(--muted); font-size: .9rem; padding-left: 2px; }
.ag-notes { margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--sunken); color: var(--fg-2); font-size: .9rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 479px) {
  .ag-ev { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 14px 14px 14px 12px; }
  .ag-ev-time b { font-size: .95rem; }
}

/* "Passados" (the closed body is display: none, not Chrome's content-visibility, so nothing is laid out off screen) */
.ag-past { padding: 0; }
.ag-past[hidden] { display: none; }
.ag-past:not([open]) .ag-past-body { display: none; }
.ag-past-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 0 22px; list-style: none; cursor: pointer; font: 450 1.1rem/1.3 var(--display); letter-spacing: -.01em; color: var(--fg-2); }
.ag-past-sum::-webkit-details-marker { display: none; }
.ag-past-chev { width: 20px; height: 20px; color: var(--muted); transition: transform .3s var(--ease); }
.ag-past[open] .ag-past-chev { transform: rotate(180deg); }
.ag-past-body { padding: 4px 18px 20px; }
.ag-past-body .ag-group-title { margin-top: 6px; }
@media (min-width: 720px) { .ag-past-sum { padding: 0 26px; } .ag-past-body { padding: 4px 22px 24px; } }

/* ---------- Details (read-only sheet) ---------- */
.ag-detail { display: flex; flex-direction: column; gap: 12px; }
.ag-detail-when { font-size: .95rem; color: var(--fg-2); }
.ag-detail-when b { font-weight: 650; color: var(--fg); }
.ag-detail-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ag-detail-chips .who { margin-right: 0; }
.ag-detail-chips .who::after { display: none; }
.ag-detail-where, .ag-detail-rem { display: flex; align-items: flex-start; gap: 8px; color: var(--fg-2); font-size: .92rem; line-height: 1.45; }
.ag-detail-where .ico, .ag-detail-rem .ico { flex: none; width: 17px; height: 17px; margin-top: 2px; color: var(--muted); }

/* ---------- The event sheet ---------- */
.sheet--evento [data-field="periodo"] .seg-opt span, .sheet--evento [data-field="tipo"] .seg-opt span { padding: 0 4px; font-size: .82rem; }
.sheet--evento [data-field="quem"] .seg-opt span { font-size: .88rem; }
@media (max-width: 400px) {
  .sheet--evento [data-field="tipo"] .seg, .sheet--evento [data-field="periodo"] .seg { flex-wrap: wrap; }
  .sheet--evento [data-field="tipo"] .seg-opt { flex: 1 1 30%; }
  .sheet--evento [data-field="periodo"] .seg-opt { flex: 1 1 45%; }
}
.ag-chips .chip input:checked + span { box-shadow: inset 0 0 0 1.5px var(--gold), 0 4px 12px -6px var(--shadow); }
.sheet--evento .g2:not(:has(> [data-field]:not([hidden]))) { display: none; }

/* ---------- Avisos no celular: the Agenda card and the account-sheet section ---------- */
.ag-push .card-head { margin-bottom: 10px; }
.push-lead { color: var(--fg-2); font-size: .95rem; line-height: 1.5; text-wrap: pretty; }
.push-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.push-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; line-height: 1.45; }
.push-note .ico { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.push-note--ios { background: var(--gold-soft); color: var(--gold-deep); }
.push-note--denied { background: var(--warn-soft); color: var(--warn); }
.acct-hint { margin: -4px 0 6px; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.acct-push .push-note { margin-top: 4px; }
.acct-push .switch-row + .btn, .acct-push .push-note + .btn { margin-top: 8px; }
.push-devs { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--line); }
.push-dev { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.push-dev:last-child { border-bottom: 0; }
.push-dev-ico { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-soft); color: var(--gold-deep); }
.push-dev-ico .ico { width: 18px; height: 18px; }
.push-dev.is-off .push-dev-ico { background: var(--sunken); color: var(--muted); }
.push-dev-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.push-dev-text b { font-weight: 600; overflow-wrap: anywhere; }
.push-dev-text small { color: var(--muted); font-size: .82rem; }
.push-this .switch-text small { text-wrap: pretty; }

/* ---------- Hoje: the Agenda card ---------- */
.agenda-hoje .row-sub .who { font-size: .84rem; }
/* ===================== end of AGENDA ===================== */
