/* === Theme tokens === */
:root {
  --bg: hsl(260, 25%, 3%);
  --surface: rgba(22, 10, 40, 0.92);
  --surface-2: rgba(40, 20, 70, 0.6);
  --surface-3: rgba(60, 30, 100, 0.35);
  --text: hsl(260, 10%, 98%);
  --muted: hsl(260, 10%, 70%);
  --accent: hsl(180, 100%, 50%);
  --accent-2: hsl(310, 100%, 65%);
  --border: rgba(255, 255, 255, 0.08);
  --nav-h: 56px;
  /* Chrome design tokens (C1) */
  --chrome-fg: #ffffff;
  --chrome-fg-dim: rgba(255, 255, 255, 0.85);
  --chrome-track: rgba(255, 255, 255, 0.35);
  --chrome-blur: 20px;
  --chrome-gap: 8px;
  --chrome-btn: 40px;
  --chrome-icon: 22px;
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-micro: 150ms;
  --dur-sheet: 320ms;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--text); margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* === Feed nav === */
.feed-nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h);
  background: rgba(7,5,12,0.7);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  z-index: 20;
}
.feed-nav .back, .feed-nav .upload {
  color: var(--text); text-decoration: none;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; line-height: 1;
}
.feed-nav .back:hover, .feed-nav .upload:hover { background: rgba(255,255,255,0.08); }
.feed-nav .title { font-weight: 600; letter-spacing: 0.5px; }

/* === Feed: transform-based swiper === */
.feed {
  position: fixed; inset: var(--nav-h) 0 0 0;
  overflow: hidden;
  touch-action: pan-y;
  background: #000;
  user-select: none;
  -webkit-user-select: none;
}
.feed-track {
  position: absolute; inset: 0;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.feed-track.dragging { transition: none; }

.feed-item {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #000;
  transform-origin: center center;
  will-change: transform, opacity;
}

/* === 9:16 shell === */
.video-shell {
  position: relative;
  background: #000;
  aspect-ratio: 9 / 16;
  width: min(100vw, calc((100dvh - var(--nav-h)) * 9 / 16));
  height: auto;
  max-height: calc(100dvh - var(--nav-h));
  flex-shrink: 0;
  overflow: hidden;
}
.video-shell iframe,
.video-shell video {
  width: 100%; height: 100%; border: 0; display: block;
  pointer-events: auto;
}

.locked-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(0,229,255,0.16), transparent 38%),
    rgba(0,0,0,0.72);
}
.locked-overlay .locked-icon {
  font-size: 38px;
}
.locked-overlay strong {
  font-size: 15px;
}

/* Legibility gradient for caption and controls (C9) */
.video-shell::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 30%;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Extended scrim when description is open (C-fix-2) */
.video-shell.cap-expanded::after {
  height: 55%;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.88) 0%,
    rgba(0,0,0,0.62) 28%,
    rgba(0,0,0,0.24) 62%,
    transparent 100%
  );
}


.empty-state {
  color: var(--muted); text-align: center; padding: 60px 20px;
  height: 100%; display: flex; align-items: center; justify-content: center;
  flex-direction: column;
}

/* === Right action rail === */
.actions {
  position: absolute; right: 10px; bottom: 90px;
  display: flex; flex-direction: column;
  gap: 10px;
  z-index: 3;
}
.actions button,
.actions .chrome-btn {
  background: transparent;
  border: none;
  color: #fff;
  width: 48px;
  height: auto;
  min-height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.15s, transform 0.15s, background 0.2s;
  opacity: 0.9;
  padding: 6px 0;
}
.actions button:hover,
.actions .chrome-btn:hover { opacity: 1; background: rgba(255,255,255,0.1); }
.actions button:active,
.actions .chrome-btn:active { transform: scale(0.88); }
.actions button.active,
.actions .chrome-btn.active { opacity: 1; }
.actions button[data-action="like"].active { color: var(--accent-2); }
.actions button[data-action="save"].active { color: var(--accent); }

.actions button[data-action="like"] svg,
.actions button[data-action="save"] svg,
.actions button[data-action="like"] svg path,
.actions button[data-action="save"] svg path {
  transition: fill 0.2s ease, stroke-width 0.2s ease;
  fill: none;
}
.actions button[data-action="like"].active svg,
.actions button[data-action="save"].active svg,
.actions button[data-action="like"].active svg path,
.actions button[data-action="save"].active svg path {
  fill: currentColor;
  stroke-width: 0;
}
.actions button svg,
.actions .chrome-btn svg {
  width: 30px;
  height: 30px;
  display: block;
}
.actions .count {
  font-size: 11px;
  display: block;
  margin-top: 5px;
  line-height: 1;
  font-weight: 600;
}

/* Unified chrome button styling (C6) */
.chrome-btn {
  width: var(--chrome-btn);
  height: var(--chrome-btn);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--chrome-fg-dim);
  cursor: pointer;
  transition: color var(--dur-micro) linear,
              transform var(--dur-micro) linear;
}
.chrome-btn:hover,
.chrome-btn:focus-visible {
  color: var(--chrome-fg);
  outline: none;
}
.chrome-btn:active { transform: scale(0.94); }
.chrome-btn svg { width: var(--chrome-icon); height: var(--chrome-icon); }

