/* strictly.cash design system — iOS / visionOS light */
:root {
  --bg: #F5F5F7;
  --card: #FFFFFF;
  --ink: #0A0A0A;
  --ink-2: #4A4A4F;
  --ink-3: #636368;
  --line: rgba(0, 0, 0, 0.08);
  --fill: rgba(118, 118, 128, 0.12);
  --blue: #0A0A0A;
  --blue-press: #2C2C2E;
  --green: #1D7535;
  --green-soft: rgba(36, 138, 61, 0.1);
  --orange: #C93400;
  --red: #CC0014;
  --glass: rgba(255, 255, 255, 0.72);
  --primary: #0A0A0A;
  --on-primary: #FFFFFF;
  --surface-raised: #FFFFFF;
  --inverse: #0A0A0A;
  --on-inverse: #FFFFFF;
  --stage: transparent;
  --stage-sheet: linear-gradient(180deg, #FFFFFF, #FAFAFA);
  --skeleton-a: #ECECF0;
  --skeleton-b: #F7F7F9;
  --warn-bg: #FFF8EC;
  --heart-bg: rgba(255, 255, 255, 0.85);
  --lock-bg: rgba(255, 255, 255, 0.8);
  --toast-bg: rgba(255, 255, 255, 0.86);
  color-scheme: light;

  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --r-xs: 8px;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 30px rgba(0, 0, 0, 0.06), 0 30px 70px rgba(0, 0, 0, 0.07);
  --shadow-float: 0 2px 6px rgba(0, 0, 0, 0.05), 0 20px 50px rgba(0, 0, 0, 0.12);

  --font: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-word: "Cabinet Grotesk", "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --green-dark-bg: #3DBA74;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);

  --tabbar-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

/* Night mode: chosen in the app, or following the device when no choice is saved */
:root[data-theme="dark"] {
  --bg: #000000;
  --card: #1C1C1E;
  --ink: #F5F5F7;
  --ink-2: #B4B4BA;
  --ink-3: #9A9AA0;
  --line: rgba(255, 255, 255, 0.1);
  --fill: rgba(118, 118, 128, 0.24);
  --blue: #F5F5F7;
  --blue-press: #D1D1D6;
  --green: #3DBA74;
  --green-soft: rgba(61, 186, 116, 0.16);
  --orange: #FF9F0A;
  --red: #FF453A;
  --glass: rgba(18, 18, 20, 0.72);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 2px 6px rgba(0, 0, 0, 0.5), 0 20px 50px rgba(0, 0, 0, 0.6);
  --primary: #F5F5F7;
  --on-primary: #0A0A0A;
  --surface-raised: #2C2C2E;
  --inverse: #161618;
  --on-inverse: #FFFFFF;
  --stage: rgba(255, 255, 255, 0.05);
  --stage-sheet: rgba(255, 255, 255, 0.05);
  --skeleton-a: #1C1C1E;
  --skeleton-b: #2A2A2D;
  --warn-bg: rgba(255, 159, 10, 0.14);
  --heart-bg: rgba(44, 44, 46, 0.85);
  --lock-bg: rgba(28, 28, 30, 0.85);
  --toast-bg: rgba(44, 44, 46, 0.92);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --card: #1C1C1E;
    --ink: #F5F5F7;
    --ink-2: #B4B4BA;
    --ink-3: #9A9AA0;
    --line: rgba(255, 255, 255, 0.1);
    --fill: rgba(118, 118, 128, 0.24);
    --blue: #F5F5F7;
    --blue-press: #D1D1D6;
    --green: #3DBA74;
    --green-soft: rgba(61, 186, 116, 0.16);
    --orange: #FF9F0A;
    --red: #FF453A;
    --glass: rgba(18, 18, 20, 0.72);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-float: 0 2px 6px rgba(0, 0, 0, 0.5), 0 20px 50px rgba(0, 0, 0, 0.6);
    --primary: #F5F5F7;
    --on-primary: #0A0A0A;
    --surface-raised: #2C2C2E;
    --inverse: #161618;
    --on-inverse: #FFFFFF;
    --stage: rgba(255, 255, 255, 0.05);
    --stage-sheet: rgba(255, 255, 255, 0.05);
    --skeleton-a: #1C1C1E;
    --skeleton-b: #2A2A2D;
    --warn-bg: rgba(255, 159, 10, 0.14);
    --heart-bg: rgba(44, 44, 46, 0.85);
    --lock-bg: rgba(28, 28, 30, 0.85);
    --toast-bg: rgba(44, 44, 46, 0.92);
    color-scheme: dark;
  }
}
/* Smooth switch between day and night */
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease) !important;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(10, 10, 10, 0.25); text-underline-offset: 3px; }
a.btn, a.logo, a.icon-btn { text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 3px solid rgba(36, 138, 61, 0.5); outline-offset: 2px; border-radius: var(--r-xs); }
[hidden] { display: none !important; }

