* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
}

.navbar-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.nav-search {
  position: relative;
  flex: 1;
  min-width: 0;
  margin: 0 12px;
}

.nav-search input {
  width: 100%;
  min-width: 0;
  padding: 10px 16px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
}

@media (max-width: 768px) {
  .navbar-search {
    margin: 0 12px;
    max-width: none;
  }

  .navbar-brand {
    font-size: 17px;
  }

  .navbar-actions .btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(70vh, 480px);
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 1100;
}

.search-suggestions[hidden] {
  display: none;
}

.search-suggestion {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.search-suggestion:last-child {
  border-bottom: 0;
}

.search-suggestion:hover,
.search-suggestion:focus-visible {
  background: var(--bg-tertiary);
  outline: none;
}

.search-suggestion-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.search-suggestion-meta,
.search-suggestion-status {
  color: var(--text-secondary);
  font-size: 12px;
}

.search-suggestion-status {
  padding: 12px 14px;
}

.search-suggestion-all {
  color: var(--accent);
  font-weight: 600;
}

.search-results-section {
  margin-top: 28px;
}

.search-results-section h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.search-results-section h3 span {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
}

.navbar-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.navbar-actions button {
  padding: 8px 16px;
  border-radius: 24px;
  background: var(--accent);
  color: white;
  font-weight: 500;
}

.sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  width: 240px;
  bottom: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 16px;
  overflow-y: auto;
}

.sidebar-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.main-content {
  margin-left: 240px;
  margin-top: 64px;
  padding: 24px;
  min-height: calc(100vh - 64px);
}

.admin-page { max-width: 1500px; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.admin-eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.admin-header h1 { margin: 2px 0 4px; }
.admin-health { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; font-size: 14px; }
.admin-health small { display: block; color: var(--text-secondary); margin-top: 3px; }
.health-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #37b36b; margin-right: 5px; }
.admin-stats { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 14px; margin-bottom: 24px; }
.admin-stat, .admin-panel { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); }
.admin-stat { padding: 18px; }
.admin-stat span { color: var(--text-secondary); display: block; font-size: 13px; }
.admin-stat strong { font-size: 28px; display: block; margin-top: 5px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 24px; align-items: start; }
.admin-panel-heading { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.admin-panel-heading h2 { font-size: 17px; }.admin-panel-heading span { color: var(--text-secondary); font-size: 12px; }
.admin-table-wrap { overflow-x: auto; }.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }.admin-table th, .admin-table td { padding: 12px 18px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }.admin-table th { color: var(--text-secondary); font-size: 12px; font-weight: 600; }.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-activity { list-style: none; max-height: 680px; overflow-y: auto; }.admin-activity li { padding: 13px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; }.admin-activity li:last-child { border-bottom: 0; }.admin-activity p, .admin-activity time { color: var(--text-secondary); font-size: 13px; }.admin-activity time { white-space: nowrap; text-align: right; }
@media (max-width: 1100px) { .admin-stats { grid-template-columns: repeat(3, 1fr); }.admin-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .admin-header { flex-direction: column; }.admin-stats { grid-template-columns: repeat(2, 1fr); }.admin-health { width: 100%; }.admin-activity li { flex-direction: column; gap: 3px; }.admin-activity time { text-align: left; } }