/* === Caption overlay === */
.caption {
  position: absolute; left: 12px; right: 88px; bottom: 32px;
  z-index: 2; color: var(--text);
  padding: 12px 12px 10px; border-radius: 10px;
  cursor: pointer;
  max-height: calc(100% - 140px);
  overflow: hidden;
}
.caption .uploader-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.3;
}
.caption p {
  position: relative;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px; color: rgba(255,255,255,0.85);
  line-height: 1.35;
}
.caption.expanded {
  max-height: min(38%, 280px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.caption.expanded::-webkit-scrollbar { width: 4px; }
.caption.expanded::-webkit-scrollbar-track { background: transparent; }
.caption.expanded::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}
.caption.expanded::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.25);
}
.caption.expanded p {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 82%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 82%, rgba(0,0,0,0) 100%);
}
.caption.expanded.at-bottom p {
  -webkit-mask-image: none;
  mask-image: none;
}
.caption .more-toggle {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}
.caption .watch-series {
  display: inline-block; margin-top: 8px;
  padding: 7px 14px; background: var(--accent);
  color: var(--bg); border-radius: 999px; font-weight: 700;
  text-decoration: none; font-size: 13px;
}
.caption:not(.expanded) .watch-series {
  display: none;
}

/* ══════════════════════════════════════════════════════════════
   COMMENT CARDS — Strict Two-Column Flex Geometry (§2 spec)
   ══════════════════════════════════════════════════════════════ */

.comment-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 16px 16px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.comment-card:last-of-type { border-bottom: 0; }

/* ── Left Column: Avatar (36×36 px circle, 12 px gutter) ── */
.cc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0a0512;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 200, 255, 0.15);
}
.cc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Right Column: Content Stack ── */
.cc-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-right: 32px;   /* reserve 22+10 px for heart icon */
}

/* A. Meta Row — single-line, baseline-locked */
.cc-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: nowrap;
  margin-bottom: 2px;
}
.cc-meta .cc-name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
  text-decoration: none !important;
}
.cc-subscriber-badge {
  display: inline-flex;
  align-items: center;
  background: var(--badge-color, var(--accent));
  color: #000;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cc-priority-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px 0 5px;
  color: var(--badge-color, var(--gold-cta, #F5C518));
  font-size: 11px;
  font-weight: 700;
  opacity: 0.9;
}
.cc-meta .cc-verified {
  margin-left: 4px;
  display: inline-flex;
}
.cc-meta .cc-time {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
}

/* B. Body Text — fills container width */
.cc-text {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255,255,255,0.92);
  word-break: break-word;
  width: 100%;
  margin: 0;
}
.cc-text .mention {
  color: var(--accent);
  font-weight: 600;
  background: rgba(0, 255, 255, 0.08);
  padding: 1px 4px;
  border-radius: 4px;
}

/* C. Media Attachment — optional, 12 px radius, 16:9, overflow hidden */
.cc-media {
  width: 100%;
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}
.cc-media img,
.cc-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* GIF attachments keep their native aspect ratio — no 16:9 crop. */
.cc-media.cc-media-gif {
  aspect-ratio: auto;
  width: fit-content;
}
.cc-media.cc-media-gif img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  margin: 0 auto;
}

/* D. Action Row — 8–10 px below body, 12 px gap between items */
.cc-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
}
.cc-actions .cc-like-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  user-select: none;
}
.cc-actions .cc-reply-btn {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s;
}
.cc-actions .cc-reply-btn:hover { color: var(--accent); }

/* ── Draft panel (comment editing) ─────────────────────────────
   Shape system: controls are pill; panels are 12px; cards untouched.
   Palette lock: --accent (cyan) for authoring intent, #ff4d6d rose
   reserved for destructive. Nothing else gets a color. */

.comment-card.is-editing .cc-like-btn { display: none; }
.comment-card.is-editing .cc-manage-btn { display: none; }

.cc-edit-clip {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition:
    grid-template-rows .24s cubic-bezier(.33, 1, .68, 1),
    opacity .18s ease-out,
    margin-top .24s cubic-bezier(.33, 1, .68, 1);
}
.cc-edit-clip.open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 7px;
}

.cc-edit-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  padding: 9px 12px 9px 15px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
}
/* Revision rail — "you are rewriting this published line" */
.cc-edit-panel::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.cc-edit-panel.arm-delete::before { background: #ff4d6d; }

.cc-edit-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}
.cc-edit-dot {
  flex: 0 0 auto;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: cc-dot-pulse 1.6s ease-in-out infinite;
}
@keyframes cc-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.72); }
}

.cc-edit-input {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  padding: 2px 0 0;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  color: inherit;
  caret-color: var(--accent);
  resize: none;
  max-height: 230px;
  overflow-y: auto;
}
.cc-edit-input:focus { outline: none; }
.cc-edit-input::placeholder { color: var(--muted); }

.cc-edit-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cc-edit-cancel {
  margin-right: auto;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s;
}
.cc-edit-cancel:hover { color: var(--text); }

