/* Stepify — styles (port of ContentView.swift SwiftUI design) */

:root {
  --font: ui-rounded, "SF Pro Rounded", "Nunito", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --tabbar: calc(49px + var(--sab));

  /* Palette */
  --bgTop: #0A0F1E;
  --bgBottom: #131B33;
  --card: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.09);
  --dim: rgba(255, 255, 255, 0.6);
  --faint: rgba(255, 255, 255, 0.35);
  --gold: #FFC94D;
  --flame: #FF7A3D;
  --red: #FF6B6B;
  --ios-red: #FF453A;

  /* Theme (overwritten from JS) */
  --c1: #2EE6A6;
  --c2: #18A0FB;
  --tint: var(--c1);
  --grad: linear-gradient(to bottom right, var(--c1), var(--c2));
  --gold-grad: linear-gradient(to right, #FFC94D, #FF9F1C);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  background: #03050B;
  overscroll-behavior: none;
}

body {
  font-family: var(--font);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input, textarea { -webkit-user-select: text; user-select: text; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: inherit;
}

#app {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bgTop);
  isolation: isolate;
}

/* On desktop show the app inside an iPhone-sized frame */
.statusbar, .home-indicator { display: none; }
@media (min-width: 640px) and (min-height: 760px) {
  body { display: flex; align-items: center; justify-content: center; }
  #app {
    width: 393px;
    max-width: 393px;
    height: 852px;
    border-radius: 54px;
    box-shadow: 0 0 0 11px #1B1E27, 0 0 0 13px #2C303B, 0 40px 100px rgba(0, 0, 0, 0.7);
    --sat: 54px;
    --sab: 34px;
  }
  .statusbar {
    display: flex;
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 54px;
    padding: 0 30px 0 44px;
    align-items: center;
    justify-content: space-between;
    font: 600 17px/1 -apple-system, system-ui, sans-serif;
    color: #fff;
    z-index: 100;
    pointer-events: none;
  }
  .statusbar .island {
    position: absolute;
    left: 50%; top: 11px;
    width: 124px; height: 36px;
    margin-left: -62px;
    border-radius: 20px;
    background: #000;
  }
  .statusbar .sb-right { display: flex; gap: 6px; font-size: 17px; }
  .home-indicator {
    display: block;
    position: absolute;
    left: 50%; bottom: 8px;
    width: 140px; height: 5px;
    margin-left: -70px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.85);
    z-index: 100;
    pointer-events: none;
  }
}

#screen {
  position: absolute;
  inset: 0;
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1), filter 0.38s, border-radius 0.38s;
  transform-origin: 50% 0%;
  overflow: hidden;
}
#screen.behind-sheet {
  transform: translateY(calc(var(--sat) * 0.25)) scale(0.92);
  border-radius: 14px;
  filter: brightness(0.6);
}

/* ---------- Typography (Dynamic Type "Large") ---------- */
.f-body { font-size: 17px; line-height: 22px; }
.f-head { font-size: 17px; line-height: 22px; font-weight: 600; }
.f-sub  { font-size: 15px; line-height: 20px; }
.f-foot { font-size: 13px; line-height: 18px; }
.f-cap  { font-size: 12px; line-height: 16px; }
.f-cap2 { font-size: 11px; line-height: 13px; }
.f-t3   { font-size: 20px; line-height: 25px; }
.f-t2   { font-size: 22px; line-height: 28px; }
.w4 { font-weight: 400; } .w5 { font-weight: 500; } .w6 { font-weight: 600; }
.w7 { font-weight: 700; } .w8 { font-weight: 800; }

.c-w { color: #fff; }
.c-dim { color: var(--dim); }
.c-faint { color: var(--faint); }
.c-gold { color: var(--gold); }
.c-tint { color: var(--tint); }
.c-blk { color: rgba(0, 0, 0, 0.85); }
.c-blk8 { color: rgba(0, 0, 0, 0.8); }
.c-red { color: var(--red); }

.gtext {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}
.gtext::before { -webkit-text-fill-color: transparent; }

.kicker {
  font-size: 12px;
  line-height: 15px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--faint);
  text-transform: uppercase;
}

.one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.two { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.center-text { text-align: center; }

/* ---------- Layout ---------- */
.vs { display: flex; flex-direction: column; }
.hs { display: flex; flex-direction: row; align-items: center; }
.hs.top { align-items: flex-start; }
.hs.bottom { align-items: flex-end; }
.vs.lead { align-items: flex-start; }
.vs.mid { align-items: center; }
.vs.stretch { align-items: stretch; }
.sp { flex: 1 1 0; min-width: 0; }
.full { width: 100%; }
.minw0 { min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; justify-items: center; }

/* ---------- Icons ---------- */
.ic { display: inline-block; line-height: 1; flex: none; vertical-align: middle; }
svg.ic { fill: currentColor; }
.lbl { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- App background ---------- */
.app-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--bgTop), var(--bgBottom));
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.app-bg .glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  left: calc(50% + 140px - 170px);
  top: calc(50% - 320px - 170px);
  background: var(--glow, rgba(46, 230, 166, 0.18));
  filter: blur(110px);
  transition: background 0.3s;
}

