/* ===================================================
   DESIGN TOKENS
=================================================== */
:root {
  --green:        #143F2E;
  --green-light:  #1a5c42;
  --green-lighter:#256b4e;
  --green-fade:   rgba(20,63,46,0.08);
  --green-fade2:  rgba(20,63,46,0.05);
  --rose:         #ebdddd;
  --rose-dark:    #d9c9c9;
  --rose-darker:  #c8b4b4;
  --bg:           #f4eded;
  --surface:      #ffffff;
  --surface-rose: #fdf8f8;
  --text:         #1c1816;
  --text-2:       #6b5a5a;
  --text-3:       #9e8585;
  --border:       #e5d5d5;
  --shadow-sm:    0 1px 3px rgba(20,63,46,0.09), 0 1px 2px rgba(20,63,46,0.05);
  --shadow-md:    0 4px 12px rgba(20,63,46,0.10), 0 2px 4px rgba(20,63,46,0.06);
  --shadow-lg:    0 10px 24px rgba(20,63,46,0.12), 0 4px 8px rgba(20,63,46,0.07);
  --r-sm:  8px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-full: 9999px;
  --ease: cubic-bezier(.25,.46,.45,.94);
  --header-h: 62px;
  --nav-h:    62px;
}

/* ===================================================
   RESET & BASE
=================================================== */
*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html { font-size: 16px; }
body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100dvh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 16px; }

/* ===================================================
   LAYOUT
=================================================== */
.app {
  max-width: 480px; margin: 0 auto;
  min-height: 100dvh; position: relative; background: var(--bg);
}

/* Header */
.header {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: var(--header-h);
  background: var(--green); display: flex; align-items: center;
  justify-content: space-between; padding: 0 18px;
  z-index: 100; box-shadow: 0 2px 12px rgba(20,63,46,0.25);
}
.header-brand { display: flex; align-items: center; gap: 10px; }
.header-icon {
  height: 36px; max-height: 36px; width: auto; max-width: 120px;
  object-fit: contain; display: block;
}
.header-name { font-size: 17px; font-weight: 800; color: #fff; letter-spacing: -.3px; }
.header-sub  { font-size: 10px; font-weight: 600; color: rgba(235,221,221,0.75); margin-top: 1px; }
.header-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm); display: flex;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,0.10); color: rgba(255,255,255,0.85);
  font-size: 17px; transition: background 150ms;
}
.header-btn:active { background: rgba(255,255,255,0.22); }

/* Main */
.main {
  padding-top: var(--header-h);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 76px);
}

/* Views */
.view { display: none; animation: fadeUp 220ms var(--ease); }
.view.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Bottom Nav */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; display: flex;
  background: var(--surface); border-top: 1px solid var(--border);
  z-index: 100; box-shadow: 0 -4px 16px rgba(20,63,46,0.07);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.nav-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; color: var(--text-3);
  transition: color 150ms; padding: 8px;
  position: relative;
}
.nav-tab.active { color: var(--green); }
.nav-tab.active::after {
  content: ''; position: absolute; top: 0; left: 50%;
  transform: translateX(-50%); width: 28px; height: 3px;
  background: var(--green); border-radius: 0 0 4px 4px;
}
.nav-tab-icon { font-size: 20px; line-height: 1; }
.nav-tab-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }

/* FAB */
.fab {
  position: fixed;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 14px);
  left: 50%; transform: translateX(-50%);
  height: 52px; padding: 0 22px;
  background: var(--green); color: #fff; border-radius: var(--r-full);
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 4px 18px rgba(20,63,46,0.42); z-index: 99;
  transition: all 150ms var(--ease);
}
.fab:active { transform: translateX(-50%) scale(0.96); box-shadow: 0 2px 10px rgba(20,63,46,0.3); }
.fab-icon { font-size: 22px; font-weight: 400; }

