/* =========================================================
   _rt — design system
   iOS system palette, native light/dark via prefers-color-scheme
   ========================================================= */

:root {
  color-scheme: light dark;

  --bg: #F2F2F7;
  --bg-elevated: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F2F2F7;
  --surface-3: #E5E5EA;
  --fill: rgba(120, 120, 128, .12);
  --fill-2: rgba(120, 120, 128, .2);
  --label: #000000;
  --label-2: rgba(60, 60, 67, .62);
  --label-3: rgba(60, 60, 67, .32);
  --separator: rgba(60, 60, 67, .2);
  --tint: #007AFF;
  --tint-press: #0062CC;
  --on-tint: #FFFFFF;
  --green: #34C759;
  --red: #FF3B30;
  --orange: #FF9F0A;
  --indigo: #5856D6;
  --teal: #30B0C7;

  --bubble-them: #E9E9EB;

  /* liquid glass */
  --glass-tint: #bbbbbc;
  --glass-light: #fff;
  --glass-dark: #000;
  --glass-reflex-light: 1;
  --glass-reflex-dark: 1;
  --glass-sat: 160%;
  --glass-alpha: 14%;

  --shadow-1: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.06);
  --shadow-2: 0 12px 40px rgba(0,0,0,.14);

  --r-s: 10px;
  --r-m: 14px;
  --r-l: 22px;
  --r-xl: 34px;

  --spring: cubic-bezier(.32, 1.28, .5, 1);
  --ease-ios: cubic-bezier(.32, .72, 0, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --maxw: 1180px;
  --tabbar-h: 64px;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elevated: #1C1C1E;
    --surface: #1C1C1E;
    --surface-2: #2C2C2E;
    --surface-3: #3A3A3C;
    --fill: rgba(120, 120, 128, .24);
    --fill-2: rgba(120, 120, 128, .36);
    --label: #FFFFFF;
    --label-2: rgba(235, 235, 245, .62);
    --label-3: rgba(235, 235, 245, .3);
    --separator: rgba(84, 84, 88, .6);
    --tint: #0A84FF;
    --tint-press: #409CFF;
    --green: #30D158;
    --red: #FF453A;
    --orange: #FF9F0A;
    --indigo: #5E5CE6;
    --teal: #40C8E0;
    --bubble-them: #26252A;

    --glass-reflex-light: .3;
    --glass-reflex-dark: 2;
    --glass-alpha: 18%;

    --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
    --shadow-2: 0 12px 40px rgba(0,0,0,.55);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 80px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--tint); text-decoration: none; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--tint) 70%, transparent); outline-offset: 2px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--tint) 30%, transparent); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type scale (iOS) ---------- */
.t-hero {
  font-size: clamp(44px, 8.4vw, 104px);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}
.t-large { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.06; letter-spacing: -.035em; font-weight: 700; margin: 0; text-wrap: balance; }
.t-title { font-size: 28px; line-height: 1.15; letter-spacing: -.03em; font-weight: 700; margin: 0; }
.t-title2 { font-size: 22px; line-height: 1.2; letter-spacing: -.026em; font-weight: 700; margin: 0; }
.t-headline { font-size: 17px; font-weight: 600; margin: 0; }
.t-body { font-size: 17px; margin: 0; }
.t-callout { font-size: 16px; line-height: 1.4; margin: 0; }
.t-sub { font-size: 15px; line-height: 1.35; margin: 0; }
.t-foot { font-size: 13px; line-height: 1.38; letter-spacing: -.006em; margin: 0; }
.t-cap { font-size: 12px; line-height: 1.3; letter-spacing: 0; margin: 0; }
.muted { color: var(--label-2); }
.faint { color: var(--label-3); }
.tnum { font-variant-numeric: tabular-nums; }
.lede { font-size: clamp(19px, 2.1vw, 23px); line-height: 1.38; letter-spacing: -.024em; color: var(--label-2); max-width: 34ch; margin: 0; text-wrap: pretty; }