/* ---------- Scroll ---------- */
.scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  z-index: 1;
  overscroll-behavior-y: contain;
}
.scroll::-webkit-scrollbar { display: none; }
.hscroll { overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.hscroll::-webkit-scrollbar { display: none; }

.content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: calc(var(--sat)) 16px calc(30px + var(--tabbar));
}
.content.lead { align-items: stretch; }

/* ---------- Card / field ---------- */
.card {
  padding: 16px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--stroke);
}
.field {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px var(--stroke);
  border: 0;
  outline: none;
  color: #fff;
  font: 400 17px/22px var(--font);
  -webkit-appearance: none;
  appearance: none;
  caret-color: var(--tint);
}
.field::placeholder, .bare-input::placeholder { color: rgba(235, 235, 245, 0.3); opacity: 1; }
.bare-input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font-family: var(--font);
  caret-color: var(--tint);
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
}

.divider { height: 0.5px; background: var(--stroke); width: 100%; flex: none; }

/* ---------- Buttons ---------- */
.gbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 15px 0;
  border-radius: 16px;
  background: var(--grad);
  color: rgba(0, 0, 0, 0.85);
  font: 600 17px/22px var(--font);
  transition: transform 0.15s ease-out, opacity 0.15s ease-out;
}
.gbtn.gold { background: var(--gold-grad); }
.gbtn:active { transform: scale(0.97); opacity: 0.9; }

.softbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font: 600 15px/20px var(--font);
  transition: transform 0.15s;
}
.softbtn:active { transform: scale(0.97); }

.pb { transition: opacity 0.15s; }
.pb:active { opacity: 0.55; }

/* ---------- Points chip ---------- */
.chip-points {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 201, 77, 0.35);
  flex: none;
}

/* ---------- Progress bar ---------- */
.pbar { position: relative; width: 100%; border-radius: 999px; background: rgba(255, 255, 255, 0.09); flex: none; }
.pbar > .pfill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--grad); transition: width 0.35s; }

/* ---------- Avatar badge ---------- */
.avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--grad);
  color: rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  flex: none;
}

/* ---------- Segment picker (custom capsule) ---------- */
.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}
.seg > button {
  position: relative;
  flex: 1 1 0;
  padding: 9px 0;
  text-align: center;
  font: 600 15px/20px var(--font);
  color: var(--dim);
  border-radius: 999px;
  transition: color 0.2s ease-in-out;
}
.seg > button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}
.seg > button > span { position: relative; }
.seg > button.on { color: rgba(0, 0, 0, 0.85); }
.seg > button.on::before { opacity: 1; }

/* ---------- iOS native-looking controls ---------- */
.ios-seg {
  position: relative;
  display: flex;
  height: 32px;
  padding: 2px;
  border-radius: 9px;
  background: rgba(118, 118, 128, 0.24);
  width: 100%;
}
.ios-seg > button {
  flex: 1 1 0;
  position: relative;
  z-index: 1;
  text-align: center;
  font: 500 13px/28px -apple-system, system-ui, var(--font);
  color: #fff;
}
.ios-seg > button.on { font-weight: 600; }
.ios-seg > .thumb {
  position: absolute;
  top: 2px; bottom: 2px;
  border-radius: 7px;
  background: #636366;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
  transition: left 0.25s cubic-bezier(0.3, 0.7, 0.3, 1);
}

.stepper {
  display: flex;
  align-items: center;
  width: 94px;
  height: 32px;
  border-radius: 8px;
  background: rgba(118, 118, 128, 0.24);
  flex: none;
}
.stepper > button {
  flex: 1 1 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
}
.stepper > button:active { background: rgba(255, 255, 255, 0.08); }
.stepper > button:disabled { opacity: 0.3; cursor: default; }
.stepper > i.sep { width: 1px; height: 18px; background: rgba(255, 255, 255, 0.18); flex: none; }

.dp-row { display: flex; align-items: center; min-height: 36px; gap: 8px; }
.dp-pills { display: flex; gap: 6px; flex: none; }
.dp-pill {
  position: relative;
  padding: 6px 11px;
  border-radius: 7px;
  background: rgba(118, 118, 128, 0.24);
  font: 400 17px/22px -apple-system, system-ui, var(--font);
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
}
.dp-pill input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  cursor: pointer;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}
.dp-pill input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* ---------- Main tab view ---------- */
.main { position: absolute; inset: 0; }
.page { position: absolute; inset: 0; display: none; }
.page.on { display: block; }