/* ---------- Type ---------- */
.t-hero { font-family: var(--font-display); font-stretch: 125%; font-size: clamp(44px, 8vw, 88px); line-height: 0.95; letter-spacing: -0.02em; font-weight: 900; margin: 0; }
.t-1 { font-family: var(--font-display); font-stretch: 125%; font-size: clamp(28px, 4vw, 44px); line-height: 1; letter-spacing: -0.015em; font-weight: 850; margin: 0; }
.t-2 { font-size: 28px; line-height: 1.14; letter-spacing: -0.03em; font-weight: 700; margin: 0; }
.t-3 { font-size: 21px; line-height: 1.24; letter-spacing: -0.02em; font-weight: 600; margin: 0; }
.t-body { font-size: 17px; color: var(--ink-2); margin: 0; }
.t-small { font-size: 14px; line-height: 1.43; color: var(--ink-2); letter-spacing: -0.01em; }
.t-tiny { font-size: 12px; line-height: 1.33; color: var(--ink-3); letter-spacing: 0; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.logo { font-family: var(--font-word); font-weight: 800; letter-spacing: -0.045em; font-size: 21px; color: var(--ink); text-decoration: none; line-height: 1; }
.logo b { /* the green centred dot in Strictly·Cash, drawn so it looks the same in every font */
  display: inline-block; width: 0.21em; height: 0.21em; border-radius: 50%; background: var(--green);
  color: transparent; overflow: hidden; text-indent: 200%; white-space: nowrap; line-height: 0;
  vertical-align: 0.27em; margin: 0 0.1em; }
.logo:hover { color: var(--ink); }
.muted { color: var(--ink-2); }
.green { color: var(--green); }

/* ---------- Surfaces ---------- */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.15s, opacity 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--blue-press); }
.btn-dark { background: var(--primary); color: var(--on-primary); }
.btn-soft { background: var(--fill); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--blue); padding: 0 12px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 15px; }
.btn-danger { background: rgba(204, 0, 20, 0.1); color: var(--red); }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; color: var(--ink-2); padding-left: 4px; }
.input, .select, .textarea {
  width: 100%;
  border: 0;
  background: var(--fill);
  border-radius: var(--r-sm);
  padding: 13px 14px;
  font-size: 17px;
  outline: none;
  transition: box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus { box-shadow: 0 0 0 3px rgba(36, 138, 61, 0.35); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--fill);
  border-radius: var(--r-sm);
  padding: 2px;
}
.segmented button {
  border: 0; background: transparent; border-radius: var(--r-xs);
  padding: 8px 10px; font-size: 14px; font-weight: 500; cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--surface-raised); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); font-weight: 600; }

