/* ============================================================
   yuyu — Story-only social. Design system + animations.
   "ทุกคอนเทนต์หายใน 24 ชั่วโมง"
   ============================================================ */

:root {
  /* palette */
  --bg: #07060f;
  --bg-2: #0e0c1a;
  --surface: #16142400;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --stroke: rgba(255, 255, 255, 0.1);
  --stroke-soft: rgba(255, 255, 255, 0.06);

  --text: #f6f5fb;
  --muted: #a3a0b8;
  --muted-2: #6f6c86;

  /* brand */
  --c1: #8b5cf6; /* violet */
  --c2: #ec4899; /* pink   */
  --c3: #fb923c; /* coral  */
  --c4: #22d3ee; /* cyan   */

  --grad: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #fb923c 100%);
  --grad-soft: linear-gradient(135deg, #8b5cf6aa 0%, #ec4899aa 100%);
  --ring: conic-gradient(from 0deg, #8b5cf6, #ec4899, #fb923c, #22d3ee, #8b5cf6);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;

  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 8px 40px -8px rgba(139, 92, 246, 0.55);

  --safe: 14px;
  --nav-h: 68px;

  --font: "Plus Jakarta Sans", "IBM Plex Sans Thai", system-ui, -apple-system,
    "Segoe UI", sans-serif;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 800px at 15% -10%, #2a1a4d 0%, transparent 55%),
    radial-gradient(1000px 700px at 110% 10%, #4a1234 0%, transparent 50%),
    radial-gradient(900px 900px at 50% 120%, #10233f 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  overflow: hidden;
  letter-spacing: 0.1px;
}

/* floating ambient blobs behind the phone (desktop flourish) */
.ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.ambient span {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: float 14s ease-in-out infinite;
}
.ambient span:nth-child(1) {
  width: 360px;
  height: 360px;
  background: #8b5cf6;
  top: 8%;
  left: 6%;
}
.ambient span:nth-child(2) {
  width: 300px;
  height: 300px;
  background: #ec4899;
  bottom: 10%;
  right: 8%;
  animation-delay: -4s;
}
.ambient span:nth-child(3) {
  width: 240px;
  height: 240px;
  background: #22d3ee;
  top: 50%;
  left: 60%;
  animation-delay: -8s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 25px) scale(0.95); }
}

/* ---------- Phone frame ---------- */
.stage {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 56px;
}
.pitch {
  display: none;
  max-width: 340px;
}
.pitch .logo-xl {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -2px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.pitch .tag {
  margin: 18px 0 26px;
  font-size: 20px;
  color: var(--text);
  font-weight: 600;
}
.pitch .tag b { background: var(--grad); -webkit-background-clip: text; background-clip:text; color: transparent; }
.pitch p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}
.pitch .feat {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pitch .feat div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}
.pitch .feat i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--glass);
  font-style: normal;
}

.phone {
  position: relative;
  width: 393px;
  height: 852px;
  max-height: calc(100dvh - 28px);
  background: #000;
  border-radius: 52px;
  padding: 11px;
  box-shadow: var(--shadow), 0 0 0 2px #1b1b26, 0 0 0 11px #050509,
    0 0 0 13px #26263a;
}
.screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-radius: 42px;
  overflow: hidden;
  isolation: isolate;
}
/* notch */
.notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 122px;
  height: 30px;
  background: #000;
  border-radius: 0 0 18px 18px;
  z-index: 60;
}
.statusbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  font-size: 13px;
  font-weight: 700;
  z-index: 55;
  pointer-events: none;
}
.statusbar .icons { display: flex; gap: 6px; align-items: center; }

/* ---------- View system ---------- */
.views {
  position: absolute;
  inset: 0;
}
.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.99);
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.32s;
  overflow: hidden;
}
.view.active {
  opacity: 1;
  visibility: visible;
  transform: none;
  z-index: 2;
}
.view.leaving {
  opacity: 0;
  transform: translateY(-6px) scale(0.99);
  z-index: 1;
}
/* scroll body */
.body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + 16px);
  scrollbar-width: none;
}
.body::-webkit-scrollbar { display: none; }
.body.no-nav { padding-bottom: 20px; }

/* ---------- Top bar ---------- */
.topbar {
  padding: 52px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(180deg, var(--bg-2) 60%, transparent);
  backdrop-filter: blur(6px);
}
.brand {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.topbar .actions { display: flex; gap: 8px; }
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--glass);
  border: 1px solid var(--stroke-soft);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
  position: relative;
}
.icon-btn:active { transform: scale(0.9); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn .dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c3);
  border: 2px solid var(--bg-2);
}

.page-head {
  padding: 52px 18px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(180deg, var(--bg-2) 70%, transparent);
  backdrop-filter: blur(8px);
}
.page-head h2 { font-size: 20px; font-weight: 700; }
.page-head .sub { font-size: 12px; color: var(--muted); }
.back-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--stroke-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
}
.back-btn:active { transform: scale(0.9); }

/* ---------- Story bubble bar ---------- */
.story-bar {
  display: flex;
  gap: 14px;
  padding: 6px 18px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.story-bar::-webkit-scrollbar { display: none; }
.bubble {
  flex-shrink: 0;
  width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.bubble .ring {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  padding: 5px;
  display: grid;
  place-items: center;
  position: relative;
  --ring: conic-gradient(from 0deg, #8b5cf6, #ec4899, #fb923c, #22d3ee, #8b5cf6);
}
.bubble .ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ring);
  z-index: 0;
}
.bubble.seen .ring::before { filter: grayscale(0.7) opacity(0.55); }
.bubble .ring::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--bg);
  z-index: 1;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ringspin { to { transform: rotate(360deg); } }
.bubble .av {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  background: var(--glass);
}
.bubble .ring { transition: transform 0.18s; }
.bubble:active .ring { transform: scale(0.92); }
.bubble .name {
  font-size: 11px;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bubble.me .ring::after { background: var(--bg); }
.bubble.me .plus {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--grad);
  display: grid;
  place-items: center;
  border: 3px solid var(--bg);
  z-index: 3;
  color: #fff;
  font-weight: 700;
}
.mood-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 15px;
  z-index: 4;
  background: var(--bg);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg-2);
}

/* section label */
.sec-label {
  padding: 4px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sec-label h3 { font-size: 15px; font-weight: 700; }
.sec-label a { font-size: 13px; color: var(--c2); cursor: pointer; }

/* ---------- Discover grid (home) ---------- */
.discover {
  padding: 0 14px 8px;
  columns: 2;
  column-gap: 12px;
}
.disc-card {
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--glass);
  border: 1px solid var(--stroke-soft);
  transition: transform 0.2s;
}
.disc-card:active { transform: scale(0.97); }
.disc-card img { width: 100%; display: block; object-fit: cover; }
.disc-card .ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.75));
  display: flex;
  align-items: flex-end;
  padding: 10px;
  gap: 8px;
}
.disc-card .ov img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid #fff;
}
.disc-card .ov span { font-size: 12px; font-weight: 600; }
.disc-card .live {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--c2);
  font-size: 9px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* ---------- Bottom nav ---------- */
.tabbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px 8px;
  background: rgba(10, 9, 18, 0.7);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--stroke-soft);
  z-index: 40;
}
.tab {
  flex: 1;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  cursor: pointer;
  height: 100%;
  transition: color 0.2s;
  position: relative;
}
.tab svg { width: 25px; height: 25px; }
.tab.active { color: var(--text); }
.tab.active::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c2);
}
.tab-create {
  flex: 0 0 auto;
}
.tab-create .fab {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--grad);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-glow);
  transform: translateY(-8px);
  transition: transform 0.18s;
}
.tab-create .fab svg { width: 26px; height: 26px; color: #fff; }
.tab-create:active .fab { transform: translateY(-8px) scale(0.9); }
.tab .badge {
  position: absolute;
  top: 8px;
  right: 50%;
  margin-right: -22px;
  background: var(--c3);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

/* ---------- Buttons / generic ---------- */
.btn {
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 15px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.15s, filter 0.2s;
  box-shadow: var(--shadow-glow);
}
.btn:active { transform: scale(0.97); }
.btn.ghost {
  background: var(--glass);
  border: 1px solid var(--stroke);
  box-shadow: none;
  color: var(--text);
}
.btn.outline {
  background: transparent;
  border: 1.5px solid var(--c2);
  box-shadow: none;
  color: var(--text);
}
.btn.line-login {
  background: #06C755;
  color: #fff;
  box-shadow: 0 16px 32px rgba(6, 199, 85, 0.28);
}
.btn.line-login:active { filter: brightness(0.95); }
.btn svg { width: 20px; height: 20px; }
.btn.line-login svg { width: 26px; height: 26px; }
.btn.sm { padding: 10px 16px; width: auto; font-size: 13px; border-radius: 12px; }

/* ---------- Auth screens ---------- */
.auth {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 28px 28px;
  overflow-y: auto;
  scrollbar-width: none;
}
.auth::-webkit-scrollbar { display: none; }
.auth .hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 320px;
  gap: 6px;
}
.logo-mark {
  width: 96px;
  height: 96px;
  border-radius: 30px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-size: 52px;
  box-shadow: var(--shadow-glow);
  margin-bottom: 18px;
  animation: pop 0.6s cubic-bezier(0.22, 1.4, 0.36, 1) both, bob 4s ease-in-out infinite 0.6s;
}
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.auth h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1.5px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth .lead { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 280px; }
.auth .stack { display: flex; flex-direction: column; gap: 11px; }
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted-2);
  font-size: 12px;
  margin: 4px 0;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--stroke);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 4px;
}
.field label { font-size: 12px; color: var(--muted); padding-left: 4px; }
.input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border 0.2s, background 0.2s;
}
.input::placeholder { color: var(--muted-2); }
.input:focus { outline: none; border-color: var(--c2); background: var(--glass-strong); }
.fine { font-size: 12px; color: var(--muted-2); text-align: center; line-height: 1.6; }
.fine a { color: var(--c2); }
.switch-auth { text-align: center; font-size: 14px; color: var(--muted); margin-top: 14px; }
.switch-auth a { color: var(--c2); font-weight: 700; cursor: pointer; }

/* OTP */
.otp-row { display: flex; gap: 10px; justify-content: center; margin: 8px 0; }
.otp-box {
  width: 48px;
  height: 58px;
  border-radius: 14px;
  background: var(--glass);
  border: 1.5px solid var(--stroke);
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  font-family: inherit;
}
.otp-box:focus { outline: none; border-color: var(--c2); }

/* avatar pick */
.av-pick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 6px 0 10px;
}
.av-pick img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform 0.15s, border 0.2s;
}
.av-pick img.sel { border-color: var(--c2); transform: scale(1.05); }

/* ---------- Story Viewer ---------- */
#viewer {
  background: #000;
  z-index: 200;
}
#viewer.active { z-index: 200; }
.viewer-wrap {
  position: absolute;
  inset: 0;
  border-radius: 42px;
  overflow: hidden;
}
.vmedia {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.3s;
}
.vmedia::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, transparent 22%, transparent 70%, rgba(0,0,0,0.7) 100%);
}
.vbars {
  position: absolute;
  top: 50px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  z-index: 20;
}
.vbar {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.32);
  overflow: hidden;
}
.vbar i {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: 3px;
}
.vbar.done i { width: 100%; }
.vbar.active i { animation: fill 5s linear forwards; }
.vbar.paused i { animation-play-state: paused; }
@keyframes fill { to { width: 100%; } }
.vhead {
  position: absolute;
  top: 64px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 20;
}
.vhead img { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.5); }
.vhead .who { flex: 1; }
.vhead .who b { font-size: 14px; display: block; }
.vhead .who small { font-size: 11px; color: rgba(255,255,255,0.7); }
.vhead .x { color: #fff; cursor: pointer; padding: 6px; }
.vcap {
  position: absolute;
  bottom: 110px;
  left: 18px;
  right: 18px;
  z-index: 15;
  font-size: 16px;
  font-weight: 600;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
  line-height: 1.4;
}
.vmood {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.4);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  margin-bottom: 10px;
  backdrop-filter: blur(8px);
}
/* text story (no photo) */
.vtext { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 70px 28px 140px; z-index: 11; }
.vtext .vmood { margin-bottom: 14px; }
.vtext-body { font-size: 26px; font-weight: 800; color: #fff; line-height: 1.35; text-shadow: 0 2px 16px rgba(0,0,0,0.35); word-break: break-word; }
.vmentions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.vmentions span { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.3); border-radius: 14px; padding: 3px 9px; font-size: 12px; font-weight: 700; color: #fff; }

.tap-zone { position: absolute; top: 0; bottom: 130px; width: 38%; z-index: 12; }
.tap-zone.left { left: 0; }
.tap-zone.right { right: 0; }
/* viewer footer: reply + react */
.vfooter {
  position: absolute;
  bottom: 22px;
  left: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
}
.vreply {
  flex: 1;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 24px;
  padding: 12px 18px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
}
.vreply::placeholder { color: rgba(255,255,255,0.7); }
.vreply:focus { outline: none; background: rgba(255,255,255,0.2); }
.vbtn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
}
.vbtn:active { transform: scale(0.88); }
/* react bar */
.react-bar {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: flex;
  gap: 6px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(14px);
  padding: 8px 12px;
  border-radius: 30px;
  z-index: 25;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.22,1.4,0.36,1);
}
.react-bar.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.react-bar span {
  font-size: 30px;
  cursor: pointer;
  transition: transform 0.15s;
}
.react-bar span:active { transform: scale(1.4); }
/* viewer-count chip (own story) */
.vviewers {
  position: absolute;
  bottom: 26px;
  left: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: -8px;
  cursor: pointer;
}
.vviewers .avs { display: flex; }
.vviewers .avs img {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid #000; margin-left: -10px;
}
.vviewers .avs img:first-child { margin-left: 0; }
.vviewers b { margin-left: 10px; font-size: 14px; }
.vviewers small { color: rgba(255,255,255,0.7); font-size: 12px; margin-left: 4px; }

/* floating reaction animation */
.floatie {
  position: absolute;
  font-size: 32px;
  z-index: 30;
  pointer-events: none;
  animation: rise 1.6s ease-out forwards;
}
@keyframes rise {
  0% { transform: translateY(0) scale(0.5); opacity: 0; }
  15% { opacity: 1; transform: translateY(-10px) scale(1.2); }
  100% { transform: translateY(-220px) scale(0.9) rotate(20deg); opacity: 0; }
}