.cc-edit-count {
  align-self: center;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  color: var(--muted);
  transition: color .2s;
}
.cc-edit-count.urgent { color: #ff8fa3; font-weight: 700; }

.cc-edit-save {
  appearance: none;
  border: 0;
  cursor: pointer;
  min-height: 32px;
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  transition: filter .15s, transform .06s, opacity .15s;
}
.cc-edit-save:hover { filter: brightness(1.12); }
.cc-edit-save:active { transform: translateY(1px); }
.cc-edit-save[disabled] { opacity: .55; cursor: default; filter: none; transform: none; }

/* Focus rings for keyboard users */
..comment-card .cc-manage-btn { opacity: .75; }
.comment-card .cc-del-btn:not(.armed):hover { color: #ff4d6d; opacity: 1; }

cc-edit-cancel:focus-visible,
.cc-edit-save:focus-visible,
.comment-card .cc-manage-btn:focus-visible,
.comment-card .cc-del-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Inline failure — no more alert() */
.cc-edit-error {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #ff8fa3;
}
.cc-edit-error[hidden] { display: none; }
.cc-edit-error::before {
  content: "";
  flex: 0 0 auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ff4d6d;
  box-shadow: 0 0 0 3px rgba(255, 77, 109, .16);
}

.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;
}

/* ── Two-step delete ("Delete" arms → "Delete forever") ───────── */
.comment-card .cc-del-btn.armed,
.comments-modal .cc-del-btn.armed {
  color: #fff;
  background: #ff4d6d;
  opacity: 1;
  padding: 5px 12px;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.comment-card .cc-del-btn.armed::after,
.comments-modal .cc-del-btn.armed::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: rgba(0, 0, 0, .35);
  transform-origin: left;
  animation: cc-arm-drain 3s linear forwards;
}
@keyframes cc-arm-drain { to { transform: scaleX(0); } }

.cc-edited-tag {
  display: inline-block;
  animation: cc-tag-in .32s ease-out backwards;
}
@keyframes cc-tag-in {
  from { opacity: 0; transform: translateX(-3px); }
}

@keyframes cc-shake {
  10%, 90% { transform: translateX(-1px); }
  30%, 70% { transform: translateX(2px); }
  50%      { transform: translateX(-3px); }
}
.cc-btn-shake { animation: cc-shake .4s; }

@media (prefers-reduced-motion: reduce) {
  .cc-edit-clip, .cc-edit-clip.open { transition: none; }
  .cc-edit-dot { animation: none; }
  .cc-edited-tag { animation: none; }
  .cc-btn-shake { animation: none; }
  .cc-del-btn.armed::after { animation: none; }
}

/* E. Reply Thread Indicator — 6 px below action row, left-aligned */
.cc-thread-indicator {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.cc-thread-indicator:hover { color: var(--accent); }

/* ── Far-Right Heart Icon (22×24 px, position:absolute, top-aligned) ── */
.cc-like-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 22px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.cc-like-btn svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  transition: fill 0.2s, stroke-width 0.2s;
}
.cc-like-btn:hover { color: var(--accent-2); }
.cc-like-btn.active {
  color: var(--accent-2);
}
.cc-like-btn.active svg {
  fill: currentColor;
  stroke-width: 0;
}

/* ── Reply Nesting ── */
.cc-replies-wrap {
  width: 100%;
  margin-top: 10px;
}
.cc-replies-wrap .replies {
  padding-left: 16px;
  border-left: 2px solid rgba(255,255,255,0.08);
}
.cc-replies-wrap .replies .comment-card {
  padding: 10px 0;
  padding-right: 0;
}
.cc-replies-wrap .replies .cc-avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
}
.cc-replies-wrap .replies .cc-content {
  padding-right: 28px;
}
.cc-replies-wrap .replies .cc-like-btn {
  top: 10px;
  right: 0;
}

/* ══════════════════════════════════════════════════════════════
   DRAWER — structure, safe-area, scroll containment
   ══════════════════════════════════════════════════════════════ */

.comments-drawer {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: 72vh; max-height: 72svh;
  background: linear-gradient(180deg,
    hsl(220, 12%, 14%) 0%,
    hsl(220, 12%, 10%) 100%);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px 18px 0 0;
  z-index: 30;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -16px 40px rgba(0,0,0,0.5);
  padding-bottom: env(safe-area-inset-bottom);
}
.comments-drawer.open { transform: translateY(0); }

.comments-drawer .list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.cd-empty {
  color: var(--muted);
  padding: 40px 20px;
  text-align: center;
  font-size: 14px;
}

/* ══════════════════════════════════════════════════════════════
   DRAWER HEADER — three-zone: [close] [title] [sort ghost]
   ══════════════════════════════════════════════════════════════ */

.cd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.cd-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  text-align: center;
  flex: 1;
}
.cd-close {
  min-width: 36px;
  min-height: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  outline: none;
}
.cd-close svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}
.cd-close:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.2);
  transform: scale(1.05);
}
.cd-close:active {
  transform: scale(0.95);
  background: rgba(255,255,255,0.22);
}

/* ══════════════════════════════════════════════════════════════
   COMPOSER — 56 px fixed bottom, pill input, avatar
   ══════════════════════════════════════════════════════════════ */

.comments-drawer .composer {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
  position: relative;
}

/* Left: 28–32 px circular avatar */
.composer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0a0512;
  font-weight: 800;
  font-size: 12px;
}
.composer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Column wrapper: holds [gif-chip? + input-wrap] between avatar and send */
.composer-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

/* Center: pill input, 40 px height */
.composer-input-wrap {
  position: relative;
  height: 40px;
  width: 100%;
}
.comments-drawer .composer-input-wrap input {
  width: 100%;
  height: 40px;
  border-radius: 9999px;          /* true pill */
  padding: 0 82px 0 16px;    /* right pad: 14px gap + 24px emoji + 8px gap + 24px GIF + 12px margin */
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 14px;
  line-height: 40px;              /* vertical centering */
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.comments-drawer .composer-input-wrap input::placeholder {
  color: var(--muted);
}
.comments-drawer .composer-input-wrap input:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.10);
}