.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--tabbar);
  padding-bottom: var(--sab);
  display: flex;
  background: rgb(13, 18, 33);
  box-shadow: 0 -0.5px 0 rgba(255, 255, 255, 0.06);
  z-index: 20;
}
.tabbar > button {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
  gap: 2px;
  color: #999;
  font: 500 10px/12px -apple-system, system-ui, var(--font);
}
.tabbar > button.on { color: var(--tint); }
.tabbar .tic { position: relative; height: 28px; display: flex; align-items: center; justify-content: center; }
.tabbar .tic .ic { font-size: 26px; }
.tabbar .badge {
  position: absolute;
  top: -1px;
  left: calc(50% + 7px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #FF3B30;
  color: #fff;
  font: 400 13px/18px -apple-system, system-ui, sans-serif;
  text-align: center;
}

/* ---------- Toast ---------- */
.toast-wrap {
  position: absolute;
  left: 0; right: 0;
  top: calc(var(--sat) + 6px);
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 30;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #1C2645;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 6px 28px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.45s cubic-bezier(0.34, 1.35, 0.64, 1) both;
}
.toast.out { animation: toastOut 0.32s ease-in both; }
@keyframes toastIn { from { transform: translateY(-140%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { from { transform: none; opacity: 1; } to { transform: translateY(-140%); opacity: 0; } }

/* ---------- Onboarding ---------- */
.onb { position: absolute; inset: 0; display: flex; flex-direction: column; }
.onb-pages { position: relative; flex: 1 1 auto; overflow: hidden; z-index: 1; touch-action: pan-y; }
.onb-track { display: flex; height: 100%; width: 300%; transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1); }
.onb-page { width: calc(100% / 3); height: 100%; position: relative; overflow: hidden; }
.onb-dots { position: relative; z-index: 1; display: flex; justify-content: center; gap: 8px; padding-bottom: 20px; }
.onb-dots > i { display: block; height: 8px; width: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.2); transition: width 0.45s cubic-bezier(0.34, 1.4, 0.64, 1); }
.onb-dots > i.on { width: 26px; background: var(--grad); }
.onb-btn { position: relative; z-index: 1; padding: 0 24px calc(24px + var(--sab)); }
.welcome { height: 100%; display: flex; flex-direction: column; align-items: center; gap: 22px; padding-top: var(--sat); }
.welcome .s1 { flex: 1 1 0; }
.welcome .s2 { flex: 2 1 0; }
.hero {
  width: 150px; height: 150px; border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  color: rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 80px color-mix(in srgb, var(--c1) 50%, transparent);
  flex: none;
}
.how { height: 100%; display: flex; flex-direction: column; gap: 18px; padding: var(--sat) 24px 0; }
.how .s { flex: 1 1 0; }
.feat-ic {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  color: rgba(0, 0, 0, 0.8);
  flex: none;
}
.round-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex: none;
}
.preset {
  flex: 1 1 0;
  padding: 10px 0;
  border-radius: 999px;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  font: 700 15px/20px var(--font);
  color: #fff;
}
.preset.on { background: var(--grad); color: rgba(0, 0, 0, 0.85); }

/* ---------- Today ---------- */
.goal-chip { padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.ring { position: relative; width: 230px; height: 230px; align-self: center; flex: none; }
.ring canvas { position: absolute; left: -11px; top: -11px; width: 252px; height: 252px; }
.ring .inner { position: absolute; inset: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.circle-ic { border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.sq-ic { display: flex; align-items: center; justify-content: center; flex: none; }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; }
.bars > .col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 6px; }
.bars .bar { border-radius: 7px; width: 100%; transition: height 0.35s; }
.bars .vlabel { font-size: 9px; line-height: 11px; font-weight: 700; color: var(--dim); text-align: center; height: 11px; }
.bars .dlabel { font-size: 12px; line-height: 15px; text-align: center; }
.legend-sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }

.entry-row { cursor: pointer; transition: transform 0.2s; }
.entry-row.pressing { transform: scale(0.98); }

/* ---------- History FAB ---------- */
.fab {
  position: absolute;
  right: 20px;
  bottom: calc(var(--tabbar) + 20px);
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--grad);
  color: rgba(0, 0, 0, 0.85);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 28px color-mix(in srgb, var(--c1) 50%, transparent);
  z-index: 5;
}

