/* ── Trailer Mixtape — App CSS (Spotify/Apple-inspired) ────────────────────── */
:root {
  --tm-bg:       #0b0b12;
  --tm-bg-2:     #11111b;
  --tm-sidebar:  #08080d;
  --tm-surface:  #16161f;
  --tm-surface-2:#1d1d2a;
  --tm-card:     #16161f;
  --tm-accent:   #4f46e5;  /* Podwires indigo */
  --tm-accent-2: #7c3aed;  /* Podwires purple */
  --tm-text:     #f5f5f7;
  --tm-muted:    #a0a0b0;
  --tm-faint:    #6b6b7b;
  --tm-line:     rgba(255,255,255,0.07);
  --tm-radius:   12px;
  --tm-sidebar-w:240px;
  --tm-bn-h:     58px;
  --tm-np-h:     74px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--tm-bg);
  color: var(--tm-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#tm-root {
  display: grid;
  grid-template-columns: var(--tm-sidebar-w) 1fr;
  grid-template-rows: 1fr auto;
  height: 100dvh;
  overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.tm-sidebar {
  grid-row: 1 / 2;
  background: var(--tm-sidebar);
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  overflow-y: auto;
}

.tm-logo { display: flex; align-items: center; gap: 11px; padding: 0 6px 22px; margin-bottom: 16px; border-bottom: 1px solid var(--tm-line); text-decoration: none; }
.tm-logo-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--tm-accent), var(--tm-accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: #fff; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(79,70,229,0.4);
}
.tm-logo-wordmark { display: flex; flex-direction: column; font-weight: 800; font-size: 17px; line-height: 1; color: var(--tm-text); letter-spacing: -0.3px; }
.tm-logo-dot { color: var(--tm-accent); }
.tm-logo-sub { font-size: 9.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--tm-faint); margin-top: 5px; }
.tm-logo-img { display: block; padding: 0 6px 18px; }
.tm-logo-image { max-width: 100%; max-height: 96px; height: auto; display: block; }

.tm-nav-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.tm-nav-btn {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 11px 12px; background: none; border: none;
  color: var(--tm-muted); font-size: 14px; font-weight: 600;
  border-radius: 8px; cursor: pointer; text-align: left;
  transition: background 0.15s, color 0.15s;
}
.tm-nav-btn:hover { color: var(--tm-text); }
.tm-nav-btn.tm-nav-active { color: var(--tm-text); background: var(--tm-surface-2); }
.tm-nav-btn svg { flex-shrink: 0; opacity: 0.9; }

.tm-sidebar-bottom { margin-top: auto; padding-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.tm-nav-link { color: var(--tm-faint); font-size: 12.5px; text-decoration: none; transition: color 0.15s; }
.tm-nav-link:hover { color: var(--tm-muted); }

/* ── Main ────────────────────────────────────────────────────────────────── */
.tm-main {
  grid-row: 1 / 2;
  position: relative;
  overflow-y: auto;
  min-height: 0;
  min-width: 0;
  background: linear-gradient(180deg, var(--tm-bg-2) 0%, var(--tm-bg) 280px);
  scroll-behavior: smooth;
}

.tm-sidebar { min-height: 0; }
.tm-main::-webkit-scrollbar { width: 10px; }
.tm-main::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 6px; border: 3px solid transparent; background-clip: padding-box; }

/* Filter rail (sticky) */
.tm-filter-rail {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: 16px 28px; overflow-x: auto; scrollbar-width: none;
  background: rgba(11,11,18,0.82); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--tm-line);
}
.tm-filter-rail::-webkit-scrollbar { display: none; }
.tm-genre-chips-inner { display: flex; gap: 8px; }
.tm-chip {
  white-space: nowrap; padding: 7px 16px; border-radius: 20px;
  border: none; background: var(--tm-surface-2); color: var(--tm-text);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; flex-shrink: 0;
}
.tm-chip:hover { background: #26263a; }
.tm-chip.tm-chip-active { background: var(--tm-text); color: #000; }

/* Mixtape banner */
.tm-mixtape-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 20px 28px 0; padding: 14px 18px; border-radius: var(--tm-radius);
  background: linear-gradient(135deg, rgba(79,70,229,0.18), rgba(124,58,237,0.12));
  border: 1px solid rgba(79,70,229,0.25); font-size: 14px;
}
.tm-mixtape-label { color: var(--tm-accent); font-weight: 700; flex-shrink: 0; }
#tm-mixtape-theme { color: var(--tm-text); flex: 1; font-weight: 600; }
#tm-close-mixtape { background: none; border: none; color: var(--tm-muted); cursor: pointer; font-size: 16px; padding: 4px; }

/* Section heading */
.tm-section-head { padding: 26px 28px 6px; }
.tm-section-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.tm-section-head p { color: var(--tm-muted); font-size: 14px; margin-top: 4px; }

/* ── Feed = responsive card grid ─────────────────────────────────────────── */
.tm-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  padding: 12px 20px 40px;
}

