/* Ree MuseO — Douyin / Reels vertical short-video feed */
:root {
  --bg: #000;
  --bg2: #0a0a0c;
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.72);
  --muted2: rgba(255, 255, 255, 0.45);
  /* Logo palette: glass magenta/pink → cyan */
  --pink: #e878b8;
  --pink2: #c94f9a;
  --magenta: #d946a8;
  --cyan: #5ac8dc;
  --cyan2: #3db8d0;
  --accent: var(--pink);
  --accent2: var(--cyan);
  --line: rgba(255, 255, 255, 0.12);
  --sheet: #12141a;
  --sheet2: #1a1d26;
  --danger: #ff4d6d;
  --ok: #5ac8dc;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --rail-w: 56px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: 100%;
  min-height: -webkit-fill-available;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  overflow: hidden;
  /* iPhone: lock rubber-band so each card fills the screen */
  position: fixed;
  inset: 0;
}

body.gate-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button {
  font-family: inherit;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
}
button:disabled { opacity: 0.45; cursor: default; }

/* ── App shell (phone frame on desktop) ── */
.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: -webkit-fill-available;
  max-width: 430px; /* iPhone Pro Max logical width */
  margin: 0 auto;
  background: #000;
  overflow: hidden;
}
@media (min-width: 480px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg2);
    position: static;
  }
  .app-shell {
    height: min(100dvh, 932px); /* iPhone 16 Pro Max-ish frame on desktop */
    min-height: 0;
    border-radius: 24px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 24px 80px rgba(0,0,0,0.6);
  }
}

/* ── Top chrome ──
   Floating logo + brand only — transparent, no opaque cover band.
   Video shows through the top; light text shadow keeps brand readable. */
.top-chrome {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + var(--safe-t)) 14px 12px;
  min-height: calc(48px + var(--safe-t));
  pointer-events: none;
  background: transparent;
}
.top-chrome > * {
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.75)) drop-shadow(0 0 12px rgba(0,0,0,0.45));
}
.brand-logo {
  width: 36px; height: 28px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 10px rgba(232, 120, 184, 0.35));
}
.brand-name {
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 14px;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.top-user-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  cursor: pointer;
  color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.75)) drop-shadow(0 0 12px rgba(0,0,0,0.45));
}
.top-user-ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
}
.top-user-ico svg {
  width: 26px;
  height: 26px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.top-user-btn:active .top-user-ico { transform: scale(0.88); }


/* ── Vertical feed ── */
.feed {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: none;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }

.card {
  position: relative;
  height: 100%;
  height: 100dvh;
  min-height: 100%;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: #000;
}
.app-shell .feed,
.app-shell .card {
  /* Inside phone shell, inherit shell height (not outer dvh on desktop frame) */
  height: 100%;
  min-height: 100%;
}

/* Poster / "video" stage */
.stage {
  position: absolute;
  inset: 0;
  background: #111;
}
.stage-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.stage-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: soft-light;
}
.stage-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.18) 0%, transparent 18%, transparent 55%, rgba(0,0,0,0.85) 100%),
    linear-gradient(90deg, rgba(0,0,0,0.25) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.15) 100%);
  pointer-events: none;
}


/* Real preview video — full-bleed cover inside vertical card */
.stage-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Apple vertical short-video: fill 9:16 screen, crop edges if needed */
  object-fit: cover;
  object-position: center center;
  background: #000;
  z-index: 1;
  pointer-events: none;
  /* Avoid iOS inline video controls / fullscreen hijack */
  -webkit-playsinline: true;
}
.stage-video.is-missing {
  display: none;
}
.stage.has-video .stage-pattern {
  opacity: 0.12;
  z-index: 2;
}
.stage.has-video .stage-bg {
  z-index: 0;
}
.stage.has-video .poster-art {
  z-index: 2;
  transition: opacity 0.35s ease;
}
.stage.has-video .poster-art.is-hidden {
  opacity: 0;
  visibility: hidden;
}
.stage.has-video .stage-vignette {
  z-index: 3;
}
.stage.has-video .play-hint,
.stage.has-video .progress-track {
  z-index: 6;
}
.stage.video-fallback .poster-art {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Decorative poster art */
.poster-art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.poster-orb {
  width: min(68vw, 280px);
  height: min(68vw, 280px);
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  animation: pulse 6s ease-in-out infinite;
}
.poster-ring {
  position: absolute;
  width: min(78vw, 320px);
  height: min(78vw, 320px);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 0 60px rgba(255,255,255,0.08) inset;
}
.poster-title-ghost {
  position: absolute;
  font-size: clamp(42px, 14vw, 72px);
  font-weight: 900;
  letter-spacing: 0.08em;
  opacity: 0.08;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  user-select: none;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.06); opacity: 0.7; }
}

