/* v209: Direct Messages chat list polish. */
.dm-chat-list .dm-chat-row,
.direct-messages-page .dm-chat-list .dm-chat-row,
body.light-mode .dm-chat-list .dm-chat-row,
body.light-mode .direct-messages-page .dm-chat-list .dm-chat-row,
body:not(.light-mode):not(.true-dark-mode) #community-view .dm-chat-list .dm-chat-row {
  border: 0 !important;
  border-bottom: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.dm-chat-list .dm-chat-row.unread,
.direct-messages-page .dm-chat-list .dm-chat-row.unread {
  border: 0 !important;
  box-shadow: none !important;
}

.dm-chat-list .dm-chat-row em,
.direct-messages-page .dm-chat-list .dm-chat-row em,
body.light-mode .dm-chat-list .dm-chat-row em,
body.light-mode .direct-messages-page .dm-chat-list .dm-chat-row em {
  color: #ffffff !important;
}

/* v211: Direct Message home row alignment and compact account tags. */
.dm-chat-list .dm-chat-row,
.direct-messages-page .dm-chat-list .dm-chat-row {
  align-items: center !important;
}

.dm-chat-list .dm-chat-row em,
.direct-messages-page .dm-chat-list .dm-chat-row em {
  align-self: center !important;
  padding-top: 0 !important;
  font-weight: 500 !important;
  line-height: 1 !important;
}

.dm-chat-copy strong {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.dm-chat-copy .creator-name-wrap,
.dm-chat-copy .user-badged-name-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex-wrap: nowrap !important;
  vertical-align: baseline !important;
}

.dm-chat-copy .creator-name,
.dm-chat-copy .creator-role,
.dm-chat-copy .creative-team-name,
.dm-chat-copy .creative-team-tag {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: max-content !important;
}

/* v204: Direct Message E2EE status and hydration states. */
.dm-e2ee-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
}

.dm-message-text {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dm-e2ee-loading {
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

body.light-mode .dm-e2ee-loading {
  color: rgba(31, 41, 55, 0.62);
}

.dm-e2ee-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid rgba(34, 197, 94, 0.34);
  border-radius: 6px;
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

body.light-mode .dm-e2ee-badge {
  color: #047857;
  background: rgba(16, 185, 129, 0.13);
  border-color: rgba(5, 150, 105, 0.28);
}

.dm-e2ee-error .dm-e2ee-badge {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.34);
}
.discover-add-btn:disabled { opacity: 0.6; cursor: default; }
#modal .modal { width: min(94vw, 560px); max-width: 560px; }
.modal-status-picker {
  margin: 14px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal-status-picker .modal-status-label {
  font-size: 12px;
  font-weight: 600;
  color: #9990b3;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.modal-status-picker .modal-status-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.modal-status-btn {
  flex: 0 0 calc(33.333% - 6px);
  max-width: calc(33.333% - 6px);
  min-width: 0;
  padding: 10px 8px;
  border-radius: 7px;
  border: 1px solid rgba(139,92,246,0.35);
  background: rgba(139,92,246,0.08);
  color: #e8e3f3;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.modal-status-btn:hover {
  background: rgba(139,92,246,0.18);
  border-color: #8b5cf6;
  transform: translateY(-1px);
}
.modal-status-btn:disabled { opacity: 0.6; cursor: default; transform: none; }
body.light-mode .modal-status-btn {
  background: rgba(124,58,237,0.06);
  border-color: rgba(124,58,237,0.32);
  color: #1a1633;
}
body.light-mode .modal-status-btn:hover {
  background: rgba(124,58,237,0.14);
  border-color: #7c3aed;
}
.modal-status-confirm {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0 2px;
}
.modal-status-confirm-title {
  font-size: 18px;
  font-weight: 700;
  color: #f8f4ff;
  line-height: 1.2;
}
.modal-status-confirm-copy {
  font-size: 14px;
  color: #cfc6e8;
  line-height: 1.45;
}
.modal-status-confirm-copy strong {
  color: #ffffff;
}
.modal-status-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.modal-status-confirm-actions .btn-secondary,
.modal-status-confirm-actions .btn-primary {
  min-width: 112px;
}
body.light-mode .modal-status-confirm-title {
  color: #1a1033;
}
body.light-mode .modal-status-confirm-copy {
  color: #5a4780;
}
body.light-mode .modal-status-confirm-copy strong {
  color: #12082e;
}
.discover-add-btn.added {
  background: rgba(34,211,238,0.12);
  border-color: rgba(34,211,238,0.55);
  color: #67e8f9;
  opacity: 1;
}
.discover-add-btn.added::before {
  content: "✓";
  margin-right: 6px;
  font-weight: 900;
}
body.light-mode .discover-add-btn.added {
  background: rgba(8,145,178,0.10);
  border-color: rgba(8,145,178,0.42);
  color: #0891b2;
}
#discover-add-modal.modal-overlay {
  z-index: 7400;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#discover-add-modal .modal {
  width: min(92vw, 420px);
  max-width: 420px;
  max-height: calc(100vh - 48px);
  padding: 22px 24px 24px;
  overflow-y: auto;
}
#discover-add-modal h3 {
  text-align: center;
  font-size: 22px;
  line-height: 1.15;
  margin-bottom: 8px;
}
.discover-add-desc {
  color: #9990b3;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}
.discover-status-options {
  display: flex; flex-direction: column; gap: 8px; margin: 16px auto 0;
  max-width: 280px;
}
.discover-status-btn {
  padding: 9px 12px; border: 1px solid #3d3466; border-radius: 8px;
  background: rgba(255,255,255,0.04); color: #ffffff; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 800;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, color 0.2s;
}
.discover-status-btn:hover { transform: translateY(-1px); }
.discover-status-btn.watched-option:hover {
  border-color: #22c55e; background: rgba(34,197,94,0.18); color: #ffffff;
}
.discover-status-btn.planned-option:hover {
  border-color: #f97316; background: rgba(249,115,22,0.18); color: #ffffff;
}
.discover-rating-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}
.discover-rating-prompt .discover-add-desc {
  width: 100%;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
  text-align: center !important;
  align-self: center;
}
.discover-rating-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin: 16px auto 6px;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.discover-rating-stars .star-btn {
  font-size: 28px;
  line-height: 1;
  padding: 1px 2px;
}
.discover-rating-stars .star-label {
  min-width: 18px;
  text-align: left;
}
#discover-add-modal .modal-actions {
  justify-content: center;
  margin-top: 20px;
}
#discover-add-modal .discover-rating-prompt .modal-actions {
  width: 100%;
  padding-top: 16px;
}
#discover-add-modal .discover-cancel-btn:hover {
  border-color: #ef4444;
  background: rgba(239,68,68,0.16);
  color: #ffffff;
}

