/* Patty — design tokens follow iOS system colors so it feels native on iPhone. */
:root {
  --bg: #f2f2f7;
  --card: #ffffff;
  --card-2: #f9f9fb;
  --label: #1c1c1e;
  --label-2: rgba(60, 60, 67, .62);
  --label-3: rgba(60, 60, 67, .32);
  --sep: rgba(60, 60, 67, .14);
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .2);
  --ink: #1c1c1e;          /* primary buttons */
  --on-ink: #ffffff;
  --green: #248a3d;
  --orange: #c45c00;
  --red: #d70015;
  --vacation: #5e5ce6;
  --sick: #0a84ff;
  --pass-a: #2c2c2e;
  --pass-b: #48484a;
  --pass-text: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  --sheet-shadow: 0 -10px 40px rgba(0, 0, 0, .18);
  --radius-l: 22px;
  --radius: 14px;
  --radius-s: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-num: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.32, .72, 0, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --card-2: #232325;
    --label: #ffffff;
    --label-2: rgba(235, 235, 245, .62);
    --label-3: rgba(235, 235, 245, .3);
    --sep: rgba(84, 84, 88, .55);
    --fill: rgba(118, 118, 128, .24);
    --fill-2: rgba(118, 118, 128, .36);
    --ink: #ffffff;
    --on-ink: #000000;
    --green: #30d158;
    --orange: #ff9f0a;
    --red: #ff453a;
    --vacation: #7d7aff;
    --sick: #409cff;
    --pass-a: #2c2c2e;
    --pass-b: #3a3a3c;
    --shadow: none;
    --sheet-shadow: 0 -10px 40px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--label);
  font: 17px/1.35 var(--font); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus { outline: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--sick) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muted { color: var(--label-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Boot ---------- */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 50; transition: opacity .35s ease; }
.boot.out { opacity: 0; pointer-events: none; }
.mark {
  width: 64px; height: 64px; border-radius: 15px; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--pass-b), var(--pass-a)); color: #fff;
  font: 600 34px/1 var(--font-num); letter-spacing: -.04em; box-shadow: var(--shadow);
}
.mark.lg { width: 76px; height: 76px; border-radius: 18px; font-size: 40px; }

/* ---------- Auth ---------- */
.auth { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: calc(32px + var(--safe-t)) 20px calc(32px + var(--safe-b)); }
.auth-inner { width: 100%; max-width: 380px; animation: rise .5s var(--ease) both; }
.auth h1 { font: 700 34px/1.1 var(--font-display); letter-spacing: -.025em; margin: 22px 0 6px; }
.auth p.lead { color: var(--label-2); margin: 0 0 28px; font-size: 16px; }
.auth .group { margin-bottom: 16px; }
.auth .msg { min-height: 22px; font-size: 15px; margin: 12px 4px 0; color: var(--label-2); }
.auth .msg.err { color: var(--red); }
.auth .msg.ok { color: var(--green); }
.link-btn { color: var(--sick); font-size: 16px; padding: 12px 4px; display: inline-block; }
.auth .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }

/* ---------- Grouped lists (iOS inset grouped) ---------- */
.group { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.group + .group { margin-top: 12px; }
.section { margin: 28px 0 0; }
.section:first-child { margin-top: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 16px 7px; }
.section-head h2 { font: 600 20px/1.2 var(--font-display); letter-spacing: -.02em; margin: 0; }
.section-head .aside { font-size: 15px; color: var(--label-2); }
.section-head button.aside { color: var(--sick); }
.section-foot { font-size: 13px; color: var(--label-2); padding: 8px 16px 0; line-height: 1.4; }
.section-foot a { color: var(--sick); }

.row {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px; position: relative;
  width: 100%; text-align: left;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
.row.indent + .row.indent::before { left: 64px; }
button.row:active, a.row:active { background: var(--fill); }
.row .main { flex: 1; min-width: 0; }
.row .title { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { font-size: 14px; color: var(--label-2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .value { font-size: 17px; color: var(--label-2); text-align: right; white-space: nowrap; }
.row .value.strong { color: var(--label); font-weight: 500; }
.row .chev { width: 8px; height: 13px; color: var(--label-3); flex: none; }
.row.disabled { opacity: .45; }

.day {
  width: 38px; height: 38px; border-radius: 10px; flex: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: var(--fill); line-height: 1;
}
.day small { font-size: 10px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .02em; }
.day b { font: 600 16px/1.1 var(--font-num); }
.day.today { background: var(--ink); color: var(--on-ink); }
.day.today small { color: inherit; opacity: .7; }

.badge { font-size: 13px; font-weight: 500; padding: 3px 8px; border-radius: 99px; background: var(--fill); color: var(--label-2); white-space: nowrap; }
.badge.green { color: var(--green); background: color-mix(in srgb, var(--green) 13%, transparent); }
.badge.orange { color: var(--orange); background: color-mix(in srgb, var(--orange) 13%, transparent); }
.badge.red { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.badge.blue { color: var(--sick); background: color-mix(in srgb, var(--sick) 12%, transparent); }

.empty { padding: 26px 20px; text-align: center; color: var(--label-2); font-size: 15px; }
.empty b { display: block; color: var(--label); font-weight: 600; font-size: 17px; margin-bottom: 3px; }

/* ---------- App shell ---------- */
.app { min-height: 100dvh; }
.nav {
  position: sticky; top: 0; z-index: 20; height: calc(44px + var(--safe-t)); padding: var(--safe-t) 12px 0;
  display: flex; align-items: center; justify-content: space-between;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid transparent; transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--sep); }
.nav .small-title { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 600; font-size: 17px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.nav.scrolled .small-title { opacity: 1; }
.nav .nav-btn { min-width: 44px; height: 44px; display: grid; place-items: center; color: var(--sick); font-size: 17px; }
.nav .nav-btn svg { width: 22px; height: 22px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(160deg, #aeaeb2, #8e8e93); color: #fff; font: 600 15px/1 var(--font-num);
}
.content { max-width: 720px; margin: 0 auto; padding: 0 16px calc(110px + var(--safe-b)); }
.large-title { padding: 2px 4px 6px; }
.large-title h1 { font: 700 34px/1.12 var(--font-display); letter-spacing: -.026em; margin: 0; }
.large-title p { margin: 3px 0 0; color: var(--label-2); font-size: 15px; }
.view { animation: fade .28s ease both; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center;
  padding: 6px 8px calc(6px + var(--safe-b));
  background: color-mix(in srgb, var(--card) 80%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--sep);
}
.tabbar .tabs { display: flex; width: 100%; max-width: 520px; }
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--label-3); font-size: 10.5px; font-weight: 500; letter-spacing: 0; }
.tabbar button svg { width: 26px; height: 26px; }
.tabbar button[aria-current="page"] { color: var(--label); }
.tabbar .dot { position: absolute; margin: 0 0 0 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.tabbar button { position: relative; }

@media (min-width: 900px) {
  .tabbar { top: 0; bottom: auto; padding: calc(8px + var(--safe-t)) 8px 8px; border: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; }
  .tabbar .tabs { pointer-events: auto; width: auto; background: color-mix(in srgb, var(--card) 85%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-radius: 99px; padding: 4px; box-shadow: var(--shadow); border: .5px solid var(--sep); }
  .tabbar button { flex-direction: row; gap: 7px; white-space: nowrap; padding: 7px 16px; border-radius: 99px; font-size: 14px; color: var(--label-2); }
  .tabbar button svg { width: 18px; height: 18px; }
  .tabbar button[aria-current="page"] { background: var(--fill); color: var(--label); }
  .tabbar .dot { position: static; margin: 0; width: 7px; height: 7px; }
  .nav { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0 !important; }
  .nav .small-title { display: none; }
  .content { padding-top: 28px; padding-bottom: 80px; }
}

/* ---------- Pass (the one bold element) ---------- */
.pass {
  position: relative; overflow: hidden; border-radius: var(--radius-l); padding: 20px 20px 18px; margin-top: 10px;
  color: var(--pass-text); background: linear-gradient(155deg, var(--pass-b) 0%, var(--pass-a) 62%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18), inset 0 .5px 0 rgba(255, 255, 255, .18);
}
.pass::after { /* subtle sheen */
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; height: 120%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .12), transparent); pointer-events: none;
}
.pass .top { display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: rgba(255, 255, 255, .72); }
.pass .amount { font: 600 48px/1.05 var(--font-num); letter-spacing: -.035em; margin: 14px 0 4px; font-variant-numeric: tabular-nums; }
.pass .amount .cents { font-size: 28px; opacity: .7; letter-spacing: -.02em; }
.pass .meta { font-size: 15px; color: rgba(255, 255, 255, .72); }
.pass .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; padding-top: 14px; border-top: .5px solid rgba(255, 255, 255, .16); }
.pass .facts div { font-size: 12px; color: rgba(255, 255, 255, .6); }
.pass .facts b { display: block; font: 600 17px/1.25 var(--font-num); color: #fff; margin-top: 2px; letter-spacing: -.01em; }
.pass .actions { display: flex; gap: 10px; margin-top: 18px; }
.pass .actions .btn { flex: 1; white-space: nowrap; padding: 0 12px; font-size: 16px; }
.pass .btn.light { background: #fff; color: #1c1c1e; }
.pass .btn.glass { background: rgba(255, 255, 255, .14); color: #fff; }

/* ---------- Week strip ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 14px 12px 12px; }
.week button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0 6px; border-radius: 12px; }
.week button:active { background: var(--fill); }
.week .dname { font-size: 12px; color: var(--label-2); font-weight: 500; }
.week .bar { width: 22px; height: 64px; border-radius: 7px; background: var(--fill); position: relative; overflow: hidden; }
.week .bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 7px; background: var(--ink); transition: height .6s var(--ease); }
.week .bar i.sched { background: repeating-linear-gradient(-45deg, var(--label-3) 0 3px, transparent 3px 6px); }
.week .bar i.ot { background: var(--orange); }
.week .hrs { font: 600 13px/1 var(--font-num); }
.week .hrs.zero { color: var(--label-3); font-weight: 500; }
.week button.is-today .dname { color: var(--label); font-weight: 700; }
.week-foot { display: flex; justify-content: space-between; padding: 10px 16px 14px; border-top: .5px solid var(--sep); font-size: 15px; }

/* ---------- Rings ---------- */
.rings { display: grid; grid-template-columns: 1fr 1fr; }
.ring-cell { display: flex; align-items: center; gap: 14px; padding: 16px; }
.ring-cell + .ring-cell { border-left: .5px solid var(--sep); }
.ring { width: 58px; height: 58px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.ring .track { stroke: var(--fill); }
.ring .val { transition: stroke-dashoffset 1s var(--ease); }
.ring-cell .k { font-size: 13px; color: var(--label-2); }
.ring-cell .v { font: 600 24px/1.1 var(--font-num); letter-spacing: -.02em; }
.ring-cell .v small { font-size: 14px; font-weight: 500; color: var(--label-2); margin-left: 2px; }
.ring-cell .s { font-size: 12px; color: var(--label-2); margin-top: 1px; }
@media (max-width: 360px) { .rings { grid-template-columns: 1fr; } .ring-cell + .ring-cell { border-left: 0; border-top: .5px solid var(--sep); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 50px; padding: 0 20px;
  border-radius: 14px; font-weight: 600; font-size: 17px; background: var(--ink); color: var(--on-ink);
  transition: transform .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(.98); opacity: .85; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn.block { width: 100%; }
.btn.tinted { background: var(--fill); color: var(--label); }
.btn.danger { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 15px; border-radius: 99px; }
.btn .spin { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.text-btn { color: var(--sick); font-size: 17px; padding: 8px 0; }
.text-btn.red { color: var(--red); }

/* ---------- Forms ---------- */
.field { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; position: relative; }
.field + .field::before, .field + .row::before, .row + .field::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
.field > label { flex: none; min-width: 92px; font-size: 17px; }
.field input, .field select, .field textarea {
  flex: 1; min-width: 0; border: 0; background: transparent; font-size: 17px; text-align: right; padding: 14px 0;
  -webkit-appearance: none; appearance: none; border-radius: 0;
}
.field.stack { flex-direction: column; align-items: stretch; gap: 0; padding-top: 10px; }
.field.stack > label { font-size: 13px; color: var(--label-2); min-width: 0; }
.field.stack input, .field.stack textarea { text-align: left; padding: 6px 0 12px; }
.field textarea { resize: none; min-height: 72px; line-height: 1.35; }
.field input::placeholder, .field textarea::placeholder { color: var(--label-3); }
.field .suffix { color: var(--label-2); }
.input-plain { width: 100%; border: 0; background: transparent; font-size: 17px; padding: 15px 16px; -webkit-appearance: none; appearance: none; }
.input-plain + .input-plain { border-top: .5px solid var(--sep); }
.input-plain::placeholder { color: var(--label-3); }

/* Dates: native iOS picker, styled as a pill so it lines up with neighbours. */
input[type="date"] {
  -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; height: 36px; padding: 0 12px !important; border-radius: 8px; background: var(--fill) !important;
  font-size: 17px; line-height: 36px; text-align: center !important; flex: 0 0 auto !important; min-width: 128px;
  color: var(--label); font-variant-numeric: tabular-nums;
}
input[type="date"]::-webkit-date-and-time-value { text-align: center; margin: 0; line-height: 36px; min-height: 36px; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: .5; margin-left: 6px; }
@supports (-webkit-touch-callout: none) { input[type="date"]::-webkit-calendar-picker-indicator { display: none; } }
.date-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
.date-pair .field { min-width: 0; }
.date-pair .field { flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; padding: 10px 16px 12px; }
.date-pair .field > label { font-size: 13px; color: var(--label-2); min-width: 0; }
.date-pair .field input[type="date"] { width: 100%; min-width: 0; max-width: 100%; padding: 0 8px !important; font-size: 16px; }
.date-pair .field + .field::before { top: 12px; bottom: 12px; left: 0; right: auto; border-top: 0; border-left: .5px solid var(--sep); }

/* Segmented control */
.seg { display: flex; padding: 2px; border-radius: 9px; background: var(--fill); position: relative; }
.seg button { flex: 1; min-height: 32px; padding: 0 8px; border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--label); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); font-weight: 600; }
@media (prefers-color-scheme: dark) { .seg button[aria-pressed="true"] { background: #636366; } }
.field .seg { flex: 1; max-width: 260px; margin-left: auto; }
.seg-wrap { padding: 12px 16px; }

/* Switch */
.switch { position: relative; width: 51px; height: 31px; flex: none; margin-left: auto; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--fill-2); transition: background .25s ease; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .3s var(--ease); }
.switch input:checked + span { background: #34c759; }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--sick) 55%, transparent); outline-offset: 2px; }

/* Stepper */
.stepper { display: flex; align-items: center; gap: 0; margin-left: auto; }
.stepper input { width: 64px; text-align: center !important; font: 600 20px/1 var(--font-num); padding: 8px 0 !important; flex: none !important; }
.stepper button { width: 44px; height: 32px; background: var(--fill); display: grid; place-items: center; font-size: 22px; font-weight: 400; }
.stepper button:first-of-type { border-radius: 8px 0 0 8px; }
.stepper button:last-of-type { border-radius: 0 8px 8px 0; }
.stepper .divider { width: .5px; height: 18px; background: var(--sep); }

/* Check rows (payment item picker) */
.check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--label-3); flex: none; display: grid; place-items: center; transition: all .15s; }
.check svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
[aria-checked="true"] .check { background: var(--sick); border-color: var(--sick); }
[aria-checked="true"] .check svg { opacity: 1; }

/* Summary (receipt-like breakdown) */
.summary .row { min-height: 44px; }
.summary .row .title { font-size: 16px; }
.summary .total .title, .summary .total .value { font-weight: 600; color: var(--label); font-size: 17px; }
.summary .neg { color: var(--red); }

/* Notice */
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--card); font-size: 15px; line-height: 1.4; }
.notice svg { width: 22px; height: 22px; flex: none; color: var(--orange); margin-top: 1px; }
.notice.info svg { color: var(--sick); }
.notice b { font-weight: 600; }
.notice .actions { margin-top: 8px; display: flex; gap: 16px; }

/* ---------- Sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .32); opacity: 0; transition: opacity .35s ease; }
.scrim.in { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: calc(100dvh - 12px - var(--safe-t));
  background: var(--bg); border-radius: 14px 14px 0 0; box-shadow: var(--sheet-shadow);
  display: flex; flex-direction: column; transform: translateY(100%); transition: transform .45s var(--ease);
}
.sheet.in { transform: translateY(0); }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--label-3); margin: 6px auto 0; flex: none; }
.sheet header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 52px; padding: 0 16px; flex: none; }
.sheet header h2 { font-size: 17px; font-weight: 600; margin: 0; text-align: center; white-space: nowrap; }
.sheet header .l { justify-self: start; }
.sheet header .r { justify-self: end; font-weight: 600; }
.sheet header button { color: var(--sick); font-size: 17px; min-height: 44px; }
.sheet header button[disabled] { color: var(--label-3); }
.sheet .body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px calc(24px + var(--safe-b)); overscroll-behavior: contain; }
.sheet .hero { text-align: center; padding: 10px 0 18px; }
.sheet .hero .big { font: 600 44px/1.05 var(--font-num); letter-spacing: -.035em; }
.sheet .hero .cap { color: var(--label-2); font-size: 15px; margin-top: 4px; }
.sheet .footer-actions { margin-top: 22px; display: grid; gap: 10px; }
@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 560px; max-height: min(86dvh, 820px); border-radius: 16px; transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .35s var(--ease), opacity .25s ease; }
  .sheet.in { transform: translate(-50%, -50%); opacity: 1; }
  .sheet .grab { display: none; }
}

/* ---------- Alert / action sheet ---------- */
.alert {
  position: fixed; z-index: 71; left: 50%; top: 50%; width: 280px; transform: translate(-50%, -50%) scale(1.08); opacity: 0;
  background: color-mix(in srgb, var(--card) 92%, transparent); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  border-radius: 14px; overflow: hidden; text-align: center; transition: transform .25s var(--ease), opacity .2s ease;
}
.alert.in { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.alert .txt { padding: 19px 16px 16px; }
.alert h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.alert p { margin: 0; font-size: 13px; line-height: 1.38; }
.alert textarea { width: 100%; margin-top: 12px; border-radius: 8px; border: .5px solid var(--sep); background: var(--card); padding: 8px 10px; font-size: 15px; resize: none; }
.alert .btns { display: flex; border-top: .5px solid var(--sep); }
.alert .btns button { flex: 1; min-height: 44px; color: var(--sick); font-size: 17px; }
.alert .btns button + button { border-left: .5px solid var(--sep); }
.alert .btns .strong { font-weight: 600; }
.alert .btns .destructive { color: var(--red); }
.alert-scrim { z-index: 70; background: rgba(0, 0, 0, .2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 80; left: 50%; top: calc(10px + var(--safe-t)); transform: translate(-50%, -140%);
  display: flex; align-items: center; gap: 10px; padding: 11px 18px 11px 14px; border-radius: 99px;
  background: color-mix(in srgb, var(--card) 92%, transparent); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .16); font-size: 15px; font-weight: 500; max-width: calc(100vw - 32px);
  transition: transform .5s var(--ease);
}
.toast.in { transform: translate(-50%, 0); }
.toast svg { width: 20px; height: 20px; flex: none; color: var(--green); }
.toast.err svg { color: var(--red); }

/* ---------- Skeleton ---------- */
.sk { background: linear-gradient(90deg, var(--fill) 0%, var(--fill-2) 50%, var(--fill) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: 10px; }
.sk-pass { height: 220px; border-radius: var(--radius-l); margin-top: 10px; }
.sk-group { height: 160px; border-radius: var(--radius); margin-top: 28px; }

.offline { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(76px + var(--safe-b)); background: var(--ink); color: var(--on-ink); font-size: 14px; padding: 8px 14px; border-radius: 99px; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