/* Play hint — soft grey translucent rounded triangle (no circle) */
.play-hint {
  position: absolute;
  left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px;
  display: grid; place-items: center;
  background: transparent;
  border: none;
  opacity: 0.92;
  transition: opacity 0.25s;
  pointer-events: none;
  z-index: 5;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.28));
}
.play-hint svg {
  width: 64px;
  height: 64px;
  margin-left: 5px;
  display: block;
}
.card.is-playing .play-hint { opacity: 0; }

/* Progress bar (fake playback) */
.progress-track {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255,255,255,0.15);
  z-index: 8;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  box-shadow: 0 0 8px rgba(232,120,184,0.55);
  transition: width 0.2s linear;
}

/* Free timer badge */
.timer-badge {
  position: absolute;
  top: calc(66px + var(--safe-t));
  left: 14px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(232,120,184,0.4);
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
}
.timer-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pink);
  animation: blink 1s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Soft lock overlay */
.lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 24px 20px calc(40px + var(--safe-b));
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.55) 40%, rgba(0,0,0,0.92) 100%);
  backdrop-filter: blur(2px);
}
.lock-overlay.show { display: flex; pointer-events: auto; }
.lock-overlay .btn-unlock { pointer-events: auto; cursor: pointer; }
.lock-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(232,120,184,0.2);
  border: 1px solid rgba(232,120,184,0.5);
  display: grid; place-items: center;
  font-size: 24px;
  margin-bottom: 14px;
}
.lock-overlay h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
}
.lock-overlay p {
  margin: 0 0 18px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  max-width: 280px;
}
.btn-unlock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(100%, 280px);
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  color: #0a0a0c;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 8px 28px rgba(217,70,168,0.4);
}
.btn-ghost-sm {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Left / bottom meta overlay */
.meta {
  position: absolute;
  left: 14px;
  right: calc(var(--rail-w) + 18px);
  bottom: calc(28px + var(--safe-b));
  z-index: 10;
  pointer-events: none;
}
.meta > * { pointer-events: auto; }

.ep-progress {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  margin-bottom: 10px;
  backdrop-filter: blur(6px);
}
.meta-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
  letter-spacing: 0.02em;
}
.meta-desc {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
}
.ep-nav {
  display: flex;
  gap: 8px;
}
.ep-nav button {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}
.ep-nav button:active { background: rgba(255,255,255,0.22); }