/* ---------- layout ---------- */
.page {
  min-height: 100vh;
  background: var(--bg);
  transform-origin: 50% 0;
  transition: transform .5s var(--ease-ios), border-radius .5s var(--ease-ios), filter .5s var(--ease-ios);
  padding-bottom: calc(var(--tabbar-h) + 48px);
}
@media (min-width: 900px) { .page { padding-bottom: 0; } }
.wrap { width: min(var(--maxw), 100% - 40px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 40px); margin-inline: auto; }
.section { padding: clamp(56px, 9vw, 120px) 0; }
.section + .section { padding-top: 0; }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: 12px; }
.spacer { flex: 1; }
.page-head { padding: calc(env(safe-area-inset-top, 0px) + 96px) 0 28px; }
@media (min-width: 900px) { .page-head { padding-top: 140px; } }

/* =========================================================
   LIQUID GLASS
   ========================================================= */
.glass {
  position: relative;
  isolation: isolate;
  background-color: color-mix(in srgb, var(--glass-tint) var(--glass-alpha), transparent);
  -webkit-backdrop-filter: blur(12px) saturate(var(--glass-sat));
  backdrop-filter: blur(12px) saturate(var(--glass-sat));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--glass-light) calc(var(--glass-reflex-light) * 10%), transparent),
    inset 1.8px 3px 0px -2px color-mix(in srgb, var(--glass-light) calc(var(--glass-reflex-light) * 90%), transparent),
    inset -2px -2px 0px -2px color-mix(in srgb, var(--glass-light) calc(var(--glass-reflex-light) * 80%), transparent),
    inset -3px -8px 1px -6px color-mix(in srgb, var(--glass-light) calc(var(--glass-reflex-light) * 60%), transparent),
    inset -.3px -1px 4px 0px color-mix(in srgb, var(--glass-dark) calc(var(--glass-reflex-dark) * 12%), transparent),
    inset -1.5px 2.5px 0px -2px color-mix(in srgb, var(--glass-dark) calc(var(--glass-reflex-dark) * 20%), transparent),
    inset 0px 3px 4px -2px color-mix(in srgb, var(--glass-dark) calc(var(--glass-reflex-dark) * 20%), transparent),
    inset 2px -6.5px 1px -4px color-mix(in srgb, var(--glass-dark) calc(var(--glass-reflex-dark) * 10%), transparent),
    0px 1px 5px 0px color-mix(in srgb, var(--glass-dark) calc(var(--glass-reflex-dark) * 10%), transparent),
    0px 6px 16px 0px color-mix(in srgb, var(--glass-dark) calc(var(--glass-reflex-dark) * 8%), transparent);
}
/* Chromium gets real refraction through an SVG displacement map */
.lg-refract .glass.refract {
  backdrop-filter: blur(4px) url(#lg-refract) saturate(var(--glass-sat));
}
.glass-thick { --glass-alpha: 46%; }
@media (prefers-color-scheme: dark) { .glass-thick { --glass-alpha: 34%; --glass-tint: #3a3a3c; } }
@media (prefers-reduced-transparency: reduce) {
  .glass { background-color: var(--bg-elevated) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}

/* ---------- top chrome ---------- */
.topbar {
  position: fixed;
  z-index: 60;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.logo-pill {
  height: 48px;
  padding: 0 16px 0 14px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--label);
  font-weight: 600;
  font-size: 15px;
}
.logo-pill svg { width: 30px; height: auto; }
.logo-pill svg path { stroke: currentColor; }
.logo-pill .loc { color: var(--label-2); font-weight: 500; }
@media (max-width: 520px) { .logo-pill .loc { display: none; } }
.circle-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 0;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: var(--label);
  transition: transform .4s var(--spring);
}
.circle-btn:active { transform: scale(.9); }
.circle-btn svg { width: 22px; height: 22px; }
.badge {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transform: scale(0);
  transition: transform .45s var(--spring);
}
.badge.on { transform: scale(1); }
.badge.bump { animation: bump .5s var(--spring); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ---------- tab bar ---------- */
.tabbar-wrap {
  position: fixed;
  z-index: 70;
  left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  pointer-events: none;
}
@media (min-width: 900px) {
  .tabbar-wrap { bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 12px); }
}
.tabbar {
  pointer-events: auto;
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  height: var(--tabbar-h);
  padding: 4px;
  border-radius: 99px;
  width: min(380px, 100%);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
@media (min-width: 900px) { .tabbar { height: 56px; width: 420px; } }
.tab {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: var(--label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .01em;
  border-radius: 99px;
  -webkit-tap-highlight-color: transparent;
  transition: color .3s;
}
.tab svg { width: 26px; height: 26px; transition: transform .35s var(--spring); }
.tab[aria-current="page"] { color: var(--tint); }
@media (min-width: 900px) {
  .tab { flex-direction: row; gap: 6px; font-size: 14px; letter-spacing: -.01em; }
  .tab svg { width: 20px; height: 20px; }
}
.tab-drop {
  position: absolute;
  z-index: 1;
  top: 4px; bottom: 4px;
  left: 0;
  border-radius: 99px;
  background-color: color-mix(in srgb, var(--glass-tint) 36%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--glass-light) calc(var(--glass-reflex-light) * 10%), transparent),
    inset 2px 1px 0px -1px color-mix(in srgb, var(--glass-light) calc(var(--glass-reflex-light) * 90%), transparent),
    inset -1.5px -1px 0px -1px color-mix(in srgb, var(--glass-light) calc(var(--glass-reflex-light) * 80%), transparent),
    inset -2px -6px 1px -5px color-mix(in srgb, var(--glass-light) calc(var(--glass-reflex-light) * 60%), transparent),
    inset -1px 2px 3px -1px color-mix(in srgb, var(--glass-dark) calc(var(--glass-reflex-dark) * 20%), transparent),
    inset 0px -4px 1px -2px color-mix(in srgb, var(--glass-dark) calc(var(--glass-reflex-dark) * 10%), transparent),
    0px 3px 6px 0px color-mix(in srgb, var(--glass-dark) calc(var(--glass-reflex-dark) * 8%), transparent);
  will-change: transform, width;
  transition: transform .55s var(--spring), width .55s var(--spring), scale .35s var(--spring);
}
.tabbar.dragging .tab-drop {
  transition: width .3s var(--spring), scale .3s var(--spring);
  scale: 1.18 1.22;
  background-color: color-mix(in srgb, var(--glass-tint) 18%, transparent);
}
.tabbar.dragging .tab svg { transform: scale(1.06); }
.tab-side { pointer-events: auto; width: var(--tabbar-h); height: var(--tabbar-h); }
.tab-side svg { width: 25px; height: 25px; }
@media (min-width: 900px) { .tab-side { width: 56px; height: 56px; } }
.tab-side[aria-current="page"] { color: var(--tint); }

/* ---------- buttons ---------- */
.btn {
  --b-bg: var(--tint);
  --b-fg: var(--on-tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 99px;
  border: 0;
  background: var(--b-bg);
  color: var(--b-fg);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .35s var(--spring), background-color .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.96); }
.btn:hover { --b-bg: var(--tint-press); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn.block { width: 100%; }
.btn > svg { width: 20px; height: 20px; flex: none; }
.btn.small { min-height: 36px; padding: 0 16px; font-size: 15px; }
.btn.tinted { --b-bg: color-mix(in srgb, var(--tint) 15%, transparent); --b-fg: var(--tint); }
.btn.tinted:hover { --b-bg: color-mix(in srgb, var(--tint) 22%, transparent); }
.btn.gray { --b-bg: var(--fill); --b-fg: var(--label); }
.btn.gray:hover { --b-bg: var(--fill-2); }
.btn.plain { --b-bg: transparent; --b-fg: var(--tint); padding: 0 8px; }
.btn.plain:hover { --b-bg: transparent; opacity: .7; }
.btn.label { --b-bg: var(--label); --b-fg: var(--bg); }
.btn.label:hover { --b-bg: var(--label); opacity: .86; }
.btn.danger { --b-bg: color-mix(in srgb, var(--red) 14%, transparent); --b-fg: var(--red); }
.btn .spin { width: 18px; height: 18px; border: 2.4px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- inset grouped list ---------- */
.group-title { padding: 0 20px 7px; font-size: 13px; color: var(--label-2); margin: 0; letter-spacing: -.006em; }
.group-foot { padding: 7px 20px 0; font-size: 13px; color: var(--label-2); margin: 0; }
.list {
  background: var(--surface);
  border-radius: var(--r-l);
  overflow: hidden;
  margin: 0;
  padding: 0;
  list-style: none;
}
.list > li, .list > .cell { position: relative; }
.cell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 11px 18px;
  color: var(--label);
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}
a.cell, button.cell, label.cell { cursor: pointer; transition: background-color .15s; }
a.cell:active, button.cell:active, label.cell:active { background: var(--fill); }
@media (hover: hover) { a.cell:hover, button.cell:hover, label.cell:hover { background: color-mix(in srgb, var(--fill) 50%, transparent); } }
.list > * + *::before, .list > * + .cell::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  left: var(--sep-inset, 18px);
  height: .5px;
  background: var(--separator);
  pointer-events: none;
}
.list.icons { --sep-inset: 64px; }
.cell .main { flex: 1; min-width: 0; }
.cell .title { font-size: 17px; line-height: 1.3; }
.cell .sub { font-size: 14px; color: var(--label-2); line-height: 1.3; margin-top: 1px; }
.cell .val { color: var(--label-2); font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chev { width: 8px; height: 14px; color: var(--label-3); flex: none; }
.ico {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
  background: var(--c, var(--tint));
}
.ico svg { width: 19px; height: 19px; }
.check { width: 20px; height: 20px; color: var(--tint); opacity: 0; transform: scale(.4); transition: transform .35s var(--spring), opacity .2s; flex: none; }
.cell[aria-checked="true"] .check, input:checked + .check, .cell:has(input:checked) .check { opacity: 1; transform: none; }

/* segmented control */
.segmented {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 2px;
  border-radius: 10px;
  background: var(--fill);
  isolation: isolate;
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: font-weight .2s;
}
.segmented label:has(input:checked) { font-weight: 600; }
.segmented .thumb {
  position: absolute;
  z-index: 0;
  top: 2px; bottom: 2px; left: 2px;
  border-radius: 8px;
  background: var(--bg-elevated);
  box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04);
  transition: transform .45s var(--spring), width .45s var(--spring);
}
@media (prefers-color-scheme: dark) { .segmented .thumb { background: #636366; } }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  scroll-snap-align: start;
  border: 0;
  border-radius: 99px;
  padding: 8px 15px;
  background: var(--fill);
  color: var(--label);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .3s var(--spring);
}
.chip:active { transform: scale(.94); }
.chip[aria-pressed="true"] { background: var(--label); color: var(--bg); }

/* ---------- forms ---------- */
.field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 18px;
}
.field label { width: 96px; flex: none; font-size: 17px; }
.field input, .field textarea, .field select, .input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--label);
  font: inherit;
  font-size: 17px;
  padding: 14px 0;
  outline: none;
}
.field textarea { resize: none; min-height: 96px; padding-top: 14px; line-height: 1.4; }
.field.top { align-items: flex-start; }
.field.top label { padding-top: 14px; }
.field input::placeholder, .field textarea::placeholder, .input::placeholder { color: var(--label-3); }
.field:focus-within { background: color-mix(in srgb, var(--tint) 5%, transparent); }
.search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--fill);
  color: var(--label-2);
}
.search svg { width: 17px; height: 17px; flex: none; }
.search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 17px; color: var(--label); outline: none; min-width: 0; }
.search input::placeholder { color: var(--label-2); }
.textfield {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: var(--fill);
  color: var(--label);
  font: inherit;
  padding: 14px 16px;
  outline: none;
  transition: box-shadow .2s;
}
.textfield:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tint) 45%, transparent); }