/* Trailer card (Spotify tile) */
.tm-card {
  background: var(--tm-card);
  border-radius: var(--tm-radius);
  padding: 14px;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
}
.tm-card:hover { background: var(--tm-surface-2); }
.tm-card:hover .tm-card-play { opacity: 1; transform: translateY(0); }

.tm-card-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  background: linear-gradient(135deg, var(--tm-accent), var(--tm-accent-2));
}
.tm-card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-card-monogram {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 52px; font-weight: 800; color: rgba(255,255,255,0.92);
}

.tm-card-play {
  position: absolute; right: 10px; bottom: 10px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--tm-accent); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,0.5);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, background 0.15s;
}
.tm-card-play:hover { background: #5b52f0; }
.tm-card.tm-playing .tm-card-play { opacity: 1; transform: none; }

.tm-card-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.tm-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px; background: rgba(0,0,0,0.6); color: #fff; backdrop-filter: blur(4px);
}
.tm-badge-feat { background: var(--tm-accent); }
.tm-card-dur { position: absolute; bottom: 10px; left: 10px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,0.7); color: #fff; }

.tm-card-title {
  font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--tm-text);
  margin-bottom: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tm-card-show { font-size: 13px; color: var(--tm-muted); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-card-note { font-size: 12.5px; color: var(--tm-faint); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Loading / empty ─────────────────────────────────────────────────────── */
.tm-feed-loading, .tm-empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 50vh; gap: 14px; color: var(--tm-muted); text-align: center;
}
.tm-spinner { width: 34px; height: 34px; border: 3px solid rgba(255,255,255,0.12); border-top-color: var(--tm-accent); border-radius: 50%; animation: tm-spin 0.8s linear infinite; }
@keyframes tm-spin { to { transform: rotate(360deg); } }

/* ── Detail overlay (Apple-style rich view) ──────────────────────────────── */
.tm-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 24px calc(var(--tm-np-h) + 24px);   /* leave room so the bottom player shows */
  animation: tm-fade 0.18s ease;
}
@keyframes tm-fade { from { opacity: 0; } to { opacity: 1; } }
.tm-overlay-close, .tm-overlay-min {
  position: fixed; top: 20px; z-index: 1002;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: none; color: #fff; font-size: 17px; cursor: pointer;
}
.tm-overlay-close { right: 24px; }
.tm-overlay-min { right: 72px; font-size: 22px; line-height: 1; }
.tm-overlay-close:hover, .tm-overlay-min:hover { background: rgba(255,255,255,0.2); }
.tm-overlay-content {
  width: 100%; max-width: 680px; max-height: 88vh; overflow-y: auto;
  background: var(--tm-surface); border-radius: 2px;   /* rectangular popup */
  box-shadow: 0 24px 70px rgba(0,0,0,0.6); scrollbar-width: thin;
}

.tm-detail-hero {
  position: relative; padding: 32px 28px 24px;
  background: linear-gradient(180deg, rgba(79,70,229,0.28), transparent);
  display: flex; gap: 20px; align-items: flex-end;
}
.tm-detail-art { width: 132px; height: 132px; border-radius: 12px; object-fit: cover; flex-shrink: 0; box-shadow: 0 12px 30px rgba(0,0,0,0.5); background: linear-gradient(135deg, var(--tm-accent), var(--tm-accent-2)); display:flex; align-items:center; justify-content:center; font-size:54px; font-weight:800; color:#fff; }
.tm-detail-meta { padding-bottom: 4px; min-width: 0; }
.tm-detail-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--tm-accent); margin-bottom: 6px; }
.tm-detail-title { font-size: 24px; font-weight: 800; line-height: 1.15; letter-spacing: -0.5px; margin-bottom: 6px; }
.tm-detail-show { font-size: 14px; color: var(--tm-muted); }

