/* Nursing Department Days - soft pink, native-iOS feel. Light theme only. */
:root {
  --pink-50: #fff5f8;
  --pink-100: #ffe8f0;
  --pink-200: #ffd0e1;
  --pink-300: #ffadc9;
  --pink-400: #ff85ae;
  --pink-500: #ec5c93;
  --pink-600: #d6336c;
  --pink-700: #a61e4d;
  --ink: #2b1620;
  --muted: #6f4f5e;
  --line: rgba(214, 51, 108, 0.14);
  --water: #3b9ae1;
  --water-soft: #d8ecfb;
  --ok: #1f8a5b;
  --warn: #b97300;
  --hot: #cf5a0a;
  --bad: #c0262d;
  --extreme: #7a1230;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px rgba(214, 51, 108, 0.12), 0 2px 6px rgba(214, 51, 108, 0.06);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--font); font-size: 16px; line-height: 1.45; color: var(--ink);
  background: var(--pink-50);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(92px + var(--safe-b));
}
body.noscroll { overflow: hidden; }
.bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(60vmax 60vmax at 90% -10%, #ffd0e1 0%, transparent 60%),
    radial-gradient(50vmax 50vmax at -10% 30%, #ffe3ee 0%, transparent 60%),
    radial-gradient(45vmax 45vmax at 80% 100%, #ffd9e8 0%, transparent 60%),
    linear-gradient(180deg, #fff5f8, #ffffff);
}
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--pink-700); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--pink-700); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Layout */
.app { max-width: 980px; margin: 0 auto; padding: calc(var(--safe-t) + 12px) calc(var(--safe-r) + 16px) 24px calc(var(--safe-l) + 16px); }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 12px 0 18px; }
.topbar-text { min-width: 0; }
.sub { font-size: 14px; font-weight: 600; color: var(--muted); }
.sub:empty { display: none; }
h1 { font-size: clamp(28px, 7.5vw, 40px); line-height: 1.1; font-weight: 800; letter-spacing: -0.025em; overflow-wrap: anywhere; }
h1:focus { outline: none; }
.actions { display: flex; gap: 8px; flex-shrink: 0; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; text-decoration: none; color: var(--pink-700); }
.icon-btn {
  width: 44px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.8); background: rgba(255,255,255,.75);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  color: var(--pink-700); font-size: 17px; cursor: pointer; text-decoration: none; box-shadow: 0 4px 14px rgba(214,51,108,.12);
}
.icon-btn.plain { background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.icon-btn.danger { color: var(--bad); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .span-2 { grid-column: 1 / -1; }
  .app { padding-left: calc(var(--safe-l) + 24px); padding-right: calc(var(--safe-r) + 24px); }
}
.view > .card { margin: 0; }
.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* Cards */
.card {
  position: relative; padding: 20px; border-radius: var(--radius); min-width: 0;
  background: rgba(255,255,255,.74);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid rgba(255,255,255,.85); box-shadow: var(--shadow);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .card { background: rgba(255,255,255,.94); } }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 750; letter-spacing: -0.01em; margin-bottom: 12px; }