/* ---------- Word-mark marquee ---------- */
.marquee {
  background: #000;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  padding: 14px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: inline-flex;
  gap: 28px;
  padding-right: 28px;
  animation: marquee 38s linear infinite;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 15px;
}
.marquee-track span { text-shadow: 0 0 12px rgba(255, 255, 255, 0.55), 0 0 28px rgba(120, 180, 255, 0.35); }
.marquee-track i { font-style: normal; color: rgba(255, 255, 255, 0.35); text-shadow: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Product imagery: transparent PNGs float on white ---------- */
.float-img {
  background: var(--stage);
  border-radius: var(--r-md);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 12px;
}
.float-img img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.14)) drop-shadow(0 4px 4px rgba(0, 0, 0, 0.06));
}

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: -0.01em;
  background: var(--fill); color: var(--ink);
}
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-blue { background: var(--primary); color: var(--on-primary); }
.pill-orange { background: rgba(201, 52, 0, 0.1); color: var(--orange); }
.pill-red { background: rgba(204, 0, 20, 0.1); color: var(--red); }

/* ---------- Sheet (bottom sheet on mobile, dialog on desktop) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0, 0, 0, 0.32);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; z-index: 91; left: 0; right: 0; bottom: 0;
  max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 10px 20px calc(24px + var(--safe-b));
  transform: translateY(100%);
  transition: transform 0.42s var(--ease);
  box-shadow: var(--shadow-float);
}
.sheet.open { transform: translateY(0); }
.sheet-grabber { width: 36px; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, 0.15); margin: 0 auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet-close { border: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--fill); cursor: pointer; font-size: 15px; color: var(--ink-2); flex: none; }
.sheet-back { border: 0; background: var(--fill); color: var(--ink); height: 30px; padding: 0 12px 0 8px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; flex: none; transition: transform .15s var(--ease), background .2s; }
.sheet-back:active { transform: scale(.94); }
.sheet-head h2 { flex: 1; min-width: 0; }
@media (min-width: 760px) {
  .sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: min(560px, 92vw);
    border-radius: var(--r-xl);
    padding: 22px 26px 26px;
    transform: translate(-50%, -46%) scale(0.98);
    opacity: 0;
    transition: transform 0.35s var(--ease), opacity 0.25s;
  }
  .sheet.open { transform: translate(-50%, -50%); opacity: 1; }
  .sheet-grabber { display: none; }
}

/* ---------- Toast (iOS notification style) ---------- */
.toast-wrap {
  position: fixed; z-index: 120; left: 0; right: 0;
  top: calc(10px + var(--safe-t));
  display: grid; justify-items: center; pointer-events: none;
}
.toast {
  pointer-events: auto;
  max-width: min(420px, calc(100vw - 24px));
  padding: 12px 18px; border-radius: var(--r-lg);
  background: var(--toast-bg);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--shadow-float);
  font-size: 15px; font-weight: 500;
  transform: translateY(-140%); transition: transform 0.45s var(--ease);
}
.toast.show { transform: translateY(0); }
.toast.error { color: var(--red); }

/* ---------- Notification-style feed items ---------- */
.notif {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}
.notif-icon {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  background: var(--primary); color: var(--on-primary); display: grid; place-items: center;
  font-weight: 800; font-size: 15px;
}
.notif-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); }
.notif-title { font-weight: 600; font-size: 15px; }
.notif-body { font-size: 15px; color: var(--ink); }

/* ---------- Progress tracker (Apple Store style) ---------- */
.track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0 6px; }
.track-bar { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.track-bar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 3px; transition: width 0.8s var(--ease); }
.track-bar.done i { width: 100%; }
.track-bar.now i { width: 50%; }
.track-labels { display: grid; grid-template-columns: repeat(3, 1fr); font-size: 12px; color: var(--ink-3); }
.track-labels span.on { color: var(--ink); font-weight: 600; }

/* ---------- Utilities ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.stack-lg { display: grid; gap: 20px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.copyable {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--fill); border-radius: var(--r-sm); padding: 10px 10px 10px 14px;
  font-variant-numeric: tabular-nums; word-break: break-all;
}
.empty { padding: 40px 20px; text-align: center; color: var(--ink-2); }
.divider { height: 1px; background: var(--line); margin: 4px 0; }


/* =========================================================
   Motion and depth
   ========================================================= */

