/* ═══════════════════════════════════════════════════════════
   THEME VARIABLES
   All colour decisions live here — components use var() only.
   ═══════════════════════════════════════════════════════════ */

/* ── Purple (default, light) ───────────────────────── */
:root {
  --bg:            #f6f4fb;
  --surface:       #ffffff;
  --text:          #1e1026;
  --muted:         #7c6890;
  --border:        #e2daf0;

  --accent:        #7c3aed;
  --accent-pale:   #f0ebff;
  --accent-mid:    #c4b5fd;
  --accent-text:   #4c1d95;

  --btn-grad:      linear-gradient(145deg, #9b59f5, #7c3aed);
  --btn-shadow:    0 6px 22px rgba(108,44,210,.42), 0 2px 6px rgba(108,44,210,.22), inset 0 1px 0 rgba(255,255,255,.18);
  --btn-icon:      white;

  --popup-bg:      #1e1026;
  --sh-sm:         0 2px 8px rgba(30,16,38,.07);
  --sh-md:         0 4px 18px rgba(30,16,38,.10), 0 1px 4px rgba(30,16,38,.06);

  /* Status badge colours */
  --safe-bg:       #e8f5eb; --safe-fg:       #2a6e35;
  --soon-bg:       #fdf0dc; --soon-fg:       #8a5010;
  --urgent-bg:     #fde8e4; --urgent-fg:     #921c10;
  --expired-bg:    #f0eae0; --expired-fg:    #6e5840;
  --feeding-bg:    #ece8fc; --feeding-fg:    #4e30a0;
  --consumed-bg:   #f0eae0; --consumed-fg:   #6e5840;
}

/* ── Pink (light) ──────────────────────────────────── */
[data-theme="pink"] {
  --bg:            #fdf2f8;
  --surface:       #ffffff;
  --text:          #1e0a14;
  --muted:         #8c5878;
  --border:        #f0d0e4;

  --accent:        #db2777;
  --accent-pale:   #fce7f3;
  --accent-mid:    #f9a8d4;
  --accent-text:   #831843;

  --btn-grad:      linear-gradient(145deg, #f472b6, #db2777);
  --btn-shadow:    0 6px 22px rgba(219,39,119,.42), 0 2px 6px rgba(219,39,119,.22), inset 0 1px 0 rgba(255,255,255,.18);
  --btn-icon:      white;

  --popup-bg:      #1e0a14;
  --sh-sm:         0 2px 8px rgba(30,10,20,.07);
  --sh-md:         0 4px 18px rgba(30,10,20,.10), 0 1px 4px rgba(30,10,20,.06);
}

/* ── Mono / Black & White (light) ──────────────────── */
[data-theme="mono"] {
  --bg:            #f5f5f5;
  --surface:       #ffffff;
  --text:          #111111;
  --muted:         #666666;
  --border:        #e0e0e0;

  --accent:        #222222;
  --accent-pale:   #f0f0f0;
  --accent-mid:    #cccccc;
  --accent-text:   #111111;

  --btn-grad:      linear-gradient(145deg, #444444, #111111);
  --btn-shadow:    0 6px 22px rgba(0,0,0,.32), 0 2px 6px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.12);
  --btn-icon:      white;

  --popup-bg:      #111111;
  --sh-sm:         0 2px 8px rgba(0,0,0,.08);
  --sh-md:         0 4px 18px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.07);
}

/* ── Colorful / Rainbow (light) ────────────────────── */
[data-theme="colorful"] {
  --bg:            #f0fdfb;
  --surface:       #ffffff;
  --text:          #0c1e1a;
  --muted:         #4a7a72;
  --border:        #b0e4de;

  --accent:        #0d9488;
  --accent-pale:   #ccfdf8;
  --accent-mid:    #99f0e8;
  --accent-text:   #115e56;

  --btn-grad:      linear-gradient(135deg, #f97316 0%, #ec4899 34%, #8b5cf6 67%, #06b6d4 100%);
  --btn-shadow:    0 6px 22px rgba(120,60,180,.30), 0 2px 6px rgba(120,60,180,.16), inset 0 1px 0 rgba(255,255,255,.25);
  --btn-icon:      white;

  --popup-bg:      #0c1e1a;
  --sh-sm:         0 2px 8px rgba(12,30,26,.07);
  --sh-md:         0 4px 18px rgba(12,30,26,.10), 0 1px 4px rgba(12,30,26,.06);
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE  (.is-dark is toggled by JS based on system pref
   or user override — applied before first paint via <script>)
   ═══════════════════════════════════════════════════════════ */

/* ── Purple dark ───────────────────────────────────── */
.is-dark {
  --bg:            #100820;
  --surface:       #1c1232;
  --text:          #e8e0f8;
  --muted:         #9880b0;
  --border:        #302048;

  --accent:        #a78bfa;
  --accent-pale:   #2e1a5c;
  --accent-mid:    #4e3090;
  --accent-text:   #ddd6fe;

  --btn-grad:      linear-gradient(145deg, #9b59f5, #7c3aed);
  --btn-shadow:    0 6px 22px rgba(108,44,210,.45), 0 2px 6px rgba(108,44,210,.25);
  --btn-icon:      white;

  --popup-bg:      #08041a;
  --sh-sm:         0 2px 8px rgba(0,0,0,.35);
  --sh-md:         0 4px 18px rgba(0,0,0,.48), 0 1px 4px rgba(0,0,0,.25);

  --safe-bg:       #0a2212; --safe-fg:       #4ade80;
  --soon-bg:       #2a1804; --soon-fg:       #fbbf24;
  --urgent-bg:     #2a0806; --urgent-fg:     #f87171;
  --expired-bg:    #1a1510; --expired-fg:    #9ca3af;
  --feeding-bg:    #1a0f40; --feeding-fg:    #a78bfa;
  --consumed-bg:   #1a1510; --consumed-fg:   #9ca3af;
}

/* ── Pink dark ─────────────────────────────────────── */
[data-theme="pink"].is-dark {
  --bg:            #1a0812;
  --surface:       #2d1020;
  --text:          #f8e0ec;
  --muted:         #c080a0;
  --border:        #4a1828;

  --accent:        #f472b6;
  --accent-pale:   #4a0e28;
  --accent-mid:    #880838;
  --accent-text:   #fbcfe8;

  --btn-grad:      linear-gradient(145deg, #f472b6, #be185d);
  --btn-shadow:    0 6px 22px rgba(219,39,119,.45), 0 2px 6px rgba(219,39,119,.25);
  --popup-bg:      #0e0408;
}

/* ── Mono dark ─────────────────────────────────────── */
[data-theme="mono"].is-dark {
  --bg:            #0a0a0a;
  --surface:       #1a1a1a;
  --text:          #f0f0f0;
  --muted:         #999999;
  --border:        #2e2e2e;

  --accent:        #e0e0e0;
  --accent-pale:   #2a2a2a;
  --accent-mid:    #404040;
  --accent-text:   #f0f0f0;

  --btn-grad:      linear-gradient(145deg, #e0e0e0, #a0a0a0);
  --btn-shadow:    0 6px 22px rgba(200,200,200,.20), 0 2px 6px rgba(200,200,200,.12);
  --btn-icon:      #111111;
  --popup-bg:      #050505;
}

/* ── Colorful dark ─────────────────────────────────── */
[data-theme="colorful"].is-dark {
  --bg:            #04110e;
  --surface:       #0a1e1a;
  --text:          #d0f8f4;
  --muted:         #3a8070;
  --border:        #0e3028;

  --accent:        #2dd4bf;
  --accent-pale:   #082018;
  --accent-mid:    #0e4035;
  --accent-text:   #99f0e8;

  --btn-grad:      linear-gradient(135deg, #f97316 0%, #ec4899 34%, #8b5cf6 67%, #06b6d4 100%);
  --btn-shadow:    0 6px 22px rgba(120,60,180,.30), 0 2px 6px rgba(120,60,180,.16);
  --popup-bg:      #020c08;
}

/* ═══════════════════════════════════════════════════════════
   BASE RESET & GLOBAL
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  min-height: 100vh;
  transition: background-color 200ms ease, color 200ms ease;
}

button  { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
svg     { display: block; }

/* ═══════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════ */

.page {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 44px 18px calc(130px + env(safe-area-inset-bottom));
}

/* ── Header ─────────────────────────────────────────── */

.page-header { margin-bottom: 32px; }

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.sarah-age {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin: 0 0 4px;
}

.sarah-countdown {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  margin: 0 0 22px;
}

h1 {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
}

.today-date {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

/* Appearance button */
.settings-btn {
  flex-shrink: 0;
  margin-top: 2px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh-sm);
  transition: background-color 200ms, border-color 200ms;
}

.settings-btn svg { width: 19px; height: 19px; }
.settings-btn:active { opacity: 0.65; }

/* ── Section labels ─────────────────────────────────── */

.section-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.text-button {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  padding: 4px 0;
  touch-action: manipulation;
}

/* ── Daily intake ───────────────────────────────────── */

.daily-section { margin-bottom: 32px; }

.daily-row {
  display: flex;
  align-items: center;
  margin-top: 14px;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--sh-md);
  overflow: hidden;
  transition: background-color 200ms, box-shadow 200ms;
}

.daily-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 12px 20px;
  gap: 10px;
}

.daily-divider {
  width: 1px;
  height: 72px;
  background: var(--border);
  flex-shrink: 0;
}

.daily-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent-pale);
  border: 1.5px solid var(--accent-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: background-color 200ms, border-color 200ms;
}

.daily-icon svg { width: 26px; height: 26px; }

.daily-ml {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.daily-label {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ── Batch list ─────────────────────────────────────── */

.batch-list { display: grid; gap: 12px; }

.empty-state {
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--sh-sm);
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  transition: background-color 200ms;
}

/* ── Batch card ─────────────────────────────────────── */

.batch-card {
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--sh-md);
  padding: 18px 18px 16px;
  transition: background-color 200ms, box-shadow 200ms;
}

.batch-card.is-consumed,
.batch-card.is-discarded { opacity: 0.48; }

.batch-card-top { margin-bottom: 12px; }

/* Status badge */
.status-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
}

.status-badge.safe      { background: var(--safe-bg);     color: var(--safe-fg);     }
.status-badge.use-soon  { background: var(--soon-bg);     color: var(--soon-fg);     }
.status-badge.urgent    { background: var(--urgent-bg);   color: var(--urgent-fg);   }
.status-badge.expired   { background: var(--expired-bg);  color: var(--expired-fg);  }
.status-badge.consumed  { background: var(--consumed-bg); color: var(--consumed-fg); }
.status-badge.discarded { background: var(--consumed-bg); color: var(--consumed-fg); }
.status-badge.feeding   { background: var(--feeding-bg);  color: var(--feeding-fg);  }
.status-badge.leftover  { background: var(--soon-bg);     color: var(--soon-fg);     }

/* Card body */
.batch-amount   { font-size: 38px; font-weight: 800; line-height: 1; }
.batch-type     { font-size: 13px; color: var(--muted); margin-top: 5px; }
.batch-location { font-size: 15px; font-weight: 600; margin-top: 5px; }
.batch-meta     { font-size: 12px; color: var(--muted); margin-top: 13px; }

/* Expiry bar */
.batch-expiry { margin-top: 16px; }

.batch-expiry-text {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 7px;
}

.batch-expiry-text.use-soon { color: var(--soon-fg);   font-weight: 600; }
.batch-expiry-text.urgent   { color: var(--urgent-fg); font-weight: 600; }
.batch-expiry-text.expired  { color: var(--expired-fg); }

.expiry-bar {
  height: 5px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.expiry-bar-fill { height: 100%; border-radius: inherit; }

/* Light mode bars */
.expiry-bar-fill.safe      { background: linear-gradient(90deg,#52c46a,#4aab5e); }
.expiry-bar-fill.use-soon  { background: linear-gradient(90deg,#f0a030,#e08820); }
.expiry-bar-fill.urgent    { background: linear-gradient(90deg,#e84030,#d02818); }
.expiry-bar-fill.expired   { background: var(--border); }
.expiry-bar-fill.feeding   { background: linear-gradient(90deg,#8868d8,#6848c0); }
.expiry-bar-fill.leftover  { background: linear-gradient(90deg,#f0a030,#e08820); }

/* Dark mode bars */
.is-dark .expiry-bar-fill.safe     { background: linear-gradient(90deg,#22c55e,#16a34a); }
.is-dark .expiry-bar-fill.use-soon { background: linear-gradient(90deg,#f59e0b,#d97706); }
.is-dark .expiry-bar-fill.urgent   { background: linear-gradient(90deg,#ef4444,#dc2626); }
.is-dark .expiry-bar-fill.expired  { background: var(--border); }
.is-dark .expiry-bar-fill.feeding  { background: linear-gradient(90deg,#a78bfa,#8b5cf6); }
.is-dark .expiry-bar-fill.leftover { background: linear-gradient(90deg,#f59e0b,#d97706); }

/* History separator */
.history-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 4px 2px;
}

/* Action buttons */
.batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  touch-action: manipulation;
  transition: background-color 200ms;
}

.action-btn svg  { width: 14px; height: 14px; flex-shrink: 0; }
.action-btn:active { opacity: 0.65; }

.action-btn.primary {
  background: var(--accent-pale);
  border-color: var(--accent-mid);
  color: var(--accent-text);
}

.action-btn.destructive {
  color: var(--urgent-fg);
  border-color: var(--urgent-bg);
  background: var(--urgent-bg);
}

/* ═══════════════════════════════════════════════════════════
   FLOATING BUTTON
   ═══════════════════════════════════════════════════════════ */

.milk-button {
  position: fixed;
  right: 20px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  width: 62px;
  height: 62px;
  border: none;
  border-radius: 50%;
  background: var(--btn-grad);
  box-shadow: var(--btn-shadow);
  color: var(--btn-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.milk-button svg { width: 30px; height: 30px; }
.milk-button.is-active { transform: scale(0.90); }

/* ═══════════════════════════════════════════════════════════
   AMOUNT POPUP
   ═══════════════════════════════════════════════════════════ */

.amount-popup {
  position: fixed;
  right: 14px;
  bottom: calc(98px + env(safe-area-inset-bottom));
  width: 150px;
  padding: 18px 16px 14px;
  border-radius: 22px;
  background: var(--popup-bg);
  color: white;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.88);
  transition: opacity 130ms ease, transform 130ms ease, visibility 130ms ease;
  pointer-events: none;
  z-index: 90;
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
}

.amount-popup.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.amount-number { font-size: 34px; font-weight: 800; letter-spacing: -0.01em; }
.amount-hint   { margin-top: 8px; color: rgba(255,255,255,.55); font-size: 11px; }

.amount-scale {
  height: 5px;
  margin-top: 14px;
  background: rgba(255,255,255,.14);
  border-radius: 999px;
  overflow: hidden;
}

.amount-scale-fill {
  height: 100%;
  background: rgba(255,255,255,.75);
  border-radius: inherit;
  width: 0;
}

/* ═══════════════════════════════════════════════════════════
   BOTTOM SHEETS (shared)
   ═══════════════════════════════════════════════════════════ */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,.46);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.sheet-backdrop.is-visible { opacity: 1; visibility: visible; }

.bottom-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 110;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  transform: translateY(100%);
  transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1), background-color 200ms;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 -4px 30px rgba(0,0,0,.14);
}

.bottom-sheet.is-open { transform: translateY(0); }

.sheet-handle {
  width: 38px;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  margin: 12px auto 0;
}

.sheet-header {
  padding: 18px 20px 15px;
  border-bottom: 1px solid var(--border);
}

.sheet-title { font-size: 18px; font-weight: 800; margin-bottom: 3px; }
.sheet-sub   { font-size: 14px; color: var(--muted); }

.sheet-options { padding: 8px 14px 4px; }

.sheet-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 10px;
  border: none;
  border-radius: 16px;
  background: none;
  text-align: left;
  touch-action: manipulation;
}

.sheet-option:active { background: var(--accent-pale); }

/* Circular icon container — matches the gold-outline icon style in the brief */
.option-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-pale);
  border: 1.5px solid var(--accent-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.option-icon svg { width: 22px; height: 22px; }

.option-text { flex: 1; min-width: 0; }

.option-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.option-hint {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.sheet-cancel {
  display: block;
  width: calc(100% - 28px);
  margin: 6px 14px 0;
  padding: 16px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  touch-action: manipulation;
  transition: background-color 200ms;
}

.sheet-cancel:active { opacity: 0.65; }

/* ═══════════════════════════════════════════════════════════
   APPEARANCE / SETTINGS SHEET
   ═══════════════════════════════════════════════════════════ */

.settings-body {
  padding: 20px 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-group-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

/* Mode pills — Auto / Light / Dark */
.mode-pills {
  display: flex;
  gap: 8px;
}

.mode-pill {
  flex: 1;
  padding: 11px 6px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  touch-action: manipulation;
  transition: background-color 150ms, border-color 150ms, color 150ms;
}

.mode-pill.is-active {
  background: var(--accent-pale);
  border-color: var(--accent-mid);
  color: var(--accent-text);
}

.mode-pill:active { opacity: 0.7; }

/* Theme swatches */
.theme-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.swatch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  padding: 4px 0;
  touch-action: manipulation;
}

.swatch-circle {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  transition: transform 150ms, box-shadow 150ms;
}

.swatch-btn.is-active .swatch-circle {
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5.5px var(--accent);
}

.swatch-btn:active .swatch-circle { transform: scale(0.92); }

/* Fixed swatch colours — independent of current theme */
.swatch-purple   { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.swatch-pink     { background: linear-gradient(135deg, #f472b6, #db2777); }
.swatch-mono     { background: conic-gradient(#222 0deg 180deg, #e0e0e0 180deg 360deg); }
.swatch-colorful { background: conic-gradient(#f97316, #ec4899, #8b5cf6, #06b6d4, #f97316); }

.swatch-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════ */

.save-message {
  position: fixed;
  left: 50%;
  bottom: calc(32px + env(safe-area-inset-bottom));
  z-index: 200;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--popup-bg);
  color: white;
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 18px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(0,0,0,.24);
}

.save-message.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