/* ---------- Bottom sheet ---------- */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 300;
  border-radius: 42px;
}
.sheet-backdrop.show { opacity: 1; visibility: visible; }
.sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-2);
  border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(var(--safe) + 18px);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 80%;
  overflow-y: auto;
  scrollbar-width: none;
  border-top: 1px solid var(--stroke);
}
.sheet::-webkit-scrollbar { display: none; }
.sheet-backdrop.show .sheet { transform: translateY(0); }
.grabber { width: 40px; height: 4px; border-radius: 4px; background: var(--stroke); margin: 4px auto 14px; }
.sheet h3 { font-size: 17px; margin-bottom: 4px; }
.sheet .sheet-sub { font-size: 13px; color: var(--muted); margin-bottom: 14px; }

/* viewer list rows */
.vlist-row, .user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}
.vlist-row img, .user-row img { width: 44px; height: 44px; border-radius: 50%; }
.vlist-row .info, .user-row .info { flex: 1; min-width: 0; }
.vlist-row b, .user-row b { font-size: 14px; display: block; }
.vlist-row small, .user-row small { font-size: 12px; color: var(--muted); }
.vlist-row .when { font-size: 12px; color: var(--muted-2); }
.vlist-row .reacted { font-size: 17px; }

/* sheet option list (report/settings) */
.opt-list { display: flex; flex-direction: column; }
.opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 4px;
  cursor: pointer;
  border-bottom: 1px solid var(--stroke-soft);
  transition: background 0.15s;
}
.opt:last-child { border-bottom: none; }
.opt:active { background: var(--glass); }
.opt .ico {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--glass); display: grid; place-items: center; flex-shrink: 0;
}
.opt .ico svg { width: 19px; height: 19px; }
.opt .lbl { flex: 1; }
.opt .lbl b { font-size: 14px; display: block; }
.opt .lbl small { font-size: 12px; color: var(--muted); }
.opt.danger .lbl b { color: #f87171; }
.opt.danger .ico { background: rgba(248,113,113,0.12); color: #f87171; }
.opt .chev { color: var(--muted-2); }

/* toggle */
.tg {
  width: 48px; height: 28px; border-radius: 20px;
  background: var(--stroke); position: relative; cursor: pointer; transition: background 0.25s; flex-shrink: 0;
}
.tg::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.25s;
}
.tg.on { background: var(--c2); }
.tg.on::after { transform: translateX(20px); }

/* ---------- Profile ---------- */
.prof-head { padding: 56px 18px 14px; text-align: center; }
.prof-av {
  width: 92px; height: 92px; border-radius: 50%;
  margin: 0 auto 12px; padding: 5px;
  position: relative; isolation: isolate;
  --ring: conic-gradient(from 0deg, #8b5cf6, #ec4899, #fb923c, #22d3ee, #8b5cf6);
}
.prof-av::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ring); z-index: 0; }
.prof-av img { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 50%; border: 5px solid var(--bg); object-fit: cover; }
.prof-av .mood { position: absolute; bottom: 0; right: 4px; font-size: 22px; z-index: 2; }
.prof-name { font-size: 21px; font-weight: 800; }
.prof-user { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.prof-bio { font-size: 14px; color: var(--text); max-width: 280px; margin: 0 auto 14px; line-height: 1.5; }
.stats { display: flex; justify-content: center; gap: 28px; margin-bottom: 16px; }
.stat { text-align: center; cursor: pointer; }
.stat b { font-size: 19px; font-weight: 800; display: block; }
.stat small { font-size: 12px; color: var(--muted); }
.prof-actions { display: flex; gap: 10px; padding: 0 18px 18px; }
.streak-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--glass); border: 1px solid var(--stroke-soft);
  padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 600;
  margin: 0 auto 16px;
}
.active-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 4px;
}
.active-cell {
  aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; position: relative; cursor: pointer;
  background: var(--glass);
}
.active-cell img { width: 100%; height: 100%; object-fit: cover; }
.active-cell .meta {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 8px 8px 6px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7)); font-size: 11px;
  display: flex; align-items: center; gap: 4px;
}
.active-cell.add {
  display: grid; place-items: center; border: 1.5px dashed var(--stroke);
  color: var(--muted); font-size: 30px;
}

/* ---------- Create story ---------- */
.create-canvas {
  flex: 1; margin: 8px 18px; border-radius: var(--r-lg); position: relative;
  background-size: cover; background-position: center; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 0;
  border: 1px solid var(--stroke);
}
.create-canvas::after { content:""; position:absolute; inset:0; background:linear-gradient(transparent 50%, rgba(0,0,0,0.6)); }
.cc-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  color: rgba(255,255,255,0.85); padding: 20px; z-index: 2;
}
.cc-placeholder .ic { font-size: 46px; margin-bottom: 10px; }
.cc-caption {
  position: relative; z-index: 3; margin: 14px;
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 14px; padding: 12px 14px; color: #fff; font-family: inherit; font-size: 15px;
}
.cc-caption::placeholder { color: rgba(255,255,255,0.7); }
.cc-caption:focus { outline: none; }
.media-strip { display: flex; gap: 10px; padding: 12px 18px; overflow-x: auto; scrollbar-width: none; }
.media-strip::-webkit-scrollbar { display: none; }
.media-thumb {
  width: 62px; height: 62px; border-radius: 14px; flex-shrink: 0; cursor: pointer;
  background-size: cover; background-position: center; border: 2px solid transparent; position: relative;
}
.media-thumb.sel { border-color: var(--c2); }
.media-thumb.upload { display: grid; place-items: center; background: var(--glass); border: 1.5px dashed var(--stroke); font-size: 24px; color: var(--muted); }
.mood-row { display: flex; gap: 8px; padding: 4px 18px 12px; overflow-x: auto; scrollbar-width: none; }
.mood-row::-webkit-scrollbar { display: none; }
.mood-pill {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 20px;
  background: var(--glass); border: 1px solid var(--stroke-soft); cursor: pointer; flex-shrink: 0;
  font-size: 13px; transition: all 0.15s;
}
.mood-pill.sel { background: var(--grad-soft); border-color: transparent; }
.mood-pill span { font-size: 18px; }
.create-foot { padding: 8px 18px calc(var(--nav-h) + 18px); }