/* Brand logo image (set in admin > Settings) */
.brand-logo { height: 26px; width: auto; display: block; }

/* Entrances */
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(0.8); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(36, 138, 61, 0.5); } 100% { box-shadow: 0 0 0 10px rgba(36, 138, 61, 0); } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(4%, -6%) scale(1.08); } 100% { transform: translate(0, 0) scale(1); } }
@keyframes sheen { from { transform: translateX(-120%) skewX(-18deg); } to { transform: translateX(260%) skewX(-18deg); } }
@keyframes slideIn { from { opacity: 0; transform: translateY(-12px) scale(0.97); } to { opacity: 1; transform: none; } }

.view-enter { animation: fadeIn 0.35s var(--ease) both; }
.stagger > * { animation: rise 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }

/* Scroll reveal */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
[data-reveal].in { opacity: 1; transform: none; }

/* Hover depth (pointer devices only) */
@media (hover: hover) {
  .lift { transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); }
  .lift:hover { transform: translateY(-6px); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04), 0 24px 60px rgba(0, 0, 0, 0.12); }
  .lift .float-img img { transition: transform 0.6s var(--ease); }
  .lift:hover .float-img img { transform: translateY(-6px) rotate(-3deg) scale(1.05); }
  .btn-primary:hover, .btn-dark:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22); }
  .btn-dark:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
}
.btn { position: relative; overflow: hidden; }
.btn-primary::after, .btn-dark::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-120%) skewX(-18deg); pointer-events: none;
}
@media (hover: hover) { .btn-primary:hover::after, .btn-dark:hover::after { animation: sheen 0.9s var(--ease); } }

/* Floating product in sheets */
.sheet .float-img img { animation: bob 6s ease-in-out infinite; }

/* Skeleton loading */
.skeleton { border-radius: var(--r-lg); background: linear-gradient(90deg, var(--skeleton-a) 0%, var(--skeleton-b) 50%, var(--skeleton-a) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }

/* Live dot */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; animation: pulse 1.6s ease-out infinite; }

/* New notification slides in */
.notif.new { animation: slideIn 0.55s var(--ease) both; }

/* Sticky bars gain depth when scrolled */
.scroll-shadow { transition: box-shadow 0.3s var(--ease); }
.scroll-shadow.scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06); }

/* Tab icon pop */
.tab[aria-current="page"] svg { animation: pop 0.4s var(--ease); }