/* Trailing emoji icon — 24 px bounding box, inside right padding */
.input-emoji {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  font-size: 17px;
  opacity: 0.7;
  line-height: 1;
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 4px;
  transition: opacity 0.15s, transform 0.15s;
  color: inherit;
}
.input-emoji:hover,
.input-emoji:focus-visible {
  opacity: 1;
  outline: none;
}
.input-emoji:active {
  transform: translateY(-50%) scale(0.88);
}
.input-emoji[aria-expanded="true"] {
  opacity: 1;
  color: var(--accent);
}

/* Composer Send button (T04) */
.composer-send {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}
.composer-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.composer-send:not(:disabled):active {
  transform: scale(0.95);
}

/* ══════════════════════════════════════════════════════════════
    REPLY BANNER (preserved)
    ══════════════════════════════════════════════════════════════ */

.reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  background: linear-gradient(90deg,
    rgba(0, 255, 255, 0.08) 0%,
    rgba(255, 100, 220, 0.06) 100%);
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  animation: replySlide 0.2s ease;
  flex-shrink: 0;
}
.reply-banner strong { color: var(--accent); font-weight: 700; }
.reply-banner button {
  background: transparent; border: 0; color: var(--muted);
  font-size: 18px; cursor: pointer;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.reply-banner button:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
@keyframes replySlide {
  from { transform: translateY(4px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}

/* === @ mention suggest popup === */
.mention-suggest {
  position: absolute;
  left: 0; right: 0; bottom: calc(100% + 8px);
  background: hsla(220, 12%, 12%, 0.98);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-height: 220px; overflow-y: auto;
  z-index: 40;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  padding: 4px;
}
.mention-suggest .item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; cursor: pointer;
  border-radius: 10px;
  transition: background 0.12s;
}
.mention-suggest .item:hover,
.mention-suggest .item.active { background: rgba(255,255,255,0.08); }
.mention-suggest .item .av {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #0a0512; font-weight: 800; font-size: 12px; overflow: hidden;
  flex-shrink: 0;
}
.mention-suggest .item .av img { width: 100%; height: 100%; object-fit: cover; }
.mention-suggest .item .uname { font-size: 14px; font-weight: 600; }
.mention-suggest .item .full { font-size: 12px; color: var(--muted); margin-left: auto; }

/* === Series detail === */
.series-hero { position: relative; height: 50vh; min-height: 360px; background-size: cover; background-position: center; }
.series-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, var(--bg)); }
.series-meta { padding: 20px; max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }
.series-meta h1 { font-size: 2rem; margin: 0 0 8px; }
.series-meta .synopsis { color: var(--muted); line-height: 1.5; }
.episodes { padding: 20px; max-width: 900px; margin: 0 auto; }
.episode { display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface); margin-bottom: 8px; cursor: pointer; border: 1px solid var(--border); }
.episode:hover { border-color: var(--accent); }
.episode img { width: 160px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: #000; }
.episode .ep-meta h3 { margin: 0; font-size: 16px; }
.episode .ep-meta p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

/* === Upload === */
.upload-shell { max-width: 640px; margin: 40px auto; padding: 24px; }
.upload-shell .panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; backdrop-filter: blur(16px); }
.upload-shell h1 { color: var(--text); }
.upload-shell label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 500; color: var(--text); }
.upload-shell input, .upload-shell textarea, .upload-shell select { width: 100%; padding: 12px; background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-size: 15px; }
.upload-shell textarea { min-height: 80px; resize: vertical; }
.upload-shell button[type=submit] { width: 100%; padding: 16px; margin-top: 24px; background: var(--accent); color: var(--bg); border: 0; border-radius: 12px; font-weight: 600; font-size: 16px; cursor: pointer; }
.upload-shell .progress { height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; margin-top: 12px; overflow: hidden; }
.upload-shell .progress .bar { height: 100%; background: var(--accent); width: 0%; transition: width 0.2s; }
.thumb-picker { margin-top: 16px; }
.thumb-picker video { width: 100%; border-radius: 12px; background: #000; }
.thumb-picker input[type=range] { width: 100%; margin-top: 8px; accent-color: var(--accent); }
.thumb-picker .time-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* === Mobile === */
@media (max-width: 600px) {
  :root { --nav-h: 48px; }
  .feed { inset: var(--nav-h) 0 0 0; height: calc(100dvh - var(--nav-h)); }
  .video-shell {
    width: 100vw;
    height: calc(100dvh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
    aspect-ratio: auto;
  }
  .actions { right: 8px; bottom: 88px; gap: 10px; }
  .actions button { width: 48px; height: auto; min-height: 44px; padding: 6px 0; font-size: 20px; }
  .caption { left: 10px; right: 72px; bottom: 12px; padding: 10px 10px 8px; }
  .caption p { font-size: 14px; }
  .comments-drawer { height: 78vh; max-height: 78dvh; }
  .player-overlay .play-icon { width: 84px; height: 84px; font-size: 34px; }
  .uploader-avatar { width: 48px; height: 48px; }
}

/* ══════════════════════════════════════════════════════════════
   COMMENT CHOREOGRAPHY — staggered deck entry / exit
   ══════════════════════════════════════════════════════════════ */

@keyframes commentEnter {
  from {
    transform: translate3d(40px, 0, 0) skewX(-2deg);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0) skewX(0deg);
    opacity: 1;
  }
}
@keyframes commentExit {
  from {
    transform: translate3d(0, 0, 0) skewX(0deg);
    opacity: 1;
  }
  to {
    transform: translate3d(40px, 0, 0) skewX(-2deg);
    opacity: 0;
  }
}

.comment-card.animating-in {
  animation: commentEnter 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.comment-card.animating-out {
  animation: commentExit 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ══════════════════════════════════════════════════════════════
   EMOJI PICKER PANEL
   ══════════════════════════════════════════════════════════════ */

.emoji-picker-wrap {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 16px;
  z-index: 45;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
  transform-origin: bottom right;
  animation: emojiPickerOpen 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes emojiPickerOpen {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

emoji-picker {
  --background: hsl(220, 12%, 12%);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-size: 1px;
  --border-radius: 14px;
  --button-active-background: rgba(255, 255, 255, 0.12);
  --button-hover-background: rgba(255, 255, 255, 0.08);
  --category-font-color: hsl(260, 10%, 70%);
  --emoji-size: 1.5rem;
  --emoji-padding: 6px;
  --indicator-color: hsl(180, 100%, 50%);
  --input-border-color: rgba(255, 255, 255, 0.08);
  --input-border-radius: 9999px;
  --input-font-color: hsl(260, 10%, 98%);
  --input-placeholder-color: hsl(260, 10%, 70%);
  --num-columns: 8;
  --outline-color: hsl(180, 100%, 50%);
  width: min(320px, 100%);
  height: 380px;
  border-radius: 14px;
  overflow: hidden;
}

/* === Feed support/tip modal === */
.feed-tip-modal:empty {
  display: none;
}
.feed-tip-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.feed-tip-panel {
  width: min(420px, 100%);
  background: hsl(220, 12%, 12%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  color: var(--text);
  position: relative;
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
}
.feed-tip-panel h2 {
  margin: 0 0 16px;
  font-size: 20px;
}
.feed-tip-close {
  position: absolute;
  right: 14px;
  top: 10px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
}
.support-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.support-presets button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 9px 0;
  cursor: pointer;
  font-weight: 700;
}
.support-presets button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.feed-tip-panel input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  padding: 12px;
  margin-bottom: 14px;
}
.feed-tip-panel #feedTipSubmit {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 800;
  padding: 13px;
  cursor: pointer;
}


/* ══════════════════════════════════════════════════════════════
   REDUCED MOTION — collapse all transitions to instant
   Critical Safeguard: must be last rule in file to win specificity
   ══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .comment-card.animating-in,
  .comment-card.animating-out {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .feed-track,
  .feed-item,
  .caption,
  .actions,
  .comments-drawer {
    transition: none !important;
    transform: none !important;
  }
}

.cc-replies-wrap.collapsed {
  display: none;
}

/* ============================================================
   TikTokPlayer overlay  (Change 13)
   Native <video> replaces the Bunny iframe; this overlay paints
   a TikTok-style control surface on top.  Most of the overlay
   is pointer-events:none so vertical swipes pass straight to
   the feed swiper; only the explicit hit-areas opt back in.
   ============================================================ */
.player-mount {
  position: absolute; inset: 0;
  background: #000;
  overflow: hidden;
}
.player-mount video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  touch-action: pan-y;       /* let parent capture vertical swipes */
}
.player-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* Full-area tap target — toggles play/pause. The inline JS
   only treats it as a tap when there was no significant drag. */
.player-overlay .player-tap {
  position: absolute; inset: 0;
  pointer-events: auto;
  touch-action: pan-y;
  background: transparent;
}

/* Centred play hint icon — fades in only when paused */
.player-overlay .stage-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 3;
}


.player-overlay .play-icon {
  width: 72px; height: 72px;
  background: rgba(0,0,0,0.55);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #fff;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  user-select: none;
}
.player-overlay.show-pause .play-icon { opacity: 1; }

/* Scrub timestamp */
.player-overlay .scrub-time {
  position: absolute;
  right: 12px;
  bottom: 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  z-index: 3;
}
.player-overlay.is-scrubbing .scrub-time {
  opacity: 1;
}

/* Volume widget — centered above play-icon inside .player-overlay (T01) */
.player-overlay .vol-mount {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% - 64px));
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.player-overlay.show-pause .vol-mount {
  opacity: 1;
}
.player-overlay .vol-mount .volume-control {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.player-overlay .vol-mount .mute-btn {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: #fff;
  cursor: pointer;
  transition: transform var(--dur-micro) linear, background 0.2s;
}
.player-overlay .vol-mount .mute-btn:hover,
.player-overlay .vol-mount .mute-btn:focus-visible {
  background: rgba(0,0,0,0.65);
  outline: none;
}
.player-overlay .vol-mount .mute-btn:active { transform: scale(0.94); }
.player-overlay .vol-mount .mute-btn svg {
  width: 20px;
  height: 20px;
}

/* Progress bar (bottom) — clickable / draggable to scrub (C8) */
.player-overlay .progress-track {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 24px 0;
  margin: -24px 0;
  background: transparent;
  display: flex;
  align-items: center;
  cursor: pointer;
  pointer-events: auto;
}
.player-overlay .progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  transition: height var(--dur-micro) var(--ease-sheet);
  position: relative;
  overflow: visible;
}
.player-overlay .progress-bar::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -14px; bottom: -14px;
}
.player-overlay .progress-track:hover .progress-bar,
.player-overlay .progress-track:active .progress-bar,
.player-overlay.is-scrubbing .progress-bar {
  height: 6px;
}
.player-overlay .progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
  border-radius: inherit;
  position: relative;
  box-shadow: 0 0 8px var(--accent), 0 0 16px rgba(0,255,255,0.35);
}
.player-overlay .progress-fill::after {
  content: '';
  position: absolute;
  right: -5px; top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%) scale(1);
  transition: transform 0.15s ease;
  box-shadow: 0 0 4px rgba(0,0,0,0.4);
}
.player-overlay .progress-track:hover .progress-fill::after,
.player-overlay .progress-track:active .progress-fill::after,
.player-overlay.is-scrubbing .progress-fill::after {
  transform: translateY(-50%) scale(1.4);
}