/* ---------- Goals ---------- */
.status-chip { padding: 5px 10px; border-radius: 999px; }
.icon-pick { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.07); color: #fff; }
.icon-pick.on { background: var(--grad); color: rgba(0, 0, 0, 0.85); }
.tpreset { flex: none; padding: 9px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font: 700 15px/20px var(--font); color: #fff; }
.tpreset.on { background: var(--grad); color: rgba(0, 0, 0, 0.85); }

/* ---------- Rewards ---------- */
.lvl { width: 66px; height: 66px; border-radius: 50%; background: var(--grad); color: rgba(0, 0, 0, 0.85); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.gold-capsule { background: var(--gold); color: rgba(0, 0, 0, 0.85); border-radius: 999px; }

/* ---------- Unlocks ---------- */
.swatch { position: relative; height: 64px; border-radius: 14px; width: 100%; }
.swatch .corner { position: absolute; top: 0; right: 0; }
.equip-ring { position: absolute; inset: -1px; border-radius: 22px; pointer-events: none; }
.rel { position: relative; }
.lock-badge { position: absolute; left: 50%; top: 50%; transform: translate(calc(-50% + 20px), calc(-50% + 20px)); padding: 5px; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; display: flex; }

/* ---------- Sheet ---------- */
#sheet-layer { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
#sheet-layer.on { pointer-events: auto; }
.sheet-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); opacity: 0; transition: opacity 0.38s; }
#sheet-layer.on .sheet-dim { opacity: 1; }
.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  top: calc(var(--sat) + 10px);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  transform: translateY(105%);
  transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
  background: var(--bgTop);
}
#sheet-layer.on .sheet { transform: translateY(0); }
.sheet.dragging { transition: none; }
.navbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 3;
  touch-action: none;
}
.navbar .nt { position: absolute; left: 50%; transform: translateX(-50%); font: 600 17px/22px -apple-system, system-ui, var(--font); color: #fff; white-space: nowrap; }
.navbar button { font: 400 17px/22px -apple-system, system-ui, var(--font); color: var(--tint); padding: 8px 0; position: relative; z-index: 1; }
.navbar button.bold { font-weight: 600; }
.navbar button:disabled { color: rgba(235, 235, 245, 0.3); cursor: default; }
.navbar button:not(:disabled):active { opacity: 0.4; }
.sheet .scroll { top: 56px; }
.sheet .content { padding: 16px 16px calc(16px + var(--sab)); }

/* ---------- Alert ---------- */
#alert-layer { position: absolute; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; }
#alert-layer.on { display: flex; }
.alert-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.48); animation: fadeIn 0.2s both; }
.alert {
  position: relative;
  width: 270px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(37, 37, 37, 0.9);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  backdrop-filter: blur(40px) saturate(1.8);
  font-family: -apple-system, system-ui, var(--font);
  text-align: center;
  animation: alertIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
.alert.out, .alert-dim.out { animation: fadeOut 0.18s both; }
.alert .at { padding: 19px 16px 0; font-weight: 600; font-size: 17px; line-height: 22px; color: #fff; }
.alert .am { padding: 2px 16px 19px; font-size: 13px; line-height: 18px; color: #fff; }
.alert .ab { display: flex; box-shadow: 0 -0.5px 0 rgba(84, 84, 88, 0.65); }
.alert .ab.vert { flex-direction: column; }
.alert .ab button { flex: 1 1 0; height: 44px; font-size: 17px; color: var(--tint); text-align: center; }
.alert .ab button + button { box-shadow: -0.5px 0 0 rgba(84, 84, 88, 0.65); }
.alert .ab.vert button + button { box-shadow: 0 -0.5px 0 rgba(84, 84, 88, 0.65); }
.alert .ab button.cancel { font-weight: 600; }
.alert .ab button.destructive { color: var(--ios-red); }
.alert .ab button:active { background: rgba(255, 255, 255, 0.08); }
@keyframes alertIn { from { transform: scale(1.18); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* ---------- Menus ---------- */
#menu-layer { position: absolute; inset: 0; z-index: 70; display: none; }
#menu-layer.on { display: block; }
.menu-dim { position: absolute; inset: 0; animation: fadeIn 0.2s both; }
.menu-dim.blur { background: rgba(0, 0, 0, 0.35); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.menu-preview { position: absolute; pointer-events: none; transform-origin: center; animation: lift 0.3s cubic-bezier(0.3, 1.4, 0.5, 1) both; border-radius: 22px; overflow: hidden; }
@keyframes lift { from { transform: scale(1); } to { transform: scale(1.03); } }
.menu {
  position: absolute;
  width: 250px;
  border-radius: 13px;
  overflow: hidden;
  background: rgba(37, 37, 37, 0.85);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  backdrop-filter: blur(40px) saturate(1.8);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  font-family: -apple-system, system-ui, var(--font);
  animation: menuIn 0.28s cubic-bezier(0.2, 1.1, 0.4, 1) both;
}
@keyframes menuIn { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; height: 44px; padding: 0 16px; font-size: 17px; color: #fff; }
.menu button + button { box-shadow: 0 -0.5px 0 rgba(84, 84, 88, 0.65); }
.menu button.destructive { color: var(--ios-red); }
.menu button:active { background: rgba(255, 255, 255, 0.1); }
.menu button .ic { font-size: 19px; }