.tm-detail-body { padding: 4px 28px 28px; }
.tm-detail-note { background: var(--tm-surface-2); border-left: 3px solid var(--tm-accent); border-radius: 0 8px 8px 0; padding: 14px 16px; margin: 18px 0; }
.tm-detail-note .q { font-size: 14.5px; font-style: italic; line-height: 1.5; }
.tm-detail-note .by { font-size: 12.5px; color: var(--tm-muted); margin-top: 8px; display: flex; align-items: center; gap: 7px; }
.tm-detail-note .by img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }

.tm-detail-desc { font-size: 14px; color: var(--tm-muted); line-height: 1.6; margin: 14px 0; }

/* Side-by-side audio + video so listeners can pick either */
.tm-media-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; margin: 18px 0; }
.tm-media-col { min-width: 0; }
.tm-media-label { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--tm-muted); margin-bottom: 8px; }
.tm-media-split .tm-player { margin: 0; }

/* Mute button */
.tm-mute-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--tm-surface-2); border: 1px solid var(--tm-line); color: var(--tm-text); font-size: 15px; cursor: pointer; flex-shrink: 0; }
.tm-mute-btn:hover { background: #26263a; }

/* Synced single-file player: one <video>, cover overlay toggles audio/video view */
.tm-sync { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; margin: 4px 0 4px; }
.tm-sync video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.tm-sync-cover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--tm-bg-2); }
.tm-sync-cover img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.7); }
.tm-sync-cover::after { content: '🎧'; position: absolute; font-size: 40px; opacity: 0.9; }

/* Video facade (poster + play) */
.tm-video-facade { cursor: pointer; }
.tm-video-facade img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.tm-facade-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 56px; height: 56px; border-radius: 50%; background: var(--tm-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; box-shadow: 0 6px 20px rgba(0,0,0,0.5); transition: transform 0.12s; }
.tm-video-facade:hover .tm-facade-play { transform: translate(-50%,-50%) scale(1.08); }
.tm-av-caret { color: var(--tm-muted); font-size: 11px; }

@media (max-width: 600px) {
  .tm-media-split { grid-template-columns: 1fr; gap: 20px; }
}

/* Player */
.tm-player { margin: 18px 0; }
.tm-waveform { position: relative; border-radius: 8px; overflow: hidden; cursor: pointer; min-height: 56px; background: rgba(255,255,255,0.03); }
.tm-waveform.tm-wave-fallback { background-image: linear-gradient(rgba(255,255,255,0.14), rgba(255,255,255,0.14)); background-size: 100% 3px; background-position: center; background-repeat: no-repeat; }
.tm-player-controls { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.tm-play-btn { width: 52px; height: 52px; border-radius: 50%; background: var(--tm-accent); border: none; color: #fff; font-size: 19px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform 0.1s, background 0.15s; }
.tm-play-btn:hover { background: #5b52f0; }
.tm-play-btn:active { transform: scale(0.93); }
.tm-time { font-size: 13px; color: var(--tm-muted); font-variant-numeric: tabular-nums; }

.tm-video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 12px; overflow: hidden; margin: 18px 0; background: #000; }
.tm-video-wrapper iframe, .tm-video-wrapper video { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* Platform links */
.tm-platforms-label { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--tm-faint); margin: 20px 0 10px; }
.tm-platforms { display: flex; gap: 8px; flex-wrap: wrap; }
.tm-platform-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 16px; border-radius: 24px; border: 1px solid var(--tm-line);
  background: var(--tm-surface-2); color: var(--tm-text);
  font-size: 13px; font-weight: 600; text-decoration: none; transition: all 0.15s;
}
.tm-platform-btn:hover { border-color: rgba(255,255,255,0.25); background: #26263a; }

.tm-detail-actions { display: flex; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--tm-line); }
.tm-action-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 18px; border-radius: 24px; background: var(--tm-surface-2);
  border: none; color: var(--tm-text); font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background 0.15s;
}
.tm-action-btn:hover { background: #26263a; }
.tm-action-btn.primary { background: var(--tm-accent); color: #fff; }
.tm-action-btn.primary:hover { background: #5b52f0; }

/* ── Multi-section homepage (shelves) ────────────────────────────────────── */
.tm-feed.tm-sections { display: block; padding: 8px 28px 48px; }
.tm-shelf { margin-bottom: 38px; }
.tm-shelf-head { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 16px; }
.tm-shelf-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; }
.tm-shelf-head span { font-size: 13px; color: var(--tm-muted); }
.tm-shelf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
/* Discover: 1 row × 6 columns */
.tm-shelf-grid.tm-grid-6 { grid-template-columns: repeat(6, 1fr); }
/* Newly Added Video: 1 row × 3 columns */
.tm-video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* Newly Added Video — wide 16:9 cards in a horizontal scroller */
.tm-video-row, .tm-top-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 360px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.tm-top-row { grid-auto-columns: minmax(280px, 320px); }
.tm-video-row::-webkit-scrollbar, .tm-top-row::-webkit-scrollbar { height: 8px; }
.tm-video-row::-webkit-scrollbar-thumb, .tm-top-row::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

.tm-vcard { scroll-snap-align: start; cursor: pointer; }
.tm-vcard-label { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--tm-faint); margin-bottom: 6px; }
.tm-vcard-title { font-size: 16px; font-weight: 600; line-height: 1.35; margin-bottom: 12px; color: var(--tm-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 44px; }
.tm-vcard-thumb { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--tm-surface-2); box-shadow: 0 8px 24px rgba(0,0,0,0.45); }
.tm-vcard-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-vcard-show { position: absolute; left: 12px; bottom: 12px; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.8); }
.tm-vcard-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.5); color: #fff; font-size: 18px; cursor: pointer; opacity: 0; transition: opacity 0.18s; }
.tm-vcard:hover .tm-vcard-play { opacity: 1; }

