/* Tendlet — native iOS demo */

/* ─── Fonts ─── */
/* Native-equivalent stacks for HFont.serif/sans/mono. No web fonts. */

/* ─── Theme tokens ─── */
:root {
  /* page (behind phone) */
  --page-bg: #1B1712;
  --page-grain: 0.5;

  /* in-phone palette — exact Tendlet iOS Theme.swift cream */
  --paper:   #F0E7D5;
  --paper-2: #FFF6EA;
  --paper-3: #FFFDF7;
  --ink:     #251F1A;
  --ink-2:   #4A4035;
  --ink-3:   #6C5D4E;
  --hair:    #C8B89F;
  --hair-2:  #D7C7B0;

  /* accents */
  --forest:  #315831;
  --forest-deep: #203F21;
  --terra:   #9E4429;
  --honey:   #865314;
  --pond:    #2E637C;
  --sage:    #4A6642;
  --olive:   #526727;
  --bisque:  #D8BD91;
  --rust:    #9A3E27;

  /* fonts */
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans:  -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
  --mono:  ui-monospace, "SF Mono", Menlo, Monaco, monospace;

  /* density */
  --gap-y: 14px;
  --pad-y: 14px;
  --card-r: 22px;
  --row-min: 64px;
}

[data-density="compact"] {
  --gap-y: 9px;
  --pad-y: 10px;
  --row-min: 54px;
}

/* alt palettes via [data-palette] */
[data-palette="terracotta"] {
  --paper: #E2C7B3;
  --paper-2: #FFF0E4;
  --paper-3: #FFF8F1;
  --hair: #C99D7F;
  --hair-2: #D8B59D;
  --forest: #8E2E1B;
  --forest-deep: #5F1E11;
  --terra: #9B3218;
  --honey: #84400E;
  --sage: #743827;
  --pond: #24566F;
  --olive: #45551F;
  --bisque: #D0AA84;
  --rust: #8F321E;
  --ink: #2F160F;
  --ink-2: #4C2B1E;
  --ink-3: #704B38;
}
[data-palette="pine"] {
  --paper: #C7DACB;
  --paper-2: #F1F8F1;
  --paper-3: #FCFFFC;
  --hair: #A7BEAB;
  --hair-2: #B9CEBD;
  --forest: #064F3A;
  --forest-deep: #033729;
  --terra: #704726;
  --honey: #66540E;
  --sage: #1E663C;
  --pond: #245E74;
  --olive: #4A5E20;
  --bisque: #C7B17F;
  --rust: #8E3D27;
  --ink: #13231B;
  --ink-2: #31483D;
  --ink-3: #506358;
}
[data-palette="tide"] {
  --paper: #D7E3EB;
  --paper-2: #F7FBFE;
  --paper-3: #FFFFFF;
  --hair: #B3C6D2;
  --hair-2: #C5D5DE;
  --forest: #2D5B78;
  --forest-deep: #1D4056;
  --terra: #316881;
  --honey: #276B7D;
  --sage: #2D6978;
  --pond: #2E637C;
  --olive: #526727;
  --bisque: #CDB48A;
  --rust: #9A3E27;
  --ink: #14242D;
  --ink-2: #314858;
  --ink-3: #4D6372;
}