/* --- admin dashboard ---------------------------------------------------- */
.admin-stats-8 { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
.admin-stat small { color: var(--text-secondary); font-size: 12px; display: block; margin-top: 4px; }
.admin-grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-bottom: 24px; }
.admin-health span { display: block; margin-top: 4px; }
.admin-panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-panel-foot { margin: 0; padding: 12px 18px; color: var(--text-secondary); font-size: 13px; border-top: 1px solid var(--border); }
.admin-panel-foot.admin-result-error { color: #ff6b6b; }

.admin-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--border); }
.admin-pill-ok { color: #37b36b; border-color: #37b36b55; background: #37b36b1a; }
.admin-pill-warn { color: #e0a92e; border-color: #e0a92e55; background: #e0a92e1a; }
.admin-pill-fail { color: #ff6b6b; border-color: #ff6b6b55; background: #ff6b6b1a; }
.admin-pill-unknown { color: var(--text-secondary); }

.admin-checks { list-style: none; margin: 0; padding: 0; }
.admin-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.admin-check:last-child { border-bottom: 0; }
.admin-check-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; background: #8a94a6; }
.admin-check-ok .admin-check-dot { background: #37b36b; }
.admin-check-warn .admin-check-dot { background: #e0a92e; }
.admin-check-fail .admin-check-dot { background: #ff6b6b; }
.admin-check-body strong { display: block; font-size: 14px; }
.admin-check-body span { display: block; color: var(--text-secondary); font-size: 13px; margin-top: 2px; }
.admin-check-body small { display: block; color: var(--text-secondary); font-size: 12px; margin-top: 3px; opacity: .8; }

.admin-alerts { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.admin-alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.admin-alert:last-child { border-bottom: 0; }
.admin-alert strong { display: block; font-size: 14px; font-weight: 500; }
.admin-alert time { display: block; color: var(--text-secondary); font-size: 12px; margin-top: 3px; }
.admin-alert-unread { background: #4f8cff0f; }
.admin-alert-unread strong { font-weight: 700; }
.admin-alert-kind { flex: 0 0 auto; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 4px; background: var(--bg-primary); color: var(--text-secondary); }
.admin-alert-kind-new_signup { color: #37b36b; }
.admin-alert-kind-content_shared { color: #4f8cff; }
.admin-alert-kind-payment { color: #e0a92e; }
.admin-badge { display: inline-block; background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; margin-left: 6px; }

.admin-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-chip { border: 1px solid var(--border); background: transparent; color: var(--text-secondary); border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.admin-chip.active { border-color: var(--accent); color: var(--accent); }
.admin-search { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-primary); padding: 7px 12px; font-size: 13px; min-width: 220px; }
.admin-when { display: block; color: var(--text-secondary); font-size: 12px; }
.admin-tag { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11px; background: var(--bg-primary); color: var(--text-secondary); }
.admin-tag-warn { color: #e0a92e; }
.admin-event time small { display: block; color: var(--text-secondary); font-size: 12px; }
.btn-sm { padding: 5px 11px; font-size: 13px; }
@media (max-width: 1100px) { .admin-stats-8 { grid-template-columns: repeat(2, 1fr); }.admin-grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .admin-stats-8 { grid-template-columns: repeat(2, 1fr); }.admin-search { width: 100%; min-width: 0; } }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.video-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.video-card-link {
  display: block;
}

.video-card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.video-card-thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-tertiary);
}

.video-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card-info {
  padding: 12px;
}

.video-card-title {
  font-weight: 600;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.video-player-container {
  max-width: 1200px;
  margin: 0 auto;
}

.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: black;
  border-radius: var(--radius);
  overflow: hidden;
}

.video-player video {
  width: 100%;
  height: 100%;
}

.video-details {
  margin-top: 16px;
}

.video-details h1 {
  font-size: 20px;
  margin-bottom: 8px;
}

.video-details-meta {
  display: flex;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

.upload-form {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-secondary);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 24px;
  font-weight: 600;
  background: var(--accent);
  color: white;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-ghost:hover {
  background: var(--border);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ghost.active,
.btn-ghost[data-liked='true'] {
  background: var(--accent);
  color: white;
}

.page-subtitle {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.empty-state {
  color: var(--text-secondary);
  padding: 32px 0;
}

.badge {
  color: var(--accent);
  font-weight: 600;
}

.notice {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.notice-error {
  border-color: var(--accent);
}

.auth-form {
  max-width: 420px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.auth-form h2 {
  margin-bottom: 4px;
}

.auth-switch {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 600;
}

.video-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  /* The manage menu is anchored to this row, so it drops below the
     buttons instead of covering the ones beside it. */
  position: relative;
  flex-wrap: wrap;
}

.video-description {
  margin-top: 12px;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.comment-form input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
}

.ad-config-panel {
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  color: var(--text-secondary);
}

.ad-config-panel h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
}

.ad-note {
  color: var(--accent);
  margin-bottom: 8px;
}

.ad-slot {
  position: relative;
  margin: 16px 0;
  padding: 8px;
  min-height: 90px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ad-slot-error {
  opacity: 0.4;
}

.ad-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.ad-break-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 16px;
}

.ad-break-overlay[hidden] {
  display: none;
}

.ad-break-card {
  width: 100%;
  max-width: 640px;
  text-align: center;
}

.ad-break-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.ad-break-skip {
  padding: 6px 12px;
  border-radius: 16px;
  background: var(--bg-tertiary);
  font-size: 13px;
  font-weight: 600;
}

.ad-break-skip:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ad-break-close {
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: 16px;
  background: var(--bg-tertiary);
  font-size: 13px;
  font-weight: 600;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* --- managing your own content ---------------------------------------- */
.owner-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: 190px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.owner-menu-item {
  text-align: left;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
}

.owner-menu-item:hover {
  background: var(--bg-tertiary);
}

.owner-menu-item-danger {
  color: #ff6b6b;
}

.btn-danger {
  color: #ff6b6b;
  border-color: #ff6b6b55;
}

.share-feedback {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--accent);
}

.notice-inline {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
}

.comment {
  position: relative;
}

.comment-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.comment:hover .comment-delete,
.comment-delete:focus {
  opacity: 1;
}

.comment-delete:hover {
  background: var(--bg-tertiary);
  color: #ff6b6b;
}

.manage-videos {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.manage-video-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.manage-video {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.manage-video.is-archived {
  opacity: 0.72;
}

.manage-video-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  color: inherit;
}

.manage-video-link img {
  width: 96px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-tertiary);
}

.manage-video-body {
  min-width: 0;
}

.manage-video-title {
  display: block;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manage-video-meta {
  display: block;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
}

.manage-video-state {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.manage-video-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .manage-video {
    flex-wrap: wrap;
  }
  .manage-video-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.status-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.badge-ok {
  color: #34d399;
}

.badge-off {
  color: var(--text-secondary);
}

.status-rendering {
  color: #fbbf24;
}

.status-rendered {
  color: #34d399;
}

.status-failed {
  color: var(--accent);
}

.source-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.source-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.source-title {
  font-weight: 600;
  font-size: 15px;
}

.source-meta,
.source-rights {
  font-size: 12px;
  color: var(--text-secondary);
}

.source-synopsis {
  font-size: 13px;
  color: var(--text-secondary);
}

.source-genres {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  font-size: 11px;
  color: var(--text-secondary);
}

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.project-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.project-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.animatic-preview {
  width: 100%;
  max-width: 720px;
  border-radius: var(--radius);
  background: #000;
  margin: 12px 0;
}

.scene-block {
  margin-bottom: 20px;
}

.scene-title {
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.shot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.shot-table th,
.shot-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.shot-table th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.shot-narration {
  color: var(--text-secondary);
}

.silent-flag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.video-card-thumbnail {
  position: relative;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.clip-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clip-thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  overflow: hidden;
}

.clip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clip-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.clip-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.sub-channel-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  margin-bottom: 8px;
}

.sub-channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 96px;
  text-align: center;
}

.sub-channel img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-tertiary);
}

.sub-channel span {
  font-size: 13px;
  font-weight: 600;
}

.sub-channel em {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: normal;
}

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.playlist-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.playlist-cover {
  aspect-ratio: 16 / 9;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.playlist-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playlist-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.playlist-name {
  font-weight: 600;
}

.playlist-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.playlist-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* ---- TikTok-style vertical feed ---- */
.feed {
  height: calc(100vh - 64px);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.feed::-webkit-scrollbar {
  display: none;
}

.feed-slide {
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.feed-frame {
  position: relative;
  height: 100%;
  width: 100%;
  max-width: min(100%, calc((100vh - 64px) * 9 / 16));
  background: #000;
  overflow: hidden;
}

.feed-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

/* Comment sheet over the feed. */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.sheet[hidden] {
  display: none;
}

.sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.65);
}

.sheet-panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(560px, 100%);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.55);
}

.sheet-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 48px 12px;
  border-bottom: 1px solid var(--border);
}

.sheet-head h3 {
  font-size: 15px;
}

.sheet-grip {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}

.sheet-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.sheet-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.sheet-form[hidden] {
  display: none;
}

.sheet-form input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
}

.sheet-hint {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.sheet-hint[hidden] {
  display: none;
}

.install-btn {
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* The hidden attribute must win over the shared .btn display rule. */
.install-btn[hidden] {
  display: none !important;
}

.search-suggestion-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-suggestion-person img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-tertiary);
  flex-shrink: 0;
}

.search-suggestion-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.search-results-section h3 span {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 14px;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.person-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.person-main {
  display: flex;
  gap: 12px;
  padding: 14px;
  color: inherit;
}

.person-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-tertiary);
  flex-shrink: 0;
}

.person-body {
  min-width: 0;
}

.person-name {
  font-weight: 600;
  font-size: 15px;
}

.person-handle {
  font-size: 12px;
  color: var(--accent);
}

.person-desc {
  margin: 6px 0;
  font-size: 12px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.person-stats {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.person-latest {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
}

.person-latest img {
  width: 48px;
  height: 27px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.person-latest span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bell-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bell-icon {
  width: 18px;
  height: 18px;
  background: currentColor;
  /* Drawn with a mask so it inherits text colour and needs no icon font. */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22a2.2 2.2 0 0 0 2.2-2.2H9.8A2.2 2.2 0 0 0 12 22Zm7-5.2-1.8-1.8V10a5.2 5.2 0 0 0-4.4-5.1V4a1.8 1.8 0 1 0-3.6 0v.9A5.2 5.2 0 0 0 4.8 10v5L3 16.2v.8h18v-.8Z'/%3E%3C/svg%3E")
    center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22a2.2 2.2 0 0 0 2.2-2.2H9.8A2.2 2.2 0 0 0 12 22Zm7-5.2-1.8-1.8V10a5.2 5.2 0 0 0-4.4-5.1V4a1.8 1.8 0 1 0-3.6 0v.9A5.2 5.2 0 0 0 4.8 10v5L3 16.2v.8h18v-.8Z'/%3E%3C/svg%3E")
    center/contain no-repeat;
}

.bell-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.bell-badge[hidden] {
  display: none;
}

.notif-panel {
  position: fixed;
  top: 60px;
  right: 16px;
  z-index: 70;
  width: min(380px, calc(100vw - 32px));
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.notif-panel[hidden] {
  display: none;
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.notif-readall {
  border: none;
  background: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.notif-body {
  overflow-y: auto;
}

.notif-row {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  align-items: flex-start;
}

.notif-row.is-unread {
  background: rgba(236, 24, 60, 0.08);
}

.notif-row img,
.notif-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-tertiary);
  flex-shrink: 0;
}

.notif-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.notif-message {
  font-size: 13px;
}

.notif-time {
  font-size: 11px;
  color: var(--text-secondary);
}

.sub-btn {
  margin: 8px 0;
}

.sub-btn[data-subscribed='true'] {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.channel-stats strong {
  color: var(--text-primary);
}

.feed-loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

.feed-loading {
  color: var(--text-secondary);
  font-size: 14px;
}

.plan-price {
  font-size: 30px;
  font-weight: 700;
  margin: 4px 0 10px;
  color: var(--text-primary);
}

.plan-price span {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

.plan-price-free {
  color: var(--text-secondary);
}

.plan-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 12px;
}

.membership-fine-print {
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.membership-unavailable {
  color: var(--text-secondary);
  font-size: 14px;
}

.membership-notice {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg-tertiary);
  border-left: 3px solid var(--accent);
  margin-bottom: 16px;
  font-size: 14px;
}

.membership-option ul {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.install-hint {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  max-width: 320px;
}

.install-hint[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .install-btn {
    padding: 6px 10px;
    font-size: 13px;
  }
}

@media (max-width: 560px) {
  .sheet-panel {
    width: 100%;
    max-height: 85vh;
  }
}
.feed-playpause {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.feed-playpause::before,
.feed-playpause::after {
  content: '';
  display: block;
}

/* Play triangle. */
.feed-playpause::before {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-left: 22px solid #fff;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
}

/* Pause bars. */
.feed-playpause::after {
  width: 8px;
  height: 24px;
  border-left: 5px solid #fff;
  border-right: 5px solid #fff;
  display: none;
}

/* Paused: show the play affordance. */
.feed-frame[data-playing='false'] .feed-playpause {
  display: flex;
}

.feed-frame[data-playing='false'] .feed-playpause::before {
  display: block;
}

/* Playing: hidden by default, revealed on hover for pointer devices. */
.feed-frame[data-playing='true'] .feed-playpause {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .feed-frame[data-playing='true']:hover .feed-playpause {
    display: flex;
  }

  .feed-frame[data-playing='true']:hover .feed-playpause::before {
    display: none;
  }

  .feed-frame[data-playing='true']:hover .feed-playpause::after {
    display: block;
  }
}

.feed-gradient {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
  pointer-events: none;
}

.feed-actions {
  position: absolute;
  right: 12px;
  bottom: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  z-index: 2;
}

.feed-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}

.feed-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.5);
  font-size: 22px;
  line-height: 1;
}

.feed-action-count {
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.feed-meta {
  position: absolute;
  left: 16px;
  right: 76px;
  bottom: 20px;
  color: #fff;
  z-index: 2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.feed-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}

.feed-description {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-submeta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
}

.feed-flag {
  color: #fbbf24;
  font-weight: 600;
}

/* Browsers block unmuted autoplay, so the feed starts silent. This makes the
   way to turn sound on impossible to miss. */
.feed-sound-prompt {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.feed-sound-prompt[hidden] {
  display: none;
}

.feed-sound-icon {
  font-size: 18px;
  display: inline-flex;
}

/* Drawn speaker with an explicit muted slash, so the state never depends on
   emoji rendering differences between platforms. */
.feed-speaker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feed-speaker svg {
  width: 22px;
  height: 22px;
}

.feed-wave {
  opacity: 1;
  transition: opacity 0.15s ease;
}

.feed-slash {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 2.5px;
  border-radius: 2px;
  background: #ef4444;
  transform: translate(-50%, -50%) rotate(-45deg);
  /* Hidden when sound is on; the red strip is drawn only while muted. */
  opacity: 0;
  transition: opacity 0.15s ease;
}

.feed-speaker.is-muted .feed-wave {
  opacity: 0;
}

.feed-speaker.is-muted .feed-slash {
  opacity: 1;
}

.feed-mute.is-muted .feed-action-icon {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
}

/* The sidebar stays put on every page, the feed included: the content area
   already reserves its width, so showing it fills the gutter rather than
   stealing space from the player. On narrow screens it slides in over the
   content instead (see the 900px breakpoint). */
body:has(.feed) .sidebar.is-open {
  display: block;
}

/* Navbar menu button, present on every page. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 0 9px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--text-primary);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

#navScrim {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.6);
  z-index: 40;
}

#navScrim[hidden] {
  display: none;
}

.sidebar.is-open {
  z-index: 50;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: none;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }
}

@media (max-width: 720px) {
  .feed {
    height: calc(100vh - 56px);
  }

  .feed-frame {
    max-width: 100%;
  }

  .feed-actions {
    right: 8px;
    bottom: 84px;
    gap: 14px;
  }

  .feed-action-icon {
    width: 40px;
    height: 40px;
    font-size: 19px;
  }
}

.silent-note {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.channel-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.channel-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  flex-shrink: 0;
  overflow: hidden;
}

.channel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-avatar {
  position: relative;
}

.avatar-upload {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.6);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.channel-avatar:hover .avatar-upload {
  opacity: 1;
}

@media (hover: none) {
  .avatar-upload {
    opacity: 1;
  }
}

.channel-info h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.channel-info .page-subtitle {
  margin-bottom: 8px;
}

.channel-stats {
  display: flex;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

.comments-section {
  margin-top: 24px;
}

.comment {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.comment-author {
  font-weight: 600;
  font-size: 14px;
}

.comment-text {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main-content {
    margin-left: 0;
  }
  .video-grid {
    grid-template-columns: 1fr;
  }
  .live-page-header,
  .live-stage-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .live-start-form {
    align-items: stretch;
    flex-direction: column;
  }
  .live-list-item {
    align-items: flex-start;
  }
  .live-viewers {
    display: none;
  }
  .live-share-link a {
    overflow-wrap: anywhere;
  }
}

.live-page,
.live-stage-page {
  max-width: 1080px;
  margin: 0 auto;
}

.live-page-header,
.live-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.live-page-header h1,
.live-stage-header h1 {
  font-size: 24px;
}

.live-count,
#watchStatus,
#broadcastStatus {
  color: var(--text-secondary);
  font-size: 14px;
}

.live-start-form {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 20px 0;
  margin: 22px 0 32px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.live-start-form label {
  font-weight: 600;
}

.live-start-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.live-start-form button:disabled,
.live-join-overlay:disabled {
  opacity: 0.65;
  cursor: wait;
}

.live-directory h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

.live-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
}

.live-list-item:hover .live-list-copy strong {
  color: var(--accent);
}

.live-list-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}

.live-list-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-list-copy span,
.live-viewers,
.live-share-link {
  color: var(--text-secondary);
  font-size: 13px;
}

.live-dot {
  display: inline-block;
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.18);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.live-stage-header p {
  color: var(--text-secondary);
}

.live-player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(72vh, 720px);
  overflow: hidden;
  background: #000;
}

.live-player-shell video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.live-join-overlay {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  padding: 12px 22px;
  border-radius: 24px;
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.live-join-overlay:hover {
  background: var(--accent-hover);
}

.live-stage-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  color: var(--text-secondary);
}

.live-stage-actions .btn-danger {
  background: #b42336;
}

.live-share-link {
  overflow-wrap: anywhere;
}

.live-share-link a {
  color: var(--text-primary);
  text-decoration: underline;
}

.membership-page {
  max-width: 980px;
  margin: 0 auto;
}

.membership-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.membership-header h1 {
  font-size: 26px;
}

.membership-eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

.membership-current,
.membership-fine-print,
.membership-unavailable,
.membership-feedback,
.membership-notice {
  color: var(--text-secondary);
  font-size: 13px;
}

.membership-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px 0;
}

.membership-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
}

.membership-option-paid {
  border-color: var(--accent);
}

.membership-option-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.membership-option-head h2 {
  font-size: 18px;
}

.plan-marker {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-secondary);
}

.plan-marker-paid {
  background: var(--accent);
}

.plan-description {
  margin: 12px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.membership-option ul {
  display: grid;
  gap: 9px;
  padding: 0 0 0 18px;
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

.membership-option .btn,
.plan-selected {
  margin-top: auto;
}

.plan-selected {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.membership-notice,
.membership-unavailable,
.membership-fine-print,
.membership-feedback {
  margin-top: 14px;
}

.subscription-status,
.subscription-prompt {
  margin: 12px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.subscription-status {
  color: #70d6a5;
  font-weight: 600;
}

.subscription-prompt a {
  color: var(--text-primary);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .membership-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .membership-options {
    grid-template-columns: 1fr;
  }
}