@media (max-width: 600px) {
  #discover-add-modal.modal-overlay {
    align-items: center;
    padding: 18px;
  }
  #discover-add-modal .modal {
    width: min(94vw, 420px);
    max-height: calc(100vh - 36px);
    padding: 20px 18px 22px;
  }
}
body.light-mode .discover-status-btn {
  background: #ede9fe; border-color: #c8bfe8; color: #12082e;
}
body.light-mode .discover-status-btn.watched-option:hover {
  border-color: #16a34a; background: rgba(34,197,94,0.22); color: #12082e;
}
body.light-mode .discover-status-btn.planned-option:hover {
  border-color: #ea580c; background: rgba(249,115,22,0.22); color: #12082e;
}
  .discover-expand-btn {
    display: none; align-items: center; justify-content: center;
    margin: 14px 0 0 auto; padding: 9px 18px; border-radius: 999px;
    border: 1px solid #3d3466; background: rgba(255,255,255,0.04);
    color: #ffffff; font-size: 13px; font-weight: 800; cursor: pointer;
    font-family: 'DM Sans', sans-serif;
  }
  .discover-expand-btn:hover { border-color: #8b5cf6; background: rgba(139,92,246,0.10); }
  .discover-message {
    grid-column: 1 / -1; padding: 22px; border: 1px dashed #2a2248;
    border-radius: 8px; color: #b8afd1; text-align: center; font-size: 13px;
  }
  body.light-mode .discover-title,
  body.light-mode .discover-section-title,
  body.light-mode .discover-card-title { color: #12082e; }
  body.light-mode .discover-subtitle,
  body.light-mode .discover-card-meta,
  body.light-mode .discover-card-overview,
  body.light-mode .discover-message { color: #5a4780; }
  body.light-mode .discover-section-desc,
  body.light-mode .discover-card-context { color: #ffffff; }
  body.light-mode .discover-hub-toggle {
    border-color: rgba(88, 60, 130, 0.12);
    background: rgba(255,255,255,0.7);
  }
  body.light-mode .discover-hub-btn { color: #5a4780; }
  body.light-mode .discover-hub-btn.active {
    color: #5b21b6;
    background: rgba(124,58,237,0.11);
    box-shadow: inset 0 0 0 1px rgba(124,58,237,0.1);
  }
  body.light-mode .discover-card { background: #fff; border-color: #c8bfe8; }
  body.light-mode .discover-message { border-color: #c8bfe8; }
  body.light-mode .discover-expand-btn { border-color: #c8bfe8; background: #ede9fe; color: #12082e; }
  .discover-media-profile-overlay {
    display: none;
  }
  @media (max-width: 700px) {
    body.discover-media-profile-open {
      overflow: hidden;
    }
    body.discover-media-profile-open .mobile-bottom-nav {
      display: none !important;
    }
    .discover-media-profile-overlay {
      position: fixed;
      inset: 0;
      z-index: 3100;
      display: block;
      background: #05040d;
      color: #f8f4ff;
      opacity: 0;
      transform: translateY(18px);
      transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .discover-media-profile-overlay.open {
      opacity: 1;
      transform: translateY(0);
    }
    .discover-media-page {
      height: 100dvh;
      overflow-y: auto;
      overflow-x: hidden;
      scrollbar-width: none;
      will-change: transform;
      contain: paint;
      background:
        linear-gradient(180deg, rgba(5,4,13,0.18), #05040d 48%),
        #05040d;
    }
    .discover-media-page::-webkit-scrollbar {
      display: none;
    }
    .discover-media-back {
      position: fixed;
      top: max(14px, env(safe-area-inset-top, 0px));
      left: 14px;
      z-index: 4;
      border: 1px solid rgba(255,255,255,0.18);
      border-radius: 999px;
      padding: 9px 13px;
      background: rgba(8,7,18,0.62);
      color: #fff;
      font-size: 12px;
      font-weight: 900;
      font-family: 'DM Sans', sans-serif;
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }
    .discover-media-add-floating {
      position: fixed;
      top: max(14px, env(safe-area-inset-top, 0px));
      right: 14px;
      z-index: 4;
      border: 1px solid rgba(255, 216, 127, 0.5);
      border-radius: 999px;
      padding: 9px 13px;
      background:
        linear-gradient(135deg, rgba(255, 216, 127, 0.24), rgba(34, 211, 238, 0.12)),
        rgba(8, 7, 18, 0.66);
      color: #fff3c6;
      font-size: 12px;
      font-weight: 950;
      letter-spacing: 0.01em;
      font-family: 'DM Sans', sans-serif;
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3), 0 0 18px rgba(255, 216, 127, 0.14);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }
    .discover-media-add-floating.added {
      border-color: rgba(34, 211, 238, 0.55);
      background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(255, 255, 255, 0.08)),
        rgba(8, 7, 18, 0.68);
      color: #bff8ff;
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3), 0 0 18px rgba(34, 211, 238, 0.16);
    }
    .discover-media-share-floating {
      position: fixed;
      top: max(14px, env(safe-area-inset-top, 0px));
      right: 14px;
      z-index: 4;
      width: 38px;
      height: 38px;
      border-radius: 999px;
      border: 1px solid rgba(255, 216, 127, 0.42);
      background:
        linear-gradient(135deg, rgba(255, 216, 127, 0.18), rgba(34, 211, 238, 0.10)),
        rgba(8, 7, 18, 0.68);
      color: #fff3c6;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3), 0 0 18px rgba(255, 216, 127, 0.12);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      cursor: pointer;
    }
    .discover-media-share-floating svg {
      width: 18px;
      height: 18px;
      fill: none;
      stroke: currentColor;
      stroke-width: 1.9;
      stroke-linecap: round;
      stroke-linejoin: round;
      display: block;
    }
    .discover-media-share-floating + .discover-media-add-floating {
      right: 58px;
    }
    .discover-media-library-dock {
      position: fixed;
      top: max(56px, calc(env(safe-area-inset-top, 0px) + 56px));
      right: 12px;
      z-index: 5;
      width: min(336px, calc(100vw - 24px));
      padding: 16px;
      border: 1px solid rgba(255, 216, 127, 0.24);
      border-radius: 22px;
      background:
        linear-gradient(145deg, rgba(20, 18, 35, 0.92), rgba(7, 8, 18, 0.82)),
        rgba(8, 7, 18, 0.78);
      color: #fff;
      box-shadow: 0 22px 56px rgba(0, 0, 0, 0.45), 0 0 32px rgba(255, 216, 127, 0.12);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      overflow: hidden;
      opacity: 0;
      transform: translateY(-10px) scale(0.97);
      transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .discover-media-library-dock.open {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
    .discover-media-library-glow {
      position: absolute;
      width: 140px;
      height: 140px;
      right: -38px;
      top: -58px;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(255, 216, 127, 0.3), rgba(34, 211, 238, 0.1) 52%, transparent 72%);
      pointer-events: none;
    }
    .discover-media-library-preview {
      position: relative;
      display: grid;
      grid-template-columns: 44px 1fr;
      gap: 11px;
      align-items: center;
      min-height: 58px;
    }
    .discover-media-library-thumb {
      width: 44px;
      aspect-ratio: 2 / 3;
      border-radius: 9px;
      background:
        linear-gradient(145deg, rgba(255, 216, 127, 0.14), rgba(34, 211, 238, 0.1)),
        rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.12);
      overflow: hidden;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    }
    .discover-media-library-thumb img {
      width: 100%;
      height: 100%;
      display: block;
      object-fit: cover;
    }
    .discover-media-library-eyebrow {
      position: relative;
      color: #ffd87f;
      font-size: 10px;
      font-weight: 950;
      letter-spacing: 0.14em;
      text-transform: uppercase;
    }
    .discover-media-library-title {
      position: relative;
      margin-top: 4px;
      padding-right: 28px;
      color: #fff;
      font-size: 16px;
      font-weight: 950;
      line-height: 1.12;
    }
    .discover-media-library-actions {
      position: relative;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-top: 14px;
    }
    .discover-media-library-actions.single {
      grid-template-columns: 1fr;
    }
    .discover-media-library-choice {
      min-height: 72px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.055);
      color: #fff;
      text-align: left;
      padding: 12px;
      font-family: 'DM Sans', sans-serif;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
    .discover-media-library-choice span {
      display: block;
      font-size: 13px;
      font-weight: 950;
    }
    .discover-media-library-choice small {
      display: block;
      margin-top: 5px;
      color: #aaa1c4;
      font-size: 10px;
      font-weight: 850;
    }
    .discover-media-library-choice.planned {
      border-color: rgba(249, 115, 22, 0.28);
      background: linear-gradient(145deg, rgba(249, 115, 22, 0.15), rgba(255, 255, 255, 0.045));
    }
    .discover-media-library-choice.watched {
      border-color: rgba(34, 197, 94, 0.28);
      background: linear-gradient(145deg, rgba(34, 197, 94, 0.15), rgba(255, 255, 255, 0.045));
    }
    .discover-media-library-choice.remove {
      min-height: 62px;
      border-color: rgba(248, 113, 113, 0.34);
      background: linear-gradient(145deg, rgba(248, 113, 113, 0.16), rgba(255, 255, 255, 0.045));
    }
    .discover-media-library-added-note {
      position: relative;
      margin-top: 11px;
      color: #bdb4d8;
      font-size: 11px;
      font-weight: 750;
      line-height: 1.35;
    }
    .discover-media-library-rating {
      position: relative;
      margin-top: 13px;
      padding-top: 12px;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .discover-media-library-rating-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: #e8e3f3;
      font-size: 11px;
      font-weight: 850;
    }
    .discover-media-library-rating-top strong {
      color: #ffd87f;
      font-size: 11px;
    }
    .discover-media-library-stars {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1px;
      margin-top: 10px;
    }
    .discover-media-library-star {
      width: 27px;
      height: 30px;
      border: 0;
      background: transparent;
      color: #b8afd1;
      font-size: 22px;
      line-height: 1;
      padding: 0;
      font-family: 'DM Sans', sans-serif;
      touch-action: pan-y;
      transition: color 0.15s, transform 0.15s;
    }
    .discover-media-library-star.lit {
      color: #f59e0b;
      text-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
    }
    .discover-media-library-skip {
      margin: 10px auto 0;
      display: block;
      border: 0;
      background: transparent;
      color: #8fdfff;
      font-size: 11px;
      font-weight: 950;
      font-family: 'DM Sans', sans-serif;
    }
    .discover-media-library-close {
      position: absolute;
      top: 10px;
      right: 10px;
      width: 28px;
      height: 28px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.06);
      color: #fff;
      font-size: 18px;
      line-height: 1;
      font-family: 'DM Sans', sans-serif;
    }
    .discover-media-library-dock.saving {
      pointer-events: none;
      opacity: 0.82;
    }
    .discover-media-library-dock.saved {
      border-color: rgba(34, 211, 238, 0.4);
      box-shadow: 0 22px 56px rgba(0, 0, 0, 0.45), 0 0 34px rgba(34, 211, 238, 0.2);
    }
    .discover-media-library-success-mark {
      position: relative;
      width: 42px;
      height: 42px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 2px auto 10px;
      border-radius: 999px;
      background: rgba(34, 211, 238, 0.16);
      border: 1px solid rgba(34, 211, 238, 0.42);
      color: #bff8ff;
      font-size: 24px;
      font-weight: 950;
      box-shadow: 0 0 24px rgba(34, 211, 238, 0.16);
    }
    .discover-media-library-success-mark.remove {
      background: rgba(248, 113, 113, 0.14);
      border-color: rgba(248, 113, 113, 0.38);
      color: #ffd0d0;
      box-shadow: 0 0 24px rgba(248, 113, 113, 0.14);
    }
    .discover-media-library-success-title {
      position: relative;
      text-align: center;
      color: #fff;
      font-size: 18px;
      font-weight: 950;
      line-height: 1.05;
    }
    .discover-media-library-success-sub {
      position: relative;
      margin: 7px auto 2px;
      max-width: 250px;
      text-align: center;
      color: #bdb4d8;
      font-size: 11px;
      font-weight: 800;
      line-height: 1.35;
    }
    .discover-media-hero {
      position: relative;
      min-height: 58vh;
      padding: max(70px, calc(env(safe-area-inset-top, 0px) + 56px)) 18px 26px;
      display: flex;
      align-items: flex-end;
      background-size: cover;
      background-position: center top;
      isolation: isolate;
    }
    .discover-media-hero::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -2;
      background: linear-gradient(145deg, #151025, #05040d);
    }
    .discover-media-hero-shade {
      position: absolute;
      inset: 0;
      z-index: -1;
      background:
        linear-gradient(180deg, rgba(5,4,13,0.08) 0%, rgba(5,4,13,0.72) 58%, #05040d 100%),
        linear-gradient(90deg, rgba(5,4,13,0.84), rgba(5,4,13,0.26));
      backdrop-filter: blur(1px);
    }
    .discover-media-hero-content {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .discover-media-hero-top {
      display: grid;
      grid-template-columns: 112px 1fr;
      gap: 15px;
      align-items: end;
    }
    .discover-media-hero-main {
      min-width: 0;
      display: flex;
      flex-direction: column;
      align-self: end;
    }
    .discover-media-poster {
      width: 112px;
      aspect-ratio: 2 / 3;
      border-radius: 8px;
      background: rgba(255,255,255,0.08);
      box-shadow: 0 18px 44px rgba(0,0,0,0.48);
      overflow: hidden;
    }
    .discover-media-poster img {
      width: 100%;
      height: 100%;
      display: block;
      object-fit: cover;
    }
    .discover-media-kicker {
      color: #f4d27a;
      font-size: 10px;
      font-weight: 950;
      letter-spacing: 1.2px;
      text-transform: uppercase;
    }
    .discover-media-hero h2 {
      margin: 6px 0 8px;
      color: #fff;
      font-family: 'Sora', sans-serif;
      font-size: 28px;
      line-height: 0.98;
      font-weight: 950;
      letter-spacing: 0;
    }
    .discover-media-tagline {
      margin: 2px 0 8px;
      color: #f4d27a;
      font-family: 'Sora', sans-serif;
      font-size: 13px;
      line-height: 1.32;
      font-weight: 800;
      letter-spacing: 0;
      text-shadow: 0 10px 24px rgba(0,0,0,0.4);
    }
    .discover-media-hero p {
      margin: 2px 0 0;
      color: #fff;
      font-size: 15px;
      line-height: 1.5;
      display: -webkit-box;
      -webkit-line-clamp: 5;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .discover-media-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      margin-top: 2px;
    }
    .discover-media-chips span {
      padding: 6px 9px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.14);
      background: rgba(255,255,255,0.07);
      color: #efe9fb;
      font-size: 10px;
      font-weight: 900;
    }
    .discover-media-body {
      padding: 0 16px max(34px, env(safe-area-inset-bottom, 0px));
    }
    .discover-media-loading {
      margin: 18px 0;
      padding: 18px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 8px;
      color: #b8afd1;
      text-align: center;
      background: rgba(255,255,255,0.04);
      font-size: 13px;
      font-weight: 800;
    }
    .discover-media-score {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 1 1 0;
      min-width: 0;
      padding: 1px 0 0;
      color: #f6c84c;
    }
    .discover-media-score span {
      color: currentColor;
      font-size: 32px;
      line-height: 1;
      font-weight: 950;
      font-family: 'Sora', sans-serif;
    }
    .discover-media-score .discover-media-score-star {
      font-size: 23px;
      font-weight: 900;
      transform: translateY(-1px);
    }
    .discover-media-score div {
      display: flex;
      flex-direction: column;
      gap: 3px;
      min-width: 0;
    }
    .discover-media-score small,
    .discover-media-score em {
      color: #bdb4d8;
      font-size: 10px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.8px;
    }
    .discover-media-score em {
      color: #706781;
      font-style: normal;
      letter-spacing: 0.4px;
      text-transform: none;
    }
    .discover-media-score-hero {
      margin-top: 2px;
      padding: 0;
    }
    .discover-media-watch-inline {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-top: 2px;
    }
    .discover-media-watch-inline-head {
      display: flex;
      align-items: baseline;
      gap: 8px;
    }
    .discover-media-watch-inline-head strong {
      color: #f4d27a;
      font-size: 11px;
      line-height: 1.1;
      font-weight: 950;
      letter-spacing: 0.4px;
      text-transform: uppercase;
    }
    .discover-media-watch-inline-head span {
      color: #8f85aa;
      font-size: 9px;
      line-height: 1.15;
      font-weight: 800;
      letter-spacing: 0.55px;
      text-transform: uppercase;
    }
    .discover-media-watch-inline-rows {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 24px;
    }
    .discover-media-watch-inline-row {
      color: #f4efff;
      font-size: 11px;
      line-height: 1.35;
      font-weight: 800;
    }
    .discover-media-watch-inline-row span {
      color: #bdb4d8;
      font-size: 9px;
      font-weight: 900;
      letter-spacing: 0.8px;
      text-transform: uppercase;
    }
    .discover-media-facts {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      padding: 2px 0 14px;
      border-bottom: 1px solid rgba(255,255,255,0.10);
    }
    .discover-media-facts div,
    .discover-media-credits div {
      min-width: 0;
    }
    .discover-media-facts div.primary strong {
      color: #f4d27a;
      font-size: 16px;
    }
    .discover-media-facts strong,
    .discover-media-credits strong {
      display: block;
      color: #fff;
      font-size: 14px;
      line-height: 1.25;
      font-weight: 950;
    }
    .discover-media-facts span,
    .discover-media-credits span {
      display: block;
      margin-top: 4px;
      color: #bdb4d8;
      font-size: 9px;
      font-weight: 900;
      letter-spacing: 0.8px;
      text-transform: uppercase;
    }
    .discover-media-credits {
      display: grid;
      gap: 12px;
      margin: 16px 0 18px;
    }
    .discover-media-trailer {
      margin: 18px 0;
      border-radius: 8px;
      overflow: hidden;
      aspect-ratio: 16 / 9;
      background: #111;
      box-shadow: 0 18px 40px rgba(0,0,0,0.34);
    }
    .discover-media-trailer iframe {
      width: 100%;
      height: 100%;
      border: 0;
      display: block;
    }
    .discover-media-trailer video {
      width: 100%;
      height: 100%;
      display: block;
      object-fit: cover;
      background: #111;
    }
    .discover-media-section {
      margin-top: 22px;
    }
    .discover-media-section h3 {
      margin: 0 0 12px;
      color: #fff;
      font-family: 'Sora', sans-serif;
      font-size: 16px;
      font-weight: 950;
      letter-spacing: 0;
    }
    .discover-media-cast,
    .discover-media-similar {
      display: grid;
      grid-auto-flow: column;
      grid-auto-columns: 118px;
      gap: 12px;
      overflow-x: auto;
      overflow-y: hidden;
      padding-bottom: 8px;
      scrollbar-width: none;
      scroll-snap-type: x proximity;
      touch-action: pan-x pan-y;
      overscroll-behavior-x: contain;
      overscroll-behavior-y: auto;
    }
    .discover-media-cast::-webkit-scrollbar,
    .discover-media-similar::-webkit-scrollbar {
      display: none;
    }
    .discover-media-cast-photo,
    .discover-media-similar img {
      width: 118px;
      aspect-ratio: 2 / 3;
      border-radius: 8px;
      background: rgba(255,255,255,0.07);
      overflow: hidden;
      object-fit: cover;
    }
    /* v730: position-anchor for the heart-favorite button. */
    .discover-media-cast-photo {
      position: relative;
    }
    /* v730: heart-favorite button on every cast card. Sits in the bottom-right
       corner of the photo. Filled state pops red; empty state is a clean
       outline. Click delegated in 22-favorite-people.js. */
    .cast-fav-btn {
      position: absolute;
      bottom: 6px;
      right: 6px;
      width: 28px;
      height: 28px;
      /* v730.1: grid + place-items reliably centers the SVG without the
         baseline offset that inline-flex + inline SVG can leave behind. */
      display: grid;
      place-items: center;
      line-height: 0;
      padding: 0;
      background: rgba(0, 0, 0, 0.55);
      -webkit-backdrop-filter: blur(6px);
      backdrop-filter: blur(6px);
      border-radius: 999px;
      cursor: pointer;
      z-index: 2;
      transition: background 0.18s ease, transform 0.18s ease;
      -webkit-tap-highlight-color: transparent;
    }
    .cast-fav-btn svg {
      display: block; /* kills inline baseline offset */
      width: 16px;
      height: 16px;
      fill: none;
      stroke: rgba(255, 255, 255, 0.95);
      stroke-width: 1.8;
      stroke-linejoin: round;
      transition: fill 0.18s ease, stroke 0.18s ease, transform 0.18s ease;
      pointer-events: none; /* clicks land on the .cast-fav-btn span, not the path */
    }
    .cast-fav-btn:hover {
      background: rgba(0, 0, 0, 0.7);
    }
    .cast-fav-btn.cast-fav-btn--tapped {
      transform: scale(0.85);
    }
    .cast-fav-btn.is-favorite {
      background: rgba(229, 57, 80, 0.95);
    }
    .cast-fav-btn.is-favorite svg {
      fill: #fff;
      stroke: #fff;
      animation: cast-fav-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    @keyframes cast-fav-pop {
      0% { transform: scale(1); }
      50% { transform: scale(1.25); }
      100% { transform: scale(1); }
    }
    /* v733: heart-favorite variant for the person profile page top-right
       corner. Larger, stronger contrast over the hero, sits above the
       backdrop image and the back button. */
    .cast-fav-btn.cast-fav-btn--profile {
      position: absolute;
      top: max(16px, env(safe-area-inset-top, 16px));
      right: 16px;
      bottom: auto;
      width: 40px;
      height: 40px;
      background: rgba(0, 0, 0, 0.55);
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
      z-index: 10;
    }
    .cast-fav-btn.cast-fav-btn--profile svg {
      width: 22px;
      height: 22px;
      stroke-width: 1.7;
    }
    .cast-fav-btn.cast-fav-btn--profile.is-favorite {
      background: rgba(229, 57, 80, 0.95);
      box-shadow: 0 6px 22px rgba(229, 57, 80, 0.45);
    }

    /* v734: Filmography section header — clickable, with a chevron. */
    .discover-person-filmography-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      width: 100%;
      padding: 0;
      margin: 0 0 6px 0;
      background: transparent;
      border: 0;
      color: inherit;
      cursor: pointer;
      font-family: inherit;
      text-align: left;
      -webkit-tap-highlight-color: transparent;
    }
    .discover-person-filmography-header h3 {
      margin: 0;
      flex: 1 1 auto;
    }
    .discover-person-filmography-header svg {
      width: 18px;
      height: 18px;
      flex: 0 0 auto;
      color: rgba(255,255,255,0.55);
      transition: transform 0.18s ease, color 0.18s ease;
    }
    .discover-person-filmography-header:hover svg,
    .discover-person-filmography-header:active svg {
      color: rgba(255,255,255,0.95);
      transform: translateX(2px);
    }

    /* v734: Filmography full-page overlay — slides in from the right.
       Stacks on top of the person profile (z-index higher than overlay). */
    body.filmography-page-open {
      overflow: hidden;
    }
    body.filmography-page-open .mobile-bottom-nav {
      display: none !important;
    }
    .filmography-page-overlay {
      position: fixed;
      inset: 0;
      z-index: 3300;
      background: #05040d;
      color: #f8f4ff;
      transform: translateX(100%);
      transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
      will-change: transform;
    }
    .filmography-page-overlay.open {
      transform: translateX(0);
    }
    .filmography-page {
      display: flex;
      flex-direction: column;
      height: 100dvh;
    }
    .filmography-page-header {
      position: relative;
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: max(14px, env(safe-area-inset-top, 14px)) 16px 12px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .filmography-page-back {
      position: absolute;
      left: 16px;
      top: max(14px, env(safe-area-inset-top, 14px));
    }
    .filmography-page-title {
      margin: 0;
      font-size: 16px;
      font-weight: 700;
      color: #f8f4ff;
      letter-spacing: -0.01em;
      max-width: 70%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .filmography-page-chips {
      flex: 0 0 auto;
      display: flex;
      gap: 8px;
      padding: 12px 16px;
      overflow-x: auto;
      scrollbar-width: none;
    }
    .filmography-page-chips::-webkit-scrollbar { display: none; }
    .filmography-chip {
      flex: 0 0 auto;
      padding: 7px 14px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.18);
      background: transparent;
      color: rgba(255,255,255,0.85);
      font-family: inherit;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    }
    .filmography-chip.active {
      background: #f8f4ff;
      color: #12082e;
      border-color: #f8f4ff;
    }
    .filmography-page-body {
      flex: 1 1 auto;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 4px 16px max(24px, env(safe-area-inset-bottom, 24px));
      -webkit-overflow-scrolling: touch;
    }
    .filmography-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 14px;
    }
    .filmography-card {
      display: flex;
      flex-direction: column;
      padding: 0;
      background: transparent;
      border: 0;
      color: inherit;
      text-align: left;
      font-family: inherit;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      min-width: 0;
    }
    .filmography-card-poster {
      width: 100%;
      aspect-ratio: 2 / 3;
      border-radius: 8px;
      background: rgba(255,255,255,0.07);
      overflow: hidden;
      box-shadow: 0 12px 28px rgba(0,0,0,0.32);
      transition: transform 0.18s ease;
    }
    .filmography-card:active .filmography-card-poster {
      transform: scale(0.97);
    }
    .filmography-card-poster img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .filmography-card-title {
      margin-top: 8px;
      color: #fff;
      font-size: 12.5px;
      line-height: 1.25;
      font-weight: 800;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      min-height: 30px;
    }
    .filmography-card-rating {
      margin-top: 4px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      color: #f5b73b;
      font-size: 11.5px;
      font-weight: 800;
    }
    .filmography-card-rating span:first-child {
      color: #f5b73b;
    }
    .filmography-card-meta {
      margin-top: 2px;
      color: #b6acce;
      font-size: 10.5px;
      line-height: 1.2;
      font-weight: 600;
      min-height: 13px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .filmography-card-character {
      margin-top: 2px;
      color: #8f86aa;
      font-size: 10.5px;
      line-height: 1.2;
      font-weight: 600;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      min-height: 13px;
    }
    .filmography-load-more {
      display: block;
      margin: 22px auto 4px;
      padding: 11px 28px;
      border-radius: 999px;
      border: 1px solid rgba(196,181,253,0.25);
      background: rgba(255,255,255,0.04);
      color: #f8f4ff;
      font-family: inherit;
      font-size: 13.5px;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.18s ease;
    }
    .filmography-load-more:hover {
      background: rgba(255,255,255,0.08);
    }
    .filmography-load-more:active {
      transform: scale(0.98);
    }
    .discover-media-cast-photo img,
    .discover-media-similar img {
      width: 100%;
      height: 100%;
      display: block;
      object-fit: cover;
    }
    .discover-media-similar-card {
      display: flex;
      flex-direction: column;
      scroll-snap-align: start;
      padding: 0 0 3px;
      border: 0;
      background: transparent;
      color: inherit;
      text-align: left;
      font-family: 'DM Sans', sans-serif;
      cursor: pointer;
      touch-action: pan-x pan-y;
    }
    .discover-media-cast-card {
      display: flex;
      flex-direction: column;
      scroll-snap-align: start;
      padding: 0 0 3px;
      border: 0;
      background: transparent;
      color: inherit;
      text-align: left;
      font-family: 'DM Sans', sans-serif;
      cursor: pointer;
      touch-action: pan-x pan-y;
    }
    .discover-media-similar-card img {
      box-shadow: 0 14px 30px rgba(0,0,0,0.28);
      transition: transform 0.18s ease;
    }
    .discover-media-cast-card .discover-media-cast-photo {
      box-shadow: 0 14px 30px rgba(0,0,0,0.28);
      transition: transform 0.18s ease;
    }
    .discover-media-similar-card:active img,
    .discover-media-cast-card:active .discover-media-cast-photo {
      transform: scale(0.97);
    }
    .discover-media-cast strong,
    .discover-media-similar span {
      display: block;
      margin-top: 8px;
      color: #fff;
      font-size: 12px;
      line-height: 1.2;
      font-weight: 900;
      min-height: 29px;
    }
    .discover-media-similar small {
      display: block;
      margin-top: 4px;
      color: #8f86aa;
      font-size: 10px;
      line-height: 1.2;
      font-weight: 800;
      min-height: 24px;
    }
    .discover-media-cast span {
      display: block;
      margin-top: 3px;
      color: #bdb4d8;
      font-size: 10px;
      line-height: 1.25;
      font-weight: 700;
    }
    .discover-person-hero {
      background-position: center top;
    }
    .discover-person-poster {
      background: rgba(255,255,255,0.09);
    }
  }
  .discover-mobile-jump {
    display: none;
  }
  @media (max-width: 600px) {
    .discover-head { align-items: flex-start; flex-direction: column; }
    .discover-section-top {
      margin-bottom: 14px;
    }
    .discover-section-title {
      font-size: 24px;
      line-height: 1.05;
    }
    .discover-section-desc { font-size: 12px; margin-top: 8px; }
    .discover-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .discover-card-body {
      padding: 10px 9px 12px;
      min-height: 112px;
      gap: 6px;
    }
    .discover-card-title {
      font-size: 10.8px;
      min-height: 0;
    }
    .discover-card-meta {
      margin-top: 7px;
      margin-bottom: 9px;
      min-height: 24px;
      font-size: 10px;
    }
    .discover-rating-meta {
      gap: 6px;
      font-size: 12px;
    }
    .discover-rating-star {
      font-size: 15px;
    }
    .discover-add-btn {
      height: 36px;
      min-height: 36px;
      margin-top: auto;
      font-size: 10.5px;
      padding: 0 12px;
    }
    .discover-expand-btn {
      min-height: 46px;
      display: flex !important;
      width: fit-content;
      margin: 16px auto 0;
      padding: 0 20px;
      font-size: 15px;
      font-weight: 800;
    }
    .discover-expand-btn.is-collapsing {
      border-color: rgba(248, 113, 113, 0.65);
      background: linear-gradient(135deg, rgba(153, 27, 27, 0.95), rgba(127, 29, 29, 0.92));
      color: #fff4f4;
      box-shadow: 0 12px 26px rgba(127, 29, 29, 0.28);
    }
    body.light-mode .discover-expand-btn.is-collapsing {
      border-color: #dc2626;
      background: linear-gradient(135deg, #ef4444, #dc2626);
      color: #ffffff;
    }
    .discover-mobile-jump {
      position: fixed;
      right: 6px;
      bottom: calc(102px + env(safe-area-inset-bottom, 0px));
      z-index: 1400;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 8px;
      padding: 0;
      background: transparent;
      border: none;
      box-shadow: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      pointer-events: none;
    }
    .discover-mobile-jump-btn {
      width: 34px;
      height: 34px;
      border: 1px solid rgba(255,255,255,0.14);
      border-radius: 999px;
      background: rgba(18, 14, 36, 0.92);
      color: #ffffff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 9px;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      cursor: pointer;
      box-shadow: 0 10px 22px rgba(0,0,0,0.28);
      pointer-events: auto;
    }
    .discover-mobile-jump-btn:active {
      transform: scale(0.96);
    }
    body.light-mode .discover-mobile-jump {
      background: transparent;
      border: none;
      box-shadow: none;
    }
    body.light-mode .discover-mobile-jump-btn {
      border-color: rgba(124,58,237,0.16);
      background: rgba(255,255,255,0.94);
      color: #4c1d95;
      box-shadow: 0 10px 22px rgba(62, 38, 92, 0.14);
    }
    .discover-card-overview { display: none; }
  }


  /* Premium polish pass */
  :root {
    --bg: #050410;
    --bg-soft: #0b0818;
    --surface: rgba(13, 10, 28, 0.88);
    --surface-2: rgba(21, 16, 37, 0.72);
    --surface-3: rgba(255, 255, 255, 0.045);
    --line: rgba(196, 181, 253, 0.14);
    --line-soft: rgba(196, 181, 253, 0.09);
    --text: #eee9fa;
    --muted: #9a90b5;
    --muted-2: #766b91;
    --purple: #8b5cf6;
    --purple-soft: rgba(139, 92, 246, 0.15);
    --gold: #f6b73c;
    --cyan: #67e8f9;
    --danger: #f87171;
    --shadow-soft: 0 14px 38px rgba(0, 0, 0, 0.22);
    --shadow-hover: 0 18px 46px rgba(0, 0, 0, 0.32);
  }

  body {
    background:
      radial-gradient(circle at 50% -10%, rgba(124, 58, 237, 0.14), transparent 34rem),
      linear-gradient(135deg, #050410 0%, #111026 58%, #050410 100%);
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    letter-spacing: 0;
  }

  .container { max-width: 1040px; padding: 0 22px; }
  .header {
    padding: 18px 0 15px;
    background: rgba(5, 4, 16, 0.76);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(16px);
  }
  .header-top {
    gap: 16px;
    margin-bottom: 12px;
  }
  .logo { font-size: 27px; letter-spacing: 0; }
  .subtitle {
    color: var(--muted-2);
    font-size: 12px;
    margin-top: 2px;
    font-family: 'DM Sans', sans-serif;
  }
  .header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0.82;
  }
  .stats {
    gap: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--line-soft);
  }
  .stat-val {
    font-size: 15px;
    line-height: 1.1;
    color: #b9a5ff;
  }
  .stat-val.gold { color: var(--gold); }
  .stat-label {
    margin-top: 2px;
    color: var(--muted-2);
    font-size: 10px;
    letter-spacing: 0.02em;
    text-transform: none;
  }
  .user-area { gap: 8px; transform: translateY(-8px); }
  .user-avatar {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  }
  .logout-btn {
    border-color: transparent;
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--muted-2);
    background: transparent;
  }
  .logout-btn:hover {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.24);
  }

  .main-nav {
    width: fit-content;
    margin: 0 auto;
    padding: 4px;
    gap: 4px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
  }
  .main-nav-btn {
    border: none;
    border-radius: 999px;
    padding: 8px 18px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
  }
  .main-nav-btn.active {
    color: #fff;
    border-bottom-color: transparent;
    background: rgba(139, 92, 246, 0.18);
    box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.12);
  }
  .main-nav-btn:hover { color: #d8cff3; }
  #nav-mylist {
    color: #f5d27a;
    font-weight: 800 !important;
  }
  #nav-mylist:hover,
  #nav-mylist.active {
    color: #fde68a;
  }
  .mobile-bottom-nav {
    display: none;
  }

  .section-toggle {
    margin-top: 10px;
    padding: 0;
    gap: 2px;
    border: none;
    border-radius: 999px;
    background: transparent;
  }
  .section-btn {
    padding: 7px 15px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
  }
  .section-btn.active {
    color: #f7f3ff;
    background: rgba(255,255,255,0.075);
    box-shadow: inset 0 0 0 1px var(--line);
  }

  .main-content { padding: 18px 22px 68px; }
  .toolbar {
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.032);
    box-shadow: 0 10px 30px rgba(0,0,0,0.14);
  }
  .tabs {
    flex: 1;
    gap: 4px;
    flex-wrap: wrap;
  }
  .tab-btn {
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
  }
  .tab-btn:hover { background: rgba(255,255,255,0.045); color: #d8cff3; }
  .tab-btn.active {
    color: #f7f3ff !important;
    background: rgba(139, 92, 246, 0.15);
    box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.12);
    font-weight: 700;
  }
  .tab-count {
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    color: #d9d0ee;
    background: rgba(255,255,255,0.055);
    font-size: 10px;
  }
  .tab-btn.active .tab-count { background: rgba(255,255,255,0.09); }
  .toolbar-right {
    align-items: center;
    gap: 8px;
  }

  input[type="text"], input[type="number"], input[type="url"], .comment-textarea {
    border-radius: 14px;
    border-color: var(--line-soft);
    background: rgba(255,255,255,0.045);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  }
  input::placeholder, .comment-textarea::placeholder { color: #685d82; }
  input:focus, .comment-textarea:focus {
    border-color: rgba(167, 139, 250, 0.62);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
  }
  .search-input {
    width: 220px;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(5, 4, 16, 0.38);
  }
  .find-search {
    padding: 10px 14px !important;
    border-radius: 999px !important;
    border-color: var(--line-soft) !important;
    background: rgba(255,255,255,0.045) !important;
  }
  .btn-primary, .btn-secondary, .comment-post-btn, .back-btn, .google-btn, .friend-action-btn {
    border-radius: 14px;
    letter-spacing: 0;
  }
  .btn-primary, .comment-post-btn {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.22);
  }
  .btn-primary:hover, .comment-post-btn:hover {
    filter: brightness(1.06);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
  }
  .btn-secondary, .back-btn {
    background: rgba(255,255,255,0.04);
    border-color: var(--line-soft);
    color: var(--muted);
  }
  .btn-secondary:hover, .back-btn:hover {
    background: rgba(255,255,255,0.065);
    border-color: var(--line);
  }
  .btn-sm { border-radius: 999px; padding: 5px 11px; }

  .grid { gap: 16px; }
  .card {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(255,255,255,0.028), rgba(255,255,255,0.006)),
      rgba(8, 6, 18, 0.92);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }
  .card:hover {
    transform: translateY(-2px);
    border-color: rgba(196, 181, 253, 0.2);
    box-shadow: var(--shadow-hover);
  }
.preview-slot {
    border: 1px dashed rgba(196, 181, 253, 0.2);
    border-radius: 14px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.02);
    color: #8f84aa;
    text-align: center;
    padding: 20px;
  }
  .preview-slot strong { color: #e8e3f3; display:block; margin-bottom:6px; }
  .card-header {
    gap: 16px;
    padding: 17px 18px 13px;
  }
  .card-cover {
    width: 112px;
    border-radius: 14px;
    font-size: 28px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.28);
  }
  .card-cover.no-img {
    background:
      radial-gradient(circle at 40% 18%, rgba(251,191,36,0.22), transparent 42%),
      linear-gradient(135deg, #241a4b 0%, #24132d 100%);
  }
  .card-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-top: 1px;
  }
  .card-title-row { gap: 12px; }
  .card-title {
    font-size: 17px;
    line-height: 1.25;
    font-weight: 700;
    color: #f3effb;
  }
  .card-genre {
    margin-top: 5px;
    color: rgba(154, 144, 181, 0.72);
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: none;
  }
  .delete-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
    border-radius: 999px;
    color: rgba(154, 144, 181, 0.48);
    font-size: 17px;
    transition: background 0.2s, color 0.2s;
  }
  .delete-btn:hover {
    background: rgba(248, 113, 113, 0.08);
    color: var(--danger);
  }
  .status-pills {
    gap: 5px;
    margin-top: 11px;
  }
  .status-pill {
    padding: 4px 9px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: rgba(154, 144, 181, 0.72);
    background: rgba(255,255,255,0.025);
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
  }
  .status-pill:hover {
    color: #d8cff3;
    background: rgba(255,255,255,0.05);
    opacity: 1;
  }
  .status-pill:not(.watching-active):not(.planned-active):not(.watched-active):not(.paused-active):not(.dropped-active) { opacity: 0.76; }
  .status-pill.watching-active { border-color: rgba(167,139,250,0.42); background: rgba(124,58,237,0.16); color: #c4b5fd; }
  .status-pill.planned-active { border-color: rgba(251,191,36,0.38); background: rgba(251,191,36,0.12); color: #f8cd75; }
  .status-pill.watched-active { border-color: rgba(103,232,249,0.34); background: rgba(103,232,249,0.1); color: #9decf7; }
  .status-pill.paused-active { border-color: rgba(249,115,22,0.34); background: rgba(249,115,22,0.1); color: #f6aa76; }
  .status-pill.dropped-active { border-color: rgba(248,113,113,0.36); background: rgba(248,113,113,0.1); color: #f5a1a1; }

  .progress-area { margin-top: 13px; }
  .progress-meta {
    margin-bottom: 6px;
    font-size: 11px;
    color: var(--muted);
  }
  .progress-meta span:last-child { color: var(--muted-2); }
  .progress-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.07);
  }
  .progress-fill {
    border-radius: 999px;
    background: linear-gradient(90deg, #7c3aed, #c084fc);
  }
  .rating-area { margin-top: 12px; }
  .rating-label {
    margin-bottom: 4px;
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 600;
  }
  .stars { gap: 1px; }
  .star-btn { color: #4a415c; }
  .star-btn.lit { color: var(--gold); }
  .star-label { color: var(--muted); font-weight: 700; }
  .card-action-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 48px;
    padding: 10px 18px 12px 146px;
  }
  .card-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .comments-btn,
  .card-footer-btn {
    min-height: 30px;
    padding: 6px 11px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255,255,255,0.035);
    font-size: 12px;
    font-weight: 650;
    line-height: 1;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
  }
  .comments-btn:hover,
  .card-footer-btn:hover {
    color: #eee9fa;
    border-color: var(--line);
    background: rgba(139, 92, 246, 0.12);
  }
  .card-action-row .ep-toggle-bar {
    width: auto;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(255,255,255,0.035);
    padding: 6px 11px;
    color: var(--muted);
    justify-content: center;
  }
  .card-action-row .ep-toggle-bar:hover {
    border-color: var(--line);
    background: rgba(139, 92, 246, 0.12);
  }
  .ep-toggle-bar {
    padding: 12px 18px;
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    background: rgba(255,255,255,0.018);
    font-weight: 700;
  }
  .ep-toggle-bar:hover {
    color: #eee9fa;
    background: rgba(255,255,255,0.04);
    border-top-color: var(--line);
  }
  .ep-list-inner { padding: 12px 18px 18px; }
  .ep-list.open {
    border-top: 1px solid rgba(196, 181, 253, 0.06);
  }
  .ep-actions { margin-bottom: 12px; }
  .season-header {
    border-color: var(--line-soft);
    border-radius: 14px;
    background: rgba(255,255,255,0.035);
  }
  .season-header:hover { background: rgba(255,255,255,0.055); }
  .ep-row {
    border-radius: 10px;
    border-left-width: 2px;
    background: rgba(255,255,255,0.026);
  }
  .ep-check {
    border-radius: 7px;
    border-width: 1.5px;
  }
  .ep-rating-btn { border-radius: 999px; }
  .ep-rating-popup {
    border-radius: 14px;
    border-color: var(--line);
    background: #151025;
  }
  .media-link-badge {
    display: inline-flex;
    align-items: center;
    vertical-align: 0.12em;
    margin-left: 6px;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.13);
    color: rgba(251, 225, 148, 0.86);
    border: 1px solid rgba(251, 191, 36, 0.18);
    font-family: 'DM Sans', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.25;
  }

  .modal {
    border-radius: 18px;
    border-color: var(--line);
    background: rgba(16, 12, 31, 0.98);
    box-shadow: 0 26px 70px rgba(0,0,0,0.48);
  }
  .modal h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 19px;
  }
  .empty, .friends-empty {
    border-color: var(--line-soft);
    border-radius: 16px;
    background: rgba(255,255,255,0.02);
    color: var(--muted-2);
  }
  .login-feature, .user-card, .comments-page-header, .comment-input-area {
    border-color: var(--line-soft);
    border-radius: 14px;
    background: rgba(255,255,255,0.035);
    box-shadow: var(--shadow-soft);
  }
  .login-feature-title {
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
  }
  .login-feature-desc { color: var(--muted); }
  .google-btn { border-color: var(--line-soft); }
  .user-card:hover {
    transform: translateY(-1px);
    border-color: rgba(196, 181, 253, 0.2);
    box-shadow: var(--shadow-hover);
  }
  .viewing-banner {
    border-color: rgba(167,139,250,0.24);
    border-radius: 14px;
    background: rgba(124,58,237,0.1);
  }
  .friends-tabs {
    width: fit-content;
    gap: 4px;
    margin-bottom: 22px;
    padding: 4px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: rgba(255,255,255,0.035);
  }
  .friends-tab-btn {
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    color: var(--muted);
  }
  .friends-tab-btn.active {
    color: #fff;
    border-bottom-color: transparent;
    background: rgba(139, 92, 246, 0.15);
  }
  .requests-badge, .nav-badge { border-radius: 999px; }
  .theme-toggle-row { border-top-color: var(--line-soft); }

  body.light-mode {
    background:
      radial-gradient(circle at 50% -10%, rgba(124,58,237,0.1), transparent 34rem),
      #f6f2fb;
    color: #170f2d;
  }
  body.light-mode .header {
    background: rgba(246, 242, 251, 0.82);
    border-bottom-color: rgba(88, 60, 130, 0.12);
  }
  body.light-mode .subtitle,
  body.light-mode .stat-label,
  body.light-mode .tab-btn,
  body.light-mode .section-btn,
  body.light-mode .main-nav-btn,
  body.light-mode .card-genre,
  body.light-mode .rating-label,
  body.light-mode .progress-meta,
  body.light-mode .comments-btn {
    color: #6a5d82;
  }
  body.light-mode .main-nav,
  body.light-mode .section-toggle,
  body.light-mode .toolbar,
  body.light-mode .friends-tabs,
  body.light-mode .stats {
    border-color: rgba(88, 60, 130, 0.12);
    background: rgba(255,255,255,0.62);
    box-shadow: 0 10px 28px rgba(62, 38, 92, 0.08);
  }
  body.light-mode .section-toggle { background: transparent; box-shadow: none; }
  body.light-mode .main-nav-btn.active,
  body.light-mode .section-btn.active,
  body.light-mode .tab-btn.active,
  body.light-mode .friends-tab-btn.active {
    color: #5b21b6 !important;
    background: rgba(124,58,237,0.11);
    box-shadow: inset 0 0 0 1px rgba(124,58,237,0.1);
  }
  body.light-mode #nav-mylist {
    color: #b45309 !important;
  }
  body.light-mode #nav-mylist:hover,
  body.light-mode #nav-mylist.active {
    color: #d97706 !important;
  }
  body.light-mode .card {
    background: linear-gradient(180deg, #fff, #fbf9ff);
    border-color: rgba(88, 60, 130, 0.12);
    box-shadow: 0 14px 34px rgba(62, 38, 92, 0.1);
  }
  body.light-mode .card:hover {
    border-color: rgba(124,58,237,0.24);
    box-shadow: 0 18px 44px rgba(62, 38, 92, 0.14);
  }
  body.light-mode .card-title { color: #170f2d; }
  body.light-mode input[type="text"],
  body.light-mode input[type="number"],
  body.light-mode input[type="url"],
  body.light-mode .comment-textarea,
  body.light-mode .find-search {
    background: rgba(255,255,255,0.82) !important;
    border-color: rgba(88, 60, 130, 0.14) !important;
  }
  body.light-mode .status-pill {
    background: rgba(124,58,237,0.035);
    border-color: rgba(88,60,130,0.12);
  }
  body.light-mode .comments-btn,
  body.light-mode .card-footer-btn,
  body.light-mode .card-action-row .ep-toggle-bar { background: rgba(124,58,237,0.06); }
  body.light-mode .media-link-badge {
    background: rgba(217,119,6,0.09);
    color: #8a5a06;
    border-color: rgba(217,119,6,0.14);
  }
  body.light-mode .ep-toggle-bar {
    border-top-color: rgba(88,60,130,0.12);
    background: rgba(124,58,237,0.025);
  }
  body.light-mode .modal,
  body.light-mode .comments-page-header,
  body.light-mode .comment-input-area,
  body.light-mode .user-card,
  body.light-mode .login-feature {
    border-color: rgba(88,60,130,0.12);
    background: #fff;
    box-shadow: 0 14px 34px rgba(62, 38, 92, 0.1);
  }

  @media (max-width: 700px) {
    .container { padding: 0 14px; }
    .header { padding: 10px 0 14px; }
    .header-top {
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
      flex-wrap: nowrap;
      gap: 0;
    }
    .header-top > div:first-child img {
      width: min(180px, 46vw) !important;
    }
    .header-actions {
      width: auto;
      justify-content: flex-end;
      gap: 0;
      align-items: center;
    }
    .edit-profile-btn { display: none !important; }
    .logout-btn { display: none !important; }
    .user-area {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      margin-top: 0;
      align-self: auto;
    }
    .user-avatar {
      width: 52px;
      height: 52px;
      border-radius: 50%;
      cursor: pointer;
      margin-top: 0;
      margin-right: 0;
    }
    .mobile-edit-profile-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 22px;
      padding: 3px 8px;
      font-size: 9.5px;
      line-height: 1;
      white-space: nowrap;
    }
    .header .main-nav {
      display: none !important;
    }
    .section-toggle, .friends-tabs { width: 100%; }
    .mobile-bottom-nav {
      position: fixed !important;
      left: 50% !important;
      right: auto !important;
      top: auto !important;
      bottom: calc(env(safe-area-inset-bottom, 0px) + 14px) !important;
      transform: translateX(-50%) !important;
      width: min(calc(100vw - 64px), 440px) !important;
      max-width: 440px;
      padding: 4px;
      gap: 4px;
      margin: 0 !important;
      border-radius: 999px;
      border: 1px solid var(--line-soft);
      background: rgba(255, 255, 255, 0.035);
      box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      z-index: 1300 !important;
      display: flex !important;
      align-items: stretch;
    }
    .main-nav-btn, .section-btn, .friends-tab-btn { flex: 1; text-align: center; }
    .mobile-bottom-nav .main-nav-btn {
      min-width: 0;
      min-height: 44px;
      padding: 8px 10px;
      border-radius: 999px;
      font-size: 13px;
      font-weight: 800;
      letter-spacing: 0;
      line-height: 1.1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: #ffffff;
      background: transparent;
      box-shadow: none;
      text-shadow: 0 0 10px rgba(255,255,255,0.06);
    }
    .mobile-bottom-nav .main-nav-btn.active {
      color: #ffffff;
      background: rgba(139, 92, 246, 0.08);
      box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.10);
    }
    .mobile-bottom-nav #mobile-nav-mylist {
      color: #f5d27a;
      font-weight: 800 !important;
    }
    .mobile-bottom-nav #mobile-nav-mylist.active {
      color: #fde68a;
    }
    .section-toggle { margin-left: -10px; }
    .main-content { padding: 15px 14px 120px; }
    .discover-hub-toggle {
      width: 100%;
      justify-content: stretch;
    }
    .discover-hub-btn {
      flex: 1 1 0;
    }
    .toolbar {
      padding: 9px;
      border-radius: 14px;
    }
    .tabs { width: 100%; }
    .tab-btn {
      flex: 1 1 auto;
      min-height: 34px;
      padding: 7px 10px;
    }
    .toolbar-right { width: 100%; }
    .search-input { flex: 1; width: auto; }
    .card-header {
      gap: 13px;
      padding: 14px;
    }
    .card-cover { width: 120px; border-radius: 11px; }
    .card-title { font-size: 17px; font-weight: 700; }
    .status-pill { padding: 5px 9px; font-size: 10.5px; }
    .card-action-row { padding: 9px 14px 12px 147px; }
    .progress-bar { max-width: 120px; }
    .ep-toggle-bar { padding: 11px 14px; }
    .ep-list-inner { padding: 8px 14px 14px; }
    .comments-page,
    .activity-page {
      padding-bottom: 118px;
    }
  }

  @media (max-width: 700px) {
    body.light-mode .mobile-bottom-nav {
      border-color: #c8bfe8;
      background: rgba(255,255,255,0.92);
      box-shadow: 0 14px 34px rgba(62, 38, 92, 0.12);
    }
    body.light-mode .mobile-bottom-nav .main-nav-btn {
      color: #3b285f;
      text-shadow: none;
    }
    body.light-mode .mobile-bottom-nav .main-nav-btn.active {
      color: #5b21b6;
      background: rgba(124, 58, 237, 0.08);
      box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.10);
    }
  }

  /* Full-product finish pass */
  *:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22), 0 0 0 1px rgba(196, 181, 253, 0.42);
  }
  button, input, textarea, .user-card, .tmdb-result {
    -webkit-tap-highlight-color: transparent;
  }
  button:active, .tmdb-result:active, .user-card:active {
    transform: translateY(1px);
  }
  button:disabled,
  .comment-post-btn:disabled,
  .friend-pending-btn {
    opacity: 0.55;
    cursor: default;
    box-shadow: none;
  }

  .login-screen {
    justify-content: center;
    gap: 22px;
    padding: 48px 20px;
    background:
      radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.18), transparent 34rem),
      linear-gradient(135deg, #050410 0%, #111026 58%, #050410 100%);
  }
  .login-hero {
    padding: 0;
  }
  .login-logo { font-size: clamp(36px, 6vw, 52px); }
  .login-tagline {
    max-width: 470px;
    color: #d3cbe7;
  }
  .login-features {
    max-width: 800px;
    margin-bottom: 12px;
  }
  .login-feature {
    padding: 22px 20px;
    text-align: left;
  }
  .login-feature-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    margin-bottom: 14px;
    background: rgba(139, 92, 246, 0.12);
    box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.08);
  }
  .login-cta { padding: 0; }
  .login-cta-label {
    color: var(--muted);
    letter-spacing: 0;
  }
  .google-btn {
    min-height: 48px;
    border-radius: 999px;
    background: rgba(255,255,255,0.055);
    box-shadow: 0 14px 36px rgba(0,0,0,0.22);
  }
  .login-cta-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  .preview-try-btn {
    border-color: rgba(167,139,250,0.5);
    background: rgba(139,92,246,0.14);
  }
  .preview-try-btn:hover {
    background: rgba(139,92,246,0.24);
    border-color: #a78bfa;
  }

  .empty, .friends-empty, .comments-empty {
    position: relative;
    overflow: hidden;
    padding: 52px 22px;
    border-style: solid;
    border-radius: 18px;
    background:
      radial-gradient(circle at 50% 0%, rgba(139,92,246,0.08), transparent 18rem),
      rgba(255,255,255,0.025);
  }
  .empty::before, .friends-empty::before, .comments-empty::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  }
  .empty-icon, .friends-empty-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: rgba(139, 92, 246, 0.12);
    box-shadow: inset 0 0 0 1px rgba(196,181,253,0.1);
    font-size: 26px;
  }
  #empty-text,
  .friends-empty p:first-of-type,
  .comments-empty {
    color: #d8d0e9;
    font-size: 15px;
    font-weight: 700;
  }
  .friends-empty p {
    color: #d8d0e9 !important;
  }
  .empty-sub, .friends-empty-sub {
    max-width: 360px;
    margin: 7px auto 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
  }
  .empty-cta {
    margin-top: 18px;
    min-height: 38px;
    padding-inline: 18px;
  }

  .modal-overlay {
    padding: 20px;
    background: rgba(3, 2, 10, 0.72);
    backdrop-filter: blur(14px);
  }
  .modal {
    width: min(92vw, 470px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 0;
    border-radius: 20px;
  }
  .modal > h3 {
    margin: 0;
    padding: 22px 24px 12px;
    border-bottom: 1px solid rgba(196,181,253,0.08);
    font-size: 19px;
    letter-spacing: 0;
  }
  .modal > h3 + *,
  #api-key-section,
  #tmdb-search-area,
  #tmdb-selected-area,
  .profile-modal,
  .theme-toggle-row {
    margin-left: 24px;
    margin-right: 24px;
  }
  #api-key-section {
    margin-top: 18px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.028);
    border: 1px solid rgba(196,181,253,0.08);
  }
  .cover-search-row {
    margin-top: 14px !important;
  }
  .modal-actions {
    margin: 20px 0 0;
    padding: 16px 24px 22px;
    border-top: 1px solid rgba(196,181,253,0.08);
    background: rgba(255,255,255,0.018);
  }
  .modal-actions .btn-primary,
  .modal-actions .btn-secondary {
    min-height: 38px;
    padding-inline: 18px;
  }
  .profile-modal {
    margin-top: 18px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255,255,255,0.028);
    border: 1px solid rgba(196,181,253,0.08);
  }
  .profile-avatar-lg {
    width: 88px;
    height: 88px;
    border: 1px solid rgba(196,181,253,0.18);
    box-shadow: 0 14px 32px rgba(0,0,0,0.28);
  }
  .theme-toggle-row {
    padding: 16px 0;
    margin-top: 16px;
  }
  .theme-toggle-label {
    font-weight: 700;
    color: #d8d0e9;
  }
  .theme-switch {
    padding: 4px 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.035);
  }

  .tmdb-results {
    gap: 8px;
    padding: 12px 0 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(196,181,253,0.18) transparent;
  }
  .tmdb-result {
    padding: 10px;
    border-width: 1px;
    border-radius: 14px;
    background: rgba(255,255,255,0.032);
  }
  .tmdb-result img {
    width: 50px;
    height: 75px;
    border-radius: 10px;
  }
  .tmdb-result-title { font-size: 14px; }
  .tmdb-result-meta {
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.4;
  }
  .tmdb-selected {
    padding: 14px;
    border-width: 1px;
    border-radius: 16px;
    background: rgba(103,232,249,0.07);
    border-color: rgba(103,232,249,0.18);
  }
  .tmdb-selected img { border-radius: 14px; }
  .tmdb-selected-title { font-size: 15px; }
  .tmdb-clear {
    text-decoration: none;
    color: var(--muted);
  }
  .cover-search-msg,
  .app-loading,
  .app-error {
    padding: 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.028);
    color: var(--muted);
    border: 1px solid rgba(196,181,253,0.08);
    font-size: 13px;
  }
  .app-error {
    color: #fca5a5;
    background: rgba(248,113,113,0.08);
    border-color: rgba(248,113,113,0.18);
  }
  .skeleton-card {
    min-height: 78px;
    border-radius: 16px;
    background:
      linear-gradient(90deg, rgba(255,255,255,0.025), rgba(255,255,255,0.06), rgba(255,255,255,0.025));
    background-size: 220% 100%;
    animation: skeleton-shimmer 1.35s ease-in-out infinite;
    border: 1px solid rgba(196,181,253,0.08);
  }
  @keyframes skeleton-shimmer {
    0% { background-position: 120% 0; }
    100% { background-position: -120% 0; }
  }
  .app-toast {
    position: fixed;
    left: 50%;
    bottom: max(22px, env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%) translateY(14px);
    z-index: 2000;
    padding: 14px 20px;
    border-radius: 999px;
    background: rgba(16, 12, 31, 0.92);
    border: 1px solid rgba(196,181,253,0.14);
    color: #efe9fb;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 18px 46px rgba(0,0,0,0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    backdrop-filter: blur(14px);
  }
  .app-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  .app-toast.letterboxd-error {
    background: #dc2626;
    border-color: rgba(255,255,255,0.2);
    color: #ffffff;
    font-weight: 800;
  }
  /* v437: rating-edit toast — card-style snackbar (not pill) so it properly
     contains the inline "Post update" text-action. Max-width ensures it never
     overflows on narrow mobile screens. */
  .app-toast.shelfd-rating-edit-toast {
    /* Override pill geometry and layout */
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    padding: 12px 6px 12px 16px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 245, 0.14) !important;
    background: rgba(14, 10, 28, 0.94) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.44), 0 1px 0 rgba(255,255,245,0.06) inset !important;
    pointer-events: auto !important;
    overflow: hidden !important;
    /* Position: bottom of page above safe area, a little above the nav */
    bottom: max(78px, calc(env(safe-area-inset-bottom, 0px) + 64px)) !important;
    max-width: min(calc(100vw - 28px), 380px) !important;
    width: max-content !important;
    white-space: nowrap !important;
    /* Start slightly below final resting position */
    transform: translateX(-50%) translateY(16px) !important;
    opacity: 0 !important;
    transition: opacity 220ms ease, transform 260ms cubic-bezier(.22,1,.36,1) !important;
  }
  .app-toast.shelfd-rating-edit-toast.show {
    transform: translateX(-50%) translateY(0) !important;
    opacity: 1 !important;
  }
  .shelfd-rating-edit-toast-msg {
    flex: 1 1 auto !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: rgba(232, 222, 255, 0.92) !important;
    white-space: nowrap !important;
    letter-spacing: 0.01em !important;
  }
  /* Subtle vertical divider */
  .shelfd-rating-edit-toast-post-btn::before {
    content: '';
    display: inline-block;
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 245, 0.16);
    margin-right: 10px;
    vertical-align: middle;
    flex-shrink: 0;
  }
  .shelfd-rating-edit-toast-post-btn {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 10px 0 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #c4b5fd !important;
    font-family: 'DM Sans', system-ui, sans-serif !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    letter-spacing: 0.01em !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: color 120ms ease !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  .shelfd-rating-edit-toast-post-btn:hover,
  .shelfd-rating-edit-toast-post-btn:focus-visible {
    color: #e0d4ff !important;
  }
  .shelfd-rating-edit-toast-post-btn:active {
    color: #fff !important;
  }

  .app-toast.dm-e2ee-key-warning {
    top: 50%;
    bottom: auto;
    width: min(90vw, 430px);
    border-radius: 16px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #991b1b, #dc2626);
    border-color: rgba(255,255,255,0.28);
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
    text-align: center;
    box-shadow: 0 22px 60px rgba(127, 29, 29, 0.5), 0 0 0 1px rgba(255,255,255,0.08) inset;
    text-shadow: 0 1px 2px rgba(69, 10, 10, 0.72);
  }

  .comments-page .main-content {
    max-width: 860px;
  }
  .comments-page-back {
    margin-bottom: 14px;
    border-radius: 999px;
  }
  .comments-page-header {
    align-items: center;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    margin-bottom: 18px;
  }
  .comments-page-cover {
    width: 88px;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.28);
  }
  .comments-page-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 22px;
    line-height: 1.2;
  }
  .comments-page-meta {
    margin-top: 6px;
    color: var(--muted);
    text-transform: none;
    letter-spacing: 0;
  }
  .comment-input-area {
    padding: 14px;
    border-radius: 18px;
    margin-bottom: 18px;
  }
  .comment-input-avatar, .comment-avatar {
    width: 38px;
    height: 38px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  }
  .comment-textarea {
    min-height: 72px;
    border-radius: 14px;
    line-height: 1.55;
  }
  .comment-post-btn {
    border-radius: 999px;
    min-height: 36px;
  }
  .comments-count {
    margin: 2px 0 10px;
    color: #d8d0e9;
    font-size: 13px;
  }
  .comments-list {
    gap: 8px;
  }
  .comment-item {
    padding: 14px;
    border: 1px solid rgba(196,181,253,0.08);
    border-radius: 16px;
    background: rgba(255,255,255,0.024);
  }
  .comment-header { margin-bottom: 6px; }
  .comment-time { color: var(--muted-2); }
  .comment-delete {
    color: var(--muted);
    border-radius: 999px;
    padding: 4px 8px;
  }
  .comment-delete:hover {
    background: rgba(248,113,113,0.08);
  }

  .community-grid {
    gap: 14px;
  }
  .friends-tabs {
    margin-bottom: 20px;
  }
  #requests-view h3 {
    color: #cfc6e2 !important;
    font-size: 12px !important;
    letter-spacing: 0.04em !important;
    text-transform: none !important;
  }
  .user-card {
    min-height: 78px;
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.012)),
      rgba(8,6,18,0.76);
  }
  .user-card.locked {
    opacity: 0.92;
    background: rgba(255,255,255,0.024);
  }
  .user-card-avatar {
    width: 48px;
    height: 48px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.26);
  }
  .user-card-name {
    font-size: 15px;
    line-height: 1.25;
  }
  .user-card-stats {
    color: var(--muted);
    line-height: 1.35;
  }
  .friend-actions-group {
    align-items: center;
    /* v810: do NOT let the 3-button creator card wrap action buttons into
       a stacked column on narrow widths — that's what was making the name
       overlap the buttons and the card columns squeeze vertically. */
    flex-wrap: nowrap;
    flex-shrink: 0;
  }
  .friend-action-btn {
    min-height: 32px;
    border-radius: 999px;
    padding: 6px 13px;
    white-space: nowrap;
  }
  .friend-add-btn {
    background: rgba(139,92,246,0.1);
    border-color: rgba(167,139,250,0.28);
  }
  .friend-add-btn:hover { background: rgba(139,92,246,0.16); }
  .friend-remove-btn {
    border-color: rgba(196,181,253,0.1);
    background: rgba(255,255,255,0.024);
  }
  .friend-accept-btn {
    border-color: rgba(16,185,129,0.32);
    box-shadow: 0 8px 22px rgba(16,185,129,0.16);
  }
  .requests-badge, .nav-badge {
    background: rgba(248,113,113,0.9);
    box-shadow: 0 6px 16px rgba(248,113,113,0.18);
  }
  .viewing-banner {
    padding: 13px 15px;
    box-shadow: var(--shadow-soft);
  }
  .viewing-banner-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #c4b5fd;
    font-weight: 700;
  }
  .viewing-banner-text img {
    margin-right: 0;
  }
  #private-modal .modal {
    max-width: 410px !important;
    padding: 28px 24px 22px;
  }
  #private-modal .modal h3 {
    padding: 0;
    border: none;
  }
  #private-modal .modal > div:first-child {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px !important;
    border-radius: 18px;
    background: rgba(139,92,246,0.12);
    box-shadow: inset 0 0 0 1px rgba(196,181,253,0.1);
  }

  body.light-mode .login-screen {
    background:
      radial-gradient(circle at 50% 0%, rgba(124,58,237,0.1), transparent 34rem),
      #f6f2fb;
  }
  body.light-mode .empty,
  body.light-mode .friends-empty,
  body.light-mode .comments-empty,
  body.light-mode .comment-item,
  body.light-mode .cover-search-msg,
  body.light-mode .app-loading {
    background: rgba(255,255,255,0.7);
    border-color: rgba(88,60,130,0.12);
    color: #5a4780;
  }
  body.light-mode #empty-text,
  body.light-mode .friends-empty p:first-of-type,
  body.light-mode .comments-empty,
  body.light-mode .comments-count,
  body.light-mode .theme-toggle-label,
  body.light-mode #requests-view h3 {
    color: #21143c !important;
  }
  body.light-mode .modal-actions {
    background: rgba(124,58,237,0.025);
  }
  body.light-mode #api-key-section,
  body.light-mode .profile-modal,
  body.light-mode .comment-item,
  body.light-mode .tmdb-result {
    background: rgba(124,58,237,0.035);
    border-color: rgba(88,60,130,0.12);
  }
  body.light-mode .comments-page-header,
  body.light-mode .comment-input-area,
  body.light-mode .user-card,
  body.light-mode .login-feature {
    background: rgba(255,255,255,0.78);
  }
  body.light-mode .comments-page-meta,
  body.light-mode .comment-time,
  body.light-mode .user-card-stats,
  body.light-mode .empty-sub,
  body.light-mode .friends-empty-sub {
    color: #6a5d82;
  }
  body.light-mode .theme-switch {
    background: rgba(124,58,237,0.07);
  }
  body.light-mode .app-toast {
    background: rgba(255,255,255,0.92);
    border-color: rgba(88,60,130,0.14);
    color: #21143c;
  }
  body.light-mode .app-toast.letterboxd-error {
    background: #dc2626;
    border-color: rgba(255,255,255,0.2);
    color: #ffffff;
  }
  body.light-mode .app-toast.dm-e2ee-key-warning {
    background: linear-gradient(135deg, #991b1b, #dc2626);
    border-color: rgba(255,255,255,0.28);
    color: #ffffff;
  }

  @media (max-width: 700px) {
    .login-screen {
      justify-content: flex-start;
      padding: 48px 16px 34px;
    }
    .login-features {
      grid-template-columns: 1fr;
      width: min(100%, 380px);
      padding: 0;
    }
    .login-feature {
      padding: 18px;
    }
    .login-cta-buttons {
      width: min(100%, 340px);
      flex-direction: column;
    }
    .google-btn {
      width: 100%;
      justify-content: center;
    }
    .modal-overlay {
      align-items: flex-end;
      padding: 10px;
    }
    .modal {
      width: 100%;
      max-height: calc(100vh - 20px);
      border-radius: 20px;
    }
    .modal > h3 {
      padding: 20px 18px 12px;
    }
    .modal > h3 + *,
    #api-key-section,
    #tmdb-search-area,
    #tmdb-selected-area,
    .profile-modal,
    .theme-toggle-row {
      margin-left: 18px;
      margin-right: 18px;
    }
    .modal-actions {
      padding: 14px 18px 18px;
    }
    .modal-actions .btn-primary,
    .modal-actions .btn-secondary {
      flex: 1;
    }
    .cover-search-row,
    .api-key-row {
      flex-direction: column;
    }
    .cover-search-row .btn-primary,
    .api-key-row .btn-primary {
      width: 100%;
    }
    .comments-page .main-content {
      padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    }
    .comments-page-back {
      width: 100%;
      justify-content: center;
    }
    .comments-page-header {
      flex-direction: column;
      align-items: flex-start;
      justify-content: flex-start;
      padding: 14px;
    }
    .comments-page-cover { width: 66px; }
    .comments-page-title { font-size: 18px; }
    .comment-input-area {
      flex-direction: column;
      align-items: stretch;
      gap: 10px;
      padding: 12px;
    }
    .comment-input-right {
      width: 100%;
    }
    .comment-input-footer {
      flex-direction: column;
      align-items: stretch;
      gap: 10px;
    }
    .comment-input-left {
      width: 100%;
    }
    .comments-scope-tabs {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      width: 100%;
    }
    .comments-scope-tab {
      display: inline-flex;
      align-items: center;
      width: 100%;
      justify-content: center;
      min-height: 40px;
    }
    .comment-post-btn {
      display: inline-flex;
      align-items: center;
      width: 100%;
      align-self: stretch;
      justify-content: center;
    }
    .comment-input-avatar, .comment-avatar {
      width: 34px;
      height: 34px;
    }
    .comment-item {
      display: grid;
      grid-template-columns: 34px minmax(0, 1fr);
      align-items: start;
      padding: 12px;
    }
    .comment-header {
      flex-wrap: wrap;
      align-items: center;
      row-gap: 4px;
    }
    .comment-delete {
      margin-left: 0;
      padding-left: 0;
    }
    .friends-tabs {
      overflow-x: auto;
      scrollbar-width: none;
    }
    .friends-tabs::-webkit-scrollbar { display: none; }
    .friends-tab-btn {
      white-space: nowrap;
      flex: 1 0 auto;
    }
    .community-grid {
      grid-template-columns: 1fr;
      gap: 12px;
    }
    .user-card {
      align-items: flex-start;
      gap: 12px;
      padding: 14px;
    }
    .friend-actions-group {
      justify-content: flex-end;
    }
    .viewing-banner {
      border-radius: 16px;
    }
    .empty, .friends-empty, .comments-empty {
      padding: 42px 16px;
    }
  }

  /* Keep comment count button on one clean line everywhere */
  .comments-btn {
    white-space: nowrap;
    flex-wrap: nowrap;
    justify-content: center;
    text-align: center;
    flex: 0 0 auto;
  }
  .comments-btn-label {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    gap: 0;
    line-height: 1;
  }
  .comment-count {
    display: inline;
  }

  /* TV show footer buttons: Comments + Show Episodes text */
  .show-card .comments-btn,
  .show-card .card-action-row .ep-toggle-bar,
  .show-card .card-action-row .ep-toggle-bar .ep-arrow {
    color: #fff;
  }
  body.light-mode .show-card .comments-btn,
  body.light-mode .show-card .card-action-row .ep-toggle-bar,
  body.light-mode .show-card .card-action-row .ep-toggle-bar .ep-arrow {
    color: #000;
  }


  /* My List toolbar size polish */
  #mylist-toolbar .search-input {
    width: 168px;
    min-height: 32px;
    padding: 5px 12px;
    font-size: 12px;
  }
  #mylist-toolbar #add-btn {
    min-height: 40px;
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 700;
  }