.card-title i { color: var(--pink-600); width: 22px; text-align: center; }
.card-title .push { margin-left: auto; }
.big { font-size: clamp(34px, 9vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.big small { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.link-reset { color: inherit; text-decoration: none; display: block; }
.chev { color: var(--pink-400); }

/* Buttons and fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: var(--radius-sm); border: 0; font-weight: 650; font-size: 16px; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background-color .2s ease;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--pink-600); color: #fff; box-shadow: 0 6px 16px rgba(214,51,108,.28); }
.btn.secondary { background: var(--pink-100); color: var(--pink-700); }
.btn.water { background: var(--water-soft); color: #14578d; }
.btn.ghost { background: transparent; color: var(--pink-700); }
.btn.danger { background: #fde8e9; color: #8f1d22; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row .btn { flex: 1 1 auto; }

label.field { display: grid; gap: 6px; font-size: 14px; font-weight: 650; color: var(--muted); }
input[type=text], input[type=number], input[type=time], select {
  width: 100%; min-height: 44px; padding: 10px 12px; font-size: 16px; color: var(--ink);
  background: #fff; border: 1.5px solid var(--pink-200); border-radius: 12px; appearance: none; -webkit-appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--pink-600) 50%), linear-gradient(135deg, var(--pink-600) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--bad); background-color: #fff6f6; }
.field-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.form-error { color: #8f1d22; background: #fde8e9; border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; }

/* Switch */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .t { font-weight: 650; }
.switch-row .d { font-size: 14px; color: var(--muted); }
.switch { position: relative; width: 52px; height: 32px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.switch span { position: absolute; inset: 0; background: #e5cdd7; border-radius: 99px; transition: background-color .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + span { background: var(--pink-600); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--pink-700); outline-offset: 2px; }

/* Progress */
.bar { height: 10px; border-radius: 99px; background: var(--pink-100); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--pink-400), var(--pink-600)); transition: width .45s ease; }
.bar.water { background: var(--water-soft); }
.bar.water > span { background: linear-gradient(90deg, #7cc2f2, var(--water)); }
.bar.indeterminate > span { width: 40% !important; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.meter { display: grid; gap: 6px; }
.meter .top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 650; }
.meter .top .v { color: var(--muted); font-weight: 600; }

/* Hydration glasses */
.glasses { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin: 16px 0; }
.glass { position: relative; display: block; text-align: center; font-size: clamp(22px, 6.4vw, 34px); line-height: 1; height: 1em; }
.glass i { position: absolute; left: 0; right: 0; top: 0; }
.glass .base { color: var(--water-soft); }
.glass .fill { color: var(--water); }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper .val { min-width: 74px; text-align: center; font-weight: 700; }

/* Countdown */
.cd { display: flex; gap: 8px; margin: 12px 0 4px; }
.cd-box { flex: 1; min-width: 0; text-align: center; padding: 10px 2px; border-radius: 16px; background: var(--pink-100); }
.cd-box b { display: block; font-size: clamp(24px, 7vw, 32px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--pink-700); }
.cd-box span { font-size: 12px; font-weight: 650; color: var(--muted); }

/* Weather */
.wx-head { display: flex; align-items: center; gap: 16px; }
.wx-icon { font-size: 44px; color: var(--pink-500); width: 60px; text-align: center; flex-shrink: 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: #fff; border: 1.5px solid var(--line); font-size: 14px; font-weight: 700; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.lvl-1 .dot, .dot.lvl-1 { background: var(--warn); }
.lvl-2 .dot, .dot.lvl-2 { background: var(--hot); }
.lvl-3 .dot, .dot.lvl-3 { background: var(--bad); }
.lvl-4 .dot, .dot.lvl-4 { background: var(--extreme); }
.tip { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--pink-50); border: 1px solid var(--line); font-size: 15px; }
.tip i { color: var(--pink-600); margin-top: 3px; }
.scale { display: flex; gap: 3px; margin: 12px 0 4px; }
.scale span { flex: 1; height: 8px; border-radius: 4px; background: var(--pink-100); }
.scale span.on { background: var(--pink-600); }
.rain-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; align-items: end; height: 96px; margin-top: 12px; }
.rain-bars div { display: grid; grid-template-rows: 1fr auto auto; height: 100%; text-align: center; font-size: 12px; font-weight: 650; gap: 2px; }
.rain-bars .col { align-self: end; width: 100%; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #7cc2f2, var(--water)); min-height: 4px; }
.rain-bars .col-wrap { display: flex; align-items: flex-end; }
.rain-bars time { color: var(--muted); font-weight: 600; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #fff3d6; color: #5c3d00; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.banner.info { background: var(--pink-100); color: var(--pink-700); }
.banner i { margin-top: 3px; }

/* Schedule */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; border-radius: 16px; background: var(--pink-100); margin-bottom: 14px; }
.tab { min-height: 52px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; display: grid; align-content: center; justify-items: center; font-weight: 700; line-height: 1.2; color: var(--muted); }
.tab small { font-size: 12px; font-weight: 600; }
.tab[aria-selected=true] { background: #fff; color: var(--pink-700); box-shadow: 0 2px 8px rgba(214,51,108,.18); }
.events { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.event { display: flex; align-items: center; gap: 6px; padding: 10px 6px 10px 4px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.event.past { opacity: .62; }
.event.past .event-title { text-decoration: line-through; text-decoration-color: rgba(43,22,32,.35); }
.event.now { border-color: var(--pink-500); box-shadow: 0 0 0 2px var(--pink-200); }
.event-body { flex: 1; min-width: 0; }
.event-time { font-size: 14px; font-weight: 700; color: var(--pink-700); font-variant-numeric: tabular-nums; }
.event-title { font-weight: 700; overflow-wrap: anywhere; }
.event-loc { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.check { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%; font-size: 26px; color: var(--pink-300); cursor: pointer; flex-shrink: 0; }
.check[aria-pressed=true] { color: var(--pink-600); }
.empty { text-align: center; padding: 28px 10px; color: var(--muted); }
.empty i { font-size: 32px; color: var(--pink-300); display: block; margin-bottom: 10px; }

/* Checklist */
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.item { display: flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding-right: 6px; }
.item.packed .item-label { color: var(--muted); text-decoration: line-through; }
.item-btn { flex: 1; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 6px 12px; border: 0; background: transparent; text-align: left; cursor: pointer; border-radius: 16px; }
.item-btn i { font-size: 24px; color: var(--pink-300); }
.item[data-packed=true] .item-btn i { color: var(--pink-600); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--pink-100); color: var(--pink-700); margin-left: 6px; vertical-align: middle; }
.badge.hint { background: #fff3d6; color: #5c3d00; }
.add-row { display: flex; gap: 8px; margin-top: 12px; }
.add-row input { flex: 1; min-width: 0; }

/* Care (meals, breaks, sun) */
.care-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.care-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); cursor: pointer; text-align: left; }
.care-item .ic { font-size: 24px; color: var(--pink-300); }
.care-item[aria-pressed=true] .ic { color: var(--pink-600); }
.care-item .t { font-weight: 700; display: block; }
.care-item .d { font-size: 14px; color: var(--muted); display: block; }
.status-late { color: #8f1d22 !important; font-weight: 650; }

/* Summary */
.summary-grid { display: grid; gap: 14px; }
.ring { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: conic-gradient(var(--pink-600) calc(var(--p) * 1%), var(--pink-100) 0); }
.ring b { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #fff; font-size: 18px; font-weight: 800; }

/* Install guide */
.steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.step-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--pink-100); color: var(--pink-700); font-size: 20px; flex-shrink: 0; }
.plain { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; }

/* Scan */
.scan-hero { text-align: center; padding: 8px 0 4px; }
.scan-hero > i { font-size: 44px; color: var(--pink-500); }
.thumb { width: 96px; height: 96px; border-radius: 16px; object-fit: cover; border: 1px solid var(--line); background: #fff; flex-shrink: 0; }
.review-row { display: grid; gap: 10px; padding: 14px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.review-row + .review-row { margin-top: 10px; }
.review-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.review-grid .wide { grid-column: 1 / -1; }
@media (min-width: 640px) { .review-grid { grid-template-columns: 1fr 1fr 1.4fr; } .review-grid .wide { grid-column: auto; } .review-grid .wide.full { grid-column: 1 / -1; } }
.input-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
label.btn:focus-within { outline: 3px solid var(--pink-700); outline-offset: 2px; }
.sticky-actions { position: sticky; bottom: calc(80px + var(--safe-b)); z-index: 5; display: flex; gap: 10px; margin-top: 16px; padding: 10px; border-radius: 20px; background: rgba(255,255,255,.85); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: var(--shadow); }
.sticky-actions .btn { flex: 1; }

/* Tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; gap: 2px;
  padding: 6px calc(var(--safe-r) + 6px) calc(6px + var(--safe-b)) calc(var(--safe-l) + 6px);
  background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--line);
}
.tabbar a { flex: 1; min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 14px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 650; }
.tabbar a i { font-size: 20px; }
.tabbar a[aria-current=page] { color: var(--pink-700); background: var(--pink-100); }
@media (min-width: 900px) {
  body { padding-bottom: 40px; }
  .tabbar { top: calc(var(--safe-t) + 14px); bottom: auto; left: 50%; right: auto; transform: translateX(-50%); width: auto; padding: 6px; gap: 4px; border: 1px solid rgba(255,255,255,.85); border-radius: 99px; box-shadow: var(--shadow); }
  .tabbar a { flex-direction: row; gap: 8px; padding: 0 18px; min-height: 44px; font-size: 15px; border-radius: 99px; }
  .tabbar a i { font-size: 16px; }
  .app { padding-top: calc(var(--safe-t) + 78px); }
  .sticky-actions { bottom: 16px; }
}

/* Sheet and toasts */
.sheet-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; background: rgba(43,22,32,.42); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet { width: min(520px, 100%); max-height: 92vh; max-height: 92dvh; overflow: auto; padding: 20px 20px calc(20px + var(--safe-b)); background: #fff; border-radius: 26px 26px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.18); animation: rise .25s ease; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h2 { font-size: 22px; font-weight: 800; }
@media (min-width: 640px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 26px; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
#toasts { position: fixed; z-index: 120; left: 0; right: 0; top: calc(var(--safe-t) + 10px); display: grid; gap: 8px; justify-items: center; padding: 0 12px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; width: min(94vw, 440px); padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 12px 34px rgba(43,22,32,.2); border: 1px solid var(--line); animation: drop .3s ease; }
.toast > i { color: var(--pink-600); font-size: 20px; margin-top: 2px; }
.toast b { display: block; }
.toast span { font-size: 14px; color: var(--muted); }
@keyframes drop { from { transform: translateY(-16px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 359px) {
  .app { padding-left: calc(var(--safe-l) + 12px); padding-right: calc(var(--safe-r) + 12px); }
  .card { padding: 16px; }
  .tabbar a { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .bar.indeterminate > span { margin-left: 0; width: 100% !important; opacity: .5; }
}

/* ===== Motion and smoothness ===== */
@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }
:root { --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.3, 1.6, .5, 1); }
html { overscroll-behavior-y: none; }
button, a, label.btn, select, input[type=checkbox] { touch-action: manipulation; }
.card { transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.card:has(.link-reset:active) { transform: scale(.985); }

/* Press feedback on every tappable control (no hover-only behavior) */
.btn, .icon-btn, .tab, .care-item, .item-btn, .check, .tabbar a { transition: transform .18s var(--ease), background-color .25s ease, color .25s ease, box-shadow .25s ease, opacity .25s ease; }
.icon-btn:active, .tab:active, .care-item:active, .item-btn:active, .check:active, .tabbar a:active { transform: scale(.94); }
.btn:active { transform: scale(.96); }
@media (hover: hover) {
  .btn.primary:hover { box-shadow: 0 8px 20px rgba(214,51,108,.36); }
  .btn.secondary:hover, .btn.water:hover, .btn.ghost:hover { background-color: var(--pink-200); }
  .btn.water:hover { background-color: #c4e2f8; }
  .icon-btn:hover { background: #fff; }
  .care-item:hover, .item:hover, .event:hover { box-shadow: 0 4px 14px rgba(214,51,108,.12); }
}
.item, .event, .care-item { transition: box-shadow .25s ease, opacity .4s ease, border-color .3s ease, transform .18s var(--ease); }

/* Screen change: one soft entrance per view, cards cascade slightly */
.view.enter .card { animation: enter .45s var(--ease) both; }
.view.enter .grid > :nth-child(2) { animation-delay: .04s; }
.view.enter .grid > :nth-child(3) { animation-delay: .08s; }
.view.enter .grid > :nth-child(4) { animation-delay: .12s; }
.view.enter .grid > :nth-child(n+5) { animation-delay: .16s; }
@keyframes enter { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* Sliding tab highlight */
.tabbar .pill { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 14px; background: var(--pink-100); pointer-events: none; opacity: 0; }
.tabbar.ready .pill { transition: transform .4s var(--ease), width .4s var(--ease), height .4s var(--ease), opacity .2s ease; }
.tabbar a { position: relative; z-index: 1; }
.tabbar a[aria-current=page] { background: transparent; }
@media (min-width: 900px) { .tabbar .pill { border-radius: 99px; } }

/* Fills, rings, glasses */
.bar > span { transition: width .7s var(--ease); }
.glass .fill { transition: clip-path .7s var(--ease); }
.ring { transition: --p .8s var(--ease); }
.rain-bars .col { transition: height .6s var(--ease); transform-origin: bottom; animation: grow .7s var(--ease) both; }
@keyframes grow { from { transform: scaleY(0); } to { transform: none; } }
.scale span { transition: background-color .4s ease; }

/* Toggle pop (check marks) */
.pop i { animation: pop .42s var(--spring); }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.switch span, .switch span::after { transition: transform .3s var(--spring), background-color .25s ease; }

/* Toasts and sheets in and out */
.toast.leaving { animation: lift .26s ease forwards; }
@keyframes lift { to { opacity: 0; transform: translateY(-12px) scale(.98); } }
.sheet-backdrop { animation: fade .2s ease; }
.sheet-backdrop.closing { animation: fadeout .2s ease forwards; pointer-events: none; }
.sheet-backdrop.closing .sheet { animation: sink .2s ease forwards; }
.sheet { animation: rise .32s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }
@keyframes sink { to { transform: translateY(24px); opacity: 0; } }

/* Loading */
.skeleton { border-radius: 12px; background: linear-gradient(90deg, var(--pink-100) 25%, #fff 50%, var(--pink-100) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.banner, .tip, .toast { animation-fill-mode: both; }

/* Lighter blur on phones keeps scrolling at full frame rate */
@media (max-width: 639px) {
  .card { -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); }
}

@media (prefers-reduced-motion: reduce) {
  .view.enter .card, .rain-bars .col, .pop i { animation: none !important; }
  .skeleton { animation: none !important; }
}