/* ===================================================
   HERO CARD
=================================================== */
.hero {
  background: linear-gradient(145deg, var(--green) 0%, #1b5a40 60%, #245f44 100%);
  padding: 22px 18px 24px; position: relative; overflow: hidden;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%;
  background: rgba(235,221,221,0.07);
}
.hero::before { width: 180px; height: 180px; top: -60px; right: -40px; }
.hero::after  { width: 110px; height: 110px; bottom: -50px; right: 50px; }

.hero-eyebrow {
  font-size: 11px; font-weight: 700; color: rgba(235,221,221,0.75);
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 3px;
}
.hero-title {
  font-size: 22px; font-weight: 900; color: #fff; line-height: 1.2;
  margin-bottom: 16px; position: relative; z-index: 1;
}
.hero-title em { color: var(--rose); font-style: normal; }
.hero-age {
  font-size: 13px; font-weight: 600; color: rgba(235,221,221,0.7);
  margin-bottom: 6px; margin-top: -12px;
}

.stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; position: relative; z-index: 1; }
.stat-card {
  background: rgba(255,255,255,0.11); border-radius: var(--r-md);
  padding: 11px 10px; border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(6px);
}
.stat-val { font-size: 26px; font-weight: 900; color: #fff; line-height: 1; }
.stat-lbl { font-size: 9px; font-weight: 700; color: rgba(235,221,221,0.75); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

.last-fed {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.13); border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--r-full); padding: 6px 14px; margin-top: 14px;
  font-size: 13px; font-weight: 600; color: #fff;
  position: relative; z-index: 1;
}
.last-fed-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #6fffa0;
  animation: blink 2.2s ease infinite;
}
@keyframes blink {
  0%,100%{ opacity:1; transform:scale(1); }
  50%{ opacity:.5; transform:scale(1.4); }
}