/* Top Rated — numbered cards */
.tm-topcard { scroll-snap-align: start; display: flex; align-items: center; gap: 8px; cursor: pointer; background: var(--tm-card); border-radius: 12px; padding: 12px; transition: background 0.2s; }
.tm-topcard:hover { background: var(--tm-surface-2); }
.tm-rank { font-size: 30px; font-weight: 800; color: var(--tm-faint); min-width: 30px; text-align: center; }
.tm-topcover { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: linear-gradient(135deg, var(--tm-accent), var(--tm-accent-2)); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: #fff; }
.tm-topcover img { width: 100%; height: 100%; object-fit: cover; }
.tm-topmeta { min-width: 0; }
.tm-top-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.tm-top-stars { display: flex; align-items: center; gap: 6px; }
.tm-top-stars span { font-size: 12px; color: var(--tm-muted); }

@media (max-width: 1100px) {
  .tm-shelf-grid.tm-grid-6 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .tm-feed.tm-sections { padding: 8px 16px 40px; }
  .tm-shelf-head h2 { font-size: 19px; }
  .tm-shelf-grid.tm-grid-6 { grid-template-columns: repeat(2, 1fr); }
  .tm-video-grid { grid-template-columns: 1fr; }
  .tm-ep-grid { grid-template-columns: 1fr; }
  .tm-top-row { grid-auto-columns: minmax(240px, 85%); }
}

/* Submission call-to-action banner */
.tm-cta { margin: 10px 0 36px; }
.tm-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 28px 32px; border-radius: var(--tm-radius); background: linear-gradient(120deg, rgba(79,70,229,0.28), rgba(124,58,237,0.22)); border: 1px solid rgba(124,58,237,0.35); }
.tm-cta-text { min-width: 260px; flex: 1; }
.tm-cta-text h2 { font-size: 23px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 6px; }
.tm-cta-text p { font-size: 14.5px; color: var(--tm-text); opacity: 0.88; line-height: 1.5; max-width: 560px; }
.tm-cta-text strong { color: #fff; }
.tm-cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.tm-cta-btn { font-size: 15px; padding: 14px 26px; box-shadow: 0 8px 24px rgba(79,70,229,0.45); white-space: nowrap; }
.tm-cta-note { font-size: 12.5px; color: var(--tm-muted); }
@media (max-width: 768px) {
  .tm-cta-inner { padding: 22px; }
  .tm-cta-text h2 { font-size: 20px; }
  .tm-cta-actions { width: 100%; }
  .tm-cta-btn { width: 100%; text-align: center; justify-content: center; }
}

/* Recommended Episodes — episode-row layout */
.tm-ep-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 28px; }
.tm-eprow { display: flex; gap: 14px; cursor: pointer; padding: 10px; border-radius: 10px; transition: background 0.15s; }
.tm-eprow:hover { background: var(--tm-surface-2); }
.tm-eprow-thumb { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: linear-gradient(135deg, var(--tm-accent), var(--tm-accent-2)); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; color: #fff; }
.tm-eprow-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tm-eprow-body { min-width: 0; flex: 1; }
.tm-eprow-meta { font-size: 12px; color: var(--tm-faint); margin-bottom: 3px; }
.tm-eprow-title { font-size: 14px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tm-eprow-desc { font-size: 12.5px; color: var(--tm-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tm-eprow-dur { font-size: 12px; color: var(--tm-faint); margin-top: 5px; }

/* ── Stars & reviews ─────────────────────────────────────────────────────── */
.tm-stars { display: inline-flex; gap: 1px; line-height: 1; }
.tm-star { color: rgba(255,255,255,0.22); font-size: 14px; }
.tm-star.on { color: #f5c518; }
.tm-stars-pick .tm-star { font-size: 30px; cursor: pointer; transition: color 0.1s; }

.tm-card-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; min-height: 16px; }
.tm-card-rating span { font-size: 12px; color: var(--tm-muted); }
.tm-card-rating:empty { display: none; }

.tm-reviews { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--tm-line); }
.tm-rev-head-row h4 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.tm-rev-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.tm-rev-summary .tm-stars { font-size: 18px; }
.tm-rev-avg { font-size: 22px; font-weight: 800; }
.tm-rev-count { font-size: 13px; color: var(--tm-muted); }
.tm-rev-empty { color: var(--tm-muted); font-size: 14px; }

.tm-rev-form { background: var(--tm-surface-2); border-radius: 12px; padding: 16px; margin-bottom: 18px; }
.tm-rev-form-label { font-size: 13px; font-weight: 700; color: var(--tm-muted); margin-bottom: 10px; }
.tm-rev-form textarea { width: 100%; margin-top: 12px; padding: 12px; background: var(--tm-bg-2); border: 1px solid var(--tm-line); border-radius: 10px; color: var(--tm-text); font-size: 14px; font-family: inherit; resize: vertical; }
.tm-rev-form textarea:focus { outline: none; border-color: var(--tm-accent); }
.tm-rev-form-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.tm-rev-form-actions .tm-btn { padding: 9px 18px; }
#tm-rev-msg { font-size: 13px; color: #ff6b81; }

.tm-rev-signin { background: var(--tm-surface-2); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: var(--tm-muted); margin-bottom: 18px; }
.tm-rev-signin a { color: var(--tm-accent); text-decoration: none; font-weight: 600; }

.tm-rev-list { display: flex; flex-direction: column; gap: 16px; }
.tm-rev-item { border-bottom: 1px solid var(--tm-line); padding-bottom: 14px; }
.tm-rev-item:last-child { border-bottom: none; }
.tm-rev-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tm-rev-author { font-size: 13px; font-weight: 700; }
.tm-rev-date { font-size: 12px; color: var(--tm-faint); margin-left: auto; }
.tm-rev-body { font-size: 14px; color: var(--tm-muted); line-height: 1.5; }

/* ── Mixtapes grid ───────────────────────────────────────────────────────── */
.tm-view { padding: 8px 28px 40px; overflow-y: auto; }
.tm-view > .tm-section-head { padding-left: 0; padding-right: 0; }
.tm-mixtapes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin-top: 16px; }
.tm-mixtape-card { background: var(--tm-card); border-radius: var(--tm-radius); overflow: hidden; cursor: pointer; transition: background 0.2s; text-decoration: none; color: var(--tm-text); }
.tm-mixtape-card:hover { background: var(--tm-surface-2); }
.tm-mixtape-cover { width: 100%; aspect-ratio: 1; object-fit: cover; background: linear-gradient(135deg, var(--tm-accent), var(--tm-accent-2)); display: flex; align-items: center; justify-content: center; font-size: 46px; }
.tm-mixtape-info { padding: 14px; }
.tm-mixtape-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.tm-mixtape-meta { font-size: 12.5px; color: var(--tm-muted); }

/* ── Now playing bar (Spotify signature) ─────────────────────────────────── */
.tm-nowplaying {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1050; /* above the detail modal */
  height: var(--tm-np-h);
  background: var(--tm-bg-2);
  border-top: 1px solid var(--tm-line);
  display: flex; align-items: center; gap: 16px; padding: 0 20px;
  transform: translateY(100%); transition: transform 0.25s ease;
}
.tm-nowplaying.tm-np-show { transform: none; }
.tm-np-art { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: linear-gradient(135deg, var(--tm-accent), var(--tm-accent-2)); cursor: pointer; transition: filter 0.15s; }
.tm-np-art:hover { filter: brightness(1.12); }
.tm-np-info { cursor: pointer; }
.tm-np-info .tm-np-title:hover { text-decoration: underline; }
.tm-np-info { min-width: 0; flex: 0 0 200px; }
.tm-np-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-np-show { font-size: 12px; color: var(--tm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-np-center { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 600px; margin: 0 auto; }
.tm-np-play { width: 38px; height: 38px; border-radius: 50%; background: #fff; border: none; color: #000; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tm-np-bar { width: 100%; height: 12px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.tm-np-bar::before { content: ''; position: absolute; width: 100%; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.15); }
.tm-np-bar { position: relative; }
.tm-np-fill { position: relative; height: 4px; width: 0; background: var(--tm-accent); border-radius: 2px; }
.tm-np-fill::after { content: ''; position: absolute; right: -5px; top: 50%; transform: translateY(-50%); width: 10px; height: 10px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity 0.12s; }
.tm-np-bar:hover .tm-np-fill::after { opacity: 1; }
.tm-np-time { font-size: 11px; color: var(--tm-muted); font-variant-numeric: tabular-nums; }
.tm-np-av-wrap { display: inline-flex; flex-shrink: 0; border: 1px solid var(--tm-line); border-radius: 8px; overflow: hidden; }
.tm-np-av-wrap[hidden] { display: none; }
.tm-np-seg { display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; background: var(--tm-surface-2); border: none; color: var(--tm-muted); font-size: 12.5px; font-weight: 700; cursor: pointer; transition: background 0.15s, color 0.15s; white-space: nowrap; }
.tm-np-seg + .tm-np-seg { border-left: 1px solid var(--tm-line); }
.tm-np-seg:hover { color: var(--tm-text); }
.tm-np-seg.tm-np-seg-active { background: var(--tm-accent); color: #fff; }
.tm-np-icon { background: none; border: none; color: var(--tm-muted); font-size: 16px; cursor: pointer; flex-shrink: 0; padding: 4px; }
.tm-np-icon:hover { color: var(--tm-text); }

/* Floating mini video (PiP) */
.tm-pip { position: fixed; right: 20px; bottom: calc(var(--tm-np-h) + 16px); z-index: 340; width: 340px; max-width: calc(100vw - 32px); background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 16px 40px rgba(0,0,0,0.6); border: 1px solid var(--tm-line); }
.tm-pip[hidden] { display: none; }
.tm-pip-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--tm-bg-2); }
.tm-pip-title { flex: 1; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tm-text); }
.tm-pip-btn { background: none; border: none; color: var(--tm-muted); font-size: 15px; cursor: pointer; padding: 2px 4px; line-height: 1; }
.tm-pip-btn:hover { color: var(--tm-text); }
.tm-pip-video { position: relative; padding-bottom: 56.25%; height: 0; }
.tm-pip-video iframe, .tm-pip-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
@media (max-width: 768px) {
  .tm-pip { right: 10px; left: 10px; width: auto; bottom: calc(var(--tm-bn-h) + var(--tm-np-h) + 10px); }
}

/* ── Bottom nav (mobile) ─────────────────────────────────────────────────── */
.tm-bottom-nav {
  display: none; grid-column: 1 / -1; grid-row: 2 / 3;
  height: var(--tm-bn-h); background: var(--tm-sidebar);
  border-top: 1px solid var(--tm-line); padding-bottom: env(safe-area-inset-bottom, 0);
}
.tm-bn-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: none; color: var(--tm-faint); font-size: 10px; font-weight: 600; cursor: pointer; padding: 8px 4px; }
.tm-bn-btn.tm-bn-active { color: var(--tm-text); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.tm-submit-wrapper { max-width: 640px; margin: 0 auto; padding: 28px 28px 60px; }
.tm-submit-wrapper h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.tm-submit-wrapper > p { color: var(--tm-muted); margin-bottom: 28px; font-size: 15px; line-height: 1.5; }
.tm-form-row { margin-bottom: 20px; display: flex; flex-direction: column; gap: 7px; }
.tm-form-row label { font-size: 12px; font-weight: 700; color: var(--tm-muted); text-transform: uppercase; letter-spacing: 0.6px; }
.tm-form input[type="text"], .tm-form input[type="url"], .tm-form input[type="email"], .tm-form input[type="number"], .tm-form textarea, .tm-form select {
  width: 100%; padding: 13px 15px; background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: 10px; color: var(--tm-text); font-size: 14px; font-family: inherit; transition: border-color 0.15s;
}
.tm-form input:focus, .tm-form textarea:focus, .tm-form select:focus { outline: none; border-color: var(--tm-accent); }
.tm-form small { font-size: 12px; color: var(--tm-faint); }
.tm-radio-group { display: flex; gap: 16px; }
.tm-radio-group label { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0; cursor: pointer; color: var(--tm-text); }
.tm-genre-checkboxes { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-genre-checkboxes label { font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; cursor: pointer; display: flex; align-items: center; gap: 6px; background: var(--tm-surface); padding: 7px 12px; border-radius: 18px; border: 1px solid var(--tm-line); color: var(--tm-text); }
/* File upload inputs */
.tm-upload-or { display: flex; align-items: center; gap: 10px; margin: 4px 0; color: var(--tm-faint); font-size: 12px; }
.tm-upload-or::before, .tm-upload-or::after { content: ''; flex: 1; height: 1px; background: var(--tm-line); }
.tm-file-input { font-size: 13px; color: var(--tm-muted); width: 100%; }
.tm-file-input::file-selector-button { background: var(--tm-surface-2); color: var(--tm-text); border: 1px solid var(--tm-line); border-radius: 20px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; margin-right: 12px; transition: background 0.15s; }
.tm-file-input::file-selector-button:hover { background: #26263a; }

/* Import-from-link row */
.tm-import-row { background: var(--tm-surface); border: 1px dashed var(--tm-line); border-radius: var(--tm-radius); padding: 16px; }
.tm-optional { font-weight: 500; color: var(--tm-faint); text-transform: none; letter-spacing: 0; }
.tm-import-inline { display: flex; gap: 8px; }
.tm-import-inline input { flex: 1; }
.tm-import-inline .tm-btn { flex-shrink: 0; padding: 0 20px; }
.tm-import-preview { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 12px; background: var(--tm-surface-2); border-radius: 10px; }
.tm-import-preview img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.tm-import-preview .tm-ok { color: #6fcf97; font-size: 12px; }
#tm_sub_preview_meta { font-size: 13px; color: var(--tm-text); }

.tm-notice { padding: 13px 16px; border-radius: 8px; margin-top: 16px; font-size: 14px; }
.tm-notice-success { background: rgba(40,167,69,0.15); border: 1px solid rgba(40,167,69,0.3); color: #6fcf97; }
.tm-notice-error { background: rgba(233,69,96,0.15); border: 1px solid rgba(233,69,96,0.3); color: #ff6b81; }

.tm-btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: 24px; border: none; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; transition: background 0.15s, opacity 0.15s; }
.tm-btn-primary { background: var(--tm-accent); color: #fff; }
.tm-btn-primary:hover { background: #5b52f0; }
.tm-btn-secondary { background: var(--tm-surface-2); color: var(--tm-text); }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.tm-toast { position: fixed; bottom: calc(var(--tm-np-h) + 20px); left: 50%; transform: translateX(-50%); background: #fff; color: #000; padding: 11px 22px; border-radius: 24px; font-size: 13px; font-weight: 600; z-index: 2000; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }

/* ── Members: register / login / dashboard ───────────────────────────────── */
.tm-content-page { overflow-y: auto; height: 100%; padding: 8px 0 40px; }
.tm-member-box { max-width: 520px; margin: 0 auto; padding: 28px 28px 50px; }
.tm-member-box h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.tm-member-box > p { color: var(--tm-muted); margin-bottom: 22px; font-size: 15px; line-height: 1.5; }
.tm-member-box a { color: var(--tm-accent); text-decoration: none; font-weight: 600; }
.tm-member-alt { margin-top: 20px; font-size: 14px; color: var(--tm-muted); }

.tm-member-box #loginform p { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.tm-member-box #loginform label { font-size: 12px; font-weight: 700; color: var(--tm-muted); text-transform: uppercase; letter-spacing: 0.6px; }
.tm-member-box #loginform input[type=text], .tm-member-box #loginform input[type=password] { width: 100%; padding: 13px 15px; background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: 10px; color: var(--tm-text); font-size: 14px; }
.tm-member-box #wp-submit { background: var(--tm-accent); color: #fff; border: none; padding: 12px 24px; border-radius: 24px; font-size: 14px; font-weight: 700; cursor: pointer; }
.tm-member-box .login-remember { flex-direction: row !important; align-items: center; gap: 8px; }

.tm-link-btn { background: none; border: none; color: var(--tm-accent); font-weight: 600; cursor: pointer; padding: 0; font-size: inherit; text-decoration: underline; }
.tm-notice-warn { background: rgba(252,185,0,0.12); border: 1px solid rgba(252,185,0,0.3); color: #ffd166; }
.tm-badge-ok { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: rgba(40,167,69,0.2); color: #6fcf97; margin-left: 6px; }
.tm-badge-warn { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: rgba(252,185,0,0.18); color: #ffd166; margin-left: 6px; }

.tm-dash { max-width: 760px; margin: 0 auto; padding: 28px 24px 60px; }
.tm-dash-profile { display: flex; align-items: center; gap: 18px; background: var(--tm-surface); border-radius: var(--tm-radius); padding: 20px; margin-bottom: 20px; }
.tm-dash-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--tm-surface-2); flex-shrink: 0; }
.tm-dash-profile h2 { font-size: 20px; font-weight: 800; }
.tm-dash-email { font-size: 13px; color: var(--tm-muted); margin-top: 3px; }
.tm-dash-social { font-size: 13px; display: inline-block; margin-top: 6px; color: var(--tm-accent); text-decoration: none; }
.tm-dash-edit-btn { margin-left: auto; flex-shrink: 0; }
.tm-dash-actions { margin: 18px 0 26px; }
.tm-disabled { opacity: 0.5; pointer-events: none; }
.tm-dash-h3 { font-size: 17px; font-weight: 700; margin: 28px 0 14px; }
.tm-dash-empty { color: var(--tm-muted); font-size: 14px; }
.tm-dash-list { display: flex; flex-direction: column; gap: 10px; }
.tm-dash-item { display: flex; align-items: center; gap: 14px; background: var(--tm-surface); border-radius: 10px; padding: 12px 14px; }
.tm-dash-item-cover { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--tm-surface-2); flex-shrink: 0; }
.tm-dash-item-body { flex: 1; min-width: 0; }
.tm-dash-item-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-dash-item-meta { font-size: 12px; color: var(--tm-muted); margin-top: 3px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #tm-root { grid-template-columns: 1fr; }
  .tm-sidebar { display: none; }
  .tm-bottom-nav { display: flex; }
  .tm-feed { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; padding: 10px 14px 30px; }
  .tm-section-head { padding: 22px 18px 4px; }
  .tm-section-head h1 { font-size: 22px; }
  .tm-filter-rail { padding: 14px 18px; }
  .tm-detail-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .tm-detail-art { width: 120px; height: 120px; }
  .tm-detail-title { font-size: 21px; }
  .tm-overlay { padding: 0; align-items: flex-end; }
  .tm-overlay-content { max-width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .tm-np-info { flex-basis: 130px; }
  .tm-nowplaying { bottom: var(--tm-bn-h); }
  .tm-np-center { display: none; }
}

/* PWA install button */
.tm-install-btn { display: block; width: 100%; text-align: left; background: linear-gradient(135deg, var(--tm-accent), var(--tm-accent-2)); color: #fff; border: none; padding: 11px 14px; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; margin-bottom: 6px; }
.tm-install-btn[hidden] { display: none; }

/* ── Tablet (769–1024) ───────────────────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  :root { --tm-sidebar-w: 200px; }
  .tm-shelf-grid.tm-grid-6 { grid-template-columns: repeat(4, 1fr); }
  .tm-video-grid { grid-template-columns: repeat(2, 1fr); }
  .tm-ep-grid { grid-template-columns: repeat(2, 1fr); }
  .tm-feed.tm-sections { padding: 8px 20px 44px; }
}

/* ── Phone (≤768) extra polish ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .tm-shelf { margin-bottom: 30px; }
  .tm-shelf-grid.tm-grid-6 { gap: 10px; }
  .tm-vcard-title { font-size: 15px; min-height: 0; }
  /* Dashboard + member pages stack */
  .tm-dash, .tm-content-page .tm-member-box { padding-left: 16px; padding-right: 16px; }
  .tm-dash-profile { flex-wrap: wrap; }
  .tm-dash-edit-btn { margin-left: 0; }
  .tm-dash-item { flex-wrap: wrap; }
  .tm-dash-item .tm-btn { margin-left: auto; }
  .tm-detail-actions { flex-wrap: wrap; }
  .tm-av-toggle { width: 100%; }
  /* Keep content clear of the fixed now-playing bar + bottom nav */
  .tm-main { padding-bottom: calc(var(--tm-bn-h) + 8px); }
  .tm-content-page { padding-bottom: calc(var(--tm-bn-h) + 20px); }
  .tm-install-btn { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