/* ─── Page (around phone) ─── */
html, body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  font-family: var(--sans);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* DARK APPEARANCE — native palette-specific appearance */
[data-appearance="dark"] {
  --paper:   #17130F;
  --paper-2: #28221B;
  --paper-3: #352E26;
  --hair:    #4A3E32;
  --hair-2:  #3C332A;
  --forest:  #7CA475;
  --forest-deep: #5E8C5A;
  --terra:   #E69673;
  --honey:   #E6BC85;
  --sage:    #9DB78F;
  --pond:    #8EC4D8;
  --olive:   #BCCC80;
  --bisque:  #E8C99A;
  --rust:    #EF9878;
  --ink:     #F1E7D2;
  --ink-2:   #C8BDA2;
  --ink-3:   #8F836E;
  --page-bg: #090705;
}
[data-appearance="dark"][data-palette="terracotta"] {
  --paper: #150B06;
  --paper-2: #2A1810;
  --paper-3: #3A261C;
  --hair: #56301F;
  --hair-2: #432416;
  --forest: #F08860;
  --forest-deep: #D86840;
  --terra: #FF9870;
  --honey: #F0A858;
  --sage: #D88060;
  --pond: #8EC4D8;
  --olive: #BCCC80;
  --bisque: #E8C99A;
  --rust: #EF9878;
  --ink: #FFE6D8;
  --ink-2: #D7AD9C;
  --ink-3: #A17B68;
  --page-bg: #080403;
}
[data-appearance="dark"][data-palette="pine"] {
  --paper: #06100D;
  --paper-2: #14231E;
  --paper-3: #20332C;
  --hair: #30483D;
  --hair-2: #263A32;
  --forest: #5CD4AC;
  --forest-deep: #3EB892;
  --terra: #D07850;
  --honey: #C4A060;
  --sage: #68B880;
  --pond: #8EC4D8;
  --olive: #BCCC80;
  --bisque: #E8C99A;
  --rust: #EF9878;
  --ink: #E0F2EA;
  --ink-2: #A8C8B8;
  --ink-3: #7E9C8C;
  --page-bg: #020806;
}
[data-appearance="dark"][data-palette="tide"] {
  --paper: #071016;
  --paper-2: #16242E;
  --paper-3: #233440;
  --hair: #30404A;
  --hair-2: #263640;
  --forest: #6BAFC8;
  --forest-deep: #4E94B0;
  --terra: #8AB0C0;
  --honey: #7EC0D0;
  --sage: #68A8BC;
  --pond: #8EC4D8;
  --olive: #BCCC80;
  --bisque: #E8C99A;
  --rust: #EF9878;
  --ink: #E0F0F5;
  --ink-2: #A8C8D8;
  --ink-3: #7C9CAC;
  --page-bg: #02070A;
}
[data-appearance="dark"] .chip { background: rgba(255,255,255,0.04); color: var(--ink-2); }
[data-appearance="dark"] .tabbar {
  background: rgba(30, 24, 18, 0.78);
  border-color: rgba(255,255,255,0.06);
}
[data-appearance="dark"] .tabbar-add {
  background: rgba(30, 24, 18, 0.78);
  border-color: rgba(255,255,255,0.06);
  color: var(--honey);
}
[data-appearance="dark"] .tabbar-center {
  background: var(--forest);
  color: #1a1612;
  border-color: rgba(255,255,255,0.12);
}
[data-appearance="dark"] .tabbar button[data-on="1"] {
  color: var(--honey);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(217,168,106,0.10)),
    rgba(217,168,106,0.055);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 -1px 0 rgba(217,168,106,0.08) inset,
    0 0 0 0.5px rgba(217,168,106,0.08) inset;
}
[data-appearance="dark"] .avatar:not(.has-photo)[data-tint="terra"]  { background: #3d2520; }
[data-appearance="dark"] .avatar:not(.has-photo)[data-tint="sand"]   { background: #322b22; }
[data-appearance="dark"] .avatar:not(.has-photo)[data-tint="honey"]  { background: #3d301e; }
[data-appearance="dark"] .avatar:not(.has-photo)[data-tint="pond"]   { background: #1e2a3a; }
[data-appearance="dark"] .avatar:not(.has-photo)[data-tint="forest"] { background: #1f2e1d; }
[data-appearance="dark"] .avatar:not(.has-photo)[data-tint="sage"]   { background: #232e1f; }
[data-appearance="dark"] .avatar:not(.has-photo)[data-tint="olive"]  { background: #292d1c; }
[data-appearance="dark"] .avatar:not(.has-photo)[data-tint="desert"] { background: #332a18; }
[data-appearance="dark"] .moment {
  background: linear-gradient(180deg, var(--paper-3), var(--paper-2));
  border-color: var(--hair);
}
[data-appearance="dark"] .meet-headsup {
  background: linear-gradient(180deg, rgba(217,168,106,0.14), rgba(217,168,106,0.06));
}
[data-appearance="dark"] .ask-cta { background: linear-gradient(160deg, #2d362a 0%, #404a3a 60%, #4a5945 100%); }
[data-appearance="dark"] .r-src.suggested { background: rgba(168, 192, 143, 0.12); color: var(--forest); }
[data-appearance="dark"] .r-src.custom    { background: rgba(232, 152, 120, 0.14); color: var(--terra); }
[data-appearance="dark"] .week-strip .day { background: var(--paper-2); }
[data-appearance="dark"] .week-strip .day.today { background: var(--forest); }
[data-appearance="dark"] .week-strip .day.today .n { color: #1a1612; }
[data-appearance="dark"] .ribbon, [data-appearance="dark"] .family { background: var(--paper-2); }
[data-appearance="dark"] .ribbon .ic { background: var(--forest); color: #1a1612; }
[data-appearance="dark"] .timeline .t-row .t-dot { background: var(--paper); border-color: var(--forest); }
[data-appearance="dark"] .ask-bubble { background: var(--paper-3); }
[data-appearance="dark"] .ask-msg.user .ask-bubble {
  background: var(--forest);
  color: #1a1612;
  border-color: var(--forest);
}
[data-appearance="dark"] .notif-card {
  background: rgba(10, 8, 5, 0.88);
}

html, body, #root {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: var(--page-bg);
}

.demo-page {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(220px, 286px) minmax(0, 430px);
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 22px;
  box-sizing: border-box;
  background:
    radial-gradient(900px 640px at 70% 12%, rgba(216, 189, 145, 0.18), transparent 62%),
    radial-gradient(680px 540px at 16% 84%, rgba(49, 88, 49, 0.14), transparent 68%),
    var(--page-bg);
}

.demo-controls {
  width: 100%;
  color: #F5ECD9;
  font-family: var(--sans);
  align-self: center;
}
.demo-controls-head {
  margin-bottom: 18px;
}
.demo-kicker,
.demo-control-label {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 236, 217, 0.58);
}
.demo-controls h2 {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 40px;
  line-height: 0.95;
  font-weight: 400;
  letter-spacing: 0;
  color: #F5ECD9;
}
.demo-control-group + .demo-control-group {
  margin-top: 18px;
}
.demo-control-label {
  margin-bottom: 8px;
}
.demo-mode-row,
.demo-palette-grid {
  display: grid;
  gap: 8px;
}
.demo-mode-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.demo-palette-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.demo-mode-row button,
.demo-palette-grid button {
  appearance: none;
  border: 0.5px solid rgba(245, 236, 217, 0.22);
  border-radius: 14px;
  background: rgba(245, 236, 217, 0.08);
  color: rgba(245, 236, 217, 0.78);
  font: 600 12px/1.1 var(--sans);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.demo-mode-row button {
  min-height: 42px;
  padding: 8px 10px;
}
.demo-palette-grid button {
  min-height: 72px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.demo-mode-row button.on,
.demo-palette-grid button.on {
  background: rgba(245, 236, 217, 0.16);
  border-color: rgba(245, 236, 217, 0.72);
  color: #FFF8EA;
  box-shadow: 0 0 0 1px rgba(245, 236, 217, 0.18) inset;
}
.demo-mode-row button:active,
.demo-palette-grid button:active {
  transform: scale(0.98);
}

.iphone-stage {
  width: 100%;
  display: grid;
  place-items: center;
  box-sizing: border-box;
}

.iphone-device {
  position: relative;
  width: min(430px, calc(100vw - 28px));
  aspect-ratio: 430 / 884;
  filter: drop-shadow(0 24px 60px rgba(0,0,0,0.42));
}

.iphone-bezel {
  position: absolute;
  inset: 0;
  border-radius: 62px;
  background:
    linear-gradient(135deg, #1B1B1E 0%, #060607 46%, #2A2A2E 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.16) inset,
    0 0 0 7px #080809 inset,
    0 18px 48px rgba(0,0,0,0.42);
}

.iphone-bezel::before,
.iphone-bezel::after {
  content: '';
  position: absolute;
  left: -3px;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: #26262A;
}
.iphone-bezel::before { top: 146px; height: 56px; }
.iphone-bezel::after { top: 220px; height: 88px; }

.iphone-screen {
  position: absolute;
  inset: 14px;
  border-radius: 48px;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset;
}

.ios-status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 26px;
  box-sizing: border-box;
  z-index: 160;
  font: 600 13px/1 var(--sans);
  color: var(--ink);
  background: var(--paper);
  pointer-events: none;
}
.ios-status-bar::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 10px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--paper) 72%, transparent) 0%,
    color-mix(in srgb, var(--paper) 0%, transparent) 100%
  );
}
.ios-status-bar > * {
  position: relative;
  z-index: 1;
}

.ios-time { justify-self: start; letter-spacing: 0; }
.ios-dynamic-island {
  width: 126px;
  height: 36px;
  border-radius: 999px;
  background: #060607;
  box-shadow: 0 1px 1px rgba(255,255,255,0.08) inset;
}
.ios-status-icons {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.ios-battery {
  width: 22px;
  height: 11px;
  border: 1.4px solid currentColor;
  border-radius: 3px;
  position: relative;
  display: inline-block;
}
.ios-battery::before {
  content: '';
  position: absolute;
  right: -3.5px;
  top: 3px;
  width: 2px;
  height: 5px;
  border-radius: 0 2px 2px 0;
  background: currentColor;
}
.ios-battery::after {
  content: '';
  position: absolute;
  inset: 2px 5px 2px 2px;
  border-radius: 1px;
  background: currentColor;
}

.app-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  overflow: hidden;
}

.screen-host {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  padding-bottom: 142px;
  scroll-padding-top: 76px;
  scroll-padding-bottom: 152px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.screen-host::-webkit-scrollbar,
.native-nav-sheet::-webkit-scrollbar,
.ask-msgs::-webkit-scrollbar { display: none; }

.iphone-home-indicator {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 134px;
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  transform: translateX(-50%);
  z-index: 170;
  pointer-events: none;
}

@media (max-width: 760px) {
  .demo-page {
    grid-template-columns: minmax(0, 430px);
    gap: 18px;
    padding: 16px 14px;
    align-items: start;
  }
  .demo-controls {
    order: -1;
  }
  .demo-controls h2 {
    font-size: 32px;
  }
}

/* ─── Re-usable typography ─── */
.h-serif { font-family: var(--serif); font-weight: 400; letter-spacing: 0; }
.h-mono  { font-family: var(--mono); font-weight: 500; letter-spacing: 0.02em; }
.italic  { font-style: italic; }
.muted   { color: var(--ink-2); }
.muted-2 { color: var(--ink-3); }

/* ─── Cards ─── */
.card {
  background: var(--paper-2);
  border-radius: var(--card-r);
  border: 0.5px solid var(--hair);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 1px 2px rgba(60, 40, 20, 0.04),
    0 8px 24px rgba(60, 40, 20, 0.04);
}

.hairline { border-top: 0.5px solid var(--hair); }

/* ─── Greeting hero ─── */
.greet {
  padding: 8px 22px 14px;
}

/* top kicker — date + open tasks (above greeting) */
.t-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.t-kicker .left { display: flex; align-items: center; gap: 8px; }
.t-kicker .left .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--terra);
  animation: pulse 2.2s ease-in-out infinite;
}
.t-kicker .left em {
  font-style: normal; color: var(--hair);
  margin: 0 1px;
}
.t-kicker .tasks-due,
.t-kicker .streak {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--forest);
  padding: 4px 9px;
  background: rgba(59, 90, 58, 0.07);
  border-radius: 99px;
  letter-spacing: 0.08em;
}
.t-kicker .tasks-due b,
.t-kicker .streak b {
  color: var(--forest);
  font-weight: 600;
  font-family: var(--mono);
  margin-left: 2px;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50%      { opacity: 1; transform: scale(1.1); }
}

/* hero h1 */
.hero-h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
  text-wrap: balance;
}
.hero-h1 .drop {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  font-style: normal;
  padding-right: 0;
}
.hero-h1 .name {
  color: var(--forest);
  font-style: normal;
}
.greet .date {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.greet .date .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--forest);
}
.greet h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.05;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: 0;
}
.greet h1 i {
  font-style: normal;
  color: var(--forest);
}
.greet h1 .name {
  color: var(--forest);
  font-style: normal;
}
.greet .sub {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.4;
  max-width: 320px;
}
.greet .sub b { color: var(--forest); font-weight: 600; }

/* ─── Spotlight: rotating featured folk card ─── */
.spotlight {
  --sl-bg: linear-gradient(150deg, #f5deb6 0%, #e6c89a 100%);
  --sl-fg: #3e2c14;
  position: relative;
  margin: 4px 16px 18px;
  min-height: 240px;
  border-radius: 26px;
  overflow: hidden;
  cursor: default;
  color: var(--sl-fg);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 8px 28px rgba(60,40,20,0.08);
  border: 0.5px solid var(--hair);
  transition: transform .2s ease;
}
.spotlight[data-tint="terra"]  { --sl-bg: linear-gradient(150deg, #f6d9c5 0%, #e6b89c 100%); --sl-fg: #5c2e16; }
.spotlight[data-tint="sand"]   { --sl-bg: linear-gradient(150deg, #ece1ca 0%, #d4c4a3 100%); --sl-fg: #3e2c14; }
.spotlight[data-tint="honey"]  { --sl-bg: linear-gradient(150deg, #f5deb6 0%, #e6c89a 100%); --sl-fg: #5a3a14; }
.spotlight[data-tint="pond"]   { --sl-bg: linear-gradient(150deg, #d6e1ed 0%, #b5c6d8 100%); --sl-fg: #1b2f44; }
.spotlight[data-tint="forest"] { --sl-bg: linear-gradient(150deg, #d6e3c8 0%, #b9c9a8 100%); --sl-fg: #1c3018; }
.spotlight[data-tint="sage"]   { --sl-bg: linear-gradient(150deg, #dde7cc 0%, #c1cfa8 100%); --sl-fg: #2c4322; }
.spotlight[data-tint="olive"]  { --sl-bg: linear-gradient(150deg, #e0e5cb 0%, #c5cfa6 100%); --sl-fg: #36421a; }
.spotlight[data-tint="desert"] { --sl-bg: linear-gradient(150deg, #f0e3c4 0%, #d8c293 100%); --sl-fg: #42330e; }
.spotlight.can-visit { cursor: pointer; }
.spotlight:active { transform: scale(0.99); }

.sl-bg {
  position: absolute; inset: 0;
  background: var(--sl-bg);
}
.sl-bg::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(180px 120px at 78% 28%, rgba(255,255,255,0.32), transparent 70%),
    radial-gradient(220px 160px at 18% 92%, rgba(0,0,0,0.08), transparent 70%);
}
.sl-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.18;
  mix-blend-mode: multiply;
}

.sl-content {
  position: relative;
  z-index: 2;
  padding: 52px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  box-sizing: border-box;
  max-width: 70%;
  color: var(--sl-fg);
}

.sl-kicker {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 20px;
  right: 20px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.78;
}
.sl-kicker-eyebrow,
.sl-topic,
.sl-kicker .counter {
  min-width: 0;
  white-space: nowrap;
}
.sl-kicker-eyebrow { opacity: 0.72; }
.sl-topic {
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 3px 7px 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.24);
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset;
  letter-spacing: 0.075em;
}
.sl-kicker .counter {
  justify-self: end;
  padding: 3px 7px 3px;
  border-radius: 999px;
  background: rgba(0,0,0,0.07);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.055em;
}

/* Lesson is the hero, matched to the native Spotlight quote scale */
.sl-lesson {
  margin-top: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
  text-wrap: balance;
  max-width: 18ch;
  position: relative;
}
.sl-lesson .lq {
  font-family: var(--serif);
  font-size: 28px;
  font-style: normal;
  opacity: 0.35;
  display: inline-block;
  line-height: 0;
  vertical-align: -0.04em;
  padding: 0 2px;
}

/* Attribution row (name + species + cycle) */
.sl-attribution {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}
.sl-avatar {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: rgba(255,255,255,0.4);
  border: 0;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.sl-avatar:disabled {
  cursor: default;
}
.sl-visit-target:not(:disabled) {
  cursor: pointer;
}
.sl-visit-target:not(:disabled):hover {
  transform: translateY(-1px);
}
.sl-visit-target:focus-visible {
  outline: 2px solid rgba(43, 38, 32, 0.38);
  outline-offset: 3px;
}
.sl-avatar-em { font-size: 18px; line-height: 1; }
.sl-attr-text { min-width: 0; }
.sl-attr-name {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
}
.sl-attr-species {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-top: 3px;
}

.sl-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
}
.sl-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.sl-tag .ipulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
}
.sl-arrow {
  appearance: none;
  border: 0;
  background: rgba(255,255,255,0.45);
  color: var(--sl-fg);
  position: absolute;
  right: 14px;
  top: 50%;
  z-index: 4;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform .15s, background .15s;
  transform: translateY(-50%);
}
.sl-arrow:hover { background: rgba(255,255,255,0.65); transform: translate(2px, -50%); }

[data-appearance="dark"] .spotlight {
  --sl-bg: linear-gradient(150deg, color-mix(in srgb, var(--paper-3) 86%, var(--forest) 8%) 0%, color-mix(in srgb, var(--paper-2) 92%, var(--forest) 8%) 100%);
  --sl-fg: var(--ink);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 16px 32px rgba(0,0,0,0.22);
}
[data-appearance="dark"] .spotlight[data-tint="terra"]  { --sl-bg: linear-gradient(150deg, color-mix(in srgb, var(--paper-3) 84%, var(--terra) 16%) 0%, color-mix(in srgb, var(--paper-2) 92%, var(--terra) 8%) 100%); }
[data-appearance="dark"] .spotlight[data-tint="sand"]   { --sl-bg: linear-gradient(150deg, color-mix(in srgb, var(--paper-3) 86%, var(--bisque) 12%) 0%, color-mix(in srgb, var(--paper-2) 92%, var(--bisque) 8%) 100%); }
[data-appearance="dark"] .spotlight[data-tint="honey"]  { --sl-bg: linear-gradient(150deg, color-mix(in srgb, var(--paper-3) 84%, var(--honey) 16%) 0%, color-mix(in srgb, var(--paper-2) 92%, var(--honey) 8%) 100%); }
[data-appearance="dark"] .spotlight[data-tint="pond"]   { --sl-bg: linear-gradient(150deg, color-mix(in srgb, var(--paper-3) 84%, var(--pond) 16%) 0%, color-mix(in srgb, var(--paper-2) 92%, var(--pond) 8%) 100%); }
[data-appearance="dark"] .spotlight[data-tint="forest"] { --sl-bg: linear-gradient(150deg, color-mix(in srgb, var(--paper-3) 82%, var(--forest) 18%) 0%, color-mix(in srgb, var(--paper-2) 90%, var(--forest) 10%) 100%); }
[data-appearance="dark"] .spotlight[data-tint="sage"]   { --sl-bg: linear-gradient(150deg, color-mix(in srgb, var(--paper-3) 84%, var(--sage) 16%) 0%, color-mix(in srgb, var(--paper-2) 92%, var(--sage) 8%) 100%); }
[data-appearance="dark"] .spotlight[data-tint="olive"]  { --sl-bg: linear-gradient(150deg, color-mix(in srgb, var(--paper-3) 84%, var(--olive) 16%) 0%, color-mix(in srgb, var(--paper-2) 92%, var(--olive) 8%) 100%); }
[data-appearance="dark"] .spotlight[data-tint="desert"] { --sl-bg: linear-gradient(150deg, color-mix(in srgb, var(--paper-3) 84%, var(--bisque) 16%) 0%, color-mix(in srgb, var(--paper-2) 92%, var(--bisque) 8%) 100%); }
[data-appearance="dark"] .sl-bg::before {
  background:
    radial-gradient(260px 180px at 18% 100%, rgba(0,0,0,0.16), transparent 72%),
    linear-gradient(180deg, rgba(255,255,255,0.025), transparent 42%);
}
[data-appearance="dark"] .sl-topic,
[data-appearance="dark"] .sl-kicker .counter,
[data-appearance="dark"] .sl-avatar,
[data-appearance="dark"] .sl-arrow {
  background: rgba(255,255,255,0.08);
  box-shadow: 0 1px 0 rgba(255,255,255,0.07) inset;
}
[data-appearance="dark"] .sl-arrow:hover { background: rgba(255,255,255,0.14); }
[data-appearance="dark"] .sl-grain {
  opacity: 0.10;
  mix-blend-mode: screen;
}

.sl-figure {
  position: absolute;
  right: -6px;
  bottom: -14px;
  width: 200px;
  height: 200px;
  border: 0;
  padding: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: transform .16s ease;
}
.sl-em {
  font-size: 140px;
  line-height: 1;
  filter: drop-shadow(0 6px 12px rgba(60,40,20,0.15)) saturate(0.92);
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-6px) rotate(2deg); }
}

/* ─── Moment: editorial memory/wisdom/growth ─── */
.moment {
  margin: 20px 16px 0;
  padding: 16px 18px 18px;
  background:
    linear-gradient(180deg, var(--paper-3), var(--paper-2));
  border: 0.5px solid var(--hair);
  border-radius: 22px;
  display: flex;
  gap: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.moment::before {
  content: '';
  position: absolute;
  left: -40px; top: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(217,168,106,0.10), transparent 70%);
  pointer-events: none;
}
.mo-mark {
  flex-shrink: 0;
  font-size: 28px;
  line-height: 1;
  color: var(--terra);
  margin-top: 2px;
  font-family: var(--serif);
}
.mo-mark[data-kind="wisdom"] { color: var(--forest); }
.mo-mark[data-kind="growth"] { color: var(--honey); }
.mo-mark[data-kind="season"] { color: var(--sage); }

.mo-body { flex: 1; min-width: 0; }
.mo-kicker {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.mo-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.35;
  color: var(--ink);
  text-wrap: pretty;
}

/* status strip — weather + counts */
.strip {
  display: flex;
  gap: 8px;
  padding: 0 18px 14px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 99px;
  font-size: 12.5px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  color: var(--ink-2);
}
.chip svg { color: var(--forest); }
.chip b { color: var(--ink); font-weight: 500; }
.chip.solid { background: var(--forest); color: #f5f0e3; border-color: var(--forest); }
.chip.solid svg { color: var(--bisque); }
.chip.solid b { color: #fff; }

/* Native Today warning shelf */
.home-warnings {
  margin: 0 16px 14px;
}
.hw-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px 8px;
}
.hw-head span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hw-head b {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}
.hw-list {
  overflow: hidden;
  border-radius: 14px;
  background: rgba(168, 75, 49, 0.07);
  border: 0.5px solid rgba(168, 75, 49, 0.28);
}
.hw-row {
  position: relative;
  display: flex;
  align-items: stretch;
}
.hw-row + .hw-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50px;
  right: 12px;
  height: 0.5px;
  background: rgba(168, 75, 49, 0.18);
}
.hw-row.lethal {
  background: rgba(143, 47, 34, 0.08);
}
.hw-open {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  flex: 1;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 14px;
  gap: 8px;
  align-items: start;
  min-height: 70px;
  padding: 11px 6px 11px 12px;
  text-align: left;
  cursor: pointer;
}
.hw-icon {
  color: var(--terra);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 1px;
}
.hw-row.lethal .hw-icon { color: #8f2f22; }
.hw-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hw-copy strong {
  font-size: 13.5px;
  line-height: 1.18;
  font-weight: 650;
  color: var(--ink);
}
.hw-copy span {
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hw-chev {
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4px;
}
.hw-hide {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(83, 67, 51, 0.48);
  width: 44px;
  min-width: 44px;
  padding: 0 8px 0 0;
  font: 22px/1 Georgia, serif;
  cursor: pointer;
}
.hw-hide:active,
.hw-open:active {
  opacity: 0.72;
}

/* ─── Task list ─── */
.section-hd {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 18px 22px 10px;
}
.section-hd .lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.section-hd .count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--forest);
}
.section-hd h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0;
  font-weight: 400;
}
.section-hd h2 i { font-style: normal; color: var(--forest); }

.tasks {
  margin: 0 16px;
  padding: 6px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 22px;
}

.task {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  min-height: var(--row-min);
  border-radius: 16px;
  cursor: pointer;
  user-select: none;
  transition: background .18s ease;
  overflow: hidden;
}
.task + .task { box-shadow: 0 -0.5px 0 var(--hair); }
.task:active { background: rgba(59, 90, 58, 0.05); }

/* completing animation — quick flash green, then collapse out */
.task.completing {
  animation: taskComplete 650ms cubic-bezier(.6, 0, .4, 1) forwards;
  pointer-events: none;
}
@keyframes taskComplete {
  0%   { background: rgba(59,90,58,0.18); transform: scale(1);   max-height: 90px; opacity: 1; padding-top: 12px; padding-bottom: 12px; margin-top: 0; }
  20%  { background: rgba(59,90,58,0.22); transform: scale(1.01); }
  50%  { background: rgba(59,90,58,0.10); }
  100% { background: transparent; transform: translateX(28px) scale(0.96); max-height: 0; min-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; margin-top: 0; box-shadow: none; }
}
.task.completing + .task { box-shadow: none; }
.task.completing .check {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
  animation: checkPop 280ms cubic-bezier(.3, 1.7, .5, 1);
}
@keyframes checkPop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.18); }
  100% { transform: scale(1.05); }
}

/* "all done for today" empty state */
.all-done {
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.all-done .ad-mark {
  color: var(--forest);
  margin-bottom: 6px;
}
.all-done .ad-t {
  font-family: var(--serif);
  font-size: 26px;
  font-style: italic;
  color: var(--forest);
  line-height: 1.1;
}
.all-done .ad-d {
  color: var(--ink-3);
  font-size: 13px;
  max-width: 240px;
  line-height: 1.4;
}

.task .time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  width: 38px;
  flex-shrink: 0;
  text-align: right;
  padding-top: 2px;
}

.task .check {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--hair);
  background: var(--paper-3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .18s cubic-bezier(.3,1.4,.5,1);
  color: transparent;
}
.task.done .check {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
  transform: scale(1.05);
}
.task .body { flex: 1; min-width: 0; }
.task .body .title {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
}
.task.done .body .title {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: rgba(0,0,0,0.2);
}
.task .body .det {
  margin-top: 1px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.task .avatar { flex-shrink: 0; }

/* swipe affordance */
.task .swipe-track {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--forest), var(--sage));
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 22px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 16px;
  pointer-events: none;
  opacity: 0;
}
.task.swiping .swipe-track { opacity: 1; }

/* ─── Folk avatars ─── */
.avatar {
  --avatar-tint: var(--forest);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--avatar-tint) 18%, transparent);
  border: 0.5px solid color-mix(in srgb, var(--avatar-tint) 35%, transparent);
}
.avatar .glyph {
  font-size: 22px;
  line-height: 1;
  filter: saturate(0.85);
  z-index: 2;
}
.avatar.lg { width: 64px; height: 64px; border-radius: 50%; }
.avatar.lg .glyph { font-size: 32px; }
.avatar.xl { width: 96px; height: 96px; border-radius: 50%; }
.avatar.xl .glyph { font-size: 48px; }

.avatar[data-tint="terra"]  { --avatar-tint: #c97b5a; }
.avatar[data-tint="sand"]   { --avatar-tint: #8a7f70; }
.avatar[data-tint="honey"]  { --avatar-tint: #d9a86a; }
.avatar[data-tint="pond"]   { --avatar-tint: #6f8caf; }
.avatar[data-tint="forest"] { --avatar-tint: #3b5a3a; }
.avatar[data-tint="sage"]   { --avatar-tint: #8aa07e; }
.avatar[data-tint="olive"]  { --avatar-tint: #94a07a; }
.avatar[data-tint="desert"] { --avatar-tint: #bca37a; }

/* Photo avatar — fills the avatar shape with the uploaded image */
.avatar.has-photo { background: transparent; }
.avatar.has-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* Detail hero photo */
.detail-hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.detail-photo-btn,
.detail-photo-remove {
  appearance: none;
  border: 0.5px solid rgba(255,255,255,0.68);
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  box-shadow: 0 4px 10px rgba(60,40,20,0.12);
}
.detail-photo-btn {
  right: -2px;
  bottom: -2px;
  background: color-mix(in srgb, var(--paper-2) 86%, white);
  color: var(--forest);
}
.detail-photo-btn:hover { background: rgba(255,255,255,0.96); }
.detail-photo-remove {
  top: -4px;
  right: -4px;
  background: rgba(43,38,32,0.56);
  color: var(--paper);
}
.detail-photo-remove:hover { background: rgba(43,38,32,0.74); }

/* Spotlight photos — per variant */
.sl-photo {
  width: 200px; height: 200px;
  object-fit: cover;
  border-radius: 22px;
  filter: drop-shadow(0 6px 16px rgba(60,40,20,0.22));
  animation: float 6s ease-in-out infinite;
}
.sl-avatar-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.mag-photo {
  width: 28px; height: 28px;
  object-fit: cover;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
}
.pc-stamp-photo {
  width: 80px; height: 90px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}
.min-photo {
  width: 24px; height: 24px;
  object-fit: cover;
  border-radius: 50%;
}
.inv-photo {
  width: 32px; height: 32px;
  object-fit: cover;
  border-radius: 10px;
}

/* ─── Folk grid ─── */
.folk-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.folk-title-row > div {
  min-width: 0;
}
.folk-add-btn {
  appearance: none;
  border: 0.5px solid var(--hair);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(49, 88, 49, 0.18), inset 0 1px 0 rgba(255,255,255,0.18);
  flex-shrink: 0;
}
.folk-add-btn:active {
  transform: scale(0.96);
}
.folk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px 24px;
}
.folk-card {
  position: relative;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 22px;
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s ease;
}
.folk-card:active { transform: scale(0.98); }
.folk-card .kind-pill {
  position: absolute;
  top: 12px; right: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 3px 7px;
  border-radius: 99px;
  background: rgba(255,255,255,0.6);
  border: 0.5px solid var(--hair);
}
.folk-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--ink);
}
.folk-card .species {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: -2px;
}

.folk-card.pet  { background: linear-gradient(180deg, #fbf3e6 0%, var(--paper-2) 80%); }
.folk-card.plant{ background: linear-gradient(180deg, #eef3e2 0%, var(--paper-2) 80%); }

[data-appearance="dark"] .folk-card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--paper-3) 86%, var(--forest) 6%) 0%, var(--paper-2) 86%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
}
[data-appearance="dark"] .folk-card.pet {
  background: linear-gradient(180deg, color-mix(in srgb, var(--paper-3) 82%, var(--terra) 10%) 0%, var(--paper-2) 82%);
}
[data-appearance="dark"] .folk-card.plant {
  background: linear-gradient(180deg, color-mix(in srgb, var(--paper-3) 82%, var(--forest) 12%) 0%, var(--paper-2) 82%);
}
[data-appearance="dark"] .folk-card .kind-pill {
  background: rgba(255,255,255,0.07);
  border-color: var(--hair);
  color: var(--ink-2);
}

/* ─── Bottom tab bar ─── */
.tabbar-shell {
  position: absolute;
  left: 12px; right: 12px;
  bottom: 17px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tabbar-shell::before {
  content: '';
  position: absolute;
  left: -12px;
  right: -12px;
  bottom: -17px;
  height: 146px;
  z-index: -1;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--paper) 0%, transparent) 0%,
    color-mix(in srgb, var(--paper) 90%, transparent) 34%,
    color-mix(in srgb, var(--paper) 98%, transparent) 100%
  );
  pointer-events: none;
}
.tabbar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  padding: 6px;
  background: rgba(245, 240, 227, 0.92);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 0.5px solid var(--hair);
  border-radius: 999px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 8px 24px rgba(60,40,20,0.08);
}
.tabbar button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 50px;
  padding: 5px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
  font-family: var(--sans);
}
.tabbar button .lbl {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
}
.tabbar button svg,
.tabbar-add svg,
.tabbar-center svg {
  display: block;
}
.tabbar .tabbar-center {
  flex: 0 0 52px;
  width: 52px;
  min-height: 52px;
  height: 52px;
  padding: 0;
  margin: -10px 2px 0;
  border-radius: 50%;
  background: var(--forest);
  color: var(--paper);
  border: 0.5px solid rgba(255,255,255,0.35);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.35) inset,
    0 10px 22px rgba(59,90,58,0.24);
}
.tabbar .tabbar-center[data-on="1"],
.tabbar .tabbar-center:active {
  background: var(--forest);
  color: var(--paper);
  transform: scale(0.96);
}
.tabbar button[data-on="1"] {
  color: var(--forest);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.30), rgba(59,90,58,0.10)),
    rgba(59,90,58,0.07);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.68) inset,
    0 -1px 0 rgba(59,90,58,0.08) inset,
    0 0 0 0.5px rgba(59,90,58,0.055) inset;
}
.tabbar button[data-on="1"] .lbl { font-weight: 600; }
.tabbar-add {
  appearance: none;
  border: 0.5px solid var(--hair);
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  background: rgba(245, 240, 227, 0.92);
  color: var(--forest);
  border-radius: 50%;
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 8px 24px rgba(60,40,20,0.08);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.tabbar-add:active { transform: scale(0.96); }

/* ─── Detail screen ─── */
.detail-hero {
  position: relative;
  margin: 10px 18px 4px;
  padding: 10px 0 16px;
  border-radius: 0;
  overflow: visible;
  min-height: 116px;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}
.detail-hero::after {
  content: '';
  position: absolute;
  left: 112px;
  right: 0;
  bottom: 0;
  height: 0.5px;
  background: var(--hair);
}
.detail-hero-avatar {
  --detail-tint: #c97b5a;
  position: relative;
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: visible;
  background: color-mix(in srgb, var(--detail-tint) 18%, transparent);
  border: 0.5px solid color-mix(in srgb, var(--detail-tint) 35%, transparent);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.52) inset,
    0 12px 28px rgba(60,40,20,0.08);
}
.detail-hero[data-tint="terra"]  .detail-hero-avatar { --detail-tint: #c97b5a; }
.detail-hero[data-tint="sand"]   .detail-hero-avatar { --detail-tint: #8a7f70; }
.detail-hero[data-tint="honey"]  .detail-hero-avatar { --detail-tint: #d9a86a; }
.detail-hero[data-tint="pond"]   .detail-hero-avatar { --detail-tint: #6f8caf; }
.detail-hero[data-tint="forest"] .detail-hero-avatar { --detail-tint: #3b5a3a; }
.detail-hero[data-tint="sage"]   .detail-hero-avatar { --detail-tint: #8aa07e; }
.detail-hero[data-tint="olive"]  .detail-hero-avatar { --detail-tint: #94a07a; }
.detail-hero[data-tint="desert"] .detail-hero-avatar { --detail-tint: #bca37a; }
.detail-hero .glyph {
  font-size: 52px;
  filter: saturate(0.9);
  line-height: 1;
}
.detail-hero-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.detail-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
}
.detail-hero .sub {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.08;
  color: var(--forest);
}
.detail-breed {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.2;
}
.detail-breed.scientific {
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
}
.detail-current {
  margin-top: 3px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.25;
}
.detail-hero-tags {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}
.detail-hero-tags span {
  min-width: 0;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail-facts-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  margin: 12px 14px 0;
}
.detail-facts-row.plant {
  grid-template-columns: 1fr;
}
.detail-facts-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.detail-fact-card {
  min-height: 86px;
  padding: 12px;
  border: 0.5px solid var(--hair);
  border-radius: 14px;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
}
.detail-fact-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.detail-fact-value {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.08;
  font-weight: 400;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.detail-fact-card.mood .detail-fact-value {
  color: var(--terra);
  font-style: italic;
}
.detail-fact-card.difficulty .detail-fact-value {
  color: var(--forest);
}
.detail-fact-sub {
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.25;
  color: var(--ink-3);
}

.native-detail-card {
  margin: 12px 14px 0;
  padding: 14px;
  border: 0.5px solid var(--hair);
  border-radius: 14px;
  background: var(--paper-2);
}
.native-detail-card.safety {
  background:
    linear-gradient(180deg, rgba(158,68,41,0.08), rgba(158,68,41,0.02)),
    var(--paper-2);
  border-color: rgba(158,68,41,0.22);
}
.detail-disclosure {
  margin: 12px 14px 0;
  border-radius: 14px;
  border: 0.5px solid var(--hair);
  background: var(--paper-2);
  overflow: hidden;
}
.detail-disclosure summary {
  list-style: none;
  display: grid;
  grid-template-columns: 28px 1fr 18px;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
}
.detail-disclosure summary::-webkit-details-marker {
  display: none;
}
.detail-disclosure-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(49,88,49,0.10);
  color: var(--forest);
}
.detail-disclosure.safety {
  background:
    linear-gradient(180deg, rgba(158,68,41,0.08), rgba(158,68,41,0.02)),
    var(--paper-2);
  border-color: rgba(158,68,41,0.32);
}
.detail-disclosure.safety.honey {
  background:
    linear-gradient(180deg, rgba(134,83,20,0.08), rgba(134,83,20,0.02)),
    var(--paper-2);
  border-color: rgba(134,83,20,0.30);
}
.detail-disclosure.safety .detail-disclosure-icon {
  background: rgba(158,68,41,0.10);
  color: var(--terra);
}
.detail-disclosure.safety.honey .detail-disclosure-icon {
  background: rgba(134,83,20,0.10);
  color: var(--honey);
}
.detail-disclosure-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detail-disclosure-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-disclosure-copy strong {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink);
}
.native-title-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.native-title-line em {
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 9.5px;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.detail-disclosure-preview {
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.detail-disclosure-hint {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--terra);
}
.detail-disclosure.native .detail-disclosure-hint {
  color: var(--forest);
}
.detail-disclosure.native.honey .detail-disclosure-icon {
  background: rgba(134,83,20,0.10);
  color: var(--honey);
}
.detail-disclosure.native.honey .detail-disclosure-hint,
.detail-disclosure.native.honey .detail-disclosure-chevron {
  color: var(--honey);
}
.detail-disclosure-chevron {
  color: var(--ink-3);
  transform: rotate(-90deg);
  transition: transform .18s ease;
  margin-top: 5px;
}
.detail-disclosure[open] .detail-disclosure-chevron {
  transform: rotate(90deg);
}
.detail-disclosure[open] summary {
  border-bottom: 0.5px solid color-mix(in srgb, var(--hair) 70%, transparent);
}
.detail-disclosure[open] .detail-disclosure-preview {
  display: none;
}
.detail-disclosure[open] .detail-disclosure-hint {
  font-size: 0;
}
.detail-disclosure[open] .detail-disclosure-hint::after {
  content: 'Hide details';
  font-size: 9.5px;
}
.detail-disclosure-panel {
  padding: 14px;
  display: grid;
  gap: 14px;
}
.detail-native-stack {
  margin: 14px 14px 0;
  display: grid;
  gap: 12px;
}
.detail-section-title {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.05;
  font-weight: 400;
}
.care-plan-card {
  padding: 14px;
  border: 0.5px solid var(--hair);
  border-radius: 14px;
  background: var(--paper-2);
  display: grid;
  gap: 12px;
}
.care-plan-card-head {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}
.care-plan-card-head > span {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(49,88,49,0.10);
  color: var(--forest);
}
.care-plan-card-head b {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.2;
}
.care-plan-card-head p {
  margin: 3px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.32;
}
.safety-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}
.safety-badges em {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(158,68,41,0.10);
  color: var(--terra);
  font-family: var(--mono);
  font-style: normal;
  font-size: 8.5px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.safety-group {
  display: grid;
  gap: 8px;
}
.safety-group-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.safety-group-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  background: rgba(158,68,41,0.10);
  color: var(--terra);
}
.safety-group-icon.honey { background: rgba(134,83,20,0.10); color: var(--honey); }
.safety-group-icon.forest { background: rgba(49,88,49,0.10); color: var(--forest); }
.safety-group-body {
  display: grid;
  gap: 6px;
}
.safety-row {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  padding: 9px 8px 9px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper-3) 62%, transparent);
  overflow: hidden;
}
.safety-row::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(158,68,41,0.32);
}
.safety-row > span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(158,68,41,0.10);
  color: var(--terra);
}
.safety-row.soft::before { background: rgba(134,83,20,0.30); }
.safety-row.soft > span { background: rgba(134,83,20,0.10); color: var(--honey); }
.safety-row b {
  display: block;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.2;
}
.safety-row p,
.safety-watch-row p {
  margin: 3px 0 0;
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.35;
}
.safety-action-banner,
.safety-source-note {
  padding: 10px 11px;
  border-radius: 11px;
  background: rgba(158,68,41,0.08);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.35;
}
.safety-source-note {
  background: rgba(49,88,49,0.08);
}
.safety-watch-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
}
.safety-watch-row span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(158,68,41,0.12);
  color: var(--terra);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}
.field-guide-mini-list {
  display: grid;
  gap: 8px;
}
.field-guide-mini-list span {
  padding: 10px 11px;
  border-radius: 12px;
  background: var(--paper-3);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.25;
}
.native-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.native-detail-symbol {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(49,88,49,0.10);
  color: var(--forest);
  flex: 0 0 auto;
}
.native-detail-symbol.warning {
  background: rgba(158,68,41,0.10);
  color: var(--terra);
}
.native-detail-kicker {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.native-detail-head h3 {
  margin: 3px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.12;
  font-weight: 400;
}
.native-detail-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.native-detail-line {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: start;
}
.native-detail-line span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(158,68,41,0.12);
  color: var(--terra);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}
.native-detail-line p {
  margin: 1px 0 0;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.35;
}
.care-plan-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.care-plan-pill {
  padding: 10px 11px;
  border-radius: 12px;
  background: var(--paper-3);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.25;
}
.native-mini-list {
  margin-top: 10px;
  border-top: 0.5px solid var(--hair);
}
.native-mini-row {
  display: grid;
  grid-template-columns: 42px 20px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border-bottom: 0.5px solid var(--hair);
  color: var(--ink-2);
}
.native-mini-row:last-child { border-bottom: 0; }
.native-mini-row b {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
}
.native-mini-time {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
}
.health-history-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.health-history-grid div {
  min-height: 56px;
  border-radius: 13px;
  background: var(--paper-3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
}
.health-history-grid b {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  font-weight: 400;
  color: var(--forest);
}
.health-history-grid span {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
}
.native-detail-footnote {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 0.5px solid var(--hair);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.35;
}

/* mini mood bars */
.mood-row {
  margin: 14px 14px 0;
  padding: 14px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 22px;
}
.mood-row .row-hd {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
}
.mood-row .row-hd .lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.mood-row .row-hd .pct {
  font-family: var(--serif);
  font-style: italic;
  color: var(--forest);
  font-size: 18px;
}
.mood-row .bars {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 56px;
}
.mood-row .bars .b {
  flex: 1;
  background: var(--sage);
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.mood-row .bars .b::after {
  content: attr(data-day);
  position: absolute;
  bottom: -16px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
}
.mood-row .bars .b.today { background: var(--forest); }
.mood-row .legend {
  display: flex; justify-content: space-between;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-3);
}

/* journal list */
.journal {
  margin: 14px 14px 100px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 22px;
  overflow: hidden;
}
.j-item {
  padding: 14px 16px;
  display: flex;
  gap: 12px;
}
.j-item + .j-item { border-top: 0.5px solid var(--hair); }
.j-item .badge {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--bisque);
  color: var(--forest-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em;
}
.j-item .badge.health { background: #cfe0c8; color: var(--forest-deep); }
.j-item .badge.photo  { background: #e6d4bd; color: var(--forest-deep); }
.j-item .badge.vet    { background: #f0c7b0; color: var(--rust); }
.j-item .badge.note   { background: #ede6d0; color: var(--ink-2); }
.j-item .body { flex: 1; }
.j-item .body .date {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 2px;
}
.j-item .body .text {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
}

/* ─── Schedule screen ─── */
.week-strip {
  display: flex;
  gap: 8px;
  padding: 4px 18px 18px;
}
.week-strip .day {
  flex: 1;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 18px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  min-width: 0;
}
.week-strip .day .d {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.week-strip .day .n {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
}
.week-strip .day .ct {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
  margin-top: 2px;
}
.week-strip .day.today {
  background: var(--forest);
  border-color: var(--forest);
}
.week-strip .day.today .d,
.week-strip .day.today .ct { color: rgba(255,255,255,0.7); }
.week-strip .day.today .n { color: #fff; }

/* timeline */
.timeline {
  margin: 0 16px 100px;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 60px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--hair);
}
.timeline .t-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}
.timeline .t-row .t-time {
  width: 50px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  padding-top: 16px;
}
.timeline .t-row .t-dot {
  position: absolute;
  left: 56px;
  top: 22px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--forest);
  z-index: 2;
}
.timeline .t-row.done .t-dot { background: var(--forest); }
.timeline .t-row .t-card {
  flex: 1;
  margin-left: 24px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.timeline .t-row.done .t-card { opacity: 0.55; }
.timeline .t-row .t-card .ttl {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}
.timeline .t-row .t-card .det {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 1px;
}
.schedule-edit-btn,
.shop-edit-btn,
.profile-sheet-edit {
  appearance: none;
  border: 0;
  background: rgba(49,88,49,0.08);
  color: var(--forest);
  border-radius: 999px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  cursor: pointer;
}
.schedule-edit-panel {
  margin-left: 86px;
  width: calc(100% - 86px);
  padding: 12px;
  border: 0.5px solid var(--hair);
  border-radius: 16px;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.schedule-edit-panel input,
.schedule-edit-panel select {
  min-height: 40px;
  border: 0.5px solid var(--hair);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  padding: 0 10px;
}
.schedule-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.schedule-edit-actions button {
  appearance: none;
  border: 0;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(49,88,49,0.10);
  color: var(--forest);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.schedule-edit-actions button:first-child {
  background: var(--paper-3);
  color: var(--ink-2);
}

/* ─── Add screen ─── */
.add-screen {
  padding: 0 18px 24px;
}
.add-screen h2 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  margin: 6px 0 4px;
  letter-spacing: 0;
}
.add-screen h2 i { font-style: normal; color: var(--forest); }
.add-screen .lead {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.45;
  margin-bottom: 22px;
}
.kind-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.kind-toggle button {
  appearance: none;
  border: 1px solid var(--hair);
  background: var(--paper-2);
  padding: 16px 14px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--ink);
  transition: all .18s;
}
.kind-toggle button[data-on="1"] {
  border-color: var(--forest);
  background: var(--paper-3);
  box-shadow: 0 0 0 3px rgba(59, 90, 58, 0.1);
}
.kind-toggle button .ic {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bisque);
  color: var(--forest-deep);
}
.kind-toggle button[data-kind="plant"] .ic { background: #d6e3c8; }
.kind-toggle button .name {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
}
.kind-toggle button .desc {
  font-size: 11.5px;
  color: var(--ink-3);
}

.species-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}
.species-grid button {
  appearance: none;
  border: 0.5px solid var(--hair);
  background: var(--paper-2);
  padding: 14px 6px 10px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--ink-2);
  font-size: 11.5px;
}
.species-grid button[data-on="1"] {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}
.species-grid button .em {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  font-size: 25px;
  line-height: 1;
  background: rgba(59,90,58,0.10);
  box-shadow: 0 1px 0 rgba(255,255,255,0.55) inset;
}
.species-grid button[data-on="1"] .em {
  background: rgba(255,255,255,0.18);
}
.species-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -2px 0 18px;
}
.species-pager span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.species-pager button {
  appearance: none;
  border: 0.5px solid var(--hair);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 14px;
  background: var(--paper-2);
  color: var(--forest);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.species-pager button:disabled {
  cursor: default;
  opacity: 0.38;
  color: var(--ink-3);
}

.field {
  margin-bottom: 14px;
}
.field label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  border: 1px solid var(--hair);
  background: var(--paper-3);
  padding: 14px 16px;
  border-radius: 14px;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  outline: none;
}
.field input:focus { border-color: var(--forest); }
.field input::placeholder {
  color: var(--ink-3);
  font-style: italic;
}

.photo-slot {
  background: var(--paper-2);
  border: 1.5px dashed var(--hair);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 12.5px;
  margin-bottom: 18px;
}
.photo-slot .ic {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--paper-3);
  display: flex; align-items: center; justify-content: center;
  color: var(--forest);
  border: 0.5px solid var(--hair);
}

.cta {
  appearance: none;
  width: 100%;
  background: var(--forest);
  color: #fff;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 16px;
  padding: 16px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(59,90,58,0.18);
}
.cta:active { transform: scale(0.98); }

/* shop list (a tiny ribbon at bottom of today) */
.ribbon {
  margin: 24px 16px 0;
  padding: 14px 16px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ribbon .ic {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--forest);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ribbon .ttl { flex: 1; font-size: 13.5px; }
.ribbon .ttl b { color: var(--ink); display: block; }
.ribbon .ttl span { color: var(--ink-3); font-size: 12px; }
.ribbon .arr { color: var(--ink-3); }

/* family share strip */
.family {
  margin: 14px 16px 0;
  padding: 12px 14px;
  background: linear-gradient(180deg, var(--paper-2), var(--paper-3));
  border: 0.5px solid var(--hair);
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.family .stack { display: flex; }
.family .stack .av {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bisque);
  border: 2px solid var(--paper-2);
  margin-left: -8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500;
  color: var(--forest-deep);
}
.family .stack .av:first-child { margin-left: 0; }
.family .stack .av.sage { background: #cfe0c8; }
.family .stack .av.honey{ background: var(--bisque); }
.family .stack .av.terra{ background: #f0c7b0; }
.family .txt { flex: 1; font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }
.family .txt b { color: var(--ink); font-weight: 500; }

/* quick add / meals / supplies */
.ribbon {
  appearance: none;
  border: 0.5px solid var(--hair);
  width: calc(100% - 32px);
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.ribbon:active { transform: scale(0.99); }

.quick-screen,
.quick-form,
.meals-body,
.shop-head {
  padding: 0 16px;
}
.quick-head { padding-left: 0; padding-right: 0; }
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
.quick-card {
  appearance: none;
  min-height: 132px;
  padding: 14px;
  border: 0.5px solid var(--hair);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--paper-2), var(--paper-3));
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
}
.quick-card:active { transform: scale(0.98); }
.quick-ic,
.quick-hero-ic {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--forest);
  background: rgba(59,90,58,0.12);
}
.quick-card[data-tint="pond"] .quick-ic,
.quick-form-hero[data-tint="pond"] .quick-hero-ic { color: var(--pond); background: rgba(111,140,175,0.14); }
.quick-card[data-tint="terra"] .quick-ic,
.quick-card[data-tint="rust"] .quick-ic,
.quick-form-hero[data-tint="terra"] .quick-hero-ic,
.quick-form-hero[data-tint="rust"] .quick-hero-ic { color: var(--terra); background: rgba(201,123,90,0.14); }
.quick-card[data-tint="honey"] .quick-ic,
.quick-form-hero[data-tint="honey"] .quick-hero-ic { color: var(--honey); background: rgba(217,168,106,0.16); }
.quick-card[data-tint="olive"] .quick-ic,
.quick-card[data-tint="sage"] .quick-ic,
.quick-form-hero[data-tint="olive"] .quick-hero-ic,
.quick-form-hero[data-tint="sage"] .quick-hero-ic { color: var(--sage); background: rgba(138,160,126,0.15); }
.quick-title {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.02;
  color: var(--ink);
}
.quick-sub {
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-3);
}
.quick-form-hero {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 18px;
  border: 0.5px solid var(--hair);
  background: linear-gradient(180deg, var(--paper-2), var(--paper-3));
}
.quick-form-hero .h-mono {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.quick-form-hero h2 {
  margin: 2px 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}
.quick-form-hero p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
}
.quick-pick {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 12px;
  scrollbar-width: none;
}
.quick-pick::-webkit-scrollbar { display: none; }
.quick-pick button {
  appearance: none;
  border: 0.5px solid var(--hair);
  background: var(--paper-2);
  color: var(--ink-2);
  border-radius: 16px;
  min-width: 82px;
  padding: 10px 8px;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.quick-pick button.on {
  color: var(--forest);
  border-color: rgba(59,90,58,0.28);
  background: rgba(59,90,58,0.08);
}
.quick-pick button span {
  font-size: 12px;
  font-weight: 600;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quick-fields {
  margin: 0;
  padding: 14px;
}
.quick-photo-preview {
  width: 100%;
  aspect-ratio: 1.3;
  object-fit: cover;
  border-radius: 14px;
  border: 0.5px solid var(--hair);
}
.quick-unit {
  min-width: 58px;
  border-radius: 12px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}
.quick-save { margin-top: 14px; }
.quick-empty { margin: 0; padding: 22px; text-align: center; }

.meals-top {
  padding: 4px 16px 12px;
  background: var(--paper);
}
.meals-kicker {
  color: var(--ink-3);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 2px 4px;
}
.meals-top h1 {
  margin: 0 2px 5px;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
}
.meals-top p {
  margin: 0 2px 14px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.35;
}
.meal-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 0.5px solid var(--hair);
  border-radius: 15px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.meal-tabs button {
  appearance: none;
  outline: none;
  border: 0;
  border-radius: 11px;
  min-height: 44px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.meal-tabs button:focus,
.meal-tabs button:focus-visible {
  outline: none;
}
.meal-tabs button.on {
  background: var(--paper);
  color: var(--forest);
  box-shadow: 0 1px 4px rgba(60,40,20,0.08);
}
.meal-start,
.grocery-hero,
.meal-dashboard,
.meal-card,
.shop-list,
.shop-add {
  border: 0.5px solid var(--hair);
  border-radius: 18px;
  background: var(--paper-2);
}
.meal-start {
  padding: 20px;
}
.meal-start .h-mono,
.grocery-hero .h-mono,
.meal-dashboard .h-mono {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.meal-start h2,
.grocery-hero h2 {
  margin: 4px 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
}
.meal-start p,
.grocery-hero p {
  margin: 0 0 16px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
}
.meal-dashboard,
.grocery-hero {
  padding: 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.meal-dashboard h2 {
  margin: 2px 0 0;
  display: block;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--forest);
  line-height: 1;
}
.meal-dashboard p {
  margin: 3px 0 0;
  color: var(--ink-2);
  font-size: 12px;
}
.meal-dashboard button,
.grocery-hero button,
.stock-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: rgba(59,90,58,0.10);
  color: var(--forest);
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.meal-week {
  margin: 10px 0 14px;
  padding: 0;
  gap: 5px;
}
.meal-week .day {
  appearance: none;
  border: 0.5px solid var(--hair);
  min-width: 0;
  min-height: 54px;
  padding-top: 7px;
  padding-bottom: 6px;
  background: var(--paper-2);
  cursor: pointer;
}
.meal-card {
  margin-top: 12px;
  overflow: hidden;
}
.meal-person {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  width: 100%;
  box-sizing: border-box;
  min-height: 64px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.meal-person .avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
}
.meal-person .species-icon-img {
  width: 30px;
  height: 30px;
}
.meal-person > div { flex: 1; min-width: 0; }
.meal-person em {
  color: var(--forest);
  background: rgba(59,90,58,0.10);
  border-radius: 999px;
  padding: 6px 9px;
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.04em;
}
.meal-person b,
.grocery-copy b,
.shop-copy b {
  display: block;
  color: var(--ink);
  font-weight: 600;
}
.meal-person span,
.grocery-copy span,
.shop-copy span {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
  margin-top: 2px;
}
.meal-rows {
  border-top: 0.5px solid var(--hair);
}
.meal-row,
.grocery-row,
.shop-row {
  appearance: none;
  border: 0;
  width: 100%;
  box-sizing: border-box;
  min-height: 62px;
  background: transparent;
  color: inherit;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
}
.meal-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 40px;
  gap: 10px;
  padding: 8px 12px;
}
.meal-row + .meal-row,
.grocery-row + .grocery-row,
.shop-row + .shop-row {
  border-top: 0.5px solid var(--hair);
}
.meal-check,
.grocery-row .check,
.shop-row .check {
  appearance: none;
  border: 0.5px solid var(--hair);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper-3);
  color: transparent;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.meal-check {
  width: 36px;
  height: 36px;
}
.meal-row.done .meal-check,
.grocery-row.done .check,
.shop-row.stocked .check {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper);
}
.meal-copy,
.grocery-copy,
.shop-copy {
  flex: 1;
  min-width: 0;
}
.meal-copy b {
  display: block;
  color: var(--ink);
  font-weight: 650;
  font-size: 14px;
  line-height: 1.12;
}
.meal-copy span {
  display: block;
  color: var(--ink-3);
  font-size: 11.8px;
  line-height: 1.25;
  margin-top: 2px;
}
.meal-state {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  justify-self: end;
}
.meal-row.done .meal-state { color: var(--forest); }
.meal-row.done .meal-copy {
  opacity: 0.62;
}
.grocery-list {
  margin-top: 12px;
  border: 0.5px solid var(--hair);
  border-radius: 18px;
  overflow: hidden;
  background: var(--paper-2);
}
.grocery-row {
  min-height: 74px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 12px 12px 14px;
}
.grocery-row.done .grocery-copy,
.shop-row.stocked .shop-copy {
  opacity: 0.56;
}
.grocery-copy b {
  font-size: 14.5px;
  line-height: 1.12;
}
.grocery-copy span {
  font-size: 12px;
  line-height: 1.25;
}
.grocery-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}
.grocery-source {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  background: rgba(60,40,20,0.06);
}
.grocery-source.shop {
  color: var(--terra);
  background: rgba(201,123,90,0.13);
}
.grocery-avatar {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
}
.grocery-avatar .avatar {
  width: 34px;
  height: 34px;
  box-shadow: none;
}
.stock-btn {
  min-height: 34px;
  padding: 0 11px;
}

/* Meals polish: closer to the native compact list surface */
.meals-top {
  padding: 4px 18px 12px;
}
.meals-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}
.meals-title-row h1 {
  margin: 0 2px 5px;
  font-family: var(--sans);
  font-size: 34px;
  line-height: 0.98;
  font-weight: 760;
  letter-spacing: 0;
  color: var(--ink);
}
.meals-title-row > span {
  margin-bottom: 8px;
  color: var(--forest);
  background: rgba(59,90,58,0.10);
  border-radius: 999px;
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.meals-context {
  margin-top: 12px;
}
.meals-context h1 {
  margin: 0 2px 4px;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1;
  font-weight: 400;
  color: var(--ink);
}
.meals-context p {
  margin: 0 2px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.35;
}
.meal-tabs {
  gap: 8px;
  padding: 8px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.meal-tabs button {
  border-radius: 12px;
  background: var(--paper-2);
}
.meal-tabs button.on {
  background: var(--forest);
  color: var(--paper);
  box-shadow: 0 5px 14px rgba(59,90,58,0.16);
}
.meal-dashboard,
.grocery-hero {
  padding: 12px;
  justify-content: flex-start;
  gap: 10px;
}
.meal-dashboard-icon,
.grocery-hero-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--forest);
  background: rgba(59,90,58,0.10);
}
.meal-dashboard-copy,
.grocery-hero > div:not(.grocery-hero-icon) {
  flex: 1;
  min-width: 0;
}
.meal-dashboard h2 {
  margin: 3px 0 0;
  font-size: 24px;
  color: var(--ink);
}
.grocery-hero h2 {
  margin: 3px 0;
  font-size: 27px;
}
.grocery-hero p {
  margin: 0;
}
.grocery-hero button {
  min-height: 38px;
  padding: 0 13px;
}
.meal-week {
  margin: 10px 0 12px;
  gap: 6px;
}
.meal-week .day {
  min-height: 48px;
  border-radius: 14px;
  padding-top: 6px;
  padding-bottom: 5px;
}
.meal-week .day .n { font-size: 19px; }
.meal-week .day .ct { font-size: 8.5px; }
.grocery-row {
  min-height: 66px;
  grid-template-columns: 38px minmax(0, 1fr) minmax(86px, auto);
  gap: 10px;
  padding: 11px 10px 11px 12px;
}
.grocery-row .check {
  width: 38px;
  height: 38px;
}
.grocery-copy b {
  font-size: 14px;
}
.grocery-meta {
  gap: 6px;
}
.grocery-avatar,
.grocery-avatar .avatar {
  width: 30px;
  height: 30px;
}
.grocery-avatar .species-icon-img {
  width: 23px;
  height: 23px;
}

.shop-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}
.shop-head h1 i { color: var(--forest); font-style: normal; }
.shop-head .sub {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 8px;
}
.shop-section {
  margin: 18px 16px 0;
}
.shop-kicker {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin: 0 0 8px;
}
.shop-list {
  overflow: hidden;
}
.shop-row {
  width: auto;
}
.shop-row .r-del {
  flex: 0 0 auto;
}
.shop-add {
  margin: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shop-add-btn {
  margin: 18px 16px 0;
}

/* utility */
.screen { padding-bottom: 152px; }
.screen.detail-screen { padding-bottom: 184px; }
.fade-in { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ───────────────────────────────────────────────────────── */
/*  CARE INTELLIGENCE — Meet your X card                      */
/* ───────────────────────────────────────────────────────── */

.meet {
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 16px;
}
.meet.embedded { margin: 0 0 16px; }

.meet-hero {
  position: relative;
  padding: 22px 22px 26px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  min-height: 140px;
}
.meet-hero[data-tint="terra"]  { background: linear-gradient(140deg, #f6d9c5 0%, #e6b89c 100%); color: #5c2e16; }
.meet-hero[data-tint="sand"]   { background: linear-gradient(140deg, #ece1ca 0%, #d4c4a3 100%); color: #3e2c14; }
.meet-hero[data-tint="honey"]  { background: linear-gradient(140deg, #f5deb6 0%, #e6c89a 100%); color: #5a3a14; }
.meet-hero[data-tint="pond"]   { background: linear-gradient(140deg, #d6e1ed 0%, #b5c6d8 100%); color: #1b2f44; }
.meet-hero[data-tint="forest"] { background: linear-gradient(140deg, #d6e3c8 0%, #b9c9a8 100%); color: #1c3018; }
.meet-hero[data-tint="sage"]   { background: linear-gradient(140deg, #dde7cc 0%, #c1cfa8 100%); color: #2c4322; }
.meet-hero[data-tint="olive"]  { background: linear-gradient(140deg, #e0e5cb 0%, #c5cfa6 100%); color: #36421a; }
.meet-hero[data-tint="desert"] { background: linear-gradient(140deg, #f0e3c4 0%, #d8c293 100%); color: #42330e; }

.meet-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.35 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.18;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.meet-em {
  font-size: 80px;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(60,40,20,0.18)) saturate(0.95);
  flex-shrink: 0;
  z-index: 1;
  animation: float 6s ease-in-out infinite;
}
.meet-h { flex: 1; position: relative; z-index: 1; }
.meet-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 4px;
}
.meet-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 38px;
  line-height: 0.95;
  font-weight: 400;
  letter-spacing: 0;
}
.meet-name i { font-style: italic; }
.meet-level {
  margin-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.35;
  opacity: 0.78;
}

.meet-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 0.5px solid var(--hair);
}
.meet-stat {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 0.5px solid var(--hair);
}
.meet-stat:last-child { border-right: 0; }
.meet-stat label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.meet-dots {
  display: flex; gap: 4px; align-items: center;
}
.meet-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,0.10);
  transition: background .2s;
}
.meet-dots span.on { background: currentColor; }
.meet-diff {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1;
}
.meet-life {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  color: var(--ink);
}

.meet-section {
  padding: 16px 18px;
  border-bottom: 0.5px solid var(--hair);
}
.meet-section:last-child { border-bottom: 0; }
.meet-section-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.meet-section-h span { color: var(--ink-2); font-weight: 500; }
.meet-section-h em { color: var(--ink-3); font-style: normal; opacity: 0.7; }

.meet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.meet-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
}
.meet-list li .bullet {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1;
  padding-top: 2px;
}
.meet-list.good li .bullet { color: var(--forest); }
.meet-list.bad  li .bullet { color: var(--terra); }

.meet-headsup {
  margin: 0 18px 18px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(217,168,106,0.10), rgba(217,168,106,0.04));
  border-left: 3px solid var(--honey);
  border-radius: 4px 14px 14px 4px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.meet-headsup .hu-q {
  font-family: var(--serif);
  font-size: 48px;
  line-height: 0.6;
  color: var(--honey);
  opacity: 0.7;
  flex-shrink: 0;
}
.meet-headsup .hu-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.4;
  color: var(--ink);
  padding-top: 4px;
}

/* ───────────────────────────────────────────────────────── */
/*  SENSORS (Detail, plants)                                  */
/* ───────────────────────────────────────────────────────── */

.sensors {
  margin: 14px 14px 0;
  padding: 16px 18px 18px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 22px;
}
.sensors-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.sensors-h .lbl {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
}
.sensors-h .sub {
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: lowercase;
}
.sensor-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 0.5px dashed var(--hair);
}
.sensor-row:first-of-type { border-top: 0; padding-top: 0; }
.s-info .s-lbl {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.s-info .s-hint {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 1px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.s-bar {
  height: 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.s-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .6s cubic-bezier(.3,1,.5,1);
}
.s-bar-fill[data-band="good"] { background: linear-gradient(90deg, var(--sage), var(--forest)); }
.s-bar-fill[data-band="low"]  { background: linear-gradient(90deg, var(--honey), var(--terra)); }
.s-bar-fill[data-band="high"] { background: linear-gradient(90deg, var(--terra), var(--rust)); }

/* ───────────────────────────────────────────────────────── */
/*  ASK TENDLET — chat sheet + entry button                   */
/* ───────────────────────────────────────────────────────── */

.ask-cta {
  appearance: none;
  border: 0;
  background: linear-gradient(160deg, #2a4528 0%, #3b5a3a 60%, #4a6b4b 100%);
  color: #f5f0e3;
  margin: 20px 16px 0;
  width: calc(100% - 32px);
  padding: 14px 16px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 8px 22px rgba(40, 60, 38, 0.22);
  transition: transform .15s;
}
.ask-cta:active { transform: scale(0.985); }
.ask-cta::before {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(217,168,106,0.25), transparent 70%);
  pointer-events: none;
}

.ask-cta-ic {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(217, 168, 106, 0.18);
  color: var(--honey);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  z-index: 1;
}
.ask-cta-t { flex: 1; min-width: 0; position: relative; z-index: 1; }
.ask-cta-t b {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  color: #f5f0e3;
  letter-spacing: 0;
}
.ask-cta-t b::after {
  content: '.';
  color: var(--honey);
}
.ask-cta-t span {
  display: block;
  font-size: 11.5px;
  color: rgba(245, 240, 227, 0.6);
  margin-top: 1px;
}
.ask-cta > svg { position: relative; z-index: 1; color: rgba(245,240,227,0.5) !important; }

/* sheet overlay */
.ask-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 10, 0.45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  animation: fadeOverlay .25s ease;
}
@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }

.ask-sheet {
  width: 100%;
  height: 78%;
  background: var(--paper);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: slideUp .35s cubic-bezier(.25, 1, .3, 1);
  box-shadow: 0 -8px 30px rgba(0,0,0,0.18);
}
@keyframes slideUp {
  from { transform: translateY(60%); opacity: 0.6; }
  to   { transform: translateY(0); opacity: 1; }
}

.ask-handle {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: rgba(0,0,0,0.15);
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
}

.ask-hd {
  padding: 22px 20px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 0.5px solid var(--hair);
}
.ask-kicker {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ask-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
  margin-top: 2px;
}
.ask-title i { font-style: normal; color: inherit; }
.ask-ctx {
  margin-left: auto;
  margin-right: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ask-x {
  appearance: none; border: 0;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: rgba(0,0,0,0.05);
  color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.ask-x:hover { background: rgba(0,0,0,0.1); }

.ask-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ask-msg { display: flex; flex-direction: column; max-width: 86%; }
.ask-msg.assistant { align-self: flex-start; }
.ask-msg.user      { align-self: flex-end;   align-items: flex-end; }

.ask-msg-kicker {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
  padding-left: 4px;
}

.ask-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.45;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  white-space: pre-wrap;
}
.ask-msg.assistant .ask-bubble {
  background: var(--paper-3);
  border-top-left-radius: 6px;
}
.ask-msg.assistant.first .ask-bubble {
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
}
.ask-msg.user .ask-bubble {
  background: var(--forest);
  color: #f5f0e3;
  border-color: var(--forest);
  border-top-right-radius: 6px;
}

.ask-bubble.thinking {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 18px;
}
.ask-bubble.thinking span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: dot 1.2s ease-in-out infinite;
}
.ask-bubble.thinking span:nth-child(2) { animation-delay: 0.15s; }
.ask-bubble.thinking span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

.ask-suggest {
  padding: 4px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ask-suggest-h {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 0 4px;
}
.ask-suggest button {
  appearance: none;
  border: 0.5px solid var(--hair);
  background: var(--paper-2);
  padding: 11px 14px;
  border-radius: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background .12s, border-color .12s;
}
.ask-suggest button:hover {
  background: var(--paper-3);
  border-color: var(--forest);
}
.ask-suggest button svg { color: var(--forest); flex-shrink: 0; }

.ask-input {
  padding: 12px 16px 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 0.5px solid var(--hair);
  background: var(--paper);
}
.ask-input input {
  flex: 1;
  appearance: none;
  border: 1px solid var(--hair);
  background: var(--paper-3);
  padding: 12px 16px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
}
.ask-input input:focus { border-color: var(--forest); }
.ask-input input::placeholder { color: var(--ink-3); font-style: italic; }
.ask-input button {
  appearance: none;
  border: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.ask-input button:disabled {
  opacity: 0.35;
  cursor: default;
}

.ask-disclaimer {
  padding: 4px 16px 14px;
  text-align: center;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

/* ───────────────────────────────────────────────────────── */
/*  ROUTINES (per-folk reminder list)                         */
/* ───────────────────────────────────────────────────────── */

.routine-card {
  margin: 0 14px 0;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 22px;
  overflow: hidden;
}

.routine-explainer {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(217,168,106,0.06), transparent);
  border-bottom: 0.5px solid var(--hair);
}
.r-spark {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--bisque);
  color: var(--forest-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.r-explainer-t b {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.3;
}
.r-explainer-t span {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 3px;
  line-height: 1.4;
}

.routine-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 0.5px solid var(--hair);
}
.routine-row:first-of-type { border-top: 0; }

.detail-meals-card {
  margin: 0 14px 18px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 22px;
  overflow: hidden;
}
.detail-meals-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(49, 88, 49, 0.045);
  border-bottom: 0.5px solid var(--hair);
}
.detail-meals-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(49, 88, 49, 0.1);
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.detail-meals-head b {
  display: block;
  font-size: 14px;
  color: var(--ink);
}
.detail-meals-head span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-3);
}
.detail-meal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-top: 0.5px solid var(--hair);
}
.detail-meal-row:first-child { border-top: 0; }
.detail-meal-row b {
  display: block;
  font-size: 14px;
  color: var(--ink);
}
.detail-meal-row span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-3);
}
.detail-meal-row em {
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  color: var(--forest);
  white-space: nowrap;
}
.routine-recommendations {
  padding: 12px 12px 14px;
  border-top: 0.5px solid var(--hair);
  background: rgba(217,168,106,0.045);
}
.routine-rec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 3px 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.routine-rec-head em {
  font-style: normal;
  color: var(--forest);
}
.routine-rec-row {
  appearance: none;
  border: 0.5px solid var(--hair);
  background: var(--paper);
  border-radius: 16px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.routine-rec-copy {
  flex: 1;
  min-width: 0;
}
.routine-rec-copy b {
  display: block;
  font-size: 13.5px;
  line-height: 1.25;
}
.routine-rec-copy small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.routine-rec-row > em {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-style: normal;
  line-height: 1;
  flex-shrink: 0;
}

.r-time {
  font-size: 11.5px;
  color: var(--ink-3);
  width: 44px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.r-body { flex: 1; min-width: 0; }
.r-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}
.r-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
  font-size: 11px;
}
.r-src {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 99px;
}
.r-src.suggested { background: rgba(59,90,58,0.08); color: var(--forest); }
.r-src.custom    { background: rgba(201,123,90,0.10); color: var(--terra); }
.r-detail { color: var(--ink-3); }

.r-del {
  appearance: none;
  border: 0;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.r-del:hover { background: rgba(168, 92, 58, 0.10); color: var(--rust); }

.r-add {
  appearance: none;
  border: 0;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border-top: 0.5px dashed var(--hair);
  color: var(--forest);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
}
.r-add:hover { background: rgba(59,90,58,0.04); }
.r-plus {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1;
}

.r-add-form {
  padding: 14px 16px;
  border-top: 0.5px solid var(--hair);
  background: var(--paper-3);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.r-add-fields {
  display: flex;
  gap: 8px;
}
.r-time-input {
  flex-shrink: 0;
  width: 84px;
  padding: 10px 12px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  outline: none;
}
.r-add-fields input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: var(--paper-2);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.r-add-fields input[type="text"]:focus,
.r-time-input:focus { border-color: var(--forest); }
.r-add-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.r-cancel, .r-save {
  appearance: none;
  border: 0;
  padding: 9px 16px;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.r-cancel { background: transparent; color: var(--ink-3); }
.r-save { background: var(--forest); color: #fff; }

/* recurrence pill in row meta */
.r-rec {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.r-rec::before {
  content: '';
  display: inline-block;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--ink-3);
  margin-right: 4px;
}
.r-detail-line {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--ink-3);
  font-family: var(--sans);
}

/* recurrence picker block (inside add form) */
.rec-block {
  border-top: 0.5px dashed var(--hair);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rec-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0,0,0,0.05);
  padding: 3px;
  border-radius: 10px;
}
.rec-tabs button {
  appearance: none;
  border: 0;
  flex: 1;
  padding: 7px 4px;
  background: transparent;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
  border-radius: 7px;
  cursor: pointer;
  transition: all .15s;
}
.rec-tabs button.on {
  background: var(--paper-3);
  color: var(--forest);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.rec-help {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-3);
  padding: 4px 4px 0;
}
.rec-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 6px;
}
.rec-days button {
  appearance: none;
  border: 1px solid var(--hair);
  background: var(--paper-3);
  height: 36px;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .12s;
}
.rec-days button.on {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}
.rec-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-2);
  padding: 4px 4px 0;
}
.rec-num-input, .rec-date-input {
  appearance: none;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: var(--paper-2);
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  width: 70px;
  text-align: center;
  -moz-appearance: textfield;
}
.rec-num-input::-webkit-inner-spin-button,
.rec-num-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.rec-num-input:focus, .rec-date-input:focus { border-color: var(--forest); }
.rec-date-input { width: 140px; font-family: var(--sans); }

/* ───────────────────────────────────────────────────────── */
/*  NOTIFICATION BANNER (lock-screen-style overlay)           */
/* ───────────────────────────────────────────────────────── */

.notif-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 30%, rgba(0,0,0,0.18) 60%, transparent 100%);
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-top: 50px;
  animation: notifFade .35s cubic-bezier(.25, 1, .3, 1);
}
@keyframes notifFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.notif-stack {
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-card {
  background: rgba(40, 36, 32, 0.78);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  border-radius: 24px;
  border: 0.5px solid rgba(255,255,255,0.10);
  color: #f5f0e3;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 10px 30px rgba(0,0,0,0.35);
  animation: notifSlide .4s cubic-bezier(.25, 1.4, .4, 1);
  transform-origin: top center;
}
@keyframes notifSlide {
  from { transform: translateY(-30px) scale(0.95); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.notif-card.collapsed {
  padding-bottom: 0;
  opacity: 0.78;
  transform: scale(0.96) translateY(-4px);
  pointer-events: none;
}

.notif-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 6px;
}
.notif-app {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(245, 240, 227, 0.72);
}
.notif-logo {
  width: 18px; height: 18px;
  border-radius: 5px;
  background: linear-gradient(140deg, var(--forest) 0%, var(--terra) 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 400;
  font-style: italic;
}
.notif-time {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  color: rgba(245, 240, 227, 0.55);
}

.notif-body {
  padding: 4px 16px 14px;
}
.notif-body-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.notif-title {
  font-family: var(--sans);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #f5f0e3;
}
.notif-icon-tray {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(245, 240, 227, 0.10);
  display: flex; align-items: center; justify-content: center;
  color: var(--honey);
}
.notif-text {
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 13px;
  color: rgba(245, 240, 227, 0.75);
  line-height: 1.4;
}
.notif-text b { color: #f5f0e3; font-weight: 500; }

.notif-folk {
  margin-top: 12px;
  padding: 10px;
  background: rgba(245, 240, 227, 0.06);
  border: 0.5px solid rgba(245, 240, 227, 0.08);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.notif-folk .avatar {
  width: 38px; height: 38px;
  border-radius: 11px;
  border: 0;
}
.notif-folk-info { flex: 1; min-width: 0; }
.notif-folk-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  color: #f5f0e3;
  line-height: 1;
}
.notif-folk-species {
  font-family: var(--mono);
  font-size: 9.5px;
  color: rgba(245, 240, 227, 0.5);
  margin-top: 3px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notif-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 0.5px solid rgba(245, 240, 227, 0.12);
}
.notif-act {
  appearance: none;
  border: 0;
  padding: 14px 12px;
  background: transparent;
  color: rgba(245, 240, 227, 0.78);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background .15s;
  border-right: 0.5px solid rgba(245, 240, 227, 0.12);
}
.notif-act:last-child { border-right: 0; }
.notif-act:hover { background: rgba(245, 240, 227, 0.05); }
.notif-act:active { background: rgba(245, 240, 227, 0.1); }
.notif-act.primary {
  color: #d6f5cc;
}
.notif-act.primary svg { color: #aee29c; }
.notif-act svg { color: rgba(245, 240, 227, 0.55); flex-shrink: 0; }

.notif-hint {
  padding: 10px 16px;
  text-align: center;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: rgba(245, 240, 227, 0.4);
  border-top: 0.5px solid rgba(245, 240, 227, 0.08);
}

/* ───────────────────────────────────────────────────────── */
/*  CARE TOOLS — Water meter + Weight tracker                 */
/* ───────────────────────────────────────────────────────── */

.tool {
  margin: 14px 14px 0;
  padding: 18px 18px 16px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 22px;
  overflow: hidden;
}
.care-plan-section .tool {
  margin: 0;
}
.tool-hd {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.tool-lbl {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.tool-sub {
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.watermeter {
  padding: 16px;
  border-radius: 18px;
  display: grid;
  gap: 10px;
}
.wm-rec-card,
.wm-status-card,
.wm-backdate {
  border: 0.5px solid color-mix(in srgb, var(--hair) 78%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper-3) 34%, transparent);
}
.wm-rec-card {
  padding: 12px;
  display: grid;
  gap: 8px;
}
.wm-rec-main {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}
.wm-rec-amount {
  font-size: 29px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: 0;
}
.wm-rec-cadence {
  margin-top: 3px;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
}
.wm-edit-pot {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 9px;
  border: 0.5px solid var(--hair);
  background: transparent;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.wm-due-line {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
}
.wm-season-row {
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
}
.wm-season-row span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  padding: 4px 7px;
  border: 0.5px solid var(--hair);
  border-radius: 999px;
  background: var(--paper-2);
}
.wm-season-row em {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  font-style: normal;
  color: var(--ink-3);
}
.wm-status-card {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
}
.wm-status-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--sage) 16%, transparent);
  color: var(--forest);
  display: grid;
  place-items: center;
}
.wm-status-kicker {
  color: var(--ink-3);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.wm-status-title {
  margin-top: 2px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 650;
}
.wm-status-sub {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.35;
}

.wm-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.wm-log {
  flex: 1;
  appearance: none; border: 0;
  background: var(--forest);
  color: #fff;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s;
}
.wm-log:active { transform: scale(0.985); }
.wm-undo {
  appearance: none; border: 0.5px solid var(--hair);
  background: transparent;
  color: var(--ink-2);
  width: 44px;
  min-height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.wm-undo:hover { color: var(--ink); }

.wm-earlier {
  appearance: none;
  border: 0;
  min-height: 36px;
  padding: 0;
  background: transparent;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.wm-earlier span {
  display: flex;
  gap: 7px;
  align-items: center;
}
.wm-earlier em {
  font-style: normal;
  color: var(--ink-3);
}
.wm-backdate {
  padding: 12px;
  background: var(--paper-2);
  display: grid;
  gap: 10px;
}
.wm-backdate-head {
  display: grid;
  gap: 2px;
}
.wm-backdate-head span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.wm-backdate-head b {
  color: var(--ink-2);
  font-size: 13px;
}
.wm-backdate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.wm-backdate-grid button {
  border: 0.5px solid var(--hair);
  background: var(--paper-3);
  border-radius: 11px;
  color: var(--ink-2);
  font-family: var(--sans);
  font-weight: 650;
  min-height: 42px;
}
.wm-history { padding-top: 2px; }
.wm-h-hd {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.spark-svg {
  width: 100%;
  height: 76px;
  display: block;
}
.spark-lbl {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  fill: var(--ink-3);
}

/* Weight tracker */
.weighttracker .wt-big {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 6px 4px 12px;
}
.wt-val {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.wt-num {
  font-family: var(--serif);
  font-size: 56px;
  line-height: 0.95;
  letter-spacing: 0;
  color: var(--ink);
}
.wt-unit {
  font-size: 14px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.wt-change {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  margin-top: 4px;
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.wt-change em { font-style: normal; color: var(--ink-3); }
.wt-change.up   { color: var(--forest); }
.wt-change.down { color: var(--terra); }

.wt-range {
  width: 100%;
  margin-top: 14px;
}
.wt-range-bar {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: rgba(0,0,0,0.06);
  overflow: visible;
}
.wt-range-fill {
  position: absolute;
  top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--sage), var(--forest), var(--sage));
  border-radius: 99px;
}
.wt-range-marker {
  position: absolute;
  top: -3px;
  width: 14px; height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: var(--paper-3);
  border: 2.5px solid var(--terra);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.wt-range-lbl {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-3);
}
.wt-range-lbl em {
  font-style: normal;
  color: var(--forest);
  letter-spacing: 0.04em;
}

.wt-chart {
  padding-top: 14px;
  margin-top: 8px;
  border-top: 0.5px solid var(--hair);
}
.wt-chart-hd {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.wt-note {
  margin: 12px 0 4px;
  padding: 10px 12px;
  background: rgba(217, 168, 106, 0.08);
  border-left: 2px solid var(--honey);
  border-radius: 4px 12px 12px 4px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink);
}

.wt-add {
  appearance: none;
  border: 0;
  width: 100%;
  margin-top: 14px;
  padding: 12px 14px;
  background: transparent;
  border-top: 0.5px dashed var(--hair);
  color: var(--forest);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
}
.wt-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 0.5px dashed var(--hair);
}
.wt-form input[type="number"] {
  flex: 1;
  appearance: none;
  -moz-appearance: textfield;
  border: 1px solid var(--hair);
  background: var(--paper-3);
  padding: 10px 12px;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--ink);
  outline: none;
}
.wt-form input::-webkit-outer-spin-button,
.wt-form input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wt-form-unit {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.wt-cancel, .wt-save {
  appearance: none;
  border: 0;
  padding: 9px 14px;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.wt-cancel { background: transparent; color: var(--ink-3); }
.wt-save { background: var(--forest); color: #fff; }

/* ───────────────────────────────────────────────────────── */
/*  HEALTH — Medications + Documents                          */
/* ───────────────────────────────────────────────────────── */

.health-card {
  margin: 0 14px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 22px;
  overflow: hidden;
}

.health-empty {
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}
.health-empty-mark {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--forest);
  opacity: 0.55;
  margin-bottom: 6px;
}
.health-empty-t {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
}
.health-empty-s {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-3);
  max-width: 280px;
  margin-top: 4px;
}

/* Med rows */
.med-row {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-top: 0.5px solid var(--hair);
  align-items: flex-start;
}
.med-row:first-of-type { border-top: 0; }

.med-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 7px;
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(168, 92, 58, 0.10);
  color: var(--rust);
  height: fit-content;
  margin-top: 2px;
}
.med-pill[data-status="active"] {
  background: rgba(168, 92, 58, 0.12);
  color: var(--rust);
}
.med-pill[data-status="ending"] {
  background: rgba(0,0,0,0.05);
  color: var(--ink-2);
}
.med-pill .med-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rust);
  animation: pulse 1.6s ease-in-out infinite;
}
.med-pill[data-status="ending"] .med-dot {
  background: var(--ink-3);
  animation: none;
}
.med-body { flex: 1; min-width: 0; }
.med-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}
.med-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.med-meta b { color: var(--ink); font-weight: 500; }
.med-meta .dot { color: var(--ink-3); margin: 0 2px; }
.med-when {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.med-note {
  margin-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  text-wrap: pretty;
}

/* Doc rows */
.doc-row {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-top: 0.5px solid var(--hair);
  align-items: center;
}
.doc-row:first-of-type { border-top: 0; }
.doc-icon {
  flex-shrink: 0;
  width: 44px; height: 50px;
  border-radius: 8px;
  background: var(--bisque);
  color: var(--forest-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  border: 0.5px solid var(--hair);
}
.doc-icon[data-type="vet"]       { background: #d8e4cc; color: var(--forest-deep); }
.doc-icon[data-type="insurance"] { background: #d6e1ed; color: #1b2f44; }
.doc-icon[data-type="legal"]     { background: #ece1ca; color: #3e2c14; }
.doc-icon[data-type="id"]        { background: #f0c7b0; color: var(--rust); }
.doc-icon[data-type="other"]     { background: var(--paper-3); color: var(--ink-2); }
.doc-glyph {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1;
}
.doc-thumb {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.doc-thumb + .doc-glyph { display: none; }
.doc-body { flex: 1; min-width: 0; }
.doc-title {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.doc-type-pill {
  padding: 1px 7px;
  background: rgba(59, 90, 58, 0.10);
  color: var(--forest);
  border-radius: 99px;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.1em;
}
.doc-file {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-2);
}
.doc-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.4;
}

/* Health form (shared by Meds + Docs) */
.health-form {
  padding: 14px 16px;
  background: var(--paper-3);
  border-top: 0.5px solid var(--hair);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.health-form-row { display: flex; flex-direction: column; gap: 8px; }
.health-form-row.split {
  flex-direction: row;
  gap: 8px;
  align-items: stretch;
}
.health-input {
  flex: 1;
  appearance: none;
  border: 1px solid var(--hair);
  background: var(--paper-2);
  padding: 10px 12px;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.health-input:focus { border-color: var(--forest); }
select.health-input {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='rgba(0,0,0,.5)' d='M0 0h10L5 6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.health-mini {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.health-mini > span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.health-file-btn {
  appearance: none;
  border: 1px dashed var(--hair);
  background: var(--paper-2);
  padding: 10px 12px;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-end;
}
.health-file-btn:hover { color: var(--ink); border-color: var(--forest); }

.doc-type-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  background: rgba(0,0,0,0.05);
  padding: 3px;
  border-radius: 10px;
}
.doc-type-tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 10.5px;
  color: var(--ink-3);
  padding: 8px 2px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.doc-type-tabs button .dt-g {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1;
  color: var(--ink-2);
}
.doc-type-tabs button.on {
  background: var(--paper-3);
  color: var(--forest);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.doc-type-tabs button.on .dt-g { color: var(--forest); }

/* ───────────────────────────────────────────────────────── */
/*  PHOTO JOURNAL                                             */
/* ───────────────────────────────────────────────────────── */

.journal-card .jr-compare {
  padding: 14px 18px 16px;
  border-bottom: 0.5px solid var(--hair);
  background: linear-gradient(180deg, rgba(59,90,58,0.04), transparent);
}
.jr-compare-hd {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
  text-align: center;
}
.jr-compare-hd em { font-style: italic; color: var(--terra); margin: 0 4px; }
.jr-compare-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.jr-compare-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.jr-compare-cell img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 14px; border: 0.5px solid var(--hair);
  box-shadow: 0 4px 12px rgba(60,40,20,0.08);
}
.jr-compare-date {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.jr-compare-arrow {
  font-family: var(--serif);
  font-size: 24px;
  font-style: italic;
  color: var(--terra);
}
.jr-compare-sub {
  text-align: center;
  margin-top: 10px;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.jr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 12px;
}
.jr-tile {
  appearance: none; border: 0; padding: 0;
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--paper-3);
  transition: transform .12s;
}
.jr-tile:hover { transform: scale(1.02); }
.jr-tile img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.jr-tile-date {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 6px 4px;
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.5));
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.jr-form .jr-pick {
  width: 100%;
  padding: 28px 16px;
  flex-direction: column;
  gap: 8px;
  border-style: dashed;
}
.jr-preview {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
}
.jr-preview img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}
.jr-clear {
  appearance: none; border: 0;
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.jr-fullscreen {
  position: absolute;
  inset: 0;
  z-index: 80;
  background: rgba(20, 16, 10, 0.88);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
  animation: fadeOverlay .25s ease;
}
.jr-fs-inner {
  max-width: 100%;
  width: 100%;
  display: flex; flex-direction: column;
  gap: 16px;
  align-items: center;
}
.jr-fs-img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 18px;
  object-fit: contain;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.jr-fs-meta { width: 100%; text-align: center; color: #f0ebdc; }
.jr-fs-date {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: rgba(240, 235, 220, 0.6);
  text-transform: uppercase;
}
.jr-fs-note {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  color: rgba(240, 235, 220, 0.95);
}
.jr-fs-actions {
  display: flex; gap: 8px; justify-content: center; margin-top: 16px;
}
.jr-fs-del, .jr-fs-close {
  appearance: none; border: 0;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.jr-fs-del   { background: rgba(232,152,120,0.20); color: #e89878; }
.jr-fs-close { background: rgba(240, 235, 220, 0.10); color: #f0ebdc; }

/* ───────────────────────────────────────────────────────── */
/*  VET CONTACTS                                              */
/* ───────────────────────────────────────────────────────── */

.vet-row {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-top: 0.5px solid var(--hair);
  align-items: flex-start;
}
.vet-row:first-of-type { border-top: 0; }
.vet-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--bisque);
  color: var(--forest-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 22px;
  border: 0.5px solid var(--hair);
}
.vet-icon[data-type="primary"]   { background: #d8e4cc; color: var(--forest-deep); }
.vet-icon[data-type="emergency"] { background: #f0c7b0; color: var(--rust); }
.vet-icon[data-type="poison"]    { background: #f5deb6; color: #5a3a14; }
.vet-icon[data-type="microchip"] { background: #d6e1ed; color: #1b2f44; }
.vet-icon[data-type="other"]     { background: var(--paper-3); color: var(--ink-2); }
.vet-body { flex: 1; min-width: 0; }
.vet-name { font-size: 15px; font-weight: 500; color: var(--ink); line-height: 1.3; }
.vet-type-pill {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 7px;
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(59,90,58,0.10);
  color: var(--forest);
}
.vet-phone {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--forest);
  text-decoration: none;
  font-weight: 500;
}
.vet-phone:hover { text-decoration: underline; }
.vet-address {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-2);
}
.vet-note {
  margin-top: 6px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-2);
}

/* ───────────────────────────────────────────────────────── */
/*  SYMPTOMS LOG                                              */
/* ───────────────────────────────────────────────────────── */

.symp-row {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-top: 0.5px solid var(--hair);
  align-items: flex-start;
}
.symp-row:first-of-type { border-top: 0; }
.symp-sev {
  flex-shrink: 0;
  width: 28px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  padding-top: 4px;
}
.symp-sev span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(0,0,0,0.10);
}
.symp-sev.sev-mild     span.on { background: var(--forest); }
.symp-sev.sev-moderate span.on { background: var(--honey); }
.symp-sev.sev-urgent   span.on { background: var(--rust); animation: pulse 1.4s ease-in-out infinite; }

.symp-body { flex: 1; min-width: 0; }
.symp-name {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}
.symp-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-top: 4px;
}
.symp-date {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.symp-sev-pill {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terra);
}
.symp-note {
  margin-top: 6px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-2);
}
.symp-summary {
  appearance: none;
  border: 0;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(160deg, var(--bisque), rgba(217,168,106,0.10));
  border-top: 0.5px solid var(--hair);
  border-bottom: 0.5px solid var(--hair);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--forest-deep);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  text-align: left;
}
.symp-summary svg { color: var(--honey); flex-shrink: 0; }
.symp-summary b { font-weight: 600; }
.symp-summary:hover { background: linear-gradient(160deg, rgba(217,168,106,0.18), rgba(217,168,106,0.08)); }

/* ───────────────────────────────────────────────────────── */
/*  FAMILY PANEL + ACTIVITY                                   */
/* ───────────────────────────────────────────────────────── */

.fam-row {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-top: 0.5px solid var(--hair);
  align-items: center;
}
.fam-row:first-of-type { border-top: 0; }
.fam-av {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--forest-deep);
}
.fam-av.tint-0 { background: #d8e4cc; }
.fam-av.tint-1 { background: var(--bisque); }
.fam-av.tint-2 { background: #f0c7b0; color: var(--rust); }
.fam-av.tint-3 { background: #d6e1ed; color: #1b2f44; }
.fam-body { flex: 1; min-width: 0; }
.fam-name {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
}
.fam-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.fam-role-pill {
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(59,90,58,0.10);
  color: var(--forest);
}
.fam-pending {
  font-family: var(--serif);
  font-style: italic;
  color: var(--terra);
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}
.fam-role {
  flex-shrink: 0;
  appearance: none;
  border: 0.5px solid var(--hair);
  background: var(--paper-3);
  padding: 5px 22px 5px 8px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 10 6'><path fill='rgba(0,0,0,.5)' d='M0 0h10L5 6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 6px center;
}

.act-row {
  display: flex;
  gap: 10px;
  padding: 11px 16px;
  border-top: 0.5px solid var(--hair);
  align-items: center;
}
.act-row:first-of-type { border-top: 0; }
.act-body { flex: 1; min-width: 0; }
.act-line {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.3;
}
.act-line b { font-weight: 500; }
.act-time {
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 2px;
  letter-spacing: 0.04em;
}

/* ───────────────────────────────────────────────────────── */
/*  AWAY MODE                                                 */
/* ───────────────────────────────────────────────────────── */

.away-card { padding-bottom: 4px; }
.away-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}
.away-toggle-t {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0;
}
.away-toggle-s {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 260px;
}
.away-form {
  padding: 14px 18px 16px;
  border-top: 0.5px solid var(--hair);
  background: linear-gradient(180deg, rgba(217,168,106,0.05), transparent);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.away-brief {
  resize: vertical;
  min-height: 80px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  line-height: 1.5;
  padding: 10px 12px;
}
.away-share {
  appearance: none; border: 0;
  background: var(--forest);
  color: #fff;
  padding: 11px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  border-top: 0;
  margin-top: 4px;
}

.away-banner {
  margin: 0 16px 14px;
  padding: 12px 14px;
  background: linear-gradient(160deg, var(--honey), var(--terra));
  border-radius: 18px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(168, 92, 58, 0.20);
}
.away-banner-ic {
  font-size: 22px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.20));
  transform: rotate(-12deg);
}
.away-banner-t { flex: 1; min-width: 0; }
.away-banner-t b {
  display: block;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.away-banner-t span {
  display: block;
  font-size: 11.5px;
  color: rgba(255,255,255,0.85);
  font-family: var(--mono);
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.away-banner-pulse {
  position: absolute;
  right: 14px; top: 14px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  animation: pulse 1.8s ease-in-out infinite;
}

/* ───────────────────────────────────────────────────────── */
/*  ONBOARDING                                                */
/* ───────────────────────────────────────────────────────── */

.onb-screen {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* header — back arrow + step dots */
.onb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 62px 18px 8px;
}
.onb-back {
  appearance: none; border: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.65);
  border: 0.5px solid var(--hair);
  color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.onb-dots {
  display: flex; gap: 6px;
}
.onb-dots .dot {
  width: 22px; height: 4px;
  border-radius: 99px;
  background: var(--hair);
  transition: all .25s;
}
.onb-dots .dot.done { background: var(--forest); opacity: 0.4; }
.onb-dots .dot.on   { background: var(--forest); width: 36px; }

.onb-body {
  flex: 1;
  padding: 22px 22px 58px;
  overflow-y: auto;
}
.onb-foot {
  position: sticky;
  bottom: 0;
  z-index: 12;
  padding: 12px 22px 42px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  background: linear-gradient(180deg, color-mix(in srgb, var(--paper) 0%, transparent), var(--paper) 22%);
}
.onb-skip {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 13px;
  padding: 8px;
  cursor: pointer;
  text-align: center;
}
.onb-demo {
  appearance: none;
  width: 100%;
  min-height: 48px;
  border: 0.5px solid rgba(59,90,58,0.28);
  border-radius: 16px;
  background: color-mix(in srgb, var(--forest) 7%, var(--paper));
  color: var(--forest);
  font: 600 14px/1.1 var(--sans);
  cursor: pointer;
}
.onb-demo:active { transform: scale(0.98); }

.onb-h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
  text-wrap: balance;
}
.onb-h2 i { font-style: normal; color: var(--forest); }
.onb-lead {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.5;
  max-width: 320px;
}
.onb-lead b { color: var(--forest); font-weight: 600; }
.onb-sect {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 24px 0 10px;
}

/* welcome screen */
.onb-welcome .onb-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 22px 0;
}
.onb-mark {
  text-align: center;
}
.onb-glyph {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  background: transparent;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.onb-glyph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.onb-mark h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
}
.onb-mark h1 i { font-style: normal; color: inherit; }
.onb-tag {
  margin-top: 16px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 16px;
  line-height: 1.42;
  color: var(--ink-2);
}

/* big "add first" button (empty state) */
.onb-big-add {
  appearance: none; border: 0;
  margin-top: 22px;
  width: 100%;
  padding: 22px 18px;
  background: var(--paper-2);
  border: 1.5px dashed var(--hair);
  border-radius: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--ink);
  text-align: left;
  transition: border-color .15s, background .15s;
}
.onb-big-add:hover { border-color: var(--forest); background: var(--paper-3); }
.onb-big-add .ic {
  width: 52px; height: 52px;
  background: var(--forest);
  color: #fff;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.onb-big-add .t b { display: block; font-family: var(--serif); font-size: 22px; font-weight: 400; }
.onb-big-add .t span { color: var(--ink-3); font-size: 12.5px; }

/* added-folk stack */
.onb-folk-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.onb-folk-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 16px;
}
.onb-folk-info { flex: 1; min-width: 0; }
.onb-folk-info .name { font-size: 18px; line-height: 1.1; color: var(--ink); }
.onb-folk-info .meta { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.onb-x {
  appearance: none; border: 0;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: transparent;
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.onb-x:hover { background: rgba(0,0,0,0.05); color: var(--rust); }

.onb-add-more {
  margin-top: 10px;
  appearance: none; border: 0;
  background: transparent;
  color: var(--forest);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.onb-add-more:hover { background: rgba(59,90,58,0.06); }

/* kind toggle pills (Animal / Plant) */
.kind-pills {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.kind-pills button {
  appearance: none; border: 0.5px solid var(--hair);
  background: var(--paper-2);
  padding: 8px 14px;
  border-radius: 99px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.kind-pills button[data-on="1"] {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}

/* search input */
.onb-search {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper-3);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 0 12px;
  height: 46px;
}
.onb-search:focus-within { border-color: var(--forest); }
.onb-search input {
  flex: 1;
  appearance: none; border: 0; outline: none; background: transparent;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  height: 100%;
}
.onb-search input::placeholder { color: var(--ink-3); font-style: italic; }
.onb-clear {
  appearance: none; border: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
  color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* "add as custom" prompt */
.onb-custom {
  margin-top: 14px;
  appearance: none; border: 0;
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(180deg, var(--paper-3), var(--paper-2));
  border: 1px solid var(--forest);
  border-radius: 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  color: var(--ink);
}
.onb-custom-ic {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--forest);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.onb-custom b { display: block; font-size: 14px; }
.onb-custom span { color: var(--ink-3); font-size: 12px; }

.onb-hint {
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(59,90,58,0.04);
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.45;
}
.onb-hint a { color: var(--forest); cursor: pointer; font-weight: 500; }

/* naming hero */
.onb-naming-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
}

/* family — mini cta button */
.onb-mini-cta {
  appearance: none; border: 0;
  background: var(--forest);
  color: #fff;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  padding: 0 18px;
  border-radius: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.onb-tip {
  margin-top: 22px;
  padding: 14px 16px;
  background: var(--paper-2);
  border-left: 3px solid var(--terra);
  border-radius: 6px 14px 14px 6px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* notifications */
.onb-toggles {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.onb-toggle-row {
  appearance: none; border: 0;
  width: 100%;
  padding: 14px 16px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-family: var(--sans);
  text-align: left;
  color: var(--ink);
}
.onb-toggle-row.on { background: var(--paper-3); border-color: var(--forest); }
.onb-toggle-row .t { flex: 1; min-width: 0; }
.onb-toggle-row .t b { display: block; font-size: 14px; font-weight: 500; }
.onb-toggle-row .t span { color: var(--ink-3); font-size: 12px; line-height: 1.35; display: block; margin-top: 2px; }
.onb-toggle-row .time { color: var(--ink-3); font-size: 10.5px; flex-shrink: 0; padding-right: 4px; }
.onb-switch {
  width: 38px; height: 22px;
  border-radius: 99px;
  background: rgba(0,0,0,0.15);
  position: relative;
  flex-shrink: 0;
  transition: background .15s;
}
.onb-switch[data-on="1"] { background: var(--forest); }
.onb-switch i {
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform .18s cubic-bezier(.3,1.4,.5,1);
}
.onb-switch[data-on="1"] i { transform: translateX(16px); }

/* done screen */
.onb-done .onb-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 80px;
}
.onb-done-mark { margin-bottom: 18px; }
.onb-folk-cluster {
  margin: 28px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.onb-first-task {
  margin-top: 36px;
  padding: 18px 22px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 18px;
  max-width: 280px;
}

/* ───────────────────────────────────────────────────────── */
/*  Native shell refinements                                  */
/* ───────────────────────────────────────────────────────── */

.mini-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 64px 18px 6px;
}
.native-nav-sheet:not(.full) .mini-nav { padding-top: 18px; }
.mini-nav-btn {
  appearance: none;
  border: 0.5px solid var(--hair);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper-3) 72%, transparent);
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.mini-nav-title {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.native-sheet-overlay {
  position: absolute;
  inset: 0;
  z-index: 74;
  display: flex;
  align-items: flex-end;
  background: rgba(20, 16, 10, 0.32);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.native-nav-sheet {
  width: 100%;
  height: 90%;
  max-height: 90%;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--paper);
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  box-shadow: 0 -18px 44px rgba(0,0,0,0.22);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  animation: slideUp .32s cubic-bezier(.25, 1, .3, 1);
}
.native-nav-sheet.full {
  height: 100%;
  max-height: 100%;
  border-radius: 0;
}
.native-nav-sheet .screen {
  min-height: 100%;
}

.species-icon-img,
.species-grid-icon,
.sl-avatar-icon,
.mag-icon-img,
.min-icon-img,
.inv-icon-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 76%;
  height: 76%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(60,40,20,0.10));
}
.avatar.lg .species-icon-img { width: 78%; height: 78%; }
.avatar.xl .species-icon-img { width: 80%; height: 80%; }
.species-grid-icon {
  width: 34px;
  height: 34px;
}
.sl-avatar-icon {
  width: 24px;
  height: 24px;
}
.sl-icon-img {
  width: 168px;
  height: 168px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 8px 16px rgba(60,40,20,0.16));
  animation: float 6s ease-in-out infinite;
}
.mag-icon-img { width: 28px; height: 28px; }
.pc-stamp-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.12));
}
.min-icon-img { width: 24px; height: 24px; }
.inv-icon-img {
  width: 32px;
  height: 32px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  box-sizing: border-box;
}
.detail-hero-icon {
  width: 76px;
  height: 76px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 8px rgba(60,40,20,0.12));
}
.meet-icon-img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  flex-shrink: 0;
  z-index: 1;
  filter: drop-shadow(0 5px 12px rgba(60,40,20,0.16));
  animation: float 6s ease-in-out infinite;
}

/* ───────────────────────────────────────────────────────── */
/*  Profile settings surface                                  */
/* ───────────────────────────────────────────────────────── */

.profile-section {
  margin: 16px 16px 0;
}
.profile-kicker {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 8px 2px;
}
.profile-stats {
  margin: 12px 16px 0;
}
.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.profile-stat {
  padding: 14px;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 14px;
}
.profile-stat .h-serif {
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
}
.profile-stat span {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.profile-card {
  overflow: hidden;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 16px;
}
.profile-row,
.profile-toggle-row {
  appearance: none;
  border: 0;
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}
.profile-row + .profile-row,
.profile-card > .profile-toggle-row + .profile-segment-row,
.profile-card > .profile-segment-row + .profile-segment-row,
.profile-card > .profile-segment-row + .profile-toggle-row,
.profile-card > .profile-toggle-row + .profile-toggle-row {
  border-top: 0.5px solid var(--hair);
}
.profile-row-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--forest);
  background: color-mix(in srgb, var(--forest) 11%, transparent);
  flex-shrink: 0;
}
.profile-row-title,
.profile-toggle-copy b {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
}
.profile-row-value {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.profile-row.danger .profile-row-icon,
.profile-row.danger .profile-row-title { color: var(--rust); }
.profile-toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.profile-toggle-copy span {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.35;
}
.ios-switch {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 16%, transparent);
  position: relative;
  flex-shrink: 0;
  transition: background .16s;
}
.ios-switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.22);
  transition: transform .18s cubic-bezier(.3,1.4,.5,1);
}
.ios-switch.on {
  background: var(--forest);
}
.ios-switch.on span {
  transform: translateX(18px);
}
.palette-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.palette-option {
  appearance: none;
  border: 0.5px solid var(--hair);
  border-radius: 12px;
  padding: 12px;
  background: var(--paper-2);
  color: var(--ink-2);
  font: 500 12px/1.2 var(--sans);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}
.palette-option.on {
  color: var(--ink);
  border-color: var(--forest);
  box-shadow: 0 0 0 1px var(--forest) inset;
}
.swatch-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.swatch-strip i {
  height: 20px;
  border-radius: 4px;
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.10) inset;
}
.profile-segment-row {
  padding: 12px 14px;
}
.profile-segment-label {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
}
.profile-segment {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
}
.profile-segment button,
.profile-chip-grid button {
  appearance: none;
  border: 0.5px solid var(--hair);
  border-radius: 12px;
  min-height: 44px;
  padding: 8px 10px;
  background: var(--paper-2);
  color: var(--ink-2);
  font: 500 12.5px/1.1 var(--sans);
  cursor: pointer;
}
.profile-segment button.on,
.profile-chip-grid button.on {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper);
}
.profile-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 14px 14px;
}

.profile-local-overlay {
  position: absolute;
  inset: 0;
  z-index: 82;
  display: flex;
  align-items: flex-end;
  background: rgba(20, 16, 10, 0.32);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.profile-local-sheet {
  width: 100%;
  max-height: 88%;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  box-shadow: 0 -18px 44px rgba(0,0,0,0.22);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  animation: slideUp .32s cubic-bezier(.25, 1, .3, 1);
}
.profile-local-sheet::-webkit-scrollbar { display: none; }
.profile-local-sheet.full {
  height: 100%;
  max-height: 100%;
  border-radius: 0;
}
.profile-local-handle {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink-3) 42%, transparent);
  margin: 10px auto 0;
}
.profile-local-sheet.full .profile-local-handle { display: none; }
.profile-local-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--paper) 96%, transparent) 0%, color-mix(in srgb, var(--paper) 84%, transparent) 76%, transparent 100%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.profile-local-sheet.full .profile-local-head {
  padding-top: 62px;
  padding-bottom: 10px;
}
.profile-local-spacer {
  display: block;
  width: 40px;
  height: 40px;
}
.profile-local-content {
  padding: 14px 16px 34px;
}
.profile-local-sheet.full .profile-local-content {
  padding-bottom: 56px;
}
.profile-local-content.panels {
  padding: 0 0 56px;
}
.profile-local-content.panels .section-hd {
  margin-top: 14px;
}
.profile-local-content.panels .health-card,
.profile-local-content.panels .fam-card,
.profile-local-content.panels .activity-card,
.profile-local-content.panels .away-card,
.profile-local-content.panels .routine-card {
  margin-left: 16px;
  margin-right: 16px;
}
.profile-sheet-list {
  overflow: hidden;
  background: var(--paper-2);
  border: 0.5px solid var(--hair);
  border-radius: 16px;
}
.profile-sheet-row {
  min-height: 54px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font: inherit;
  text-align: left;
  background: transparent;
  border: 0;
}
.profile-sheet-row + .profile-sheet-row {
  border-top: 0.5px solid var(--hair);
}
.profile-sheet-list.selectable .profile-sheet-row {
  width: 100%;
  cursor: pointer;
  justify-content: space-between;
}
.profile-sheet-list.selectable .profile-sheet-row[data-on="1"] {
  color: var(--forest);
  background: color-mix(in srgb, var(--forest) 7%, transparent);
}
.profile-sheet-time {
  width: 42px;
  flex: 0 0 42px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.profile-sheet-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.profile-sheet-copy b {
  font: 500 14px/1.2 var(--sans);
  color: var(--ink);
}
.profile-sheet-copy span {
  font: 400 11.5px/1.35 var(--sans);
  color: var(--ink-3);
}
.profile-schedule-editor {
  margin-top: 14px;
  padding: 14px;
  border: 0.5px solid var(--hair);
  border-radius: 18px;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-schedule-editor .profile-kicker {
  margin-bottom: -2px;
}
.profile-sheet-note {
  margin: 12px 4px 0;
  font: 400 12.5px/1.45 var(--sans);
  color: var(--ink-3);
}
.about-mini h2 {
  margin: 0;
  font: 400 34px/1.05 var(--serif);
  color: var(--ink);
}
.about-mini .about-lead {
  margin: 8px 0 18px;
  font: 400 17px/1.35 var(--serif);
  color: var(--ink-2);
}
.about-section {
  margin-top: 18px;
}
.about-section p {
  margin: 0;
  padding: 14px;
  border: 0.5px solid var(--hair);
  border-radius: 14px;
  background: var(--paper-2);
  font: 400 15px/1.48 var(--serif);
  color: var(--ink-2);
}
.about-links,
.credits {
  margin-top: 8px;
  margin-bottom: 18px;
}
.credits .profile-sheet-row {
  justify-content: space-between;
}
.credits .profile-sheet-row span {
  color: var(--ink);
}
.credits .profile-sheet-row b {
  max-width: 58%;
  text-align: right;
  font: 500 11px/1.25 var(--mono);
  color: var(--ink-3);
}