/* Install banner */
.install-banner {
  display: none; margin: 12px 16px 0; padding: 13px 14px;
  background: linear-gradient(135deg,var(--green),#1b5a40);
  border-radius: var(--r-lg); align-items: center; gap: 11px;
}
.install-banner.visible { display: flex; }
.install-banner-info { flex:1; }
.install-banner-title { font-size: 13px; font-weight: 700; color: #fff; }
.install-banner-sub   { font-size: 11px; color: rgba(235,221,221,0.8); margin-top: 1px; }
.install-btn {
  background: #fff; color: var(--green); border-radius: var(--r-full);
  padding: 7px 15px; font-size: 12px; font-weight: 800; white-space: nowrap;
}
.install-close { color: rgba(255,255,255,0.5); font-size: 17px; padding: 4px; }

/* ===================================================
   SECTIONS
=================================================== */
.section { padding: 20px 16px 0; }
.section-hd {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.section-title { font-size: 16px; font-weight: 800; color: var(--text); }
.section-badge {
  font-size: 12px; font-weight: 700; color: var(--green);
  background: var(--green-fade); border-radius: var(--r-full); padding: 3px 10px;
}

/* ===================================================
   QUICK LOG
=================================================== */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ql-btn {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--r-lg); padding: 13px 12px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-sm); text-align: left; transition: all 150ms;
}
.ql-btn:active { transform: scale(0.97); border-color: var(--green); background: var(--green-fade); }
.ql-icon {
  width: 42px; height: 42px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; flex-shrink: 0;
}
.ql-label { font-size: 13px; font-weight: 800; color: var(--text); line-height: 1.2; }
.ql-sub   { font-size: 11px; font-weight: 500; color: var(--text-3); margin-top: 1px; }

/* ===================================================
   FEED ITEMS
=================================================== */
.feed-list { display: flex; flex-direction: column; gap: 8px; }

.feed-item {
  background: var(--surface); border-radius: var(--r-lg); padding: 13px 14px;
  display: flex; align-items: center; gap: 11px;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  animation: slideIn 240ms var(--ease);
}
@keyframes slideIn {
  from { opacity:0; transform:translateY(-6px); }
  to   { opacity:1; transform:translateY(0); }
}
.feed-item-icon {
  width: 46px; height: 46px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.feed-item-body { flex: 1; min-width: 0; }
.feed-item-type { font-size: 14px; font-weight: 800; color: var(--text); }
.feed-item-meta { font-size: 12px; font-weight: 600; color: var(--text-2); margin-top: 2px; }
.feed-item-note {
  font-size: 11px; font-style: italic; color: var(--text-3); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.feed-item-actions { display: flex; gap: 4px; flex-shrink: 0; }
.feed-action {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 150ms;
}
.feed-action.edit  { background: var(--green-fade); color: var(--green); }
.feed-action.del   { background: #fff0f0; color: #cc4444; }
.feed-action:active { transform: scale(0.9); }

/* Feeding type colors */
.t-bl  .feed-item-icon, .t-bl  .ql-icon, .t-bl  .type-icon-wrap { background: #fde8e8; }
.t-br  .feed-item-icon, .t-br  .ql-icon, .t-br  .type-icon-wrap { background: #fde8e8; }
.t-bb  .feed-item-icon, .t-bb  .type-icon-wrap                   { background: #fde8e8; }
.t-bt  .feed-item-icon, .t-bt  .ql-icon, .t-bt  .type-icon-wrap { background: #e5ecfd; }
.t-fm  .feed-item-icon, .t-fm  .ql-icon, .t-fm  .type-icon-wrap { background: #e5fde8; }
.t-sf  .feed-item-icon, .t-sf  .type-icon-wrap                   { background: #fdf4e5; }

/* Diaper type colors */
.d-wet   .feed-item-icon, .d-wet   .ql-icon, .d-wet   .type-icon-wrap { background: #deeafe; }
.d-dirty .feed-item-icon, .d-dirty .ql-icon, .d-dirty .type-icon-wrap { background: #fdeede; }
.d-mixed .feed-item-icon, .d-mixed .ql-icon, .d-mixed .type-icon-wrap { background: #eddefe; }
.d-dry   .feed-item-icon, .d-dry   .ql-icon, .d-dry   .type-icon-wrap { background: #f0efee; }

/* Sleep type colors */
.s-nap      .feed-item-icon, .s-nap      .ql-icon, .s-nap      .type-icon-wrap { background: #e8f0fd; }
.s-night    .feed-item-icon, .s-night    .ql-icon, .s-night    .type-icon-wrap { background: #ede8fd; }
.s-restless .feed-item-icon, .s-restless .ql-icon, .s-restless .type-icon-wrap { background: #fdf0e8; }
.s-awake    .feed-item-icon, .s-awake    .ql-icon, .s-awake    .type-icon-wrap { background: #fdfde8; }

/* ===================================================
   EMPTY STATE
=================================================== */
.empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 44px 24px; text-align: center;
}
.empty-icon  { font-size: 60px; opacity: .65; margin-bottom: 14px; }
.empty-title { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.empty-text  { font-size: 14px; color: var(--text-2); line-height: 1.55; max-width: 230px; }

/* ===================================================
   HISTORY VIEW
=================================================== */
.history-top {
  padding: 20px 16px 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.history-top h2 { font-size: 21px; font-weight: 900; }
.export-btn {
  font-size: 12px; font-weight: 700; color: var(--green);
  background: var(--green-fade); padding: 7px 14px;
  border-radius: var(--r-full); transition: background 150ms;
}
.export-btn:active { background: rgba(20,63,46,0.14); }

.day-group { margin-bottom: 6px; }
.day-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 8px;
}
.day-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .7px; color: var(--text-2);
}
.day-count {
  font-size: 11px; font-weight: 700; color: var(--green);
  background: var(--green-fade); padding: 3px 9px; border-radius: var(--r-full);
}
.day-items { padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }

/* ===================================================
   MODALS & BOTTOM SHEET
=================================================== */
.overlay {
  position: fixed; inset: 0; background: rgba(15,10,10,.50);
  z-index: 200; opacity: 0; visibility: hidden;
  transition: opacity 280ms var(--ease), visibility 280ms var(--ease);
  backdrop-filter: blur(3px);
}
.overlay.open { opacity: 1; visibility: visible; }

.sheet {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: 480px; max-height: 94dvh;
  background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0;
  z-index: 201; transition: transform 320ms var(--ease);
  overflow-y: auto; overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.overlay.open .sheet { transform: translateX(-50%) translateY(0); }

.sheet-handle {
  width: 34px; height: 4px; background: var(--border);
  border-radius: var(--r-full); margin: 10px auto 0;
}
.sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid var(--border);
}
.sheet-title { font-size: 18px; font-weight: 900; }
.sheet-close {
  width: 30px; height: 30px; border-radius: var(--r-full);
  background: var(--rose); display: flex; align-items: center;
  justify-content: center; color: var(--text-2); font-size: 16px;
  transition: background 150ms;
}
.sheet-close:active { background: var(--rose-dark); }
.sheet-body   { padding: 18px 18px 0; }
.sheet-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; margin-top: 18px;
}

/* ===================================================
   FORM COMPONENTS
=================================================== */
.fgroup { margin-bottom: 16px; }
.flabel {
  display: block; font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-2); margin-bottom: 7px;
}
.finput {
  width: 100%; padding: 12px 14px; border: 2px solid var(--border);
  border-radius: var(--r-md); font-size: 16px; font-weight: 500;
  color: var(--text); background: var(--surface); outline: none;
  transition: border-color 180ms; -webkit-appearance: none;
}
.finput:focus { border-color: var(--green); }
.finput::placeholder { color: var(--text-3); }

/* Suffix input */
.suffix-wrap {
  display: flex; border: 2px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; transition: border-color 180ms;
}
.suffix-wrap:focus-within { border-color: var(--green); }
.suffix-wrap input {
  flex: 1; padding: 12px 14px; border: none; font-size: 16px; font-weight: 500;
  color: var(--text); background: var(--surface); outline: none; min-width: 0;
}
.suffix-lbl {
  padding: 12px 14px; background: var(--rose); font-size: 13px; font-weight: 700;
  color: var(--text-2); display: flex; align-items: center; border-left: 2px solid var(--border);
}

/* Pill row */
.pill-row { display: flex; gap: 7px; flex-wrap: wrap; }
.pill-btn {
  padding: 7px 14px; border: 2px solid var(--border); border-radius: var(--r-full);
  font-size: 13px; font-weight: 700; color: var(--text-2); background: var(--surface);
  transition: all 160ms;
}
.pill-btn.on { border-color: var(--green); background: var(--green-fade); color: var(--green); }

/* Type selector grid */
.type-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.type-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px; border: 2px solid var(--border);
  border-radius: var(--r-lg); background: var(--surface); transition: all 160ms;
}
.type-card.on { border-color: var(--green); background: var(--green-fade); }
.type-icon-wrap {
  width: 44px; height: 44px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.type-name { font-size: 10px; font-weight: 800; color: var(--text-2); text-align: center; line-height: 1.3; }
.type-card.on .type-name { color: var(--green); }

/* Timer */
.timer-box {
  background: var(--green-fade2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.timer-display { font-size: 28px; font-weight: 900; color: var(--green); font-variant-numeric: tabular-nums; }
.timer-display.running { color: var(--green-lighter); }
.timer-label { font-size: 11px; font-weight: 700; color: var(--text-3); margin-top: 1px; }
.timer-btns { display: flex; gap: 7px; }
.timer-start {
  padding: 9px 18px; background: var(--green); color: #fff;
  border-radius: var(--r-full); font-size: 13px; font-weight: 700; transition: all 150ms;
}
.timer-start:active { opacity: .85; transform: scale(.97); }
.timer-stop {
  padding: 9px 18px; background: #e53e3e; color: #fff;
  border-radius: var(--r-full); font-size: 13px; font-weight: 700; transition: all 150ms;
}
.timer-stop:active { opacity: .85; transform: scale(.97); }
.timer-reset {
  padding: 9px 14px; background: var(--rose); color: var(--text-2);
  border-radius: var(--r-full); font-size: 13px; font-weight: 700; transition: all 150ms;
}
.timer-reset:active { background: var(--rose-dark); }

/* Unit toggle */
.unit-toggle { display: flex; background: var(--rose); border-radius: var(--r-md); padding: 3px; }
.unit-pill {
  flex: 1; padding: 7px; font-size: 13px; font-weight: 700; color: var(--text-2);
  border-radius: var(--r-sm); transition: all 160ms; text-align: center;
}
.unit-pill.on { background: var(--surface); color: var(--green); box-shadow: var(--shadow-sm); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 13px 20px; border-radius: var(--r-md);
  font-size: 15px; font-weight: 800; transition: all 150ms; outline: none;
}
.btn-primary { background: var(--green); color: #fff; flex: 1; }
.btn-primary:active { background: var(--green-light); transform: scale(.98); }
.btn-ghost { background: var(--rose); color: var(--text-2); }
.btn-ghost:active { background: var(--rose-dark); }

/* ===================================================
   SETUP SCREEN
=================================================== */
.setup-screen {
  position: fixed; inset: 0; background: var(--bg); z-index: 500;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 32px 24px; text-align: center;
}
.setup-screen.hidden { display: none; }
.setup-blob {
  width: 120px; height: 120px; margin: 0 auto 22px;
  display: flex; align-items: center; justify-content: center;
}
.setup-blob img { width: 100%; height: 100%; object-fit: contain; }
.setup-title { font-size: 30px; font-weight: 900; color: var(--green); margin-bottom: 8px; }
.setup-sub {
  font-size: 15px; color: var(--text-2); line-height: 1.55;
  max-width: 280px; margin: 0 auto 30px;
}
.setup-form { width: 100%; max-width: 320px; text-align: left; }
.setup-cta {
  width: 100%; margin-top: 8px; padding: 15px;
  background: var(--green); color: #fff;
  border-radius: var(--r-md); font-size: 16px; font-weight: 800;
  box-shadow: 0 4px 14px rgba(20,63,46,0.35); transition: all 150ms;
}
.setup-cta:active { background: var(--green-light); transform: scale(.98); }

/* ===================================================
   CONFIRM DIALOG
=================================================== */
.confirm-overlay {
  position: fixed; inset: 0; background: rgba(15,10,10,.55);
  z-index: 600; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 200ms, visibility 200ms;
  padding: 24px;
}
.confirm-overlay.open { opacity: 1; visibility: visible; }
.confirm-box {
  background: var(--surface); border-radius: var(--r-xl); padding: 28px 24px;
  width: 100%; max-width: 320px; text-align: center;
  transform: scale(.9); transition: transform 200ms var(--ease);
  box-shadow: var(--shadow-lg);
}
.confirm-overlay.open .confirm-box { transform: scale(1); }
.confirm-icon   { font-size: 44px; margin-bottom: 12px; }
.confirm-title  { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.confirm-text   { font-size: 14px; color: var(--text-2); line-height: 1.5; margin-bottom: 20px; }
.confirm-btns   { display: flex; gap: 10px; }
.confirm-cancel { flex:1; padding: 12px; background: var(--rose); color: var(--text-2); border-radius: var(--r-md); font-size: 15px; font-weight: 700; }
.confirm-ok     { flex:1; padding: 12px; background: #e53e3e; color: #fff; border-radius: var(--r-md); font-size: 15px; font-weight: 700; }

/* ===================================================
   SETTINGS
=================================================== */
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 0; border-bottom: 1px solid var(--border);
}
.settings-row:last-of-type { border-bottom: none; }
.settings-lbl { font-size: 15px; font-weight: 700; }
.settings-sub  { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.settings-val  { font-size: 13px; font-weight: 700; color: var(--green); }
.danger-btn {
  padding: 8px 14px; background: #fff0f0; color: #cc4444;
  border-radius: var(--r-sm); font-size: 13px; font-weight: 700;
}

/* ===================================================
   TOAST
=================================================== */
.toast {
  position: fixed; top: calc(var(--header-h) + 10px); left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--green); color: #fff;
  padding: 11px 20px; border-radius: var(--r-full);
  font-size: 14px; font-weight: 700; z-index: 800;
  opacity: 0; transition: all 240ms var(--ease);
  white-space: normal; text-align: center; line-height: 1.4;
  max-width: calc(min(480px, 100vw) - 32px);
  box-shadow: var(--shadow-lg); pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================================================
   DISCLAIMER
=================================================== */
.disclaimer {
  margin: 14px 16px 4px; padding: 12px 14px;
  background: var(--rose); border-radius: var(--r-md);
  font-size: 11px; color: var(--text-2); line-height: 1.5; text-align: center;
}

/* ===================================================
   DIAPER HISTORY HEADER
=================================================== */
.diaper-hist-hd {
  padding: 22px 16px 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.diaper-hist-hd h3 { font-size: 16px; font-weight: 800; }

/* ===================================================
   AUTH SCREEN
=================================================== */
.auth-screen {
  position: fixed; inset: 0; background: var(--bg); z-index: 600;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 32px 24px; text-align: center;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.auth-screen.hidden { display: none; }
@media (max-height: 620px) {
  .auth-screen { justify-content: flex-start; padding-top: 24px; }
}
.auth-tabs {
  display: flex; width: 100%; max-width: 320px;
  background: var(--rose); border-radius: var(--r-md); padding: 3px;
  margin-bottom: 22px;
}
.auth-tab-btn {
  flex: 1; padding: 9px; font-size: 14px; font-weight: 700; color: var(--text-2);
  border-radius: var(--r-sm); transition: all 160ms; text-align: center;
}
.auth-tab-btn.active { background: var(--surface); color: var(--green); box-shadow: var(--shadow-sm); }
.auth-skip {
  display: block; width: 100%; margin-top: 14px; padding: 11px;
  font-size: 13px; font-weight: 600; color: var(--text-3);
  text-decoration: underline; background: none; border: none; cursor: pointer;
}
.auth-error-box {
  background: #fff0f0; border: 1px solid #ffc9c9; border-radius: var(--r-sm);
  padding: 10px 14px; font-size: 13px; color: #cc4444; margin-bottom: 12px;
  display: none; text-align: left;
}
.sync-badge { font-size: 16px; opacity: 0.85; line-height: 1; }
.btn-sm-green {
  padding: 7px 14px; background: var(--green-fade); color: var(--green);
  border-radius: var(--r-sm); font-size: 13px; font-weight: 700; white-space: nowrap;
}
.btn-sm-danger {
  padding: 7px 14px; background: #fff0f0; color: #cc4444;
  border-radius: var(--r-sm); font-size: 13px; font-weight: 700;
}

/* Legal links — auth screen */
.auth-legal {
  text-align: center; font-size: 12px; color: var(--text-3);
  margin-top: 14px; line-height: 1.6; padding: 0 4px;
}
.auth-legal a { color: var(--green); font-weight: 600; text-decoration: none; }
.auth-legal a:hover { text-decoration: underline; }

/* Legal links — settings sheet */
.legal-links {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 12px; font-size: 12px;
}
.legal-links a { color: var(--green); font-weight: 600; text-decoration: none; }
.legal-links a:hover { text-decoration: underline; }
.legal-sep { color: var(--text-3); }

/* Scrollbar */
::-webkit-scrollbar { width: 0; }