/* ---------- Search ---------- */
.search-bar { padding: 52px 18px 12px; position: sticky; top: 0; background: var(--bg-2); z-index: 30; }
.search-input-wrap { position: relative; }
.search-input-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 19px; height: 19px; }
.search-input-wrap input {
  width: 100%; padding: 13px 14px 13px 42px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--stroke); color: var(--text);
  font-family: inherit; font-size: 15px;
}
.search-input-wrap input:focus { outline: none; border-color: var(--c2); }
.chips { display: flex; gap: 8px; padding: 4px 18px 14px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 7px 14px; border-radius: 20px; background: var(--glass);
  border: 1px solid var(--stroke-soft); font-size: 13px; cursor: pointer; color: var(--muted);
}
.chip.on { background: var(--grad-soft); color: #fff; border-color: transparent; }

/* ---------- Notifications ---------- */
.notif {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px; cursor: pointer;
  transition: background 0.15s; position: relative;
}
.notif:active { background: var(--glass); }
.notif.unread::before {
  content: ""; position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: var(--c2);
}
.notif img { width: 46px; height: 46px; border-radius: 50%; }
.notif .ntext { flex: 1; font-size: 14px; line-height: 1.4; }
.notif .ntext b { font-weight: 700; }
.notif .ntext small { color: var(--muted); }
.notif .nthumb { width: 44px; height: 56px; border-radius: 8px; object-fit: cover; }
.notif .nfollow { font-size: 12px; padding: 7px 14px; }
.date-label { padding: 14px 18px 6px; font-size: 12px; font-weight: 700; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.5px; }

/* ---------- Viral hub ---------- */
.viral-banner {
  margin: 8px 18px 14px; border-radius: var(--r-lg); padding: 20px;
  background: var(--grad); position: relative; overflow: hidden;
}
.viral-banner::after {
  content: ""; position: absolute; top: -40px; right: -40px; width: 140px; height: 140px;
  background: rgba(255,255,255,0.15); border-radius: 50%;
}
.viral-banner h3 { font-size: 19px; font-weight: 800; }
.viral-banner p { font-size: 13px; opacity: 0.9; margin-top: 4px; max-width: 80%; }
.card {
  margin: 0 18px 14px; background: var(--glass); border: 1px solid var(--stroke-soft);
  border-radius: var(--r-md); padding: 16px; backdrop-filter: blur(6px);
}
.card .ch { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card .ch .em { font-size: 20px; }
.card .ch b { font-size: 15px; }
.card .ch .pill { margin-left: auto; font-size: 11px; padding: 3px 9px; border-radius: 12px; background: var(--glass-strong); color: var(--muted); }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--stroke-soft); }
.rank-row:last-child { border-bottom: none; }
.rank-row .pos { width: 26px; font-weight: 800; font-size: 15px; text-align: center; }
.rank-row .pos.gold { color: #fbbf24; }
.rank-row .pos.silver { color: #cbd5e1; }
.rank-row .pos.bronze { color: #f59e0b; }
.rank-row img { width: 40px; height: 40px; border-radius: 50%; }
.rank-row .info { flex: 1; }
.rank-row .info b { font-size: 14px; display: block; }
.rank-row .info small { font-size: 12px; color: var(--muted); }
.rank-row .score { font-weight: 800; font-size: 14px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.streak-cal { display: flex; gap: 6px; justify-content: space-between; margin-top: 6px; }
.streak-cal .d {
  flex: 1; aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center;
  background: var(--glass); font-size: 11px; color: var(--muted-2);
}
.streak-cal .d.on { background: var(--grad); color: #fff; font-weight: 700; }
.badges { display: flex; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.badge-item { text-align: center; flex: 1; min-width: 64px; }
.badge-item .bicon {
  width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 6px;
  display: grid; place-items: center; font-size: 26px; background: var(--glass);
  border: 1px solid var(--stroke-soft);
}
.badge-item.earned .bicon { background: var(--grad); box-shadow: var(--shadow-glow); }
.badge-item small { font-size: 11px; color: var(--muted); }
.mood-pick-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin-top: 4px; }
.mood-pick-grid .mp {
  aspect-ratio: 1; border-radius: 16px; background: var(--glass); border: 1px solid var(--stroke-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; font-size: 24px;
}
.mood-pick-grid .mp small { font-size: 9px; color: var(--muted); }
.mood-pick-grid .mp.sel { background: var(--grad-soft); border-color: transparent; }

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: 6px; padding: 4px 18px 14px; }
.admin-tab {
  flex: 1; padding: 9px; border-radius: 12px; text-align: center; font-size: 13px; font-weight: 600;
  background: var(--glass); cursor: pointer; color: var(--muted); border: 1px solid var(--stroke-soft);
}
.admin-tab.on { background: var(--grad-soft); color: #fff; border-color: transparent; }
.kpi-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; padding: 0 18px 14px; }
.kpi {
  background: var(--glass); border: 1px solid var(--stroke-soft); border-radius: var(--r-md); padding: 16px;
}
.kpi .lbl { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 26px; font-weight: 800; margin: 6px 0 2px; }
.kpi .trend { font-size: 12px; font-weight: 700; }
.kpi .trend.up { color: #34d399; }
.kpi .trend.down { color: #f87171; }
.chart {
  margin: 0 18px 14px; background: var(--glass); border: 1px solid var(--stroke-soft);
  border-radius: var(--r-md); padding: 16px;
}
.chart h4 { font-size: 14px; margin-bottom: 14px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.bars .bcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .bcol .bar { width: 100%; border-radius: 6px 6px 0 0; background: var(--grad); transition: height 0.6s cubic-bezier(0.22,1,0.36,1); }
.bars .bcol small { font-size: 10px; color: var(--muted-2); }
.admin-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--stroke-soft);
}
.admin-row img { width: 42px; height: 42px; border-radius: 50%; }
.admin-row .info { flex: 1; min-width: 0; }
.admin-row .info b { font-size: 14px; display: block; }
.admin-row .info small { font-size: 12px; color: var(--muted); }
.tagx { font-size: 10px; padding: 3px 8px; border-radius: 10px; font-weight: 700; }
.tagx.ok { background: rgba(52,211,153,0.15); color: #34d399; }
.tagx.warn { background: rgba(251,191,36,0.15); color: #fbbf24; }
.tagx.ban { background: rgba(248,113,113,0.15); color: #f87171; }
.mini-btn {
  font-size: 12px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--stroke);
  background: var(--glass); color: var(--text); cursor: pointer; font-family: inherit; font-weight: 600;
}
.mini-btn.red { color: #f87171; border-color: rgba(248,113,113,0.3); }
.report-card {
  margin: 0 18px 12px; background: var(--glass); border: 1px solid var(--stroke-soft);
  border-radius: var(--r-md); overflow: hidden;
}
.report-card .rc-media { height: 120px; background-size: cover; background-position: center; position: relative; }
.report-card .rc-reason {
  position: absolute; top: 8px; left: 8px; background: rgba(248,113,113,0.9); color: #fff;
  font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 8px;
}
.report-card .rc-body { padding: 12px; }
.report-card .rc-body .rc-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.report-card .rc-body .rc-meta img { width: 30px; height: 30px; border-radius: 50%; }
.report-card .rc-actions { display: flex; gap: 8px; }
.report-card .rc-actions button { flex: 1; }

/* ---------- Toast ---------- */
.toast-wrap {
  position: absolute; bottom: calc(var(--nav-h) + 16px); left: 18px; right: 18px;
  z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast {
  background: rgba(20, 18, 34, 0.95); border: 1px solid var(--stroke);
  backdrop-filter: blur(14px); padding: 13px 18px; border-radius: 16px;
  font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow); max-width: 100%;
  animation: toastin 0.35s cubic-bezier(0.22,1.4,0.36,1);
}
.toast .te { font-size: 18px; }
@keyframes toastin { from { transform: translateY(20px); opacity: 0; } }
.toast.out { animation: toastout 0.3s forwards; }
@keyframes toastout { to { transform: translateY(20px); opacity: 0; } }

/* confetti */
.confetti {
  position: absolute; width: 9px; height: 14px; top: -20px; z-index: 600;
  pointer-events: none; border-radius: 2px;
}
@keyframes confall {
  to { transform: translateY(900px) rotate(720deg); opacity: 0; }
}

/* hint pulse for first time */
.hint {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); padding: 10px 16px; border-radius: 20px;
  font-size: 12px; z-index: 30; opacity: 0; animation: hintfade 3s ease forwards;
}
@keyframes hintfade { 0%,70%{opacity:1} 100%{opacity:0;visibility:hidden} }

/* empty state */
.empty { text-align: center; padding: 60px 30px; color: var(--muted); }
.empty .ic { font-size: 46px; margin-bottom: 12px; }
.empty b { display: block; font-size: 16px; color: var(--text); margin-bottom: 4px; }
.empty small { font-size: 13px; line-height: 1.5; }

/* skeleton shimmer used at boot */
.shimmer { background: linear-gradient(100deg, var(--glass) 30%, var(--glass-strong) 50%, var(--glass) 70%); background-size: 200% 100%; animation: shim 1.4s infinite; }
@keyframes shim { to { background-position: -200% 0; } }

/* ---------- yuyu coin ---------- */
.coin-chip {
  display: flex; align-items: center; gap: 5px; padding: 0 11px; height: 40px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(249, 115, 22, 0.14));
  border: 1px solid rgba(251, 191, 36, 0.38); cursor: pointer; transition: transform 0.15s;
}
.coin-chip:active { transform: scale(0.9); }
.coin-chip .ci { font-size: 15px; }
.coin-chip b { font-size: 13px; font-weight: 800; color: #fcd34d; }

.coin-hero {
  margin: 8px 18px 16px; border-radius: var(--r-lg); padding: 24px 20px; text-align: center; color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316, #ec4899); position: relative; overflow: hidden;
  animation: pop 0.5s cubic-bezier(0.22, 1.4, 0.36, 1) both;
}
.coin-hero::after { content: ""; position: absolute; top: -50px; right: -30px; width: 160px; height: 160px; background: rgba(255, 255, 255, 0.15); border-radius: 50%; }
.coin-hero::before { content: ""; position: absolute; bottom: -60px; left: -25px; width: 140px; height: 140px; background: rgba(255, 255, 255, 0.1); border-radius: 50%; }
.coin-hero .lbl { font-size: 13px; opacity: 0.92; font-weight: 600; position: relative; }
.coin-hero .amt { font-size: 46px; font-weight: 800; letter-spacing: -1.5px; display: flex; align-items: center; justify-content: center; gap: 8px; position: relative; }
.coin-hero .amt .c { font-size: 34px; animation: bob 3s ease-in-out infinite; }
.coin-hero .hint { font-size: 12px; opacity: 0.88; margin-top: 4px; position: relative; }

.mission { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--stroke-soft); }
.mission:last-child { border-bottom: none; }
.mission .mi { width: 42px; height: 42px; border-radius: 13px; background: var(--glass); display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.mission .mb { flex: 1; min-width: 0; }
.mission .mb b { font-size: 14px; display: block; }
.mission .mbar { height: 6px; border-radius: 4px; background: var(--glass); overflow: hidden; margin-top: 6px; }
.mission .mbar i { display: block; height: 100%; background: var(--grad); border-radius: 4px; transition: width 0.5s; }
.mission .mb small { font-size: 11px; color: var(--muted); }
.claim-btn { font-size: 12px; font-weight: 700; padding: 9px 14px; border-radius: 11px; border: none; cursor: pointer; font-family: inherit; background: var(--grad); color: #fff; white-space: nowrap; }
.claim-btn.go { background: var(--glass); border: 1px solid var(--stroke); color: var(--text); }
.claim-btn.done { background: var(--glass); color: var(--muted-2); }
.claim-btn:active { transform: scale(0.92); }

.shop-cat { padding: 8px 18px 10px; font-size: 14px; font-weight: 700; }
.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 18px 6px; }
.shop-item { background: var(--glass); border: 1px solid var(--stroke-soft); border-radius: var(--r-md); padding: 12px; text-align: center; transition: transform 0.15s; }
.shop-item.equipped { border-color: var(--c2); box-shadow: 0 0 0 1px var(--c2), var(--shadow-glow); }
.shop-prev { height: 76px; border-radius: 12px; margin-bottom: 10px; display: grid; place-items: center; overflow: hidden; position: relative; background: var(--bg-2); }
.shop-prev .pav { width: 54px; height: 54px; border-radius: 50%; padding: 3px; display: grid; place-items: center; }
.shop-prev .pav img { width: 100%; height: 100%; border-radius: 50%; }
.shop-prev .pname { font-size: 21px; font-weight: 800; }
.shop-prev .ppin { font-size: 32px; }
.shop-item .sname { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.shop-btn { width: 100%; padding: 9px; border-radius: 11px; border: none; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 5px; transition: transform 0.12s; }
.shop-btn.buy { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; }
.shop-btn.equip { background: var(--glass-strong); color: var(--text); border: 1px solid var(--stroke); }
.shop-btn.using { background: var(--c2); color: #fff; }
.shop-btn:active { transform: scale(0.94); }

.frame-top { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); font-size: 20px; z-index: 6; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4)); }
.prof-head.decorated { margin: 0 12px; border-radius: 0 0 var(--r-lg) var(--r-lg); padding-top: 24px; }
.active-cell .pin-badge { position: absolute; top: 6px; left: 6px; font-size: 13px; background: rgba(0,0,0,0.55); border-radius: 8px; padding: 2px 7px; z-index: 4; }

/* ---------- home: view count on discover cards ---------- */
.disc-views {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  display: flex; align-items: center; gap: 4px;
  background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px);
  border-radius: 20px; padding: 4px 9px; font-size: 11px; font-weight: 700;
}
.disc-views svg { width: 13px; height: 13px; }
.disc-card .live { left: auto; right: 8px; }

/* ---------- comments ---------- */
.cmt-sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cmt-gear { margin-left: auto; cursor: pointer; color: var(--muted); }
.cmt-gear svg { width: 20px; height: 20px; }
.cmt-notice {
  font-size: 12px; color: var(--muted); background: var(--glass); border: 1px solid var(--stroke-soft);
  border-radius: 12px; padding: 9px 12px; margin: 8px 0 12px; display: flex; gap: 8px; align-items: flex-start; line-height: 1.4;
}
.cmt { display: flex; gap: 10px; padding: 8px 0; }
.cmt .cav { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.cmt-body { flex: 1; min-width: 0; }
.cmt-bubble { background: var(--glass); border-radius: 4px 16px 16px 16px; padding: 9px 13px; display: inline-block; max-width: 100%; }
.cmt-bubble b { font-size: 12.5px; display: block; margin-bottom: 2px; }
.cmt-bubble b .own-tag { font-size: 9px; font-weight: 800; color: #fff; background: var(--grad); padding: 1px 6px; border-radius: 8px; margin-left: 5px; }
.cmt-bubble span { font-size: 13.5px; color: var(--text); line-height: 1.4; word-break: break-word; }
.cmt-meta { display: flex; gap: 16px; font-size: 11px; color: var(--muted-2); padding: 5px 4px 0; }
.cmt-meta .rep { font-weight: 700; color: var(--muted); cursor: pointer; }
.cmt-meta .rep:active { color: var(--c2); }
.cmt-like { display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; flex-shrink: 0; padding-top: 8px; min-width: 26px; }
.cmt-like .h { font-size: 15px; transition: transform 0.15s; }
.cmt-like:active .h { transform: scale(1.4); }
.cmt-like small { font-size: 11px; color: var(--muted-2); }
.cmt-like.on small { color: var(--c2); font-weight: 700; }
.cmt-replies { margin-top: 8px; padding-left: 8px; border-left: 2px solid var(--stroke-soft); display: flex; flex-direction: column; }
.cmt-reply-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 8px 4px 4px; }
.cmt-reply-bar b { flex: 1; color: var(--c2); font-weight: 700; }
.cmt-reply-bar .cancel { cursor: pointer; color: var(--muted-2); padding: 4px 8px; }
.cmt-input-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; position: sticky; bottom: 0; background: var(--bg-2); padding: 8px 0 2px; }
.cmt-input { flex: 1; background: var(--glass); border: 1px solid var(--stroke); border-radius: 22px; padding: 11px 16px; color: var(--text); font-family: inherit; font-size: 14px; }
.cmt-input:focus { outline: none; border-color: var(--c2); }
.cmt-send { width: 42px; height: 42px; border-radius: 50%; background: var(--grad); border: none; display: grid; place-items: center; color: #fff; cursor: pointer; flex-shrink: 0; }
.cmt-send:active { transform: scale(0.9); }
.cmt-send svg { width: 19px; height: 19px; }

/* viewer comment buttons */
.vbtn { position: relative; }
.vbadge { position: absolute; top: -5px; right: -5px; background: var(--c2); color: #fff; font-size: 9px; font-weight: 800; min-width: 17px; height: 17px; padding: 0 3px; border-radius: 9px; display: grid; place-items: center; border: 1.5px solid #000; }
.vcomments {
  position: absolute; bottom: 26px; right: 18px; z-index: 20;
  display: flex; align-items: center; gap: 6px; cursor: pointer; color: #fff; font-size: 13px; font-weight: 600;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 14px; border-radius: 22px; backdrop-filter: blur(8px);
}
.vcomments:active { transform: scale(0.93); }

/* ---------- search: X-style explore ---------- */
.search-header { position: sticky; top: 0; z-index: 30; background: var(--bg-2); }
.search-topbar { display: flex; align-items: center; gap: 10px; padding: 50px 14px 10px; }
.search-av { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; cursor: pointer; border: 1px solid var(--stroke); }
.search-topbar .search-input-wrap { flex: 1; }
.search-topbar .icon-btn { flex-shrink: 0; }
.search-tabs { display: flex; gap: 26px; padding: 2px 18px 0; border-bottom: 1px solid var(--stroke-soft); }
.stab { padding: 9px 2px 12px; font-size: 15px; font-weight: 700; color: var(--muted-2); cursor: pointer; position: relative; transition: color 0.2s; }
.stab.on { color: var(--text); }
.stab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px; background: var(--grad); }
.stab:active { transform: scale(0.95); }

.trend-hero {
  margin: 14px 18px; height: 200px; border-radius: var(--r-lg); background-size: cover; background-position: center;
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; cursor: pointer;
  overflow: hidden; border: 1px solid var(--stroke-soft); transition: transform 0.18s;
}
.trend-hero:active { transform: scale(0.98); }
.th-badge { position: absolute; top: 14px; left: 14px; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px); font-size: 11px; font-weight: 800; padding: 5px 11px; border-radius: 20px; }
.th-meta b { font-size: 25px; font-weight: 800; display: block; letter-spacing: -0.5px; }
.th-meta small { font-size: 13px; color: rgba(255, 255, 255, 0.88); }
.trend-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; cursor: pointer; transition: background 0.15s; }
.trend-row:active { background: var(--glass); }
.tr-rank { font-size: 18px; font-weight: 800; color: var(--muted-2); width: 22px; text-align: center; }
.tr-body { flex: 1; min-width: 0; }
.tr-body b { font-size: 15px; font-weight: 700; display: block; margin: 1px 0; }
.tr-body small { font-size: 12px; color: var(--muted); }
.tr-more { color: var(--muted-2); cursor: pointer; }
.tr-more svg { width: 18px; height: 18px; }

.radius-box { margin: 16px 18px; background: var(--glass); border: 1px solid var(--stroke-soft); border-radius: var(--r-md); padding: 16px 16px 14px; }
.radius-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.radius-head b { font-size: 15px; }
.radius-val { font-size: 16px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.radius-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 5px; background: linear-gradient(90deg, var(--c1), var(--c2), var(--c3)); outline: none; cursor: pointer; }
.radius-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); border: 3px solid var(--c2); }
.radius-slider::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; cursor: pointer; border: 3px solid var(--c2); }
.radius-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--muted-2); }
.dist-chip { position: absolute; top: 8px; left: 8px; z-index: 3; display: flex; align-items: center; gap: 3px; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px); border-radius: 20px; padding: 4px 9px; font-size: 11px; font-weight: 700; }