/* =========================================================
   SHEET (iOS modal sheet with detents)
   ========================================================= */
.sheet-root { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.sheet-root.open { pointer-events: auto; }
.sheet-dim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .45s var(--ease-ios);
}
.sheet-root.open .sheet-dim { opacity: 1; }
.sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100%, 620px);
  height: calc(100% - env(safe-area-inset-top, 0px) - 14px);
  max-height: 940px;
  translate: -50% 100%;
  background: var(--bg);
  border-radius: 38px 38px 0 0;
  box-shadow: 0 -10px 60px rgba(0,0,0,.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: translate .55s var(--ease-ios);
  will-change: translate;
  overscroll-behavior: contain;
}
@media (min-width: 700px) {
  .sheet { bottom: 50%; height: min(820px, calc(100% - 64px)); border-radius: 38px; translate: -50% calc(50% + 100vh); }
  .sheet-root.open .sheet { translate: -50% 50%; }
}
.sheet-root.open .sheet { translate: -50% 0; }
.sheet.dragging { transition: none; }
.sheet-grabber { height: 22px; flex: none; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet-grabber::before { content: ""; width: 40px; height: 5px; border-radius: 3px; background: var(--label-3); }
.sheet-nav {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 12px 6px;
  min-height: 48px;
  touch-action: none;
}
.sheet-nav .nav-title { font-weight: 600; font-size: 17px; text-align: center; opacity: 0; transition: opacity .25s; }
.sheet-nav.scrolled .nav-title { opacity: 1; }
.sheet-nav .left { justify-self: start; }
.sheet-nav .right { justify-self: end; }
.sheet-nav .circle-btn { width: 44px; height: 44px; }
.sheet-body { position: relative; flex: 1; overflow: hidden; }
.sheet-step {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 4px 20px 120px;
  transition: transform .5s var(--ease-ios), opacity .5s var(--ease-ios);
}
.sheet-step[data-state="next"] { transform: translateX(100%); pointer-events: none; }
.sheet-step[data-state="prev"] { transform: translateX(-28%); opacity: 0; pointer-events: none; }
.sheet-step[data-state="hidden"] { display: none; }
.sheet-foot {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 20px calc(env(safe-area-inset-bottom, 0px) + 18px);
  background: linear-gradient(to top, var(--bg) 62%, color-mix(in srgb, var(--bg) 0%, transparent));
  z-index: 3;
}
body.sheet-open .page {
  transform: scale(.93) translateY(calc(env(safe-area-inset-top, 0px) + 6px));
  border-radius: 24px;
  overflow: hidden;
  filter: brightness(.92);
}
body.sheet-open { background: #000; overflow: hidden; }
@media (min-width: 700px) { body.sheet-open .page { transform: scale(.97); } }

/* step progress */
.steps { display: flex; gap: 5px; margin: 2px 0 18px; }
.steps i { height: 4px; flex: 1; border-radius: 2px; background: var(--fill-2); overflow: hidden; position: relative; }
.steps i::after { content: ""; position: absolute; inset: 0; background: var(--tint); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-ios); }
.steps i.done::after { transform: none; }

/* big device tiles inside sheet */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile {
  position: relative;
  border: 0;
  background: var(--surface);
  border-radius: var(--r-l);
  padding: 18px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
  color: var(--label);
  transition: transform .35s var(--spring), box-shadow .2s;
}
.tile:active { transform: scale(.96); }
.tile[aria-pressed="true"] { box-shadow: inset 0 0 0 2.5px var(--tint); }
.tile svg { width: 36px; height: 36px; color: var(--tint); }
.tile b { font-size: 17px; font-weight: 600; }
.tile span { font-size: 13px; color: var(--label-2); }

/* date & slot pickers */
.days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; margin: 0 -20px; padding-inline: 20px; scroll-snap-type: x mandatory; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: none;
  width: 62px;
  padding: 10px 0;
  border-radius: 16px;
  border: 0;
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  scroll-snap-align: start;
  transition: background-color .2s, color .2s, transform .3s var(--spring);
}
.day:active { transform: scale(.93); }
.day small { display: block; font-size: 12px; color: var(--label-2); font-weight: 600; }
.day b { display: block; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.day[aria-pressed="true"] { background: var(--tint); color: #fff; }
.day[aria-pressed="true"] small { color: rgba(255,255,255,.8); }
.day[disabled] { opacity: .35; pointer-events: none; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot {
  border: 0;
  border-radius: 12px;
  padding: 12px 0;
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .3s var(--spring);
}
.slot:active { transform: scale(.94); }
.slot[aria-pressed="true"] { background: var(--tint); color: #fff; }

/* price readout */
.price-big { font-size: 56px; font-weight: 700; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.price-big sup { font-size: .42em; vertical-align: .9em; margin-right: 2px; letter-spacing: 0; }
.strike { text-decoration: line-through; color: var(--label-3); }

/* success check */
.done-mark { width: 92px; height: 92px; margin: 32px auto 18px; }
.done-mark circle { fill: var(--green); transform-origin: center; animation: pop .6s var(--spring) both; }
.done-mark path { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .45s .3s var(--ease-ios) forwards; }
@keyframes pop { from { transform: scale(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* =========================================================
   Dynamic-island style toast
   ========================================================= */
.island {
  position: fixed;
  z-index: 400;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  translate: -50% 0;
  width: 126px;
  height: 37px;
  border-radius: 99px;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  overflow: hidden;
  opacity: 0;
  scale: .6;
  transition: width .6s var(--spring), height .6s var(--spring), border-radius .6s var(--spring), opacity .25s, scale .5s var(--spring);
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
@media (prefers-color-scheme: dark) { .island { box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 10px 30px rgba(0,0,0,.5); } }
.island.show { opacity: 1; scale: 1; width: min(380px, calc(100vw - 24px)); height: 64px; border-radius: 32px; pointer-events: auto; }
.island .i-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--green); opacity: 0; transition: opacity .3s .2s; }
.island .i-ico svg { width: 20px; height: 20px; }
.island .i-txt { flex: 1; min-width: 0; opacity: 0; transition: opacity .3s .2s; }
.island .i-txt b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.island .i-txt span { display: block; font-size: 13px; color: rgba(255,255,255,.66); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.island.show .i-ico, .island.show .i-txt { opacity: 1; }
.island a { color: #0A84FF; font-weight: 600; font-size: 15px; flex: none; }

/* =========================================================
   Footer
   ========================================================= */
.footer { padding: 64px 0 40px; color: var(--label-2); font-size: 13px; }
.footer .cols { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-top: .5px solid var(--separator); padding-top: 28px; }
.footer h4 { color: var(--label); font-size: 13px; font-weight: 600; margin: 0 0 8px; }
.footer a { color: var(--label-2); display: block; padding: 3px 0; }
.footer a:hover { color: var(--label); }
.footer .legal { margin-top: 32px; }

/* =========================================================
   Misc components
   ========================================================= */
.card { background: var(--surface); border-radius: var(--r-l); padding: 22px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--fill); color: var(--label-2); }
.pill.green { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.pill.orange { background: color-mix(in srgb, var(--orange) 18%, transparent); color: color-mix(in srgb, var(--orange) 80%, var(--label)); }
.pill.blue { background: color-mix(in srgb, var(--tint) 14%, transparent); color: var(--tint); }
.pill.red { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot.live { background: var(--green); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.empty { text-align: center; padding: 48px 20px; color: var(--label-2); }
.empty svg { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--label-3); }
.skeleton { background: linear-gradient(90deg, var(--fill) 0%, var(--fill-2) 50%, var(--fill) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.hr { height: .5px; background: var(--separator); border: 0; margin: 0; }
.kbd { font-family: var(--mono); font-size: .9em; padding: 2px 6px; border-radius: 6px; background: var(--fill); }

/* ambient wallpaper — gives glass something to refract */
.wallpaper {
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.wallpaper::before, .wallpaper::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
}
.wallpaper::before { width: 60vmax; height: 60vmax; left: -18vmax; top: -24vmax; background: radial-gradient(circle, #5AC8FA, transparent 62%); }
.wallpaper::after { width: 54vmax; height: 54vmax; right: -20vmax; top: 4vmax; background: radial-gradient(circle, #AF52DE, transparent 60%); opacity: .38; }
@media (prefers-color-scheme: dark) { .wallpaper::before { opacity: .35; } .wallpaper::after { opacity: .3; } }

/* reveal on scroll — used once per page, sparingly */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease-ios), transform .8s var(--ease-ios); }
  .rise.in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* cross-page transitions: the tab bar stays put while pages swap */
@view-transition { navigation: auto; }
.tabbar-wrap { view-transition-name: tabbar; }
.topbar { view-transition-name: topbar; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; }

/* ---------- product card (home rail + shop grid) ---------- */
.p-card { scroll-snap-align: start; color: var(--label); display: block; position: relative; }
.p-card .img { position: relative; aspect-ratio: 1; border-radius: var(--r-l); background: #fff; display: grid; place-items: center; overflow: hidden; transition: transform .45s var(--spring); }
.p-card .img img { width: 78%; height: 78%; object-fit: contain; transition: transform .6s var(--ease-ios); }
@media (hover: hover) { .p-card:hover .img img { transform: scale(1.04); } }
.p-card:active .img { transform: scale(.97); }
.p-card b { display: block; margin-top: 12px; font-weight: 600; font-size: 16px; letter-spacing: -.012em; }
.p-card span { font-size: 15px; color: var(--label-2); }
.p-card .img .pill { position: absolute; top: 10px; left: 10px; }
.p-card.sold .img img { filter: grayscale(1); opacity: .45; }
