/* ==========================================================================
   Scent Check — Phase 1 prototype styles
   Dark theme primary. One accent: blue-green teal (#F3ECDC).
   No external fonts or assets — system type stack only.
   ========================================================================== */

:root {
  --accent: #f3ecdc;
  --accent-dark: #c9bfa8;
  --bg: #0a0a0b;
  --bg-elev: #161618;
  --bg-elev-2: #1f1f22;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f5f5f4;
  --text-dim: #a7a7ab;
  --text-faint: #6d6d72;
  --danger: #e5534b;
  /* Accent + buttons (owner, 2026-10-16): MONOCHROME identity — cream
     accent (--accent #F3ECDC / --accent-dark #C9BFA8) drives chips,
     badges, toggles, links and the nav pill; --btn-fill cream for
     primary buttons (near-black ink #111111), --btn-fill-2 charcoal
     #26262A for secondary buttons. Green, teal and amber-gold are
     retired from UI chrome; teal survives only in the app icon.
     Retint via these tokens. */
  --btn-fill: #f3ecdc;
  --btn-fill-2: #26262a;
  --radius: 16px;
  --nav-h: 62px;
  /* Shared top headroom for root screens (Groups / Search / Profile):
     clears the phone status bar / notch, plus visible breathing room.
     The feed header deliberately uses a smaller nudge (video stays
     immersive) — see .feed-tabs. */
  --head-top: calc(env(safe-area-inset-top) + 26px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: #000;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  overflow: hidden;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  font-size: inherit;
}
input, textarea, select { font-family: inherit; }
img { display: block; }
a { color: var(--accent); }

/* ---------- Phone frame / app column ---------- */
.phone {
  position: relative;
  width: min(430px, 100vw);
  height: min(932px, 100dvh);
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (min-width: 480px) and (min-height: 980px) {
  .phone {
    border-radius: 44px;
    border: 1px solid #2a2a2e;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.9), 0 0 0 10px #101012;
    height: min(932px, calc(100dvh - 48px));
  }
  body { background: radial-gradient(1200px 800px at 50% 30%, #10181a 0%, #000 60%); }
}

/* ---------- Views ---------- */
#views { flex: 1; position: relative; overflow: hidden; }
.view {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
}
.view.active { display: flex; }

.view-scroll {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  /* Views extend beneath the floating glass nav; keep the last content clear of it. */
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 26px);
}
.view-scroll::-webkit-scrollbar { width: 0; }

.view-head {
  padding: var(--head-top) 18px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.view-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.view-sub { color: var(--text-dim); font-size: 13px; margin-top: 2px; }
.view-head.gear-only { justify-content: flex-end; padding-bottom: 2px; }

.icon-btn {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--btn-fill-2); color: var(--text);
  transition: transform 0.15s ease, background 0.15s ease;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Bottom navigation — floating "liquid glass" bar ----------
   iOS-style glass: the bar detaches from the screen edges and floats
   above the bottom safe-area inset, so content scrolls beneath it.
   Frosted via backdrop blur + saturate over a translucent tint.
   Owner: NO white outline / specular edge lines — clean HD glass;
   depth comes from the blur, tint, and soft drop shadows. A single
   accent-glass pill SLIDES between tabs behind the active item. */
#bottomnav {
  position: absolute;
  left: 14px; right: 14px;
  bottom: calc(env(safe-area-inset-bottom) + 10px);
  height: var(--nav-h);
  border-radius: 999px;
  display: flex;
  z-index: 40;
  background: linear-gradient(180deg, rgba(52, 52, 58, 0.52), rgba(18, 18, 21, 0.46));
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.5),
    0 3px 10px rgba(0, 0, 0, 0.35);
}
/* Fallback when backdrop-filter is unavailable: near-opaque dark bar. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  #bottomnav { background: rgba(16, 16, 18, 0.96); }
}
#bottomnav button {
  flex: 1;
  position: relative;
  min-height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10.5px; font-weight: 600;
  transition: color 0.15s ease, transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1);
}
#bottomnav button svg, #bottomnav button span { position: relative; z-index: 1; }
#bottomnav button svg { width: 24px; height: 24px; }
#bottomnav button.active { color: var(--accent); }
/* Sliding accent-glass pill: ONE element that glides between tabs
   (positioned by moveNavPill in app.js) for a clean switch animation. */
#nav-pill {
  position: absolute; top: 6px; left: 0; height: calc(100% - 12px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(243, 236, 220, 0.30), rgba(243, 236, 220, 0.16));
  box-shadow: inset 0 0 0 1px rgba(243, 236, 220, 0.35);
  transition: transform 0.34s cubic-bezier(0.34, 1.25, 0.64, 1),
    width 0.34s cubic-bezier(0.34, 1.25, 0.64, 1), opacity 0.2s ease;
  opacity: 0; pointer-events: none; z-index: 0;
}
#nav-pill.no-anim { transition: none; }
@media (prefers-reduced-motion: reduce) { #nav-pill { transition: none; } }

/* Center plus: a raised accent circle popping out of the bar's top
   edge (TikTok-style), sitting between Groups and Search. It exists
   ONLY while posting is available (spray-day window + not yet posted
   + not banned) — app.js (refreshNavPlus) toggles [hidden]; hidden
   takes NO layout space, so the bar returns to the clean, evenly
   spaced 4-tab layout with no center gap. It is NOT a tab: the
   sliding pill never targets it. */
#bottomnav #nav-plus {
  position: relative; z-index: 2;
  flex: 0 0 52px; align-self: center;
  width: 52px; height: 52px; min-height: 52px; margin: 0 3px;
  border-radius: 50%;
  background: linear-gradient(180deg, #17c9b6, #0d9488);
  color: #fff;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.5),
    0 0 0 4px rgba(8, 8, 10, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(-14px);
  transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.2s ease;
}
#bottomnav #nav-plus[hidden] { display: none; }
#bottomnav #nav-plus svg { width: 26px; height: 26px; }
#bottomnav #nav-plus:active { transform: translateY(-14px) scale(0.9); }
#bottomnav #nav-plus.leaving { transform: translateY(-2px) scale(0.5); opacity: 0; }
@keyframes nav-plus-in {
  from { transform: translateY(-2px) scale(0.5); opacity: 0; }
  to { transform: translateY(-14px) scale(1); opacity: 1; }
}
#bottomnav #nav-plus.entering { animation: nav-plus-in 0.3s cubic-bezier(0.34, 1.4, 0.64, 1); }
@media (prefers-reduced-motion: reduce) {
  #bottomnav #nav-plus { transition: none; }
  #bottomnav #nav-plus.entering { animation: none; }
  #bottomnav #nav-plus:active { transform: translateY(-14px); }
}

/* ---------- Avatars & bottles (pure CSS visuals) ---------- */
.avatar {
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; flex: 0 0 auto;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  user-select: none;
}
.avatar.s36 { width: 36px; height: 36px; font-size: 13px; }
.avatar.s44 { width: 44px; height: 44px; font-size: 16px; }
.avatar.s56 { width: 56px; height: 56px; font-size: 20px; }
.avatar.s88 { width: 88px; height: 88px; font-size: 32px; }
.avatar.ring { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }

/* CSS fragrance bottle: cap + neck + body, tinted per fragrance hue. */
.bottle { position: relative; flex: 0 0 auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45)); }
.bottle .cap {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 34%; height: 16%; border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, #3d3d42, #17171a);
}
.bottle .neck {
  position: absolute; left: 50%; top: 15%; transform: translateX(-50%);
  width: 18%; height: 9%;
  background: linear-gradient(180deg, #c9c9cf, #8a8a91);
}
.bottle .body {
  position: absolute; left: 8%; right: 8%; top: 23%; bottom: 0;
  border-radius: 12% 12% 8% 8%;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.bottle .label {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%);
  width: 62%; padding: 8% 4%;
  background: rgba(250, 250, 248, 0.92); color: #151517;
  font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-align: center;
  text-transform: uppercase; line-height: 1.25; border-radius: 2px;
}
.bottle.b40 { width: 40px; height: 52px; }
.bottle.b56 { width: 56px; height: 74px; }
.bottle.b72 { width: 72px; height: 96px; }
.bottle.b120 { width: 120px; height: 160px; }
.bottle.b120 .label { font-size: 11px; }

/* ==========================================================================
   FEED
   ========================================================================== */
#view-feed { background: #000; }

.feed-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent);
}
.feed-tabs {
  display: flex; align-items: center; justify-content: center; gap: 26px;
  /* Small nudge only (owner's call): centered tabs, slight extra top
     breathing room — the video underneath stays full-bleed/immersive. */
  padding: 18px 20px 12px; position: relative;
}
.feed-tabs button {
  font-size: 16.5px; font-weight: 700; color: rgba(255, 255, 255, 0.62);
  padding: 4px 2px; position: relative; transition: color 0.15s ease;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.feed-tabs button.active { color: #fff; }
.feed-tabs button.active::after {
  content: ""; position: absolute; left: 50%; bottom: -3px; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 2px; background: var(--accent);
}

#feed-scroll {
  flex: 1; overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
#feed-scroll::-webkit-scrollbar { display: none; }

.video-card {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: #050505;
}
.video-card video.post-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
/* Animated poster "video" scene */
.poster-scene { position: absolute; inset: 0; overflow: hidden; }
.poster-scene .scene-bg {
  position: absolute; inset: -12%;
  animation: kenburns 18s ease-in-out infinite alternate;
  animation-play-state: paused;
}
.video-card.active .poster-scene .scene-bg { animation-play-state: running; }
@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.14) translate(-1.5%, 2%); }
}
.poster-scene .scene-bottle {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  opacity: 0.95;
}
.poster-scene .scene-grain {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px);
  background-size: 5px 5px; opacity: 0.25; mix-blend-mode: overlay;
}
.card-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.12) 34%, transparent 55%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 22%);
}
.play-indicator {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%) scale(0.8);
  width: 74px; height: 74px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45); display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease;
}
.play-indicator svg { width: 30px; height: 30px; color: #fff; }
.video-card.paused .play-indicator { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.progress-track {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(255, 255, 255, 0.18); z-index: 6;
}
.progress-fill {
  height: 100%; width: 0%; background: var(--accent);
}
.video-card.active .progress-fill { animation: progress 15s linear forwards; animation-play-state: running; }
.video-card.paused .progress-fill { animation-play-state: paused; }
@keyframes progress { from { width: 0%; } to { width: 100%; } }

/* card chrome — the action rail is anchored from the bottom, stacking
   upward from just above the fragrance-bar zone. */
.rail {
  position: absolute; right: 8px; bottom: 104px; z-index: 8;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.rail-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #fff; font-size: 11.5px; font-weight: 700;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
}
.rail-btn .rail-ic {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(20, 20, 22, 0.45); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s ease;
}
.rail-btn:active .rail-ic { transform: scale(0.9); }
.rail-btn svg { width: 25px; height: 25px; }
.rail-btn.liked { color: #ff4d6d; }
.rail-btn.liked .rail-ic { color: #ff4d6d; }
/* Expiry countdown — fills the rail slot the Notes button used to
   occupy (the fragrance bar under the caption still opens the scent
   page). Not a control: same column geometry as .rail-btn, cream
   clock, tabular digits so the ticking time never jitters sideways. */
.rail-count { cursor: default; }
.rail-count .rail-ic { color: var(--accent); }
.count-time { font-variant-numeric: tabular-nums; letter-spacing: 0.03em; }
.card-bottom {
  position: absolute; left: 0; right: 76px; bottom: 0; z-index: 7;
  padding: 0 14px 14px;
}
.creator-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.creator-names { min-width: 0; }
.creator-names .u { font-weight: 800; font-size: 16px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.creator-names .d { color: rgba(255, 255, 255, 0.75); font-size: 12.5px; text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8); }
.follow-btn {
  margin-left: auto; flex: 0 0 auto;
  padding: 7px 14px; border-radius: 999px;
  background: var(--btn-fill); color: #111111; font-weight: 800; font-size: 13.5px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.follow-btn:active { transform: scale(0.95); }
.follow-btn.following { background: rgba(255, 255, 255, 0.16); color: #fff; }
.caption {
  font-size: 14px; line-height: 1.45; color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.caption.expanded { -webkit-line-clamp: unset; }
.caption .more { color: rgba(255, 255, 255, 0.65); font-weight: 700; }
.hashtags { margin-top: 5px; font-size: 13.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85); }
.day-chip {
  display: inline-block; margin-bottom: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(0, 0, 0, 0.5); color: var(--accent);
  padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(243, 236, 220, 0.45);
}

.frag-bar {
  margin-top: 12px;
  display: flex; align-items: center; gap: 11px;
  background: rgba(14, 14, 16, 0.62); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px; padding: 8px 12px 8px 8px;
  text-align: left; width: 100%;
  transition: transform 0.12s ease;
}
.frag-bar:active { transform: scale(0.985); }
.frag-bar .fb-name { font-weight: 800; font-size: 14.5px; color: #fff; }
.frag-bar .fb-meta { color: rgba(255, 255, 255, 0.72); font-size: 12px; margin-top: 1px; }
.frag-bar .fb-chev { margin-left: auto; color: rgba(255, 255, 255, 0.6); flex: 0 0 auto; }
.frag-bar .fb-chev svg { width: 18px; height: 18px; display: block; }
.wearing-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 5px; vertical-align: 1px; }

/* In the feed, card chrome lifts to clear the floating glass nav
   (the feed has no post button — posting lives on Profile). */
#feed-scroll .video-card .card-bottom { bottom: 84px; }
#feed-scroll .video-card .rail { bottom: 176px; }

/* ==========================================================================
   Shared components
   ========================================================================== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--btn-fill); color: #111111; font-weight: 800; font-size: 15px;
  padding: 13px 22px; border-radius: 999px; width: 100%;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.28);
  transition: transform 0.14s cubic-bezier(0.34, 1.3, 0.64, 1), box-shadow 0.14s ease, opacity 0.15s ease;
}
.btn-primary:active { transform: scale(0.97) translateY(1px); box-shadow: 0 0 0 rgba(0, 0, 0, 0), 0 3px 8px rgba(0, 0, 0, 0.25); }
.btn-primary:disabled { opacity: 0.55; cursor: default; }
.btn-primary.busy { opacity: 0.85; }
.btn-primary.success { background: var(--accent-dark); }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--btn-fill-2); color: var(--text); font-weight: 700; font-size: 14.5px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line);
  transition: transform 0.14s cubic-bezier(0.34, 1.3, 0.64, 1), background 0.15s ease;
}
.btn-ghost:active { transform: scale(0.97) translateY(1px); }
/* Gentle keyboard focus ring everywhere (mouse taps unaffected) */
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid rgba(243, 236, 220, 0.6); outline-offset: 2px; }
/* Spinner for in-flight submit buttons */
.btn-spin {
  width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid rgba(17, 17, 17, 0.25); border-top-color: #111111;
  animation: btnSpin 0.7s linear infinite;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn-spin { animation-duration: 1.8s; } }
/* Icons inside generic buttons are ALWAYS sized — a bare <svg> with no
   rule renders at default replaced-element size and blows the button
   up (this is what made the success-screen Save button giant). */
.btn-primary svg, .btn-ghost svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--danger); color: #fff; font-weight: 800; font-size: 15px;
  padding: 13px 22px; border-radius: 999px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.28);
  transition: transform 0.14s cubic-bezier(0.34, 1.3, 0.64, 1), box-shadow 0.14s ease, opacity 0.15s ease;
}
.btn-danger:disabled { opacity: 0.55; cursor: default; }
.delete-list { margin: 10px 0 12px; padding-left: 20px; color: var(--text-dim); font-size: 13.5px; line-height: 1.7; }

.section-title {
  font-size: 13px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--text-dim); margin: 22px 18px 10px;
}
.pill-toggle {
  display: inline-flex; background: var(--btn-fill-2); border-radius: 999px; padding: 3px;
  border: 1px solid var(--line);
}
.pill-toggle button {
  padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--text-dim);
}
.pill-toggle button.active { background: var(--accent); color: #111111; }

/* Accessibility read-aloud switch (Settings -> Accessibility):
   a real role="switch" button; .on slides the knob and fills the
   track with the cream accent. */
.a11y-switch {
  flex: 0 0 auto; width: 48px; height: 28px; border-radius: 999px; padding: 0;
  background: var(--btn-fill-2); border: 1px solid var(--line); position: relative;
  transition: background 0.15s ease;
}
.a11y-switch .a11y-knob {
  position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--text-dim); transition: transform 0.16s ease, background 0.15s ease;
}
.a11y-switch.on { background: var(--accent); border-color: var(--accent); }
.a11y-switch.on .a11y-knob { transform: translateX(20px); background: #111111; }
.a11y-switch:disabled { opacity: 0.45; }

.row-item {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 18px; width: 100%; text-align: left;
  transition: background 0.12s ease;
}
.row-item:active { background: var(--bg-elev); }
.row-item .grow { flex: 1; min-width: 0; }
.row-item .t { font-weight: 700; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item .s { color: var(--text-dim); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item .chev { color: var(--text-faint); flex: 0 0 auto; }
.row-item .chev svg { width: 18px; height: 18px; display: block; }

.join-btn {
  flex: 0 0 auto; padding: 8px 16px; border-radius: 999px;
  background: var(--btn-fill); color: #111111; font-weight: 800; font-size: 13.5px;
}
.join-btn.joined { background: var(--btn-fill-2); color: var(--text); border: 1px solid var(--line); }

.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-elev-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 11px 16px; margin: 4px 18px 6px;
  color: var(--text-faint);
}
.search-box svg { width: 18px; height: 18px; flex: 0 0 auto; }
.search-box input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 15.5px; min-width: 0;
}
.search-box input::placeholder { color: var(--text-faint); }

.chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 8px 18px 2px; scrollbar-width: none; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px;
  background: var(--bg-elev-2); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--text-dim);
}
.chip.active { background: var(--accent); color: #111111; border-color: var(--accent); }

.proto-note {
  margin: 26px 18px 10px; padding: 12px 14px;
  border: 1px dashed rgba(243, 236, 220, 0.4); border-radius: 12px;
  color: var(--text-dim); font-size: 12.5px; line-height: 1.5; text-align: center;
}
.proto-note b { color: var(--accent); }

/* ---------- States: skeleton / spinner / empty / error ---------- */
.skeleton-card { height: 100%; padding: 90px 18px 30px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; background: #0d0d0f; }
.sk { border-radius: 10px; background: linear-gradient(100deg, #1a1a1d 40%, #242428 50%, #1a1a1d 60%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -80% 0; } }

.spinner {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3.5px solid rgba(255, 255, 255, 0.15); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.buffering {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.25);
}
.state-box {
  position: absolute; inset: 0; z-index: 9;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 30px; text-align: center; background: rgba(5, 5, 6, 0.72);
}
.state-box .big-ic {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--bg-elev-2); display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.state-box .big-ic svg { width: 30px; height: 30px; }
.state-box h3 { font-size: 18px; font-weight: 800; }
.state-box p { color: var(--text-dim); font-size: 14px; line-height: 1.5; max-width: 270px; }
.state-box .btn-primary, .state-box .btn-ghost { width: auto; }

.empty-block { padding: 56px 34px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-block .big-ic {
  width: 64px; height: 64px; border-radius: 50%; background: var(--bg-elev-2);
  display: flex; align-items: center; justify-content: center; color: var(--accent); margin-bottom: 4px;
}
.empty-block .big-ic svg { width: 30px; height: 30px; }
.empty-block h3 { font-size: 17.5px; font-weight: 800; }
.empty-block p { color: var(--text-dim); font-size: 14px; line-height: 1.55; }
.empty-block .btn-primary { width: auto; margin-top: 6px; }

/* ==========================================================================
   Search / Wardrobe / Groups lists & grids
   ========================================================================== */
/* Fragrance-page actions + WANTS bookmarks (owner, 2026-10-16) */
.frag-actions { display: flex; gap: 10px; padding: 18px 18px 0; }
.frag-actions .btn-primary { flex: 1; }
.bm-btn {
  width: 48px; flex: 0 0 auto; border-radius: 14px;
  background: var(--bg-elev-2); color: var(--text);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.bm-btn svg { width: 22px; height: 22px; }
.bm-btn.saved { background: var(--accent); color: #111111; border-color: transparent; }
.bm-btn.saved svg path { fill: currentColor; }
.bm-btn.small { width: 40px; height: 40px; border-radius: 12px; align-self: center; }
.bm-btn.small svg { width: 19px; height: 19px; }
.wardrobe-seg { margin: 14px 18px 2px; }
.want-status { padding: 10px 18px 0; color: var(--text-dim); font-size: 12.5px; line-height: 1.5; }
.want-row {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 18px 0; padding: 10px 12px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px;
}
.wr-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; }
.wr-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wr-name { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-brand { color: var(--text-dim); font-size: 12px; }
.wr-notes { color: var(--text-dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-own { flex: 0 0 auto; font-size: 12.5px; font-weight: 800; color: var(--accent); padding: 8px 4px; }

.frag-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 6px 18px 18px; }
.frag-card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 12px 13px; display: flex; flex-direction: column; align-items: center; gap: 9px;
  text-align: center; position: relative; transition: transform 0.12s ease;
  width: 100%;
}
.frag-card:active { transform: scale(0.98); }
.frag-card .fc-name { font-weight: 800; font-size: 14.5px; line-height: 1.25; }
.frag-card .fc-brand { color: var(--text-dim); font-size: 12px; font-weight: 600; }
.frag-card .fc-wear { color: var(--accent); font-size: 11.5px; font-weight: 700; }
.frag-card .remove-x {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-elev-2); color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
}
.frag-card .remove-x svg { width: 13px; height: 13px; }
.frag-add-tile {
  background: transparent; border: 1.5px dashed var(--line); border-radius: var(--radius);
  color: var(--text-dim); width: 100%; min-height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  font-size: 13px; font-weight: 700; transition: transform 0.12s ease;
}
.frag-add-tile:active { transform: scale(0.98); }
.frag-add-tile svg { width: 24px; height: 24px; }

.group-cover {
  height: 92px; border-radius: var(--radius); margin: 10px 18px 0;
  display: flex; align-items: flex-end; padding: 12px 14px;
  position: relative; overflow: hidden;
}
.group-cover .gc-name { font-size: 18px; font-weight: 800; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); position: relative; z-index: 1; }

/* Post history grid (profiles) */
.history-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }

/* History week view — page the permanent history 7 days at a time
   (display window only; nothing is ever deleted). */
.week-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px 10px;
}
.week-chev {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--btn-fill-2); color: var(--text);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.week-chev svg { width: 19px; height: 19px; }
.week-chev:disabled { opacity: .3; }
.week-label { font-size: 14.5px; font-weight: 800; letter-spacing: .01em; }

/* Profile history — month calendar (own Profile only; creator
   profiles keep the week-stepper grid above). Days with a check get a
   circular scene thumbnail with the date number overlaid; days
   without are plain muted numbers. Cells key off spray days. */
.cal-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px 10px;
}
.cal-label { font-size: 15.5px; font-weight: 800; letter-spacing: .01em; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 0 8px; row-gap: 4px;
}
.cal-dow {
  text-align: center; font-size: 11.5px; font-weight: 700;
  color: var(--text-dim); padding-bottom: 6px;
}
.cal-cell {
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.cal-num { font-size: 14.5px; font-weight: 600; color: var(--text-dim); }
.cal-cell.future .cal-num { color: var(--text-faint); }
.cal-cell.today .cal-num { color: var(--accent); font-weight: 800; }
.cal-cell.today::after {
  content: ""; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 15px; height: 2.5px; border-radius: 2px; background: var(--accent);
}
.cal-circle {
  position: relative; width: min(50px, 92%); aspect-ratio: 1 / 1;
  border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.cal-cell.today .cal-circle { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.cal-circle.held { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #f0a840; }
.cal-bottle { display: flex; transform: translateY(-4px); }
.cal-bottle .bottle { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5)); }
/* At b28 inside a 50px circle the bottle's text label is illegible and
   long brand names wrap past the label card — the calendar bottle is
   a clean silhouette; the gradient + date number carry the cell. */
.cal-bottle .bottle .label { display: none; }
.cal-daynum {
  position: absolute; left: 0; right: 0; bottom: 3px; text-align: center;
  font-size: 13.5px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.85);
}
.cal-held-dot {
  position: absolute; top: 3px; right: 3px; z-index: 2;
  width: 9px; height: 9px; border-radius: 50%;
  background: #f0a840; border: 1.5px solid rgba(0, 0, 0, 0.45);
}
.history-tile {
  aspect-ratio: 3 / 4; position: relative; overflow: hidden; text-align: left; width: 100%;
}
.history-tile .ht-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent 55%); }
.history-tile .ht-label {
  position: absolute; left: 8px; right: 8px; bottom: 7px; z-index: 1;
  font-size: 11px; font-weight: 700; line-height: 1.3; color: #fff;
}
.history-tile .ht-likes {
  position: absolute; left: 8px; top: 7px; z-index: 1;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}
.history-tile .ht-likes svg { width: 12px; height: 12px; }

/* Streaks */
.streak-hero {
  margin: 8px 18px 0; padding: 24px 20px; border-radius: 20px; text-align: center;
  background: linear-gradient(160deg, rgba(243, 236, 220, 0.22), rgba(243, 236, 220, 0.05) 55%, var(--bg-elev));
  border: 1px solid rgba(243, 236, 220, 0.35);
}
.streak-hero .flame-badge {
  width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 50%;
  background: var(--accent); color: #ffffff;
  display: flex; align-items: center; justify-content: center;
}
.streak-hero .flame-badge svg { width: var(--flame, 30px); height: var(--flame, 30px); }
.streak-hero .num { font-size: 52px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.streak-hero .lbl { color: var(--text-dim); font-size: 13.5px; margin-top: 5px; }
.streak-stats { display: flex; gap: 12px; margin: 14px 18px 0; }
.stat-card {
  flex: 1; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 14px; text-align: center;
}
.stat-card .v { font-size: 22px; font-weight: 900; }
.stat-card .k { color: var(--text-dim); font-size: 12px; margin-top: 3px; font-weight: 600; }
.day-dots { display: flex; justify-content: space-between; padding: 6px 18px 0; }
.day-dot { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.day-dot .dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--line); color: transparent;
  display: flex; align-items: center; justify-content: center;
}
.day-dot .dot svg { width: 15px; height: 15px; }
.day-dot.posted .dot { background: var(--accent); border-color: var(--accent); color: #111111; }
.day-dot.today .dot { border-color: var(--accent); }
.day-dot .dl { font-size: 10.5px; color: var(--text-faint); font-weight: 700; }

/* Streak bubble — compact Profile summary; tapping opens the Streaks screen */
.streak-bubble {
  display: flex; align-items: center; gap: 13px; width: calc(100% - 36px);
  margin: 16px 18px 0; padding: 13px 16px; text-align: left; cursor: pointer;
  background: linear-gradient(160deg, rgba(243, 236, 220, 0.16), rgba(243, 236, 220, 0.04) 60%, var(--bg-elev));
  border: 1px solid rgba(243, 236, 220, 0.35); border-radius: var(--radius); color: var(--text);
  transition: transform 0.15s ease;
}
.streak-bubble:active { transform: scale(0.985); }
.streak-bubble .sb-flame {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  background: var(--accent); color: #ffffff;
  display: flex; align-items: center; justify-content: center;
}
.streak-bubble .sb-flame svg { width: var(--flame, 23px); height: var(--flame, 23px); }
/* Streak flame animation (owner, 2026-10-16): a real flame DANCE — the
   glyph stretches, leans and darts (no symmetric pulsing), the chip
   breathes a soft tier-colored glow, and tiny embers rise and fade.
   Tier color arrives via the --tier custom property set inline. */
@keyframes flameDance {
  0%, 100% { transform: scale(1, 1) skewX(0deg); }
  20% { transform: scale(.97, 1.10) skewX(-2.5deg); }
  40% { transform: scale(1.02, .96) skewX(1.5deg); }
  60% { transform: scale(.95, 1.13) skewX(2.5deg) translateY(-.5px); }
  80% { transform: scale(1.01, .99) skewX(-1deg); }
}
@keyframes chipGlow {
  0%, 100% { box-shadow: 0 0 5px color-mix(in srgb, var(--tier, transparent) 35%, transparent); }
  55% { box-shadow: 0 0 16px color-mix(in srgb, var(--tier, transparent) 55%, transparent); }
}
@keyframes emberRise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  15% { opacity: .95; }
  100% { transform: translateY(-26px) scale(.35); opacity: 0; }
}
.flick { position: relative; animation: chipGlow 1.8s ease-in-out infinite; }
.flick svg { animation: flameDance 1.8s ease-in-out infinite; transform-origin: 50% 92%; }
.flick .embers { position: absolute; inset: 0; pointer-events: none; }
.flick .embers i {
  position: absolute; bottom: 24%; left: 50%; width: 3px; height: 3px;
  border-radius: 50%; background: var(--tier, #fff); opacity: 0;
  animation: emberRise 2.4s linear infinite;
}
.flick .embers i:nth-child(2) { animation-delay: .8s; margin-left: -6px; width: 2.5px; height: 2.5px; }
.flick .embers i:nth-child(3) { animation-delay: 1.6s; margin-left: 5px; width: 2px; height: 2px; }
.sb-tier { font-weight: 800; }
.profile-actions .btn-ghost.btn-hl { background: var(--accent); color: #111111; border-color: transparent; }
.profile-actions .btn-primary.btn-hl { background: var(--btn-fill-2); color: var(--text); }

.streak-bubble .sb-num { font-size: 30px; font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.streak-bubble .sb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.streak-bubble .sb-label { font-weight: 800; font-size: 14.5px; }
.streak-bubble .sb-state { color: var(--text-dim); font-size: 12.5px; margin-top: 1px; }
.streak-bubble .sb-chev { color: var(--text-faint); flex: 0 0 auto; display: flex; }
.streak-bubble .sb-chev svg { width: 20px; height: 20px; }

/* Profile */
.profile-head { padding: 12px 18px 6px; text-align: center; }
.profile-head.inview { padding-top: 8px; }
.profile-head .p-user { font-size: 19px; font-weight: 800; margin-top: 12px; }
.profile-head .p-name { color: var(--text-dim); font-size: 13.5px; margin-top: 2px; }
.profile-head .p-bio { font-size: 14px; line-height: 1.5; margin: 10px auto 0; max-width: 320px; }
.profile-counts { display: flex; justify-content: center; gap: 38px; margin: 16px 0 4px; }
.profile-counts .pc { text-align: center; }
.profile-counts .pc .v { font-size: 17px; font-weight: 900; }
.profile-counts .pc .k { color: var(--text-dim); font-size: 12px; }
.profile-actions { display: flex; gap: 10px; padding: 12px 18px 4px; }
.profile-actions .btn-primary, .profile-actions .btn-ghost { flex: 1; }

/* Fragrance detail */
.frag-hero {
  padding: 26px 18px 8px; display: flex; flex-direction: column; align-items: center; text-align: center;
}
.frag-hero .fh-brand { color: var(--accent); font-weight: 800; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.frag-hero .fh-name { font-size: 29px; font-weight: 900; letter-spacing: -0.02em; margin-top: 4px; line-height: 1.12; }
.frag-hero .fh-meta { color: var(--text-dim); font-size: 13.5px; margin-top: 6px; }
.frag-desc { padding: 12px 22px 0; color: #d8d8da; font-size: 14.5px; line-height: 1.6; text-align: center; }
.notes-wrap { padding: 4px 18px 0; }
.note-tier {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 15px; margin-top: 10px;
}
.note-tier .nt-k { font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.note-tier .nt-v { margin-top: 6px; font-size: 14.5px; line-height: 1.55; }
.link-row {
  display: flex; align-items: center; gap: 12px; margin: 10px 18px 0;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 15px;
  width: calc(100% - 36px); text-align: left;
}
.link-row .grow { flex: 1; }
.link-row .t { font-weight: 700; font-size: 14.5px; }
.link-row .s { color: var(--text-dim); font-size: 12.5px; margin-top: 1px; }

/* ==========================================================================
   Overlay screens & sheets
   ========================================================================== */
.screen {
  position: absolute; inset: 0; z-index: 60;
  background: var(--bg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.28s cubic-bezier(0.32, 0.72, 0.24, 1);
}
.screen.open { transform: translateX(0); }
.screen-head {
  padding: calc(env(safe-area-inset-top) + 18px) 14px 10px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--line);
}
.screen-head .sh-title { font-size: 17px; font-weight: 800; flex: 1; text-align: center; margin-right: 38px; }
.screen-head .back-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--text);
}
.screen-head .back-btn svg { width: 22px; height: 22px; }
.screen-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.screen-body::-webkit-scrollbar { width: 0; }
.screen.no-head .screen-body { padding-top: env(safe-area-inset-top); }

.sheet-wrap {
  position: absolute; inset: 0; z-index: 70;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.sheet-wrap.open { opacity: 1; pointer-events: auto; }
.sheet {
  background: var(--bg-elev); border-radius: 22px 22px 0 0;
  max-height: 86%; display: flex; flex-direction: column;
  transform: translateY(24px); transition: transform 0.24s ease;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet-wrap.open .sheet { transform: translateY(0); }
.sheet-grab { width: 40px; height: 4.5px; border-radius: 3px; background: rgba(255, 255, 255, 0.25); margin: 10px auto 4px; }
.sheet-head { padding: 8px 18px 10px; display: flex; align-items: center; justify-content: space-between; }
.sheet-head .st { font-size: 17px; font-weight: 800; }
.sheet-body { overflow-y: auto; padding: 0 18px 16px; }
.sheet-body::-webkit-scrollbar { width: 0; }

/* Comments */
.comment-row { display: flex; gap: 11px; padding: 10px 0; }
.comment-row .c-main { flex: 1; min-width: 0; }
.comment-row .c-u { font-weight: 800; font-size: 13.5px; }
.comment-row .c-t { font-size: 14px; line-height: 1.45; margin-top: 1px; overflow-wrap: break-word; }
.comment-row .c-time { color: var(--text-faint); font-size: 11.5px; margin-top: 2px; }
.comment-input-bar {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.comment-input-bar input {
  flex: 1; background: var(--bg-elev-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 11px 15px; color: var(--text); font-size: 14.5px; outline: none; min-width: 0;
}
.comment-input-bar .send-btn {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  background: var(--accent); color: #111111;
  display: flex; align-items: center; justify-content: center;
}
.comment-input-bar .send-btn svg { width: 18px; height: 18px; }

/* Post flow */
.flow-steps { display: flex; gap: 6px; padding: 14px 18px 4px; }
.flow-steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--bg-elev-2); }
.flow-steps i.on { background: var(--accent); }
.source-cards { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; }
.source-card {
  display: flex; gap: 14px; align-items: center; text-align: left; width: 100%;
  background: var(--btn-fill-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px;
}
.source-card .sc-ic {
  width: 50px; height: 50px; border-radius: 14px; flex: 0 0 auto;
  background: rgba(243, 236, 220, 0.15); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.source-card .sc-ic svg { width: 25px; height: 25px; }
.source-card .t { font-weight: 800; font-size: 16px; }
.source-card .s { color: var(--text-dim); font-size: 13px; margin-top: 3px; line-height: 1.45; }
.preview-box {
  margin: 14px 18px 0; border-radius: var(--radius); overflow: hidden;
  background: #000; border: 1px solid var(--line);
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; position: relative;
}
.preview-box video { width: 100%; height: 100%; object-fit: cover; }
.preview-box .poster-scene { position: absolute; inset: 0; }
.field { padding: 12px 18px 0; }
.field label { display: block; font-size: 12.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
.field textarea, .field input[type="text"] {
  width: 100%; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 13px;
  padding: 12px 14px; color: var(--text); font-size: 15px; outline: none; resize: none;
}
.field textarea:focus, .field input[type="text"]:focus { border-color: var(--accent); }
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; padding: 11px 6px; border-radius: 12px; font-weight: 700; font-size: 13.5px;
  background: var(--btn-fill-2); border: 1px solid var(--line); color: var(--text-dim);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.seg button svg { width: 18px; height: 18px; }
.seg button.active { border-color: var(--accent); color: var(--accent); background: rgba(243, 236, 220, 0.1); }
.selected-frag {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--bg-elev); border: 1px solid var(--accent); border-radius: 13px; padding: 10px 13px;
}
.upload-progress { height: 8px; border-radius: 4px; background: var(--bg-elev-2); overflow: hidden; margin: 18px 18px 0; }
.upload-progress i { display: block; height: 100%; width: 0%; background: var(--accent); border-radius: 4px; transition: width 0.2s ease; }
.success-badge {
  width: 76px; height: 76px; border-radius: 50%; margin: 26px auto 0;
  background: var(--accent); color: #111111;
  display: flex; align-items: center; justify-content: center;
  animation: pop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.success-badge svg { width: 38px; height: 38px; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.flow-foot { padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; }
.flow-foot .btn-ghost { flex: 0 0 auto; }
.flow-foot .btn-primary { flex: 1; width: auto; }

/* ============ IN-APP CAMERA (post flow creation step) ============ */
/* Cam mode: the camera is full-screen — the standard screen head is
   hidden and the body stops scrolling. */
.post-flow-screen.cam-mode .screen-head { display: none; }
.post-flow-screen.cam-mode .screen-body { overflow: hidden; }
.cam2 { position: absolute; inset: 0; background: #000; }
.cam2 [hidden] { display: none !important; }
.cam2-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam2-video.mirror { transform: scaleX(-1); }
.cam2-shade { position: absolute; left: 0; right: 0; height: 130px; pointer-events: none; z-index: 1; }
.cam2-shade.top { top: 0; background: linear-gradient(rgba(0, 0, 0, .45), transparent); }
.cam2-shade.bottom { bottom: 0; height: 190px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
/* Segmented progress bar — fills toward the 45-second cap. */
.cam2-progress {
  position: absolute; top: calc(env(safe-area-inset-top) + 14px); left: 16px; right: 16px;
  height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .28);
  overflow: hidden; z-index: 4;
}
.cam2-progress i {
  display: block; height: 100%; width: 0;
  background: var(--accent); border-radius: 3px;
  transition: width .1s linear;
}
.cam2-progress::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 9 - 2px), rgba(0, 0, 0, .55) calc(100% / 9 - 2px) calc(100% / 9));
}
.cam2-top {
  position: absolute; top: calc(env(safe-area-inset-top) + 28px); left: 12px; right: 12px;
  display: flex; align-items: center; justify-content: space-between; z-index: 3;
}
.cam2-top-actions { display: flex; gap: 10px; }
/* Upload quality selector (Original = highest capture quality this
   device offers; Standard = a real lower-bitrate capture path). */
.cam2-quality {
  position: absolute; top: calc(env(safe-area-inset-top) + 84px); left: 50%;
  transform: translateX(-50%); display: flex; gap: 2px; padding: 3px;
  background: rgba(10, 10, 12, .45); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-radius: 999px; z-index: 3;
}
.cam2-quality button {
  border: 0; background: transparent; color: rgba(255, 255, 255, .72);
  font: inherit; font-size: 12.5px; font-weight: 700;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
}
.cam2-quality button.active { background: #F3ECDC; color: #111; }
.cam2.recording .cam2-quality { opacity: .35; pointer-events: none; }
.cam2-icbtn {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(10, 10, 12, .45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.cam2-icbtn svg { width: 21px; height: 21px; }
.cam2-icbtn.on { background: var(--accent); color: #111111; }
.cam2-icbtn:disabled { opacity: .35; }
.cam2-time {
  font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: rgba(10, 10, 12, .5); border-radius: 999px; padding: 7px 13px; color: #fff;
}
/* Priming + fallback panel (centered over the dark stage). */
.cam2-panel {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 32px 30px calc(env(safe-area-inset-bottom) + 120px);
  background: rgba(5, 5, 7, .58);
}
.cam2-panel-ic {
  width: 78px; height: 78px; border-radius: 50%;
  background: rgba(243, 236, 220, .16); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.cam2-panel-ic svg { width: 37px; height: 37px; }
.cam2-panel h3 { font-size: 20px; margin-top: 18px; }
.cam2-panel p { color: var(--text-dim); font-size: 14.5px; line-height: 1.55; max-width: 300px; margin: 8px 0 18px; }
.cam2-panel .cam2-panel-alt { font-size: 12.5px; color: var(--text-faint); margin: 14px 0 0; }
.cam2-note {
  position: absolute; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 128px); z-index: 3;
  background: rgba(18, 18, 20, .94); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5;
}
.cam2-bottom {
  position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 20px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 34px; z-index: 3;
}
.cam2-side {
  width: 64px; padding: 9px 0 7px; border-radius: 16px;
  background: rgba(10, 10, 12, .42);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
}
.cam2-side svg { width: 24px; height: 24px; }
.cam2.recording .cam2-side { opacity: .35; pointer-events: none; }
/* The record button: white ring; while recording the core becomes a
   smaller red rounded square (the universal "stop" affordance). */
.cam2-record {
  width: 78px; height: 78px; border-radius: 50%;
  border: 5px solid #fff; background: transparent;
  display: flex; align-items: center; justify-content: center;
}
.cam2-record span {
  width: 56px; height: 56px; border-radius: 50%; background: #fff;
  transition: width .18s ease, height .18s ease, border-radius .18s ease, background .18s ease;
}
.cam2-record.recording span { width: 30px; height: 30px; border-radius: 9px; background: #e5484d; }
.cam2-record:disabled { opacity: .35; }
.cam2-review {
  position: absolute; left: 18px; right: 18px; bottom: calc(env(safe-area-inset-bottom) + 22px);
  display: flex; gap: 10px; z-index: 3;
}
.cam2-review .btn-primary { flex: 1; width: auto; }

/* ============ CLIP EDITOR (post flow review step) ============ */
/* Large preview + transport row + the trim timeline + cover row.
   The timeline is one track: dimmed full clip, cream range between
   the two handles, white playhead inside it. Handles are wide pill
   grips (thumb targets); the whole track is pointer-draggable
   (touch-action none so touch drags never scroll the sheet). */
.review-box { aspect-ratio: 4 / 4.3; }
.review-bigplay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 68px; border-radius: 50%;
  background: rgba(10, 10, 12, .55); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .18s ease;
}
.review-bigplay svg { width: 30px; height: 30px; }
.review-controls {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 0;
}
.review-toggle {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
  background: var(--bg-elev-2); border: 1px solid var(--line); color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.review-toggle svg { width: 19px; height: 19px; }
.review-time { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.review-len { font-size: 12.5px; font-weight: 700; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.trim-block { padding: 16px 18px 0; }
.trim-track {
  position: relative; height: 44px; border-radius: 12px;
  background: var(--bg-elev-2); border: 1px solid var(--line);
  touch-action: none; cursor: pointer;
}
.trim-range {
  position: absolute; top: 0; bottom: 0;
  background: rgba(243, 236, 220, .18);
  border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  pointer-events: none;
}
.trim-playhead {
  position: absolute; top: 3px; bottom: 3px; width: 2px; margin-left: -1px;
  background: #fff; border-radius: 1px; pointer-events: none;
  box-shadow: 0 0 5px rgba(0, 0, 0, .6);
}
.trim-handle {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 22px; height: 40px; border-radius: 8px; z-index: 2;
  background: var(--accent); color: #111111;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45); cursor: ew-resize; touch-action: none;
}
.trim-handle::before, .trim-handle::after {
  content: ''; width: 2px; height: 16px; border-radius: 1px; background: rgba(17, 17, 17, .55);
}
.trim-handle::before { margin-right: 3px; }
.trim-labels {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 9px; gap: 8px;
}
.trim-lab { display: flex; align-items: center; gap: 2px; }
.trim-lab > button[data-nudge] {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--bg-elev-2); border: 1px solid var(--line); color: var(--text-dim);
  font-size: 15px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.trim-time {
  padding: 4px 6px; font-size: 13.5px; font-weight: 800; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.trim-mid { font-size: 12.5px; font-weight: 700; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.trim-hint { color: var(--text-dim); font-size: 12.5px; line-height: 1.5; margin-top: 10px; }
.cover-row {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px 0;
}
.cover-row .btn-ghost { flex: 0 0 auto; width: auto; display: inline-flex; align-items: center; gap: 7px; }
.cover-row .btn-ghost svg { width: 17px; height: 17px; }
.cover-thumb {
  width: 40px; height: 52px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--accent); flex: 0 0 auto;
}
.cover-state { font-size: 12.5px; color: var(--text-dim); line-height: 1.45; }

/* Dialog & toast */
.dialog-wrap {
  position: absolute; inset: 0; z-index: 90;
  background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center; padding: 28px;
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
}
.dialog-wrap.open { opacity: 1; pointer-events: auto; }
.dialog {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 20px;
  padding: 22px 20px 16px; width: 100%; max-width: 320px; text-align: center;
  transform: scale(0.94); transition: transform 0.18s ease;
}
.dialog-wrap.open .dialog { transform: scale(1); }
.dialog h3 { font-size: 17.5px; font-weight: 800; }
.dialog p { color: var(--text-dim); font-size: 14px; line-height: 1.55; margin-top: 8px; }
.dialog .d-actions { display: flex; gap: 10px; margin-top: 18px; }
.dialog .d-actions button { flex: 1; padding: 12px; border-radius: 999px; font-weight: 800; font-size: 14.5px; }
.dialog .d-cancel { background: var(--bg-elev-2); }
.dialog .d-confirm { background: var(--danger); color: #fff; }
.dialog .d-confirm.accent { background: var(--accent); color: #111111; }

#toast {
  position: absolute; left: 50%; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 30px);
  transform: translate(-50%, 16px); z-index: 120;
  background: #f5f5f4; color: #111;
  font-size: 13.5px; font-weight: 700;
  padding: 11px 18px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: calc(100% - 48px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Save to camera roll on the publish success screen — a compact pill,
   content-width and centered (owner: the full-width giant read wrong). */
.save-roll-btn { padding: 9px 16px; font-size: 13.5px; gap: 7px; }
.save-roll-btn svg { width: 16px; height: 16px; }

/* Save to camera roll — own posts, floating in the post viewer. */
.viewer-save {
  position: absolute; top: calc(env(safe-area-inset-top) + 10px); right: 12px; z-index: 6;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(10, 10, 12, .55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px;
  color: #fff; font-size: 13px; font-weight: 700; padding: 9px 14px;
}
.viewer-save svg { width: 16px; height: 16px; }

/* ==========================================================================
   Moderation — honest content states (under review / blocked / banned)
   and the Admin moderation queue. Status is always visible, never a
   silent removal: amber = under review, red = blocked/banned.
   ========================================================================== */
.success-badge.danger { background: rgba(229, 83, 75, .16); color: var(--danger); }
.success-badge.review { background: rgba(240, 168, 64, .18); color: #f0a840; }
.join-btn.danger { background: rgba(229, 83, 75, .14); color: var(--danger); }
.history-tile .ht-likes.review {
  background: rgba(240, 168, 64, .95); color: #241703; text-shadow: none;
  padding: 2.5px 8px; border-radius: 999px;
}
.comment-row.held { opacity: .72; }
.comment-row .c-held { color: #f0a840; font-size: 11.5px; font-weight: 700; margin-top: 3px; }
.viewer-held {
  position: absolute; top: calc(env(safe-area-inset-top) + 58px); left: 50%; transform: translateX(-50%);
  z-index: 6; display: inline-flex; align-items: center; gap: 7px;
  max-width: calc(100% - 48px);
  background: rgba(36, 23, 3, .82); color: #ffd9a0;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(240, 168, 64, .5); border-radius: 999px;
  font-size: 12.5px; font-weight: 700; padding: 8px 13px; text-align: center;
}
.viewer-held svg { width: 15px; height: 15px; flex: 0 0 auto; }
.viewer-remove {
  position: absolute; top: calc(env(safe-area-inset-top) + 56px); right: 12px; z-index: 6;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(30, 8, 8, .55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(229, 83, 75, .45); border-radius: 999px;
  color: #ffb4ae; font-size: 13px; font-weight: 700; padding: 9px 14px;
}
.viewer-remove svg { width: 15px; height: 15px; }
.mod-device-ban {
  display: flex; gap: 12px; align-items: center;
  margin: 2px 18px 12px; padding: 12px 14px; border-radius: 14px;
  background: rgba(229, 83, 75, .1); border: 1px solid rgba(229, 83, 75, .4);
  font-size: 13.5px; line-height: 1.45;
}
.mod-device-ban > svg { width: 22px; height: 22px; color: var(--danger); flex: 0 0 auto; }
.mod-device-ban .grow { flex: 1; min-width: 0; }
.mod-device-ban .s2 { color: var(--text-dim); font-size: 12px; line-height: 1.5; margin-top: 2px; }
.mod-banned-tag {
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 800;
  letter-spacing: .05em; padding: 2.5px 7px; border-radius: 999px; vertical-align: 2px;
}
.mod-acct { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.mod-item { padding: 4px 18px 12px 76px; }
.mod-item-main { display: flex; gap: 10px; align-items: flex-start; }
.mod-item-main .grow { flex: 1; min-width: 0; }
.mod-item .t { font-weight: 700; font-size: 14px; }
.mod-item .s { color: var(--text-dim); font-size: 12.5px; margin-top: 1px; overflow-wrap: break-word; }
.mod-kind {
  flex: 0 0 auto; margin-top: 1px;
  font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent); background: rgba(243, 236, 220, .13);
  padding: 3.5px 8px; border-radius: 999px; white-space: nowrap;
}
.mod-kind.bad { color: var(--danger); background: rgba(229, 83, 75, .13); }
.mod-item-sub { color: var(--text-faint); font-size: 12px; margin-top: 6px; }
.mod-actions { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.mod-item .mod-actions { margin-top: 8px; }

.hidden { display: none !important; }
.pad-bottom { padding-bottom: 28px; }

/* ==========================================================================
   Additions: thumbnails, streak rewards, misc icon sizing
   ========================================================================== */
.thumb-scene {
  width: 52px; height: 66px; border-radius: 10px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; color: #fff; border: 1px solid var(--line);
}
.thumb-scene svg { width: 22px; height: 22px; }
.row-item .s svg { width: 13px; height: 13px; vertical-align: -2px; }
.row-item .big-ic svg { width: 20px; height: 20px; }

/* Real <video> cards: JS drives the progress bar, not the CSS animation. */
.video-card.has-video .progress-fill { animation: none !important; }

/* Streak reward tiers (sample perks — see Streaks screen disclaimer) */
.reward-card {
  display: flex; align-items: center; gap: 13px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 15px; opacity: 0.88;
}
.reward-card.unlocked { border-color: rgba(243, 236, 220, 0.55); opacity: 1; }
.reward-badge {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  background: var(--bg-elev-2); color: var(--text-faint);
  display: flex; align-items: center; justify-content: center;
}
.reward-card.unlocked .reward-badge { background: var(--accent); color: #111111; }
.reward-badge svg { width: 20px; height: 20px; }
.reward-card .t { font-weight: 800; font-size: 15px; display: block; }
.reward-card .s { color: var(--text-dim); font-size: 12.5px; margin-top: 2px; }
.reward-state { font-size: 12px; font-weight: 800; color: var(--text-faint); flex: 0 0 auto; white-space: nowrap; }
.reward-card.unlocked .reward-state { color: var(--accent); }
.reward-prog { display: block; height: 5px; border-radius: 3px; background: var(--bg-elev-2); margin-top: 8px; overflow: hidden; }
.reward-prog i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* ==========================================================================
   Additions: verified badges, Profile hub sub-tabs, creator-led groups
   ========================================================================== */

/* Verified creator badge (accent check) */
.vbadge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto;
  background: var(--accent); color: #111111;
  vertical-align: -2px; margin-left: 5px;
}
.vbadge svg { width: 10px; height: 10px; }
.vbadge.lg { width: 19px; height: 19px; vertical-align: -3px; }
.vbadge.lg svg { width: 12px; height: 12px; }

/* Mini bottle for chips */
.bottle.b28 { width: 28px; height: 37px; }
.bottle.b28 .label { font-size: 6.5px; padding: 6% 2%; }

/* Real bottle photos (fragrance catalog) — same footprint as the CSS
   bottles so photos and fallback bottles sit identically in layouts. */
.bottle-photo { display: inline-flex; align-items: flex-end; justify-content: center; flex: 0 0 auto; }
.bottle-photo img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45)); }
.bottle-photo.b28 { width: 28px; height: 37px; }
.bottle-photo.b40 { width: 40px; height: 52px; }
.bottle-photo.b56 { width: 56px; height: 74px; }
.bottle-photo.b72 { width: 72px; height: 96px; }
.bottle-photo.b120 { width: 120px; height: 160px; }
.frag-source { margin: 10px 18px 0; color: var(--text-dim); font-size: 12.5px; }
a.link-row { text-decoration: none; color: inherit; }

/* ==========================================================================
   Welcome gate + accounts (Phase 2) — first screen for logged-out opens.
   Monochrome + cream; the teal logo tile is the one colored asset.
   ========================================================================== */
#welcome-gate {
  position: absolute; inset: 0; z-index: 110; overflow-y: auto;
  background:
    radial-gradient(130% 60% at 50% -6%, rgba(243, 236, 220, 0.09), transparent 60%),
    linear-gradient(180deg, #101012, var(--bg) 55%);
  display: flex;
}
#welcome-gate::-webkit-scrollbar { width: 0; }
.gate-inner {
  margin: auto; width: 100%; max-width: 430px;
  padding: calc(env(safe-area-inset-top) + 30px) 26px calc(env(safe-area-inset-bottom) + 26px);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.gate-rise { animation: gateRise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: var(--d, 0s); }
@keyframes gateRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.gate-logo-sm { width: 56px; height: 56px; border-radius: 15px; margin-bottom: 14px; }
.gate-wordmark { margin-top: 16px; }
.gate-wordmark .wordmark { width: 196px; }
.gate-hero {
  margin-top: 26px; width: 230px; height: 258px; position: relative;
  /* No card, no white box: transparent bottle cutouts (gate-assets/)
     float directly on the gate's dark background. */
}
.gate-slide {
  position: absolute; inset: 0; margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  opacity: 0; transition: opacity 0.9s ease; pointer-events: none;
}
.gate-slide.active { opacity: 1; }
.gate-slide img {
  flex: 1 1 auto; min-height: 0; max-width: 100%; object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.55));
}
.gate-slide figcaption {
  margin-top: 10px; text-align: center; font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em; color: var(--text-dim);
}
.gate-h1 { font-size: 27px; font-weight: 800; letter-spacing: -0.01em; margin-top: 22px; }
.gate-sub { color: var(--text-dim); font-size: 14.5px; line-height: 1.55; margin-top: 8px; max-width: 320px; }
.gate-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 26px; }
.gate-btn { width: 100%; padding: 14px 18px; font-size: 15.5px; }
.gate-note { color: var(--text-faint); font-size: 12px; line-height: 1.55; margin-top: 18px; max-width: 320px; }
.gate-form-wrap { text-align: left; align-items: stretch; }
.gate-form-wrap .gate-h1 { text-align: center; margin-top: 2px; }
.gate-form-wrap .gate-logo-sm { align-self: center; }
.gate-back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 2px;
  color: var(--text-dim); font-weight: 700; font-size: 14px; padding: 6px 6px 6px 0; margin-bottom: 10px;
}
.gate-back svg { width: 18px; height: 18px; }
.gate-form { display: flex; flex-direction: column; gap: 13px; margin-top: 18px; width: 100%; }
.gate-field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-dim); margin-bottom: 6px; }
.gate-input {
  width: 100%; background: var(--bg-elev-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; min-height: 48px; color: var(--text); font-size: 15px; color-scheme: dark;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gate-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(243, 236, 220, 0.16); }
textarea.gate-input { resize: vertical; min-height: 118px; line-height: 1.5; font-family: inherit; }
.gate-input.invalid { border-color: rgba(229, 83, 75, 0.9); }
.gate-input.invalid:focus { box-shadow: 0 0 0 3px rgba(229, 83, 75, 0.18); }
.gate-field-error { color: #FF9C9C; font-size: 12.5px; line-height: 1.45; margin-top: 6px; }
.gate-caption { font-size: 12px; color: var(--text-faint); line-height: 1.45; margin-top: 6px; }
.gate-pw { position: relative; }
.gate-pw .gate-input { padding-right: 64px; }
.gate-pw button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-weight: 700; font-size: 12.5px; padding: 10px 10px; min-height: 40px;
}
.gate-form-sub { text-align: center; color: var(--text-dim); font-size: 13.5px; line-height: 1.5; margin-top: 6px; }
.gate-terms { text-align: center; color: var(--text-faint); font-size: 12px; line-height: 1.55; }
.gate-terms button {
  color: var(--accent); font-weight: 700; padding: 4px 1px;
  text-decoration: underline; text-underline-offset: 2px;
}
.gate-error {
  display: none; background: rgba(224, 49, 49, 0.12); border: 1px solid rgba(224, 49, 49, 0.45);
  color: #FF9C9C; border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.45;
}
.gate-error.show { display: block; }
/* Invite friends (Settings) — personal referral link row */
.invite-link-row { display: flex; gap: 8px; align-items: stretch; }
.invite-link-input {
  flex: 1; min-width: 0; font-size: 13px; padding: 11px 12px; min-height: 44px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.invite-link-row .btn-ghost { flex: 0 0 auto; padding: 0 18px; min-height: 44px; }
/* Admin referrals — account blocks with expandable joined lists */
.ref-acct { border-bottom: 1px solid var(--line); padding-bottom: 6px; }

/* Two-factor setup (Settings -> Security) */
.qr-box {
  background: #fff; border-radius: 18px; padding: 16px;
  max-width: 240px; margin: 16px auto;
}
.qr-box svg { display: block; width: 100%; height: auto; }
.code-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 2px;
  text-align: center; font-size: 15px; color: var(--text);
  background: var(--bg-elev-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; margin: 8px 18px 16px; word-break: break-all;
}
.backup-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 18px; }
.backup-codes span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1.5px;
  text-align: center; font-size: 14.5px; color: var(--text);
  background: var(--bg-elev-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 4px;
}
.gate-notice {
  background: rgba(243, 236, 220, 0.08); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.45; margin-top: 14px; text-align: center;
}
.gate-switch { text-align: center; color: var(--text-dim); font-size: 13.5px; }
.gate-switch button { color: var(--accent); font-weight: 700; }
.gate-form .gate-btn { margin-top: 2px; }

/* (The Profile auth strip was removed 2026-10-18 at the owner's ask:
   Profile is one clean page; identity + Log out live in Settings.) */

/* ==========================================================================
   Legal pages — in-app reader for legal/terms-of-service.md and
   legal/privacy-policy.md, rendered by app.js renderMarkdown.
   ========================================================================== */
.screen.legal { z-index: 115; } /* above the welcome gate (110) */
.legal-body {
  padding: 18px 22px 8px; max-width: 640px; margin: 0 auto;
  font-size: 14.5px; line-height: 1.65; color: var(--text-dim);
}
.legal-body h2 { color: var(--text); font-size: 21px; font-weight: 800; letter-spacing: -0.01em; margin: 2px 0 12px; }
.legal-body h3 { color: var(--text); font-size: 16.5px; font-weight: 800; margin: 24px 0 8px; }
.legal-body h4 { color: var(--text); font-size: 14.5px; font-weight: 700; margin: 18px 0 6px; }
.legal-body p { margin: 0 0 12px; }
.legal-body ul, .legal-body ol { margin: 0 0 12px; padding-left: 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body strong { color: var(--text); }
.legal-body blockquote {
  border-left: 3px solid var(--accent); background: rgba(243, 236, 220, 0.07);
  border-radius: 0 12px 12px 0; padding: 12px 14px; margin: 0 0 16px;
}
.legal-body blockquote p { margin-bottom: 6px; }
.legal-body blockquote p:last-child { margin-bottom: 0; }
.legal-body hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }

/* Admin (Phase 2 sections) */
.admin-tabs { margin: 14px 18px 4px; }
/* Admin mobile containment (2026-10-19): on a phone the Admin view
   must never pan sideways. The tab strip is a horizontally
   scrollable chip row — chips never shrink or wrap, no visible
   scrollbar — pinned to the top of the view; the view itself clips
   horizontal overflow; row text truncates inside .grow (min-width:0
   + ellipsis, above); row action buttons are flex-none at the right
   edge, always fully visible; overview stat grids wrap instead of
   crushing. */
.admin-body { overflow-x: hidden; }
.admin-tabs {
  display: flex; max-width: calc(100% - 36px);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs button { flex: 0 0 auto; white-space: nowrap; }
.admin-tabs-main { position: sticky; top: 8px; z-index: 6; }
.admin-actions { display: flex; gap: 6px; flex: 0 0 auto; align-items: center; }
.admin-actions .join-btn { flex: 0 0 auto; white-space: nowrap; }
.row-item > .admin-chip { flex: 0 0 auto; }
.admin-body .streak-stats { flex-wrap: wrap; }
.admin-body .stat-card { flex: 1 1 30%; min-width: 0; }
.admin-body .stat-card .v { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-chip {
  display: inline-block; vertical-align: 2px; margin-left: 4px;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em;
  padding: 2px 6px; border-radius: 5px;
  background: rgba(243, 236, 220, 0.14); color: var(--accent);
}
.admin-chip.danger { background: rgba(224, 49, 49, 0.18); color: #FF9C9C; }

/* Profile hub sub-tabs (Checks | Wardrobe) */
.ptabs { display: flex; gap: 8px; padding: 18px 18px 4px; }
.ptabs button {
  flex: 1; padding: 10px; border-radius: 12px;
  background: var(--bg-elev); border: 1px solid var(--line);
  color: var(--text-dim); font-weight: 800; font-size: 14px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.ptabs button.active { background: var(--bg-elev-2); color: var(--text); border-color: rgba(243, 236, 220, 0.55); }

/* Inline text link (e.g. "Led by @creator") */
.linklike { color: var(--accent); font-weight: 700; font-size: inherit; padding: 0; }

/* Group list: leader wearing-today chip */
.wear-chip {
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 36px); margin: 0 18px 14px;
  padding: 7px 12px 7px 9px; text-align: left;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text-dim); font-size: 13px;
}
.wear-chip b { color: var(--text); }
.wear-chip .chev { margin-left: auto; color: var(--text-faint); display: flex; }
.wear-chip .chev svg { width: 16px; height: 16px; }

/* Group detail: pinned leader card */
.leader-card {
  margin: 14px 18px 0; padding: 14px;
  background: linear-gradient(160deg, rgba(243, 236, 220, 0.13), var(--bg-elev) 62%);
  border: 1px solid rgba(243, 236, 220, 0.45); border-radius: var(--radius);
}
.leader-tag {
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.leader-tag svg { width: 14px; height: 14px; }
.leader-top { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.leader-top .grow { flex: 1; min-width: 0; }
.leader-top .t { font-weight: 800; font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader-top .s { color: var(--text-dim); font-size: 13px; margin-top: 1px; }
.leader-top .chev, .wear-row .chev { color: var(--text-faint); flex: 0 0 auto; display: flex; }
.leader-top .chev svg, .wear-row .chev svg { width: 18px; height: 18px; }
.wear-row {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  margin-top: 12px; padding: 9px 12px 9px 10px;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-radius: 12px;
}
.wear-row .grow { flex: 1; min-width: 0; }
.wear-row .s { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; display: block; }
.wear-row .t { font-weight: 800; font-size: 15px; display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader-pill {
  flex: 0 0 auto; padding: 5px 11px; border-radius: 999px;
  background: rgba(243, 236, 220, 0.15); color: var(--accent);
  font-size: 12px; font-weight: 800;
}
.leader-post-tag {
  padding: 4px 18px 0; font-size: 12px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
}

/* Verified group invite link */
.invite-box {
  margin: 2px 18px 0; padding: 14px 15px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
}
.invite-box p { font-size: 13.5px; line-height: 1.55; color: var(--text-dim); }
.invite-row { display: flex; gap: 8px; margin-top: 11px; }
.invite-row input {
  flex: 1; min-width: 0;
  background: var(--bg-elev-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; color: var(--text-dim); font-size: 12.5px; outline: none;
}
.invite-row .join-btn { white-space: nowrap; }

/* ==========================================================================
   Wordmark (Concept C — the in-app brand lockup) + launch splash
   ========================================================================== */
.wordmark { display: block; height: auto; }

#splash {
  position: absolute; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.38s ease, transform 0.38s ease;
}
#splash .wordmark {
  width: min(250px, 62vw);
  animation: splash-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
#splash.hide { opacity: 0; transform: translateY(-10px); pointer-events: none; }
@keyframes splash-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* Wordmark header at the top of the Settings sheet */
.settings-brand { display: flex; justify-content: center; padding: 12px 0 2px; }
.settings-brand .wordmark { width: 148px; }

/* ==========================================================================
   Profile pictures — custom photo avatar, edit affordance, camera
   ========================================================================== */
.avatar.has-photo {
  background-size: cover; background-position: center; background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.avatar-edit {
  position: relative; display: inline-block; border-radius: 50%;
  transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.avatar-edit:active { transform: scale(0.94); }
.avatar-cam {
  position: absolute; right: -2px; bottom: -2px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #111111;
  border: 2.5px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.avatar-cam svg { width: 14px; height: 14px; }
.row-ic {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
  background: rgba(243, 236, 220, 0.15); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.row-ic svg { width: 21px; height: 21px; }
.row-ic.danger { background: rgba(255, 92, 92, 0.13); color: var(--danger); }

/* Live camera capture screen */
.cam-body { display: flex; flex-direction: column; }
.cam-stage {
  position: relative; margin: 14px 18px 0;
  border-radius: 22px; overflow: hidden; background: #000;
  aspect-ratio: 3 / 4; max-height: 60vh;
  border: 1px solid var(--line);
}
.cam-stage video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scaleX(-1); /* mirror the front-camera preview */
}
.cam-msg {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 26px;
  background: rgba(8, 8, 10, 0.82);
}
.cam-msg[hidden] { display: none; }
.cam-msg p { color: var(--text); font-size: 14.5px; line-height: 1.6; max-width: 290px; }
.cam-actions {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 30px 0;
}
.cam-actions .btn-ghost { width: auto; }
.cam-spacer { width: 92px; }
.cam-shutter {
  width: 70px; height: 70px; border-radius: 50%; flex: 0 0 auto;
  background: #fff;
  border: 5px solid rgba(255, 255, 255, 0.35); background-clip: padding-box;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  transition: transform 0.14s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.15s ease;
}
.cam-shutter:active { transform: scale(0.9); }
.cam-shutter:disabled { opacity: 0.35; }
.cam-hint { text-align: center; color: var(--text-faint); font-size: 12.5px; padding: 16px 30px 0; line-height: 1.5; }

/* ==========================================================================
   Profile posting card — posting lives on Profile (feed has no post
   button). Sits between the profile actions and the streak bubble.
   ========================================================================== */
.post-card {
  display: flex; align-items: center; gap: 13px; width: calc(100% - 36px);
  margin: 18px 18px 0; padding: 14px 16px; text-align: left; cursor: pointer;
  background: linear-gradient(160deg, rgba(243, 236, 220, 0.30), rgba(243, 236, 220, 0.10) 62%, var(--bg-elev));
  border: 1px solid rgba(243, 236, 220, 0.55); border-radius: var(--radius); color: var(--text);
  box-shadow: 0 8px 22px rgba(243, 236, 220, 0.14);
  transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.post-card:active { transform: scale(0.98); }
.post-card .pc-ic {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  background: var(--accent); color: #111111;
  display: flex; align-items: center; justify-content: center;
}
.post-card .pc-ic svg { width: 22px; height: 22px; }
.post-card .pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post-card .pc-title { font-weight: 800; font-size: 15.5px; }
.post-card .pc-sub { color: var(--text-dim); font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-card .pc-chev { color: var(--text-faint); flex: 0 0 auto; display: flex; }
.post-card .pc-chev svg { width: 20px; height: 20px; }
.post-card.posted {
  background: var(--bg-elev);
  border-color: var(--line);
  box-shadow: none;
}
.post-card.posted .pc-ic { background: rgba(243, 236, 220, 0.16); color: var(--accent); }

/* ==========================================================================
   Streak celebration — publish success: flame, count-up number,
   brand-color confetti (teal / white / soft gray only).
   ========================================================================== */
.celebrate { position: relative; padding: 16px 22px 0; text-align: center; overflow: hidden; }
.confetti-host { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti-piece { position: absolute; border-radius: 2px; will-change: transform, opacity; }
.cel-flame {
  width: 76px; height: 76px; border-radius: 50%; margin: 4px auto 0;
  background: var(--accent); color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 10px rgba(243, 236, 220, 0.16), 0 12px 28px rgba(243, 236, 220, 0.35);
  animation: cel-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.cel-flame svg { width: var(--flame, 38px); height: var(--flame, 38px); }
@keyframes cel-pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.cel-num { font-size: 56px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; margin-top: 14px; font-variant-numeric: tabular-nums; }
.cel-label { color: var(--accent); font-weight: 800; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; margin-top: 2px; }

/* Brief pulse on Profile's streak bubble right after a publish. */
@keyframes streak-pulse {
  0% { box-shadow: 0 0 0 0 rgba(243, 236, 220, 0.55); transform: scale(1); }
  35% { transform: scale(1.03); }
  100% { box-shadow: 0 0 0 18px rgba(243, 236, 220, 0); transform: scale(1); }
}
.streak-bubble.pulse { animation: streak-pulse 0.9s ease-out 2; }

/* ==========================================================================
   Tactile press feedback — one premium, springy press language for
   every interactive element: a subtle press-down scale on :active
   (0.94–0.99 by element size) with a spring ease, no layout shift, no
   added latency. Toggle moments (like / follow) get a one-shot pop
   via the .pop-once class added in JS.
   ========================================================================== */
button { touch-action: manipulation; }
.btn-primary { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.15s ease; }
.btn-primary:active { transform: scale(0.97); }
.btn-ghost { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.15s ease; }
.btn-ghost:active { transform: scale(0.97); }
.btn-danger { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.btn-danger:active { transform: scale(0.97); }
.join-btn { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.15s ease, color 0.15s ease; }
.join-btn:active { transform: scale(0.94); }
.follow-btn { transition: background 0.15s ease, color 0.15s ease, transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.follow-btn:active { transform: scale(0.94); }
.feed-tabs button { transition: color 0.15s ease, transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.feed-tabs button:active { transform: scale(0.94); }
.chip { transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.chip:active { transform: scale(0.94); }
.pill-toggle button { transition: background 0.15s ease, color 0.15s ease, transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.pill-toggle button:active { transform: scale(0.94); }
.icon-btn { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.15s ease; }
.icon-btn:active { transform: scale(0.9); }
#bottomnav button:active { transform: scale(0.93); }
.row-item { transition: background 0.12s ease, transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.row-item:active { transform: scale(0.99); }
.frag-bar { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.frag-bar:active { transform: scale(0.98); }
.frag-add-tile { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.frag-add-tile:active { transform: scale(0.97); }
.history-tile { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.history-tile:active { transform: scale(0.97); }
.group-cover { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.group-cover:active { transform: scale(0.99); }
.source-card { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1), border-color 0.15s ease; }
.source-card:active { transform: scale(0.98); }
.streak-bubble { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.streak-bubble:active { transform: scale(0.98); }
.wear-row { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.12s ease; }
.wear-row:active { transform: scale(0.99); }
.rail-btn .rail-ic { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.rail-btn:active .rail-ic { transform: scale(0.88); }
.dialog .d-cancel, .dialog .d-confirm { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.15s ease; }
.dialog .d-cancel:active, .dialog .d-confirm:active { transform: scale(0.96); }
.seg button { transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.seg button:active { transform: scale(0.96); }
.selected-frag { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1), border-color 0.15s ease; }
.selected-frag:active { transform: scale(0.98); }
.link-row { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.12s ease; }
.link-row:active { transform: scale(0.99); }
.leader-top { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.leader-top:active { transform: scale(0.99); }
.frag-card .remove-x { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.15s ease; }
.frag-card .remove-x:active { transform: scale(0.88); }
.week-chev { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.15s ease; }
.week-chev:active:not(:disabled) { transform: scale(0.9); }
.cal-cell.has-post { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.cal-cell.has-post:active { transform: scale(0.92); }
.viewer-save { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.viewer-save:active { transform: scale(0.94); }
.cam2-icbtn { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.15s ease; }
.cam2-icbtn:active { transform: scale(0.88); }
.cam2-side { transition: transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1); }
.cam2-side:active { transform: scale(0.92); }

/* One-shot pop for toggle moments (JS adds .pop-once, forces reflow). */
@keyframes pop-once {
  0% { transform: scale(1); }
  35% { transform: scale(1.3); }
  62% { transform: scale(0.93); }
  100% { transform: scale(1); }
}
.pop-once { animation: pop-once 0.38s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* Button animation pack (owner, 2026-10-18): bottom-nav icons are
   HOLLOW until active, then FILLED, with a pop on activation; liking a
   post fires a particle burst around the heart; saving a bookmark pops. */
#bottomnav button[data-nav] .ic-fill { display: none; }
#bottomnav button[data-nav].active .ic-fill { display: block; }
#bottomnav button[data-nav].active .ic-line { display: none; }
#bottomnav button[data-nav].active svg { animation: navPop 0.34s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes navPop { 0% { transform: scale(0.7); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }

.burst-fx { position: absolute; top: 24px; left: 50%; width: 0; height: 0; pointer-events: none; }
.burst-fx i {
  position: absolute; left: 0; top: 0; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  border-radius: 50%; background: var(--accent); opacity: 0;
}
.burst-fx i:nth-child(2) { background: #ffffff; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; }
.burst-fx i:nth-child(4) { background: #ffffff; }
.burst-fx i:nth-child(1) { --tx: 0px; --ty: -27px; }
.burst-fx i:nth-child(2) { --tx: 21px; --ty: -17px; }
.burst-fx i:nth-child(3) { --tx: 25px; --ty: 7px; }
.burst-fx i:nth-child(4) { --tx: 9px; --ty: 24px; }
.burst-fx i:nth-child(5) { --tx: -15px; --ty: 19px; }
.burst-fx i:nth-child(6) { --tx: -24px; --ty: -8px; }
.rail-btn.burst .burst-fx i { animation: burstFly 0.6s cubic-bezier(0.17, 0.67, 0.35, 1) forwards; }
@keyframes burstFly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0.3); opacity: 0; }
}

.bm-btn.saved svg { animation: bmPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes bmPop { 0% { transform: scale(0.55) rotate(-16deg); } 55% { transform: scale(1.28) rotate(5deg); } 100% { transform: scale(1) rotate(0deg); } }

/* Reduced motion: calm the press language and celebration flourishes. */
@media (prefers-reduced-motion: reduce) {
  .pop-once, .cel-flame, .streak-bubble.pulse, .flick, .flick svg, .flick .embers i, .rail-btn.burst .burst-fx i, #bottomnav button[data-nav].active svg, .bm-btn.saved svg , .gate-rise { animation: none !important; }
  .btn-primary:active, .btn-ghost:active, .btn-danger:active, .join-btn:active,
  .follow-btn:active, .feed-tabs button:active, .chip:active, .pill-toggle button:active,
  .icon-btn:active, #bottomnav button:active, .row-item:active, .frag-bar:active,
  .frag-add-tile:active, .history-tile:active, .group-cover:active, .source-card:active,
  .streak-bubble:active, .wear-row:active, .post-card:active, .avatar-edit:active,
  .cam-shutter:active, .rail-btn:active .rail-ic, .seg button:active,
  .selected-frag:active, .link-row:active, .leader-top:active,
  .frag-card .remove-x:active, .dialog .d-cancel:active,
  .dialog .d-confirm:active, .week-chev:active, .viewer-save:active,
  .cam2-icbtn:active, .cam2-side:active, .cal-cell.has-post:active { transform: none; }
  .cam2-record span, .cam2-progress i { transition: none; }
}