/* ---------- viewer header: follow + report + countdown + corner close ---------- */
.vhead { right: 56px; align-items: flex-start; }
.vhead img { margin-top: 2px; }
.name-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.name-row b { font-size: 14px; }
.vfollow { font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 20px; background: var(--grad); color: #fff; cursor: pointer; border: none; font-family: inherit; }
.vfollow.following { background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.4); }
.vfollow:active { transform: scale(0.92); }
.vreport { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 20px; background: rgba(0, 0, 0, 0.35); color: #fff; border: 1px solid rgba(255, 255, 255, 0.28); cursor: pointer; }
.vreport:active { transform: scale(0.92); }
.vcountdown { display: flex; align-items: center; gap: 5px; font-size: 11px; color: rgba(255, 255, 255, 0.85); margin-top: 4px; }
.vcountdown b { font-variant-numeric: tabular-nums; font-weight: 700; }
.vclose-corner { position: absolute; top: 58px; right: 12px; z-index: 35; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(8px); display: grid; place-items: center; color: #fff; cursor: pointer; }
.vclose-corner:active { transform: scale(0.9); }
.vclose-corner svg { width: 20px; height: 20px; }

/* ---------- create story: tools ---------- */
.canvas-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: filter 0.25s; }
.tool-rail { position: absolute; left: 10px; top: 12px; display: flex; flex-direction: column; gap: 9px; z-index: 6; }
.tool-btn { width: 44px; height: 44px; border-radius: 14px; background: rgba(0, 0, 0, 0.42); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.22); display: grid; place-items: center; font-size: 17px; font-weight: 800; color: #fff; cursor: pointer; transition: transform 0.12s; }
.tool-btn:active { transform: scale(0.88); }
.tool-btn.on { background: var(--grad); border-color: transparent; box-shadow: var(--shadow-glow); }
.story-text { position: absolute; inset: 0; display: block; width: 100%; height: 100%; text-align: center; border: none; background: transparent; color: #fff; font-family: inherit; font-size: 27px; font-weight: 800; line-height: 1.3; padding: 80px 26px; resize: none; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45); z-index: 3; }
.story-text:focus { outline: none; }
.story-text::placeholder { color: rgba(255, 255, 255, 0.75); }
.vid-badge { position: absolute; top: 12px; right: 12px; z-index: 5; background: rgba(0, 0, 0, 0.5); border-radius: 20px; padding: 5px 11px; font-size: 11px; font-weight: 800; color: #fff; }
.mention-chips { position: absolute; bottom: 72px; left: 14px; right: 14px; z-index: 4; display: flex; flex-wrap: wrap; gap: 6px; }
.mention-chip { background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 16px; padding: 4px 10px; font-size: 12px; font-weight: 700; color: #fff; }
.tool-panel { min-height: 64px; }
.color-row { display: flex; gap: 10px; padding: 12px 18px 6px; overflow-x: auto; scrollbar-width: none; }
.color-row::-webkit-scrollbar { display: none; }
.color-sw { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; cursor: pointer; border: 3px solid transparent; transition: transform 0.12s; }
.color-sw.sel { border-color: #fff; transform: scale(1.08); }
.trim-box { padding: 14px 18px 6px; }
.trim-track { height: 56px; border-radius: 10px; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.trim-mask-l, .trim-mask-r { position: absolute; top: 0; bottom: 0; width: 18%; background: rgba(0, 0, 0, 0.6); }
.trim-mask-l { left: 0; border-right: 3px solid var(--c2); }
.trim-mask-r { right: 0; border-left: 3px solid var(--c2); }
.trim-handle { position: absolute; top: 50%; transform: translateY(-50%); width: 8px; height: 30px; border-radius: 4px; background: var(--c2); }
.trim-label { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }

/* ---------- edit profile ---------- */
.edit-pencil { font-size: 13px; opacity: 0.6; -webkit-text-fill-color: initial; }
.prof-name[data-editprofile], .prof-bio[data-editprofile] { cursor: pointer; }
.edit-photo { font-size: 13px; color: var(--c2); font-weight: 700; cursor: pointer; }
.free-tag { font-size: 10px; font-weight: 700; color: #34d399; background: rgba(52, 211, 153, 0.14); border: 1px solid rgba(52, 211, 153, 0.3); padding: 1px 7px; border-radius: 9px; margin-left: 4px; }
.uname-cost { font-size: 10px; font-weight: 700; color: #fcd34d; background: rgba(251, 191, 36, 0.14); border: 1px solid rgba(251, 191, 36, 0.3); padding: 1px 8px; border-radius: 9px; margin-left: 4px; }
.uname-row { display: flex; align-items: center; gap: 7px; }
.uname-row .at { font-size: 17px; color: var(--muted); font-weight: 800; }
.uname-row .input { flex: 1; }
.uname-note { font-size: 11px; color: var(--muted-2); padding-left: 2px; display: block; margin-top: 5px; line-height: 1.4; }

/* ---------- framed avatars everywhere (fav) ---------- */
.fav { position: relative; display: inline-grid; place-items: center; border-radius: 50%; box-sizing: border-box; flex-shrink: 0; isolation: isolate; vertical-align: middle; }
.fav::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ring); z-index: 0; }
.fav img { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg); }
.disc-card .ov .fav img,
.vhead .fav img { width: 100%; height: 100%; border: 3px solid var(--bg); margin-top: 0; }
.fav-top { position: absolute; top: -7px; left: 50%; transform: translateX(-50%); z-index: 2; line-height: 1; font-size: 13px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
.ov .fav { width: 34px; height: 34px; padding: 4px; }
.ov .fav-top { font-size: 11px; top: -6px; }
.vhead .fav { width: 42px; height: 42px; padding: 4px; }

/* shop frame preview as ::before ring */
.shop-prev .pav { position: relative; isolation: isolate; }
.shop-prev .pav::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ring); z-index: 0; }
.shop-prev .pav img { position: relative; z-index: 1; }

/* ---------- frame / name animations ---------- */
@keyframes fxGlow { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
@keyframes fxShine { 0%,100% { filter: brightness(1) contrast(1); } 50% { filter: brightness(1.4) contrast(1.12); } }
@keyframes fxFlicker { 0%,100% { filter: brightness(1); } 42% { filter: brightness(1.65); } 48% { filter: brightness(0.7); } 54% { filter: brightness(1.5); } }
@keyframes fxPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes fxWobble { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes fxBreathe { 0%,100% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.05); filter: brightness(1.3); } }
@keyframes fxBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes fxHue { to { filter: hue-rotate(360deg); } }
.fx-spin::before { animation: ringspin 3.5s linear infinite; }
.fx-spin-slow::before { animation: ringspin 8s linear infinite; }
.fx-spin-rev::before { animation: ringspin 5s linear infinite reverse; }
.fx-hue::before { animation: fxHue 4s linear infinite; }
.fx-glow { animation: fxGlow 2.2s ease-in-out infinite; }
.fx-shine { animation: fxShine 2.2s ease-in-out infinite; }
.fx-flicker { animation: fxFlicker 2s ease-in-out infinite; }
.fav.fx-pulse, .prof-av.fx-pulse, .bubble .ring.fx-pulse, .shop-prev .pav.fx-pulse { animation: fxPulse 1.5s ease-in-out infinite; }
.fav.fx-wobble, .prof-av.fx-wobble, .bubble .ring.fx-wobble, .shop-prev .pav.fx-wobble { animation: fxWobble 2.4s ease-in-out infinite; }
.fav.fx-breathe, .prof-av.fx-breathe, .bubble .ring.fx-breathe, .shop-prev .pav.fx-breathe { animation: fxBreathe 2.6s ease-in-out infinite; }
.fav.fx-bounce, .prof-av.fx-bounce, .bubble .ring.fx-bounce, .shop-prev .pav.fx-bounce { animation: fxBounce 1.6s ease-in-out infinite; }

/* === team frame effects — Sirius: Comet Runner / Aurora Liquid / Orbit Satellites === */
@keyframes fxCometRunner { to { transform: rotate(1turn); } }
@keyframes fxAuroraLiquid {
  0% { transform: rotate(0turn) scale(1); filter: hue-rotate(0deg) saturate(1.15) brightness(1.1); }
  50% { transform: rotate(.5turn) scale(1.04); filter: hue-rotate(80deg) saturate(1.35) brightness(1.24); }
  100% { transform: rotate(1turn) scale(1); filter: hue-rotate(160deg) saturate(1.15) brightness(1.1); }
}
@keyframes fxOrbitSatellites { to { transform: rotate(1turn); } }
.fx-comet::before { animation: fxCometRunner 1.5s linear infinite; transform-origin: 50% 50%; will-change: transform; }
.fx-aurora::before { animation: fxAuroraLiquid 7s linear infinite; transform-origin: 50% 50%; will-change: transform, filter; }
.fx-orbit::before { animation: fxOrbitSatellites 4.8s linear infinite; transform-origin: 50% 50%; will-change: transform; }

/* === team frame effect — Vega: Time-Burn Ring (24h story countdown, @property) === */
@property --burn { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
@keyframes burnCountdown { from { --burn: 100%; } to { --burn: 0%; } }
@keyframes burnFlicker {
  0%, 100% { filter: brightness(1.05) saturate(1.08); }
  45% { filter: brightness(1.35) saturate(1.28); }
  52% { filter: brightness(.9) saturate(.92); }
  62% { filter: brightness(1.22) saturate(1.2); }
}
.fx-burn::before {
  --burn: 100%;
  --burn-ring-width: 6px;
  background:
    conic-gradient(from -90deg, #fef08a 0%, #fb923c, #ef4444 var(--burn), rgba(15,23,42,.42) var(--burn) 100%),
    var(--ring);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--burn-ring-width)), #000 calc(100% - var(--burn-ring-width) + 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--burn-ring-width)), #000 calc(100% - var(--burn-ring-width) + 1px));
  animation: burnCountdown var(--burn-duration, 30s) linear infinite, burnFlicker 2.4s ease-in-out infinite;
}
.shop-prev .fx-burn::before { --burn-duration: 16s; }
/* unviewed stories: ring spins (framed or not); viewed = static + dimmed; ring only, face still */
.bubble:not(.seen):not(.me) .ring::before { animation: ringspin 5s linear infinite; }
.bubble.seen .ring::before { animation: none; }

/* name text animations */
@keyframes nmShift { to { background-position: 240% center; } }
@keyframes nmNeon { 0%,100% { filter: drop-shadow(0 0 4px #22d3ee); } 50% { filter: drop-shadow(0 0 11px #a855f7); } }
@keyframes nmBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes nmPop { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.nm-shift { animation: nmShift 3s linear infinite; }
.nm-neon { animation: nmNeon 1.8s ease-in-out infinite; }
.nm-bounce { display: inline-block; animation: nmBounce 1.4s ease-in-out infinite; }
.nm-pop { display: inline-block; animation: nmPop 1.6s ease-in-out infinite; }
/* team ideas (Leo): Rainbow Comet ☄️ / Neon Bounce 💗 / Type Glitch ⌁ */
.nm-comet { animation: nmShift 1.8s linear infinite; }
@keyframes nmNeonBounce { 0%,100% { transform: scale(1); filter: drop-shadow(0 0 4px #f472b6) drop-shadow(0 0 7px #22d3ee); } 50% { transform: scale(1.04); filter: drop-shadow(0 0 9px #f472b6) drop-shadow(0 0 14px #22d3ee); } }
.nm-neonbounce { display: inline-block; animation: nmNeonBounce 1.4s ease-in-out infinite; }
@keyframes nmType { 0% { clip-path: inset(0 100% 0 0); } 65% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 0 0); } }
@keyframes nmGlitch { 0%,90%,100% { transform: translate(0,0); } 93% { transform: translate(-2px,1px); } 96% { transform: translate(2px,-1px); } 98% { transform: translate(-1px,0); } }
@keyframes caretBlink { 0%,49% { border-color: #67e8f9; } 50%,100% { border-color: transparent; } }
.nm-typeglitch { display: inline-block; border-right: 2px solid #67e8f9; padding-right: 2px; animation: nmType 3.4s steps(20,end) infinite, nmGlitch 3.4s linear infinite, caretBlink 0.8s step-end infinite; }

/* animated profile/shop backgrounds */
@keyframes bgFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.bg-flow { animation: bgFlow 14s ease-in-out infinite; }

/* ---------- particle effects (fx) ---------- */
.fx-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.fx-layer span { position: absolute; opacity: 0; will-change: transform, opacity; }
.fx-float span { bottom: -12%; animation-name: fxFloatUp; animation-timing-function: ease-in; animation-iteration-count: infinite; }
.fx-fall span { top: -12%; animation-name: fxFallDown; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes fxFloatUp { 0% { transform: translateY(0) scale(0.6); opacity: 0; } 15% { opacity: 0.9; } 100% { transform: translateY(-170px) scale(1) rotate(18deg); opacity: 0; } }
/* Nova: natural drifting fall (petals/leaves/snow/etc) */
@keyframes fxFallDown {
  0% { transform: translate3d(0,-8px,0) rotate(0deg) scale(.78); opacity: 0; }
  12% { opacity: .95; }
  48% { transform: translate3d(18px,92px,0) rotate(86deg) scale(.96); }
  100% { transform: translate3d(-14px,204px,0) rotate(188deg) scale(1.05); opacity: 0; }
}
/* Nova: meteor streak (only the meteor fx) */
.fx-layer.fx-meteor span { top: -18%; animation-name: fxMeteorFall; animation-timing-function: cubic-bezier(.18,.72,.24,1); filter: drop-shadow(0 0 7px rgba(251,191,36,.9)); }
@keyframes fxMeteorFall {
  0% { transform: translate3d(-28px,-18px,0) rotate(-24deg) scale(.65); opacity: 0; }
  10% { opacity: 1; }
  72% { opacity: .85; }
  100% { transform: translate3d(122px,224px,0) rotate(-24deg) scale(1.08); opacity: 0; }
}
.prof-head { position: relative; overflow: hidden; }
.fx-prev { position: relative; width: 100%; height: 100%; }

/* ---------- shop: durations + badges ---------- */
.shop-item { position: relative; }
.own-dur { position: absolute; top: 6px; left: 6px; z-index: 3; background: rgba(0,0,0,0.62); font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 9px; color: #fcd34d; }
.shop-note { margin: 0 18px 10px; font-size: 11px; color: var(--muted); background: var(--glass); border: 1px solid var(--stroke-soft); border-radius: 12px; padding: 9px 12px; line-height: 1.45; }
.shop-cat-sub { display: block; font-size: 11px; color: var(--muted-2); font-weight: 500; margin-top: 2px; }
.dur-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.dur-opt { background: var(--glass); border: 1px solid var(--stroke); border-radius: 14px; padding: 15px 12px; text-align: center; cursor: pointer; position: relative; transition: transform 0.12s; }
.dur-opt:active { transform: scale(0.96); }
.dur-opt b { display: block; font-size: 15px; margin-bottom: 4px; }
.dur-price { font-size: 13px; font-weight: 800; color: #fcd34d; }
.dur-opt.best { border-color: var(--c2); background: var(--glass-strong); }
.dur-tag { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: var(--grad); font-size: 9px; font-weight: 800; padding: 2px 9px; border-radius: 10px; color: #fff; }
.dur-opt.cant { opacity: 0.45; }

/* accessibility: visible keyboard focus ring */
:focus-visible { outline: 2px solid #ec4899; outline-offset: 2px; border-radius: 6px; }

/* accessibility: reduce strong motion while preserving gentle brand motion */
@media (prefers-reduced-motion: reduce) {
  .fx-spin-rev::before,
  .fx-comet::before,
  .fx-flicker,
  .fx-bounce,
  .fav.fx-pulse,
  .prof-av.fx-pulse,
  .bubble .ring.fx-pulse,
  .shop-prev .pav.fx-pulse,
  .nm-bounce,
  .nm-pop,
  .nm-neonbounce,
  .nm-typeglitch,
  .bg-flow,
  .fx-float span,
  .fx-fall span,
  .fx-layer.fx-meteor span,
  .coin-hero {
    animation: none !important;
  }

  .bubble:not(.seen):not(.me) .ring::before { animation: ringspin 10s linear infinite !important; }
  .fx-spin::before { animation-duration: 14s !important; }
  .fx-spin-slow::before { animation-duration: 14s !important; }
  .fx-aurora::before { animation-duration: 18s !important; }
  .fx-orbit::before { animation-duration: 14s !important; }
  .fx-hue::before { animation-duration: 12s !important; }
  .fx-burn::before { animation-duration: 60s, 4.8s !important; }
  .fx-glow { animation-duration: 5s !important; }
  .fx-shine { animation-duration: 5.5s !important; }
  .fx-wobble { animation-duration: 6s !important; }
  .fx-breathe { animation-duration: 6s !important; }
  .nm-shift { animation-duration: 9s !important; }
  .nm-comet { animation-duration: 10s !important; }
  .nm-neon { animation-duration: 5s !important; }

  .fx-burn::before { --burn: 64%; filter: none !important; }
  .fx-layer span { opacity: 0.4; transform: none !important; }
  .nm-typeglitch { clip-path: none !important; border-right: none !important; padding-right: 0 !important; }
}

/* desktop layout */
@media (min-width: 1024px) {
  .pitch { display: block; }
}
@media (min-width: 560px) {
  .reset-fab {
    position: fixed; bottom: 18px; right: 18px; z-index: 10;
    background: var(--glass); border: 1px solid var(--stroke); color: var(--muted);
    padding: 10px 14px; border-radius: 14px; font-size: 12px; cursor: pointer; backdrop-filter: blur(10px);
  }
}
.reset-fab { display: none; }
@media (min-width: 560px) { .reset-fab { display: block; } }

/* mobile: phone fills screen */
@media (max-width: 559px) {
  body { display: block; }
  .ambient { display: none; }
  .stage { gap: 0; }
  .phone {
    width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; padding: 0;
    box-shadow: none;
  }
  .screen { border-radius: 0; }
  .viewer-wrap { border-radius: 0; }
  .sheet-backdrop { border-radius: 0; }
  .notch { display: none; }
  .statusbar { display: none; }
  .topbar, .page-head, .search-bar, .search-topbar { padding-top: max(18px, env(safe-area-inset-top)); }
  .auth { padding-top: 30px; }
}