/* Right action rail — glyph-only (transparent, no plate/border) */
.rail {
  position: absolute;
  right: 6px;
  bottom: calc(100px + var(--safe-b));
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: var(--rail-w);
}
.rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.rail-ico {
  width: 40px; height: 40px;
  border-radius: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  display: grid; place-items: center;
  color: #fff;
  transition: transform 0.15s, color 0.15s, opacity 0.15s;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.65));
}
.rail-ico svg {
  width: 28px;
  height: 28px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rail-ico svg .fill-on {
  fill: currentColor;
  stroke: currentColor;
}
.rail-btn:active .rail-ico { transform: scale(0.88); }
.rail-btn.on .rail-ico {
  background: transparent !important;
  border: 0 !important;
  color: var(--pink);
}
.rail-btn.on.fav .rail-ico {
  background: transparent !important;
  color: var(--cyan);
}
.rail-btn.muted .rail-ico { color: rgba(255,255,255,0.75); }
.rail-count {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

/* Swipe hint (first visit) */
.swipe-hint {
  position: absolute;
  left: 50%;
  bottom: calc(120px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  animation: floatUp 1.6s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.4s;
}
.swipe-hint.show { opacity: 1; }
.swipe-hint .chev { font-size: 20px; }
@keyframes floatUp {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

/* ── Sheets ── */
.sheet-mask {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s;
}
.sheet-mask.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  max-height: min(88%, 640px);
  background: var(--sheet);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--line);
  transform: translateY(105%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.32s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: none; /* closed sheets must not block profile/auth buttons */
  visibility: hidden;
}
.sheet.open {
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}
.sheet-handle {
  width: 40px; height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.22);
  margin: 10px auto 4px;
  flex-shrink: 0;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.sheet-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}
.sheet-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: grid; place-items: center;
  font-size: 16px;
}
.sheet-body {
  padding: 16px 18px calc(20px + var(--safe-b));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Age gate — 9-point logo mesh + flowing pink→cyan border */
.age-gate {
  position: absolute;
  inset: 0;
  z-index: 100;
  /* 3×3 (上中下 × 左中右) radial mesh: pink / magenta / cyan over charcoal */
  background:
    radial-gradient(ellipse 85% 70% at 0% 0%, rgba(232, 120, 184, 0.62) 0%, transparent 58%),
    radial-gradient(ellipse 75% 65% at 50% 0%, rgba(217, 70, 168, 0.48) 0%, transparent 55%),
    radial-gradient(ellipse 85% 70% at 100% 0%, rgba(90, 200, 220, 0.52) 0%, transparent 58%),
    radial-gradient(ellipse 70% 55% at 0% 50%, rgba(201, 79, 154, 0.32) 0%, transparent 52%),
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(18, 12, 22, 0.55) 0%, transparent 62%),
    radial-gradient(ellipse 70% 55% at 100% 50%, rgba(61, 184, 208, 0.34) 0%, transparent 52%),
    radial-gradient(ellipse 85% 70% at 0% 100%, rgba(90, 200, 220, 0.42) 0%, transparent 58%),
    radial-gradient(ellipse 75% 65% at 50% 100%, rgba(232, 120, 184, 0.36) 0%, transparent 55%),
    radial-gradient(ellipse 85% 70% at 100% 100%, rgba(217, 70, 168, 0.46) 0%, transparent 58%),
    linear-gradient(165deg, #0c0812 0%, #121018 42%, #0a1216 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}
.age-gate::before {
  /* soft ambient bloom behind card */
  content: "";
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,120,184,0.22) 0%, rgba(90,200,220,0.12) 45%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}
.age-card-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 340px);
  border-radius: 22px;
  padding: 2px;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(232, 120, 184, 0.18),
    0 0 56px rgba(90, 200, 220, 0.12);
}
.age-card-wrap::before {
  /* spinning conic gradient = flowing logo-color stroke */
  content: "";
  position: absolute;
  inset: -60%;
  background: conic-gradient(
    from 0deg,
    #e878b8 0deg,
    #d946a8 60deg,
    #5ac8dc 140deg,
    #3db8d0 200deg,
    #c94f9a 280deg,
    #e878b8 360deg
  );
  animation: ageBorderFlow 3.2s linear infinite;
  z-index: 0;
}
@keyframes ageBorderFlow {
  to { transform: rotate(360deg); }
}
.age-card {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
  padding: 28px 22px;
  border-radius: 20px;
  background:
    linear-gradient(165deg, rgba(22, 18, 28, 0.97) 0%, rgba(14, 16, 22, 0.98) 100%);
  border: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.age-logo {
  font-weight: 900;
  letter-spacing: 0.04em;
  font-size: 20px;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.age-logo img {
  width: 96px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(232,120,184,0.35));
}
.age-card h1 {
  margin: 0 0 10px;
  font-size: 20px;
}
.age-card p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.btn-primary {
  display: block;
  width: 100%;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  color: #0a0a0c;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 10px;
  box-shadow: 0 8px 24px rgba(217, 70, 168, 0.35);
}
.btn-ghost {
  display: block;
  width: 100%;
  height: 44px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(90, 200, 220, 0.28);
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

/* Toast */
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(80px + var(--safe-b));
  transform: translateX(-50%) translateY(20px);
  z-index: 90;
  background: rgba(30,26,28,0.95);
  border: 1px solid var(--line);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.toast-link {
  white-space: normal;
  word-break: break-all;
  border-radius: 14px;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.45;
  max-width: min(92%, 420px);
  text-align: center;
  overflow: visible;
  text-overflow: clip;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Comments — interactive local community */
.sheet-comments-live {
  max-height: min(78%, 620px);
}
.sheet-comments-live .sheet-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.comment-panel {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  height: 100%;
}
.comment-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px 12px;
}
.comment-empty {
  flex: 1;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 36px 18px;
  color: var(--muted);
  font-size: 13px;
  gap: 6px;
}
.comment-empty strong {
  color: #fff;
  font-size: 15px;
}
.cmt-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cmt-av {
  width: 36px; height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #2a2f3a center/cover no-repeat;
}
.cmt-av-letter {
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #6a1f55, #2a6a88);
}
.cmt-main { min-width: 0; flex: 1; }
.cmt-meta {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 4px;
}
.cmt-name { font-size: 13px; font-weight: 700; color: #fff; }
.cmt-time { font-size: 11px; color: var(--muted); }
.cmt-text {
  font-size: 14px; line-height: 1.45; color: rgba(255,255,255,0.9);
  word-break: break-word;
}
.comment-composer {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 14px calc(12px + var(--safe-b));
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,12,18,0.96);
}
.comment-composer.is-guest { justify-content: center; }
.cmt-input {
  flex: 1; min-width: 0;
  height: 40px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff; padding: 0 14px; font-size: 14px; outline: none;
}
.cmt-input:focus { border-color: rgba(232,120,184,0.55); }
.cmt-send {
  height: 40px; padding: 0 16px; border-radius: 20px;
  font-weight: 700; font-size: 13px; color: #0a0c12;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
}
.cmt-login-cta {
  width: 100%; height: 42px; border-radius: 21px;
  font-weight: 700; font-size: 14px; color: #0a0c12;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
}
.comment-stub {
  text-align: center;
  padding: 28px 12px;
  color: var(--muted);
  font-size: 13px;
}
.comment-stub strong { display: block; color: #fff; margin-bottom: 6px; font-size: 15px; }

/* Profile sheet — personal center + favorites + legal footer */
.sheet-profile {
  max-height: min(92%, 780px);
  height: min(92%, 780px);
  background:
    linear-gradient(180deg, rgba(28,18,28,0.98) 0%, rgba(12,14,20,0.99) 40%, #0a0c12 100%);
  border-top: 1px solid rgba(232,120,184,0.22);
}
.sheet-profile .sheet-head h2 {
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.profile-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.profile-guest {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 8px 20px;
}
.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.06), 0 8px 24px rgba(0,0,0,0.35);
}
.profile-avatar-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.profile-name {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 16px;
  letter-spacing: 0.01em;
}
.profile-auth-row {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 300px;
}
.profile-btn-signup,
.profile-btn-login {
  flex: 1;
  height: 44px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.profile-btn-signup {
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  color: #fff;
  box-shadow: 0 8px 22px rgba(217,70,168,0.32);
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.profile-btn-signup:active { transform: scale(0.97); }
.profile-btn-login {
  background: #e8eaef;
  color: #1a1d26;
}
.profile-btn-login:active { transform: scale(0.97); background: #d5d8e0; }

.profile-section {
  margin-top: 4px;
}
.profile-section-title {
  margin: 4px 0 14px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
}

.profile-footer {
  margin-top: 28px;
  padding: 18px 4px calc(8px + var(--safe-b));
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.profile-legal-link {
  color: rgba(200, 208, 220, 0.72);
  font-size: 12px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  line-height: 1.4;
}
.profile-legal-link:active,
.profile-legal-link:hover {
  color: rgba(232, 120, 184, 0.95);
}

.profile-legal {
  padding: 4px 0 12px;
}
.profile-legal h3 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}
.profile-legal-body {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.profile-legal-body p { margin: 0 0 12px; }
.profile-legal-body h4 {
  margin: 18px 0 8px;
  font-size: 14px;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
  line-height: 1.35;
}
.profile-legal-body h4:first-child { margin-top: 0; }
.profile-legal-body .legal-meta {
  color: rgba(200,208,220,0.55);
  font-size: 12px;
  margin: 0 0 14px;
}
.profile-legal-body ul {
  margin: 0 0 12px;
  padding-left: 1.15em;
}
.profile-legal-body li {
  margin: 0 0 6px;
}
.profile-legal-body strong { color: rgba(255,255,255,0.88); }
.profile-legal {
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 28px;
}

.profile-subview-active #profile-guest,
.profile-subview-active #profile-footer,
.profile-subview-active #profile-favs-title {
  display: none;
}
.col-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.col-create-btn {
  flex: 1;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  color: #0a0a0c;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 8px 22px rgba(217,70,168,0.28);
}
.col-empty {
  text-align: center;
  padding: 48px 16px 36px;
}
.col-empty-ico {
  width: 72px; height: 72px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  color: rgba(232,120,184,0.85);
  filter: drop-shadow(0 0 18px rgba(90,200,220,0.25));
}
.col-empty-ico svg {
  width: 56px; height: 56px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.col-empty h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.col-empty p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.col-list { display: flex; flex-direction: column; gap: 10px; }
.col-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: left;
  width: 100%;
}
.col-item:active { background: rgba(232,120,184,0.1); }
.col-thumb {
  position: relative;
  width: 52px; height: 68px;
  border-radius: 10px;
  flex-shrink: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,0.1);
}
.col-meta { flex: 1; min-width: 0; }
.col-meta .name {
  font-weight: 800;
  font-size: 14px;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.col-meta .sub {
  font-size: 12px;
  color: var(--muted);
}
.col-count-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(90,200,220,0.12);
  border: 1px solid rgba(90,200,220,0.28);
  padding: 4px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.col-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0 4px;
}
.col-form input {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(232,120,184,0.35);
  background: rgba(0,0,0,0.35);
  color: #fff;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
}
.col-form input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(90,200,220,0.15);
}
.col-form-actions {
  display: flex;
  gap: 10px;
}
.col-form-actions .btn-primary { margin: 0; flex: 1; }
.col-form-actions .btn-ghost { margin: 0; flex: 1; }
.col-fav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.col-fav-card {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  background: #15151a;
  padding: 0;
}
.col-fav-card .bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
.col-thumb.has-cover,
.col-fav-card .bg.has-cover {
  position: relative;
  overflow: hidden;
}
.col-thumb .cover-img,
.col-fav-card .bg .cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: transparent;
}
.col-thumb.cover-miss .cover-img,
.col-fav-card .bg.cover-miss .cover-img {
  display: none;
}

.col-fav-card .label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 6px 8px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.col-section-title {
  margin: 4px 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.col-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Mute rail: icon only, no label */
.rail-btn-mute .rail-count,
.rail-btn[data-act="mute"] .rail-count { display: none !important; }
.rail-btn-mute { gap: 0; }

/* ── Auth sheet (Sign Up / Log In) ── */
.sheet-auth {
  z-index: 80;
  max-height: min(94%, 860px);
  height: min(94%, 860px);
  background:
    linear-gradient(180deg, rgba(28,18,28,0.98) 0%, rgba(12,14,20,0.99) 42%, #0a0c12 100%);
  border-top: 1px solid rgba(232,120,184,0.22);
}
.sheet-auth .sheet-head h2 {
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-sheet-head {
  gap: 12px;
}
.auth-mode-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.auth-mode-tab {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 4px 0;
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.38);
  cursor: pointer;
  line-height: 1.2;
}
.auth-mode-tab.is-active {
  color: var(--pink);
  text-shadow: 0 0 18px rgba(232,120,184,0.35);
}
.auth-mode-tab:active { transform: scale(0.97); }
.auth-panel[hidden] { display: none !important; }

.auth-body {
  padding-bottom: calc(20px + var(--safe-b));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.auth-body::-webkit-scrollbar { display: none; width: 0; height: 0; }

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 2px 0 18px;
}
.auth-brand img {
  width: 40px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(232,120,184,0.35));
}
.auth-brand span {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-block { margin: 0 0 4px; }
.auth-section-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
}
.auth-field { display: block; margin: 0 0 10px; }
.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #1a1d26;
  color: #fff;
  font-size: 15px;
  font-weight: 560;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.auth-input::placeholder { color: rgba(255,255,255,0.38); font-weight: 500; }
.auth-input:focus {
  border-color: rgba(232,120,184,0.55);
  box-shadow: 0 0 0 3px rgba(90,200,220,0.12);
}

.auth-btn-primary {
  width: 100%;
  height: 48px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 26px rgba(217,70,168,0.32);
  text-shadow: 0 1px 2px rgba(0,0,0,0.22);
  cursor: pointer;
}
.auth-btn-primary:active { transform: scale(0.98); }

.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: rgba(255,255,255,0.42);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}
.auth-or span { flex: 0 0 auto; }

.auth-btn-google {
  width: 100%;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: #fff;
  color: #1a1d26;
  font-size: 15px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
}
.auth-btn-google:active { transform: scale(0.98); background: #f3f4f7; }
.auth-google-ico {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}
.auth-google-ico svg { display: block; }

.auth-hint {
  margin: 22px 8px 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(200,208,220,0.62);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Logged-in profile header */
.profile-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 8px 20px;
}
.profile-avatar-live {
  background: #2a2f3a;
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 28px;
}
.profile-email {
  margin: -8px 0 14px;
  font-size: 13px;
  color: var(--muted);
  word-break: break-all;
}
.profile-btn-logout {
  min-width: 140px;
  height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}
.profile-btn-logout:active { background: rgba(255,255,255,0.12); transform: scale(0.97); }

/* Hide classic white scrollbars on legal / compliance panels — keep touch/wheel scroll */
.profile-legal,
.profile-legal-body,
#legal-body,
.sheet-profile .sheet-body,
.sheet-auth .sheet-body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.profile-legal::-webkit-scrollbar,
.profile-legal-body::-webkit-scrollbar,
#legal-body::-webkit-scrollbar,
.sheet-profile .sheet-body::-webkit-scrollbar,
.sheet-auth .sheet-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.profile-user[hidden],
.profile-guest[hidden],
#profile-legal[hidden] { display: none !important; }


/* Google Client ID paste help (shown when unset) */
.auth-client-help {
  margin: 0 0 14px;
  padding: 12px 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(232,120,184,0.28);
}
.auth-client-help[hidden] { display: none !important; }
.auth-client-note {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255,255,255,0.72);
}


/* Auth controls must stay clickable above decorative layers */
.auth-mode-tab,
.auth-btn-primary,
.auth-btn-google,
.auth-input,
.profile-btn-signup,
.profile-btn-login {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  touch-action: manipulation;
}


/* ── Membership card (profile) ── */
.profile-member {
  margin: 12px 0 8px;
}
.member-card {
  position: relative;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(232,120,184,0.16), rgba(90,200,220,0.10)),
    rgba(255,255,255,0.04);
  border: 1px solid rgba(232,120,184,0.28);
  box-shadow: 0 10px 28px rgba(217,70,168,0.12), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.member-status {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
  margin-bottom: 4px;
}
.member-status.is-active {
  color: var(--cyan);
}
.member-trial {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(232,120,184,0.95);
  font-weight: 600;
}
.member-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.member-plan-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 12px 11px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10,10,14,0.45);
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.member-plan-btn:active { transform: scale(0.97); }
.member-plan-btn--featured {
  border-color: rgba(90,200,220,0.45);
  background: linear-gradient(160deg, rgba(232,120,184,0.22), rgba(90,200,220,0.18));
}
.member-plan-badge {
  position: absolute;
  top: -8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0a0a0c;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  box-shadow: 0 4px 12px rgba(217,70,168,0.35);
}
.member-plan-title {
  font-size: 13px;
  font-weight: 800;
}
.member-plan-price {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.member-manage {
  display: block;
  width: 100%;
  margin-top: 10px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(90,200,220,0.35);
  background: rgba(90,200,220,0.12);
  color: var(--cyan);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.member-manage:active { transform: scale(0.98); background: rgba(90,200,220,0.2); }
.member-manage[hidden] { display: none !important; }
.profile-subview-active #profile-member-section {
  display: none;
}
.member-soft-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  box-shadow: 0 0 8px rgba(232,120,184,0.8);
}
#btn-user.has-member-cta {
  position: relative;
}