/* ============================================================
   Series-detail polish — accordion + action row
   ============================================================ */
.series-actions {
  display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap;
}
.series-actions .btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.season-block {
  background: var(--surface, #1a1a1a);
  border-radius: 12px;
  margin: 12px 16px;
  overflow: hidden;
}
.season-block > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 16px;
  list-style: none;
  user-select: none;
}
.season-block > summary::-webkit-details-marker { display: none; }
.season-block > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.15s ease;
}
.season-block[open] > summary::before { transform: rotate(90deg); }
.season-block .season-body {
  padding: 0 8px 8px;
}

/* === Uploader avatar in action rail (T13) === */
.uploader-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  display: block;
  background: #000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  flex-shrink: 0;
  margin-bottom: 0;
}
.uploader-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* === Giphy picker (T8) === */
.gif-icon-btn {
  position: absolute;
  right: 46px;              /* 14px gap + 24px emoji + 8px gap = 46px from right edge */
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  opacity: 0.7;
  border-radius: 4px;
  transition: opacity 0.15s, color 0.15s, transform 0.15s;
}
.gif-icon-btn:hover,
.gif-icon-btn:focus-visible {
  opacity: 1;
  color: var(--text);
  outline: none;
  background: rgba(255,255,255,0.08);
}
.gif-icon-btn:active {
  transform: translateY(-50%) scale(0.88);
}
.gif-icon-btn[aria-expanded="true"] {
  opacity: 1;
  color: var(--accent);
}
.giphy-panel {
  position: absolute;
  left: 16px;
  right: 16px;
  width: auto;
  bottom: calc(100% + 8px);
  height: 320px;
  background: hsla(220, 12%, 12%, 0.98);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex; flex-direction: column;
  z-index: 35;
  backdrop-filter: blur(16px);
}
.giphy-panel input {
  margin: 10px 10px 0;
  padding: 8px 12px;
  width: calc(100% - 20px);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
}
.giphy-grid {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; padding: 6px 10px 10px;
}
.giphy-grid img {
  width: 100%; height: 100px; object-fit: cover;
  border-radius: 6px; cursor: pointer; background: #000;
}