/* Unread badge */
.dot-badge { position: absolute; top: 6px; right: calc(50% - 20px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; letter-spacing: 0; }

/* Ambient visionOS light */
.ambient { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ambient i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; animation: drift 18s ease-in-out infinite; }
.ambient i:nth-child(1) { width: 46vw; height: 46vw; max-width: 560px; max-height: 560px; background: #bcd9ff; top: -12%; right: -8%; }
.ambient i:nth-child(2) { width: 34vw; height: 34vw; max-width: 420px; max-height: 420px; background: #d8ccff; top: 30%; right: 22%; animation-delay: -6s; animation-duration: 22s; }
.ambient i:nth-child(3) { width: 30vw; height: 30vw; max-width: 380px; max-height: 380px; background: #c8f0dc; top: 10%; left: -10%; animation-delay: -11s; animation-duration: 26s; }

/* Headline word reveal */
.words span { display: inline-block; opacity: 0; transform: translateY(0.4em); filter: blur(6px); animation: wordIn 0.9s var(--ease) forwards; animation-delay: calc(var(--i) * 90ms + 120ms); }
@keyframes wordIn { to { opacity: 1; transform: none; filter: blur(0); } }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 6px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: var(--r-lg); font-size: 16px; line-height: 1.38; white-space: pre-wrap; word-wrap: break-word; animation: rise 0.4s var(--ease) both; }
.bubble.me { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 6px; }
.bubble.them { align-self: flex-start; background: var(--surface-raised); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.bubble-meta { font-size: 12px; color: var(--ink-3); margin: 2px 6px 8px; letter-spacing: 0; }
.bubble-meta.me { align-self: flex-end; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.composer textarea { min-height: 46px; max-height: 160px; resize: none; border-radius: var(--r-lg); padding: 12px 16px; }
.send { width: 46px; height: 46px; padding: 0; border-radius: 50%; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 0; background: var(--fill); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background 0.2s, color 0.2s, transform 0.15s; }
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }

/* Reduced motion (an OS setting many desktops have on by default):
   keep the soft fades so the site still feels alive, drop movement, drifting and bouncing. */
@media (prefers-reduced-motion: reduce) {
  @keyframes rise { from { opacity: 0; } to { opacity: 1; } }
  @keyframes slideIn { from { opacity: 0; } to { opacity: 1; } }
  @keyframes wordIn { to { opacity: 1; filter: blur(0); } }
  .words span { transform: none; }
  [data-reveal] { transform: none; transition: opacity 0.8s var(--ease); }
  .ambient i, .sheet .float-img img, .tab[aria-current="page"] svg,
  .transit::after, .btn-primary::after, .btn-dark::after { animation: none !important; }
  .lift:hover, .lift:hover .float-img img, .btn:active { transform: none !important; }
  .sheet, .toast { transition-duration: 0.2s; }
}

/* Day / night toggle button */
.theme-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--fill); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; flex: none; transition: transform .2s var(--ease); }
.theme-btn:active { transform: scale(.92) rotate(-20deg); }
.theme-btn .moon { display: block; } .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
  :root:not([data-theme="light"]) .theme-btn .sun { display: block; }
}
:root[data-theme="dark"] .ambient i { opacity: .2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ambient i { opacity: .2; } }

.usdc-nudge { background: var(--green-soft); color: var(--ink); border-radius: var(--r-sm); padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.renew-banner { width: 100%; border: 0; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 14px; cursor: pointer; background: var(--green-soft); box-shadow: none; color: var(--ink); }
.renew-clock { display: grid; gap: 2px; }
.renew-clock strong { font-size: 40px; letter-spacing: -0.04em; line-height: 1; }
.renew-clock span { color: var(--ink-2); font-size: 15px; }
.list-row > span:first-child { min-width: 0; flex: 1; }
.list-row .btn { flex: none; }

/* Never let anything widen the page on phones */
html, body { overflow-x: clip; }
.t-1, .t-2, .t-3 { overflow-wrap: anywhere; }
/* iPhone zooms into any text field smaller than 16px when it's tapped */
@media (max-width: 700px) {
  input, select, textarea, .input, .select, .textarea { font-size: 16px !important; }
}

/* Intro video */
.intro { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, 0.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); display: grid; place-items: center; padding: calc(12px + var(--safe-t)) 12px calc(12px + var(--safe-b)); opacity: 0; transition: opacity .3s var(--ease); }
.intro.open { opacity: 1; }
.intro-stage { position: relative; width: min(100%, calc((100dvh - 24px) * 9 / 16), 460px); aspect-ratio: 9 / 16; border-radius: var(--r-xl); overflow: hidden; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.6); transform: scale(.96); transition: transform .4s var(--ease); }
.intro.open .intro-stage { transform: none; }
.intro-video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.intro-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 8px; }
.intro-chip { border: 0; border-radius: 999px; padding: 9px 16px; min-height: 40px; font-weight: 600; font-size: 15px; color: #fff; background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: pointer; }
.intro-bar { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255,255,255,.2); }
.intro-bar i { display: block; height: 100%; width: 0; background: #3DBA74; transition: width .25s linear; }
.intro-end { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 18px 20px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.85) 40%); display: grid; gap: 10px; animation: rise .4s var(--ease) both; }
.intro-end-t { color: #fff; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
.intro-end .btn-primary { background: #fff; color: #0A0A0A; }
.intro-light { color: #fff !important; }
.intro-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 0; width: 100%; text-align: left; cursor: pointer; }
.intro-card .play { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; flex: none; }
/* Grid and stack children may shrink below their content width (long links, codes) */
.stack > *, .stack-lg > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .row > .grow { min-width: 0; }
.t-small, .t-tiny, .field > span { overflow-wrap: anywhere; }

/* "No USDC yet?" card guide inside the payment sheet */
.usdc-help { background: var(--bg); border-radius: var(--r-md); padding: 12px 14px; }
.usdc-help summary { list-style: none; display: flex; gap: 12px; align-items: center; cursor: pointer; }
.usdc-help summary::-webkit-details-marker { display: none; }
.usdc-help .play { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; flex: none; }
.usdc-guide { display: grid; gap: 12px; margin-top: 12px; animation: rise .35s var(--ease) both; }
.guide-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.guide-steps li { font-size: 15px; line-height: 1.45; }
.guide-steps li > span { display: block; color: var(--ink-2); font-size: 14px; margin-top: 2px; }


/* ---------- Back links (pages that open from another page) ---------- */
.back-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: var(--fill); color: var(--ink); border-radius: 999px; padding: 7px 14px 7px 10px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; margin: 2px 0 10px; transition: transform .2s var(--ease), background .2s; }
.back-link svg { transition: transform .25s var(--ease); }
.back-link:hover svg { transform: translateX(-3px); }
.back-link:active { transform: scale(.95); }

/* ---------- Motion pack ---------- */
:root { --spring: cubic-bezier(.34, 1.4, .64, 1); }

/* Pages glide in instead of just fading */
.view-enter { animation: viewIn .5s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: blur(0); } }