/* =============================================================================
   v735: Filmography page — UNSCOPED rules (apply at every viewport).
   The earlier copies of these rules live inside @media (max-width: 700px)
   which can be flaky on PWA when the overlay-open transition reads viewport
   metrics. Duplicating them outside any media query guarantees the slide-in
   page is fully styled regardless of breakpoint match.
   Animation duration bumped from 0.28s → 0.6s per spec.
   ============================================================================= */
.discover-person-filmography-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0;
  margin: 0 0 6px 0;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.discover-person-filmography-header h3 { margin: 0; flex: 1 1 auto; }
.discover-person-filmography-header svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: rgba(255,255,255,0.55);
  transition: transform 0.18s ease, color 0.18s ease;
}
.discover-person-filmography-header:hover svg,
.discover-person-filmography-header:active svg {
  color: rgba(255,255,255,0.95);
  transform: translateX(2px);
}

body.filmography-page-open { overflow: hidden; }
body.filmography-page-open .mobile-bottom-nav { display: none !important; }
.filmography-page-overlay {
  position: fixed;
  inset: 0;
  z-index: 3300;
  background: #05040d;
  color: #f8f4ff;
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.filmography-page-overlay.open { transform: translateX(0); }
.filmography-page {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}
.filmography-page-header {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(14px, env(safe-area-inset-top, 14px)) 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.filmography-page-back {
  position: absolute;
  left: 16px;
  top: max(14px, env(safe-area-inset-top, 14px));
}
.filmography-page-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #f8f4ff;
  letter-spacing: -0.01em;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filmography-page-chips {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filmography-page-chips::-webkit-scrollbar { display: none; }
.filmography-chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: transparent;
  color: rgba(255,255,255,0.85);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.filmography-chip.active {
  background: #f8f4ff;
  color: #12082e;
  border-color: #f8f4ff;
}
.filmography-page-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 16px max(24px, env(safe-area-inset-bottom, 24px));
  -webkit-overflow-scrolling: touch;
}
.filmography-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.filmography-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  min-width: 0;
}
.filmography-card-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0,0,0,0.32);
  transition: transform 0.18s ease;
}
.filmography-card:active .filmography-card-poster { transform: scale(0.97); }
.filmography-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.filmography-card-title {
  margin-top: 8px;
  color: #fff;
  font-size: 12.5px;
  line-height: 1.25;
  font-weight: 800;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 30px;
}
.filmography-card-rating {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #f5b73b;
  font-size: 11.5px;
  font-weight: 800;
}
.filmography-card-rating span:first-child { color: #f5b73b; }
.filmography-card-meta {
  margin-top: 2px;
  color: #b6acce;
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 600;
  min-height: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filmography-card-character {
  margin-top: 2px;
  color: #8f86aa;
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 600;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 13px;
}
.filmography-load-more {
  display: block;
  margin: 22px auto 4px;
  padding: 11px 28px;
  border-radius: 999px;
  border: 1px solid rgba(196,181,253,0.25);
  background: rgba(255,255,255,0.04);
  color: #f8f4ff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease;
}
.filmography-load-more:hover { background: rgba(255,255,255,0.08); }
.filmography-load-more:active { transform: scale(0.98); }
@media (min-width: 1024px) { .filmography-grid { gap: 20px; } }

/* ==========================================================================
   v810: Friend-search result card — mobile horizontal layout fix.
   The 3-button creator card (Message / Profile / + Add) used to wrap the
   action buttons into stacked rows on narrow widths, which made the card
   grow tall and the buttons visually collide with the name column. We
   now keep the card single-row on every width and shrink the buttons +
   creator-role badge so the (Creator) tag stays readable inline.
   ========================================================================== */
#inline-friend-search-grid .user-card {
  flex-wrap: nowrap;
}
#inline-friend-search-grid .friend-actions-group {
  flex-wrap: nowrap;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  #inline-friend-search-grid .user-card {
    gap: 12px;
    padding: 12px 14px;
    align-items: center;
  }
  #inline-friend-search-grid .user-card-avatar {
    width: 44px;
    height: 44px;
  }
  /* Name column shrinks instead of being shoved by the action buttons. */
  #inline-friend-search-grid .user-card > div:first-child {
    min-width: 0;
  }
  #inline-friend-search-grid .user-card-name,
  #inline-friend-search-grid .user-card-stats {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  /* Creator label sits inline next to the name and never breaks the row.
     Crown icon + gold name + (Creator) badge stay readable but compact. */
  #inline-friend-search-grid .creator-name-wrap {
    flex-wrap: nowrap;
    overflow: hidden;
    max-width: 100%;
    gap: 5px;
  }
  #inline-friend-search-grid .user-card-name .creator-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex-shrink: 1;
  }
  #inline-friend-search-grid .creator-role {
    font-size: 9px;
    padding: 1px 5px;
    flex-shrink: 0;
    letter-spacing: 0.32px;
  }
  /* v811: when the card has 3 action buttons (creator: Message/Profile/+Add,
     or any other 3-button friend state), stack them vertically into a
     narrow column on the right edge. This guarantees the buttons can never
     push into or overlap the avatar/name on phone widths. Single-button
     cards keep the original horizontal layout. */
  #inline-friend-search-grid .friend-actions-group {
    gap: 6px;
    flex-shrink: 0;
  }
  #inline-friend-search-grid .friend-actions-group:has(> :nth-child(3)) {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    min-width: 86px;
    max-width: 100px;
  }
  #inline-friend-search-grid .friend-actions-group:has(> :nth-child(3)) .friend-action-btn {
    width: 100%;
    min-height: 28px;
    padding: 4px 10px;
    font-size: 11px;
    line-height: 1.1;
  }
  /* For 1-button cards (most non-creator users), keep horizontal but tight. */
  #inline-friend-search-grid .friend-actions-group:not(:has(> :nth-child(3))) .friend-action-btn {
    padding: 5px 12px;
    font-size: 11.5px;
    min-height: 30px;
    line-height: 1;
  }
}