/* === GIF Preview Chip === */
.gif-preview-chip {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;   /* shrinks to content width */
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.08);
  align-self: flex-start; /* don't stretch full width */
}
.gif-preview-chip img {
  width: 110px;
  height: 80px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}
.gif-chip-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: 0;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, transform 0.15s;
  z-index: 1;
}
.gif-chip-close:hover {
  background: rgba(0,0,0,0.85);
}
.gif-chip-close:active {
  transform: scale(0.88);
}

/* ══════════════════════════════════════════════════════════════
   SHARE SHEET — iOS-style bottom sheet with brand color circles
   ══════════════════════════════════════════════════════════════ */
.share-sheet-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  margin: 0 auto auto;
  width: 100%;
  max-width: 520px;
  inset: auto 0 0 0;
}
.share-sheet-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--dur-sheet) var(--ease-sheet);
}
.share-sheet-dialog[open]::backdrop { opacity: 1; }

.share-sheet-dialog__panel {
  background: rgba(28, 28, 30, 0.95);
  backdrop-filter: blur(var(--chrome-blur));
  -webkit-backdrop-filter: blur(var(--chrome-blur));
  color: #fff;
  border-radius: 18px 18px 0 0;
  padding: 12px 16px 24px;
  transform: translateY(100%);
  transition: transform var(--dur-sheet) var(--ease-sheet);
  display: flex; flex-direction: column; gap: 16px;
}
.share-sheet-dialog[open] .share-sheet-dialog__panel { transform: translateY(0); }

.share-sheet-dialog__handle {
  width: 36px; height: 4px; border-radius: 999px;
  background: rgba(255,255,255,0.3);
  align-self: center;
  display: block;
}

.share-sheet-dialog__title {
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  margin: 0;
  color: #fff;
}

.share-sheet-dialog__platforms {
  list-style: none; margin: 0; padding: 4px 0;
  display: flex; gap: 14px; overflow-x: auto;
  scrollbar-width: none;
}
.share-sheet-dialog__platforms::-webkit-scrollbar { display: none; }
.share-sheet-dialog__platforms li { flex-shrink: 0; }

.platform-btn {
  background: transparent; border: 0; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; min-width: 64px;
  padding: 0;
}
.platform-btn:active { transform: scale(0.92); }

/* Brand color circles with white icons */
.platform-btn__icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.platform-btn__icon svg {
  width: 28px; height: 28px;
  display: block;
}