/* Sheets spring up; their content follows one piece at a time */
.sheet { transition: transform .5s var(--spring); }
.sheet.open .stack-lg > *, .sheet.open .stack > * { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms + 120ms); }
.sheet.open .stack-lg > :nth-child(1), .sheet.open .stack > :nth-child(1) { --i: 0; }
.sheet.open .stack-lg > :nth-child(2), .sheet.open .stack > :nth-child(2) { --i: 1; }
.sheet.open .stack-lg > :nth-child(3), .sheet.open .stack > :nth-child(3) { --i: 2; }
.sheet.open .stack-lg > :nth-child(4), .sheet.open .stack > :nth-child(4) { --i: 3; }
.sheet.open .stack-lg > :nth-child(5), .sheet.open .stack > :nth-child(5) { --i: 4; }
.sheet.open .stack-lg > :nth-child(n+6), .sheet.open .stack > :nth-child(n+6) { --i: 5; }

/* Everything pressable answers a tap */
.btn, .chip, .tab, .tier-opt, .price-opt, .cur-opt, .item-open, .intro-card, .renew-banner { -webkit-tap-highlight-color: transparent; }
.btn { transition: transform .18s var(--spring), box-shadow .3s var(--ease), background .2s, opacity .2s; }
.btn:active { transform: scale(.96); }
.tier-opt, .cur-opt, .intro-card, .renew-banner { transition: transform .2s var(--spring), border-color .25s, background .2s, box-shadow .3s var(--ease); }
.tier-opt:active, .cur-opt:active, .intro-card:active, .renew-banner:active { transform: scale(.98); }
.sizes button { transition: transform .2s var(--spring), background .2s, color .2s; }
.sizes button:active:not(:disabled) { transform: scale(.92); }
.sizes button[aria-pressed="true"] { animation: pop .35s var(--spring); }
.stepper button { transition: transform .15s var(--spring), background .2s; border-radius: 50%; }
.stepper button:active { transform: scale(.85); background: var(--line); }