.platform-btn__icon[data-brand="x"]        { background: #000; }
.platform-btn__icon[data-brand="facebook"] { background: #1877F2; }
.platform-btn__icon[data-brand="whatsapp"] { background: #25D366; }
.platform-btn__icon[data-brand="telegram"] { background: #229ED9; }
.platform-btn__icon[data-brand="reddit"]   { background: #FF4500; }

.platform-btn__label {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
}

/* URL + Copy row */
.share-sheet-dialog__link {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 6px 6px 6px 14px;
}
.share-sheet-dialog__url {
  flex: 1; background: transparent; border: 0; color: #fff;
  font: inherit; outline: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px;
}

.share-sheet-dialog__copy {
  background: #fff; color: #000;
  border: 0; border-radius: 999px;
  padding: 8px 16px; font-weight: 600; font-size: 13px; cursor: pointer;
}
.share-sheet-dialog__copy.is-copied { background: #34c759; color: #fff; }

.share-sheet-dialog__close {
  background: transparent; border: 0; color: rgba(255,255,255,0.6);
  padding: 10px; font: inherit; font-size: 15px; cursor: pointer;
  width: 100%; text-align: center;
}
.share-sheet-dialog__close:hover { color: #fff; }

/* === Carousel Viewer ===
   Sizing is owned by static/js/carousel.js (#car-css single source of truth).
   The legacy .car-* cover rules below are disabled intentionally: keeping them
   active could resurrect the full-bleed object-fit:cover overlap bug behind the
   injected stylesheet. */
/*
.carousel-mount { position: absolute; inset: 0; background: #000; overflow: hidden; touch-action: pan-y; }
.car-track { display: flex; width: 100%; height: 100%; transition: transform .3s cubic-bezier(0.22, 1, 0.36, 1); }
.car-slide { width: 100%; height: 100%; flex-shrink: 0; position: relative; }
.car-slide img, .car-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.4); transition: background .2s; }
.car-dots span.on { background: #fff; }
.car-track.dragging { transition: none; }
*/

/* ─────────────────────────────────────────────────────────────
   Content Detail Page (CDP) Styles
   ───────────────────────────────────────────────────────────── */
.cdp-hero { position: relative; padding: 120px 24px 40px; background-size: cover; background-position: center; color: #fff; border-radius: 12px; margin-bottom: 24px; }
.cdp-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 100%); border-radius: 12px; z-index: 0; }
.cdp-hero > * { position: relative; z-index: 1; }
.cdp-hero__badges { display: flex; gap: 8px; margin-bottom: 12px; }
.cdp-title { font-size: 2.5rem; font-weight: 800; margin: 0 0 8px; }
.cdp-subtitle { text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; color: #00E5FF; margin: 0 0 12px; }
.cdp-stats { font-size: 0.95rem; color: #ccc; margin-bottom: 24px; }
.cdp-cta { display: flex; gap: 16px; margin-bottom: 24px; }
.cdp-cta .btn { padding: 12px 28px; font-size: 1rem; }
.cdp-creator-row { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1); }
.cdp-creator-row .avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.cdp-creator-row .name { font-weight: 600; }
.cdp-creator-row .muted { font-size: 0.85rem; color: #aaa; }
.cdp-creator-row .btn { margin-left: auto; }

.cdp-synopsis, .cdp-rate, .cdp-support, .cdp-similar { margin-bottom: 32px; }
.cdp-synopsis h2, .cdp-rate h2, .cdp-support h2, .cdp-similar h2 { font-size: 1.25rem; margin-bottom: 12px; }

.cdp-next { display: block; padding: 16px; border: 1px solid #333; border-radius: 8px; text-decoration: none; color: #fff; margin-bottom: 32px; transition: border-color 0.2s; }
.cdp-next:hover { border-color: #00E5FF; }
.cdp-next strong { color: #00E5FF; }

.cdp-support { text-align: center; padding: 24px; border: 1px solid #222; border-radius: 12px; background: #111; }
.cdp-support .avatar.lg { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 12px; }
.cdp-support .bio { font-style: italic; color: #ccc; margin: 16px auto; max-width: 400px; }
.cdp-support .socials { display: flex; justify-content: center; gap: 16px; margin-bottom: 16px; }
.cdp-support .btn { margin: 0 8px; }

.cdp-stars { display: flex; gap: 8px; margin-bottom: 16px; }
.cdp-stars .star { background: none; border: none; font-size: 1.5rem; color: #444; cursor: pointer; transition: color 0.2s; }
.cdp-stars .star.on, .cdp-stars .star:hover { color: #FFD700; }

.cdp-episodes { margin-bottom: 32px; }
.cdp-season {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px; background: #111; cursor: pointer; font-weight: 600;
  border: 1px solid #222; border-radius: 8px;
}
.cdp-season::after { content: '▾'; color: #888; transition: transform 0.2s; }
.cdp-season.collapsed::after { transform: rotate(-90deg); }
.cdp-season-count { font-weight: 400; color: #888; font-size: 0.9rem; margin-right: 16px; }
.cdp-ep-list { margin-top: 8px; border-radius: 8px; overflow: hidden; }
.cdp-ep-list.hidden { display: none; }
.cdp-ep { display: flex; gap: 16px; padding: 16px; border-bottom: 1px solid #222; text-decoration: none; color: #fff; transition: background 0.2s; cursor: pointer; }
.cdp-ep:last-child { border-bottom: none; }
.cdp-ep:hover { background: #1a1a1a; }
.cdp-ep.is-active { background: rgba(0, 229, 255, 0.1); border-left: 3px solid #00E5FF; }
.cdp-ep img { width: 120px; height: 68px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.cdp-ep__t { font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.cdp-ep__meta { font-size: 0.85rem; color: #888; margin-bottom: 8px; }
.cdp-ep p { font-size: 0.9rem; color: #ccc; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pill { background: #00E5FF; color: #000; font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; font-weight: 700; text-transform: uppercase; }

/* ── CDP comment composer (inline, full experience) ── */
.cdp-rate__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.cdp-rate__head h2 { margin: 0; }
.cdp-comment-count { color: #888; font-size: 0.9rem; }

.cdp-composer { margin-top: 8px; margin-bottom: 16px; }
.cdp-gif-chip-area { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.cdp-gif-chip-area:empty { display: none; }

.cdp-composer-input-wrap { display: flex; gap: 8px; align-items: stretch; }
.cdp-composer-input-wrap #cdpCommentInput { flex: 1; padding: 10px; border-radius: 6px; border: 1px solid #333; background: #111; color: #fff; }
.cdp-giphy-btn {
  padding: 8px 12px; border-radius: 6px; border: 1px solid #333;
  background: #111; color: #00E5FF; font-weight: 700; cursor: pointer;
  font-size: 0.85rem; letter-spacing: 0.04em;
}
.cdp-giphy-btn:hover { background: #1a1a1a; }
.cdp-giphy-btn[hidden] { display: none; }

.cdp-giphy-panel {
  margin-top: 8px; padding: 10px; border-radius: 8px;
  background: #111; border: 1px solid #222;
}
.cdp-giphy-panel[hidden] { display: none; }
.cdp-giphy-search {
  width: 100%; padding: 8px 10px; margin-bottom: 8px;
  border-radius: 6px; border: 1px solid #333; background: #0a0a0a; color: #fff;
  box-sizing: border-box;
}
.cdp-giphy-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px; max-height: 240px; overflow-y: auto;
}
.cdp-giphy-grid img {
  width: 100%; height: 80px; object-fit: cover;
  border-radius: 6px; cursor: pointer; background: #000;
}

.cdp-mention-suggest {
  background: #1a1a1a; border: 1px solid #333; border-radius: 8px;
  max-height: 240px; overflow-y: auto; margin-top: 4px;
}
.cdp-mention-suggest[hidden] { display: none; }
.cdp-mention-suggest .item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; cursor: pointer;
}
.cdp-mention-suggest .item:hover,
.cdp-mention-suggest .item.active { background: rgba(0, 229, 255, 0.12); }
.cdp-mention-suggest .item .av {
  width: 28px; height: 28px; border-radius: 50%; background: #333;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; overflow: hidden;
}
.cdp-mention-suggest .item .av img { width: 100%; height: 100%; object-fit: cover; }
.cdp-mention-suggest .item .uname { font-weight: 600; color: #00E5FF; }
.cdp-mention-suggest .item .full { color: #888; font-size: 0.85rem; }

.cdp-reply-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: #1a1a1a; border-radius: 6px;
  margin-bottom: 8px; font-size: 0.85rem; color: #ccc;
}
.cdp-reply-banner[hidden] { display: none; }
.cdp-reply-banner .cdp-reply-to { color: #00E5FF; font-weight: 600; }
.cdp-reply-banner .cdp-reply-cancel {
  margin-left: auto; background: none; border: 0;
  color: #888; cursor: pointer; font-size: 0.85rem;
}
.cdp-reply-banner .cdp-reply-cancel:hover { color: #fff; }

.cdp-comments-list { margin-top: 12px; }
#cdpCommentForm { display: block; }
#cdpPost[hidden] { display: none; }

/* Inline CDP comment cards reuse the drawer styles (.comment-card, .cc-*) */

/* ── Next Episode button inside the feed (§10 Q7 playback context) ── */
.next-ep-btn {
  display: inline-block; margin-top: 10px; padding: 8px 14px;
  background: var(--accent, #00E5FF); color: #000; border: 0; border-radius: 6px;
  font-weight: 700; cursor: pointer; font-size: 0.85rem;
}
.next-ep-btn:hover { filter: brightness(1.1); }
.next-ep-btn[hidden] { display: none; }

/* Tip modal (mirrors feed.js feed-tip-modal) */
.feed-tip-modal { position: fixed; inset: 0; z-index: 9999; }
.feed-tip-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; }
.feed-tip-panel { background: #1a1a2e; border-radius: 12px; padding: 24px; min-width: 300px; max-width: 400px; text-align: center; position: relative; }
.feed-tip-panel h2 { margin: 0 0 16px; }
.feed-tip-panel button { display: block; width: 100%; margin-bottom: 8px; padding: 10px; border-radius: 8px; border: 1px solid #333; background: #222; color: #fff; cursor: pointer; font-size: 0.95rem; }
.feed-tip-panel button:hover { background: #333; }
.feed-tip-panel [data-x] { position: absolute; top: 8px; right: 12px; width: auto; background: none; border: none; font-size: 1.2rem; padding: 0; }
.feed-tip-panel input { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #333; background: #111; color: #fff; margin-bottom: 8px; }
.feed-tip-panel #tipGo { background: #00E5FF; color: #000; font-weight: 600; }

/* Ticket 3: Drag-and-drop visual feedback */
.dropzone.dropzone-active {
  border-color: #00E5FF !important;
  background: rgba(0, 229, 255, 0.08);
}