/* Cards rise a little on hover with a soft glow */
/* Product cards fade up once as they scroll in; hover lift is untouched afterwards */
.item[data-reveal] { opacity: 0; transform: none; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.item[data-reveal].in { opacity: 1; animation: rise .7s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
@media (hover: hover) {
  .list-row { transition: background .2s; }
  .list-row:hover { background: var(--fill); }
  .tab { transition: color .2s, transform .2s var(--spring); }
  .tab:hover { transform: translateY(-1px); }
  .side .tab:hover { transform: translateX(3px); }
}

/* Active tab gets a sliding dot */
.tabbar .tab::before { content: ""; position: absolute; top: 4px; left: 50%; width: 18px; height: 3px; margin-left: -9px; border-radius: 3px; background: var(--blue); transform: scaleX(0); transition: transform .35s var(--spring); }
.tabbar .tab[aria-current="page"]::before { transform: scaleX(1); }

/* Bars fill in, numbers count up, pills pop */
.meter-bar i, .bar-fill { transition: width 1s var(--ease); }
.pill { transition: transform .2s var(--spring); }
.dot-badge { animation: pop .5s var(--spring) both; }

/* Live spread highlight sweeps once when a card scrolls in */
[data-reveal] .spread-line, .item[data-reveal] .spread-line { position: relative; overflow: hidden; }
.item.in .spread-line::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: translateX(-120%) skewX(-18deg); animation: sheen 1.1s var(--ease) .5s 1 both; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .view-enter { animation: fadeIn .3s both; }
  .sheet.open .stack-lg > *, .sheet.open .stack > * { animation: none; }
  .sizes button[aria-pressed="true"], .dot-badge, .item.in .spread-line::after { animation: none; }
  .meter-bar i, .bar-fill { transition: none; }
}

/* ---------- Image protection (deterrents) ---------- */
img, video { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.float-img img, .mini img, .order-head img, .media-grid img { pointer-events: none; }
@media print { body { display: none !important; } }

/* Simple on/off switch */
.switch-lite { position: relative; width: 50px; height: 30px; flex: none; }
.switch-lite input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch-lite span { position: absolute; inset: 0; border-radius: 999px; background: var(--fill); transition: background .2s; }
.switch-lite span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch-lite input:checked + span { background: var(--green); }
.switch-lite input:checked + span::after { transform: translateX(20px); }

/* Shuffle chip */
.chip-shuf { display: inline-flex; align-items: center; gap: 6px; }
.chip-shuf svg { transition: transform .5s var(--spring); }
.chip-shuf:active svg { transform: rotate(180deg); }
.chip-shuf[aria-pressed="true"] svg { transform: rotate(180deg); }

/* A wordmark (or custom logo) set inline inside a heading or sentence */
.inline-logo { display: inline-block; font-size: 1.12em; vertical-align: -0.04em; margin: 0 2px; }
.inline-logo .brand-logo { height: 1.1em; vertical-align: -0.15em; }

/* ---------- Celebration ---------- */
.celebrate { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .3s var(--ease); overflow: hidden; }
.celebrate.open { opacity: 1; }
.cel-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cel-confetti i { position: absolute; top: -16px; width: 9px; height: 15px; border-radius: 2px; opacity: 0; animation: confettiFall var(--d, 3s) linear var(--dl, 0s) forwards; }
@keyframes confettiFall { 0% { opacity: 1; transform: translate3d(0, -10px, 0) rotate(0); } 100% { opacity: .95; transform: translate3d(var(--x, 0), 105vh, 0) rotate(var(--r, 540deg)); } }
.cel-card { position: relative; width: min(420px, 100%); background: var(--card); color: var(--ink); border-radius: var(--r-xl); padding: 34px 26px 26px; text-align: center; box-shadow: var(--shadow-float); transform: translateY(24px) scale(.94); transition: transform .55s var(--spring, cubic-bezier(.34, 1.4, .64, 1)); }
.celebrate.open .cel-card { transform: none; }
.cel-ring { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; box-shadow: 0 0 0 10px rgba(36, 138, 61, .16); animation: celPop .7s var(--spring, cubic-bezier(.34, 1.4, .64, 1)) .15s both; }
@keyframes celPop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.cel-kicker { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green); }
.cel-title { margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: -0.035em; }
.cel-sub { margin: 10px 0 0; color: var(--ink-2); font-size: 16px; line-height: 1.45; }
.cel-actions { display: grid; gap: 10px; margin-top: 24px; }
@media (prefers-reduced-motion: reduce) { .cel-confetti { display: none; } .cel-ring, .cel-card { animation: none; transition: none; } }

/* Type chips under the category chips (Drops) */
.sub-chips { margin-top: -6px; margin-bottom: 14px; }
.sub-chips[hidden] { display: none; }
.chip-sub { background: transparent; box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; padding: 5px 12px; display: inline-flex; gap: 6px; align-items: center; }
.chip-sub .chip-n { color: var(--ink-3); font-weight: 500; }
.chip-sub[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.chip-sub[aria-pressed="true"] .chip-n { color: inherit; opacity: .75; }

/* Collapsible admin sections */
.acc-head { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; user-select: none; }
.acc-head > :first-child { flex: 1 1 auto; }
.acc-head .acc-chev { flex: none; transition: transform .3s var(--ease); color: var(--ink-3); }
.acc-open > .acc-head .acc-chev { transform: rotate(180deg); }
.acc-body[hidden] { display: none; }
.card:has(> .acc-head) { gap: 0; }
.card:has(> .acc-head) > .acc-body { margin-top: 14px; }

/* ---------- Phones on their side (every page: landing, member app, admin) ---------- */
/* Landscape phones are wide but only ~320-430px tall, and the notch / camera island sits on the left or right edge.
   Content keeps clear of it, the bars get shorter so more of the page shows, sheets open wide instead of as a small
   box, and a product photo never takes the whole height. Text never rescales on rotation (text-size-adjust above). */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --tabbar-h: 48px; }
  body { padding-left: var(--safe-l); padding-right: var(--safe-r); }
  .tabbar, .toast-wrap { padding-left: var(--safe-l); padding-right: var(--safe-r); }
  .tab { gap: 1px; font-size: 11px; }
  .tab svg { width: 21px; height: 21px; }
  .tabbar .tab::before { top: 2px; }
  .topbar { padding-top: calc(5px + var(--safe-t)); padding-bottom: 6px; }
  .sheet { padding-left: calc(18px + var(--safe-l)); padding-right: calc(18px + var(--safe-r)); }
  .sheet .float-img, .lg-hero { max-height: 52dvh; }
  .sheet .float-img img, .lg-hero img { max-height: calc(52dvh - 24px); }
  .intro-stage { width: min(100%, calc((100dvh - 24px) * 9 / 16), 460px); }
  /* Product sheet: photo on the left (stays put), details scroll on the right */
  .pdp { grid-template-columns: minmax(0, 38%) minmax(0, 1fr); column-gap: 26px; align-items: start; }
  .pdp > .float-img { grid-column: 1; grid-row: 1 / span 40; position: sticky; top: 0; max-height: calc(100dvh - 96px); }
  .pdp > .float-img img { max-height: calc(100dvh - 120px); }
  .pdp > :not(.float-img) { grid-column: 2; }
}
@media (orientation: landscape) and (max-height: 520px) and (min-width: 760px) {
  .sheet {
    top: 8px; bottom: 0; left: 50%; right: auto;
    width: min(880px, calc(100vw - 16px - var(--safe-l) - var(--safe-r)));
    max-height: none; border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding: 14px 24px calc(16px + var(--safe-b));
    transform: translate(-50%, 8%); opacity: 0;
  }
  .sheet.open { transform: translate(-50%, 0); opacity: 1; }
}
