*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; color: inherit; }
.hidden { display: none !important; }

:root {
  --c1: #262626;
  --c2: #7A7A7A;
  --c3: #989898;
  --c4: #BCBCBC;
  --c5: #D3D3D3;
  --c6: #EBEBEB;
  --c7: #F5F5F5;
  --blur: blur(8px);
  --nav-h: 84px;
  --mini-h: 72px;
  --topbar-h: 60px;
  --w: 720px;
}

html, body {
  height: 100vh; height: 100dvh; overflow: hidden;
  background: var(--c7);
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--c1);
}

/* ── TOPBAR ── */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: rgba(245,245,245,0.88);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
#topbar.hidden { display: none; }
.topbar-logo { height: 22px; width: auto; display: block; color: var(--c1); }
.topbar-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--c1); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--c7); font-size: 14px; font-weight: 500; font-family: inherit;
  overflow: hidden; flex-shrink: 0;
  transition: opacity .13s;
}
.topbar-avatar:hover { opacity: 0.75; }
.topbar-avatar.hidden { display: none; }

/* ── SCROLL CONTAINER ── */
#main { height: 100vh; overflow-y: auto; overflow-x: hidden; }
#main::-webkit-scrollbar { width: 4px; }
#main::-webkit-scrollbar-track { background: transparent; }
#main::-webkit-scrollbar-thumb { background: var(--c5); border-radius: 4px; }

/* ── PAGE VISIBILITY ── */
.page { display: none; }
.page.active { display: block; }

/* ── CENTERED CONTENT ── */
.inner { max-width: var(--w); margin: 0 auto; padding: 0; }

/* ── PAGE HEADER ── */
.page-header { padding: 36px 0 20px; max-width: var(--w); margin: 0 auto; }
.page-title { font-size: 24px; font-weight: 500; letter-spacing: -0.5px; }

/* ── EPISODE LIST ── */
.ep-list {
  max-width: var(--w); margin: 0 auto;
  display: flex; flex-direction: column; gap: 8px;
  padding-top: calc(var(--topbar-h) + 16px);
  padding-bottom: calc(var(--mini-h) + var(--nav-h) + 24px);
}

/* ── EPISODE CARD ── */
.ep-card {
  background: var(--c6); border-radius: 16px;
  padding: 20px 24px;
  display: flex; align-items: flex-start; gap: 16px;
  cursor: pointer; transition: background .13s;
  -webkit-tap-highlight-color: transparent;
}

/* Artwork */
.ep-art {
  width: 92px; height: 92px; border-radius: 8px; flex-shrink: 0;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}

/* Text column */
.ep-body { flex: 1; min-width: 0; }

.ep-title {
  font-size: 18px; font-weight: 600;
  letter-spacing: -0.2px; line-height: 1.3; margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.ep-desc {
  font-size: 16px; color: var(--c2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px;
}

.ep-bar {
  height: 2px; background: var(--c5); border-radius: 2px;
  overflow: hidden; margin-bottom: 8px;
}
.ep-bar-fill { height: 100%; background: var(--c3); border-radius: 2px; }

.ep-meta { display: flex; align-items: center; justify-content: space-between; }
.ep-date { font-size: 12px; color: var(--c2); }

.ep-btns { display: flex; align-items: center; gap: 12px; }
.ep-btn {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; color: var(--c4);
  padding: 0; transition: color .13s;
}
.ep-btn:hover { color: var(--c2); }

/* Download circle indicator */
.dl-ind { display: flex; align-items: center; }
.dl-ring-svg { transform: rotate(-90deg); display: block; }
.dl-prog-ring { transition: stroke-dashoffset 0.25s linear; }

/* ── ARTWORK COLOURS ── */
.art-lbl {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--c7); font-weight: 500; font-family: inherit;
}

/* ── SEARCH PAGE ── */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--c6); border-radius: 12px;
  padding: 12px 16px; margin-bottom: 16px;
}
.search-bar img { width: 16px; height: 16px; opacity: 0.35; flex-shrink: 0; }
.search-bar input {
  flex: 1; border: none; background: none;
  font-family: inherit; font-size: 16px; color: var(--c1); outline: none;
}
.search-bar input::placeholder { color: var(--c4); }
.search-bar input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7.5' fill='%23262626'/%3E%3Cpath d='M5.5 5.5l5 5M10.5 5.5l-5 5' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 16px;
}
#search-list { display: flex; flex-direction: column; gap: 8px; }

/* ── SHOWS GRID ── */
.shows-wrap { max-width: var(--w); margin: 0 auto; padding-top: calc(var(--topbar-h) + 16px); padding-bottom: calc(var(--mini-h) + var(--nav-h) + 24px); }
.shows-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.show-card {
  background: var(--c6); border-radius: 16px;
  padding: 16px; cursor: pointer; transition: background .13s;
}
.show-card:hover { background: var(--c5); }
.show-art {
  width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
}
.show-name   { font-size: 12px; font-weight: 500; line-height: 1.3; }
.show-author { font-size: 12px; color: var(--c2); margin-top: 4px; }

/* ── SETTINGS ── */
.settings-wrap { max-width: 520px; margin: 0 auto; padding-top: calc(var(--topbar-h) + 16px); padding-bottom: calc(var(--mini-h) + var(--nav-h) + 24px); }
.s-lbl {
  font-size: 12px; font-weight: 500; color: var(--c3);
  text-transform: uppercase; letter-spacing: 0.8px; padding: 16px 0 8px;
}
.s-lbl:first-child { padding-top: 0; }
.s-group { background: var(--c6); border-radius: 12px; overflow: hidden; }
.s-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--c5);
}
.s-row:last-child { border-bottom: none; }
.s-lbl-text { font-size: 16px; }
.s-val { font-size: 16px; color: var(--c2); }
.toggle {
  width: 40px; height: 24px; background: var(--c4); border-radius: 12px;
  position: relative; cursor: pointer; flex-shrink: 0; transition: background .18s;
}
.toggle.on { background: var(--c1); }
.toggle::after {
  content: ''; position: absolute;
  width: 16px; height: 16px; background: var(--c7);
  border-radius: 50%; top: 4px; left: 4px;
  transition: transform .18s; box-shadow: 0 1px 4px rgba(0,0,0,0.14);
}
.toggle.on::after { transform: translateX(16px); }

.empty { padding: 60px 0; text-align: center; color: var(--c3); font-size: 16px; }

/* ── BOTTOM DOCK (mini + nav unified glass pill) ── */
#bottom-dock {
  position: fixed;
  bottom: 1.5rem;
  left: 50%; transform: translateX(-50%);
  z-index: 100;
  background: rgba(245,245,245,0.6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 100px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  overflow: hidden;
  display: flex; flex-direction: column; align-items: stretch;
  min-width: fit-content;
}
#bottom-dock:has(#mini.on) {
  border-radius: 28px;
  width: clamp(260px, 38dvw, calc(100vw - 32px));
}

/* ── MINI PLAYER ── */
#mini {
  display: none;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}
#mini.on { display: block; }

.mini-inner {
  display: flex; align-items: center; gap: 12px;
}

.mini-art {
  width: 48px; height: 48px; border-radius: 8px; flex-shrink: 0;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.mini-info { flex: 1; min-width: 0; cursor: pointer; }
.mini-show { font-size: 12px; color: var(--c2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-ep   { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }

.mini-prog-row { display: flex; align-items: center; gap: 8px; }
.mini-t { font-size: 12px; color: var(--c3); flex-shrink: 0; }
.mini-bar { flex: 1; height: 2px; background: var(--c5); border-radius: 2px; cursor: pointer; }
.mini-bar-fill { height: 100%; background: var(--c1); border-radius: 2px; pointer-events: none; }

.mini-ctrls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.mini-btn {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--c1); padding: 8px; border-radius: 8px; transition: opacity .13s;
}
.mini-btn:hover { opacity: 0.5; }
.mini-btn.pp {
  width: 32px; height: 32px;
  background: var(--c1); border-radius: 50%; color: var(--c7); padding: 0;
}
.mini-btn.pp:hover { opacity: 0.75; }

/* ── NAV BAR ── */
#nav {
  display: flex; align-items: center; justify-content: center;
  padding: 4px; gap: 4px;
}
.nav-tab {
  display: flex; flex-direction: row;
  align-items: center; justify-content: center;
  gap: 8px;
  border: none; background: none; cursor: pointer;
  font-family: inherit; padding: 8px 12px;
  border-radius: 100px;
  transition: background .15s;
  white-space: nowrap; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.nav-tab:hover { background: rgba(19,19,19,0.06); }
.nav-tab img { width: 20px; height: 20px; opacity: 0.4; flex-shrink: 0; }
.nav-tab .lbl {
  display: none;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--c1); font-family: inherit;
}
.nav-tab.active { background: rgba(19,19,19,0.08); }
.nav-tab.active img  { filter: brightness(0); opacity: 1; }
.nav-tab.active .lbl { display: block; }

/* ── FULL PLAYER MODAL ── */
#modal {
  position: fixed; inset: 0; z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
#modal.on { opacity: 1; pointer-events: all; }

.fp {
  position: absolute; inset: 0;
  background: var(--c7);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.32,.72,0,1);
}
#modal.on .fp { transform: translateY(0); }

/* Blurred artwork blobs — injected via JS */
.fp-art-bg {
  position: absolute; inset: 0;
  overflow: hidden; z-index: 0; pointer-events: none;
}

.fp-scroll {
  position: relative; z-index: 1;
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column;
  padding: 20px 32px 48px;
}
.fp-scroll::-webkit-scrollbar { display: none; }

.fp-down {
  background: rgba(19,19,19,0.07); border: none; cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--c2); margin-bottom: 32px; transition: background .12s;
}
.fp-down:hover { background: rgba(19,19,19,0.13); }

.fp-date { font-size: 14px; color: var(--c3); margin-bottom: 6px; }
.fp-show { font-size: 17px; font-weight: 500; margin-bottom: 10px; }
.fp-ep-t {
  font-size: clamp(34px, 4.5vw, 58px);
  font-weight: 500; letter-spacing: -1.5px; line-height: 1.1;
}

.fp-spacer { flex: 1; min-height: 40dvh; }

.fp-dev { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--c3); margin-bottom: 20px; }

.fp-prog { margin-bottom: 20px; }
.fp-prog-bar {
  height: 4px; background: rgba(0,0,0,0.1); border-radius: 4px;
  cursor: pointer; margin-bottom: 10px; position: relative;
  touch-action: none; user-select: none;
  transition: height 0.12s ease;
}
.fp-prog-bar:hover,
.fp-prog-bar.dragging { height: 6px; }
.fp-prog-fill {
  height: 100%; background: var(--c1); border-radius: 4px;
  position: relative; pointer-events: none;
  transition: width 0s;
}
.fp-prog-fill::after {
  content: ''; position: absolute; right: -6px; top: 50%;
  width: 12px; height: 12px; background: var(--c1); border-radius: 50%;
  transform: translateY(-50%) scale(0);
  transition: transform 0.12s ease;
}
.fp-prog-bar:hover .fp-prog-fill::after,
.fp-prog-bar.dragging .fp-prog-fill::after { transform: translateY(-50%) scale(1); }
.fp-ts { display: flex; justify-content: space-between; font-size: 13px; color: var(--c3); }
.fp-ts.scrubbing span { color: var(--c1); font-weight: 500; }

.fp-ctrls {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; margin-bottom: 40px;
}
.c-btn {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--c1); padding: 8px; border-radius: 8px; transition: opacity .13s;
}
.c-btn:hover { opacity: 0.5; }
.c-btn.pp {
  width: 62px; height: 62px;
  background: var(--c1); border-radius: 50%; color: var(--c7); padding: 0;
}
.c-btn.pp:hover { opacity: 0.75; }

.fp-notes { border-top: 1px solid rgba(0,0,0,0.07); padding-top: 20px; }
.fp-notes-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fp-notes-hl { display: flex; align-items: center; gap: 8px; }
.fp-notes-t { font-size: 14px; font-weight: 500; }
.fp-notes-b { font-size: 14px; color: var(--c2); line-height: 1.7; white-space: pre-line; }

/* ── AUTH SCREEN ── */
#auth-screen {
  position: fixed; inset: 0; z-index: 300;
  background: var(--c7);
  display: flex; align-items: center; justify-content: center;
}
#auth-screen.hidden { display: none; }

.auth-box { width: 360px; text-align: center; }
.auth-logo { height: 40px; width: auto; color: var(--c1); display: block; margin: 0 auto 20px; }
.auth-title { font-size: 24px; font-weight: 500; letter-spacing: -0.3px; margin-bottom: 8px; }
.auth-sub   { font-size: 16px; color: var(--c2); margin-bottom: 28px; line-height: 1.5; }

.auth-input {
  width: 100%; padding: 12px 16px;
  background: var(--c6); border: 1px solid var(--c5);
  border-radius: 12px; font-family: inherit; font-size: 16px;
  color: var(--c1); outline: none; margin-bottom: 8px;
  transition: border-color .15s;
}
.auth-input:focus { border-color: var(--c3); }

.auth-btn {
  width: 100%; padding: 12px;
  background: var(--c1); color: var(--c7);
  border: none; border-radius: 12px;
  font-family: inherit; font-size: 16px; font-weight: 500;
  cursor: pointer; transition: opacity .15s;
}
.auth-btn:hover { opacity: 0.8; }
.auth-btn:disabled { opacity: 0.4; cursor: default; }

.auth-msg { font-size: 12px; color: var(--c2); margin-top: 16px; min-height: 16px; }
.auth-msg.err { color: #c0392b; }

.auth-toggle {
  margin-top: 16px;
  font-size: 12px; color: var(--c2);
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.auth-toggle-btn {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 12px;
  color: var(--c1); font-weight: 500; padding: 0;
}
.auth-toggle-btn:hover { text-decoration: underline; }

/* ── TOAST ── */
#toast {
  position: fixed; bottom: calc(var(--nav-h) + var(--mini-h) + 12px);
  left: 50%; transform: translateX(-50%);
  background: var(--c1); color: var(--c7);
  font-size: 12px; font-weight: 500;
  padding: 8px 16px; border-radius: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s; z-index: 500;
  white-space: nowrap;
}
#toast.show { opacity: 1; }

/* ── LOADING SKELETON ── */
.skeleton { background: var(--c6); border-radius: 8px; animation: shimmer 1.2s infinite; }
@keyframes shimmer {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.skel-card {
  background: var(--c6); border-radius: 16px;
  padding: 20px 24px; display: flex; gap: 16px; align-items: flex-start;
}
.skel-art  { width: 92px; height: 92px; border-radius: 8px; flex-shrink: 0; }
.skel-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.skel-line { height: 16px; border-radius: 4px; }

/* ── SIGN OUT BUTTON (settings) ── */
/* ── PROFILE CARD (settings) ── */
.profile-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 8px 0 24px;
}
.profile-card-av-wrap {
  position: relative; cursor: pointer; display: inline-block;
}
.profile-card-av {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--c1); color: var(--c7);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 500; font-family: inherit;
  overflow: hidden; transition: opacity .13s;
}
.profile-card-av-wrap:hover .profile-card-av { opacity: 0.85; }
.profile-card-cam {
  position: absolute; bottom: 2px; right: 2px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--c5); border: 2px solid var(--c7);
  display: flex; align-items: center; justify-content: center;
  color: var(--c2); pointer-events: none;
}
.profile-card-name-row {
  display: flex; align-items: center; gap: 6px;
}
.profile-card-name {
  font-size: 20px; font-weight: 500; letter-spacing: -0.2px;
}
.profile-card-edit-btn {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--c4); display: flex; align-items: center;
  transition: color .13s; border-radius: 6px;
}
.profile-card-edit-btn:hover { color: var(--c2); }
.profile-card-name-edit {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; width: 100%; max-width: 300px;
}
.profile-name-input {
  width: 100%; padding: 10px 14px; text-align: center;
  background: var(--c6); border: 1px solid var(--c5);
  border-radius: 10px; font-family: inherit; font-size: 16px;
  outline: none; transition: border-color .15s;
}
.profile-name-input:focus { border-color: var(--c3); }
.profile-name-actions { display: flex; gap: 8px; }
.profile-name-cancel {
  padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer;
  background: var(--c5); font-family: inherit; font-size: 14px; color: var(--c2);
  transition: background .13s;
}
.profile-name-cancel:hover { background: var(--c4); }
.profile-name-save {
  padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer;
  background: var(--c1); font-family: inherit; font-size: 14px;
  font-weight: 500; transition: opacity .13s;
}
.profile-name-save:hover { opacity: 0.8; }
.profile-name-save:disabled { opacity: 0.4; cursor: default; }
.profile-card-email { font-size: 13px; color: var(--c3); }

/* ── SIGN OUT BUTTON (settings) ── */
.signout-btn {
  width: 100%; padding: 12px 16px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 16px; color: #c0392b;
  text-align: left;
}

/* ── PROFILE SETUP SCREEN ── */
#profile-screen {
  position: fixed; inset: 0; z-index: 290;
  background: var(--c7);
  display: flex; align-items: center; justify-content: center;
}
#profile-screen.hidden { display: none; }

.profile-avatar-preview {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--c1); color: var(--c7);
  font-size: 28px; font-weight: 500; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  transition: background .2s;
}

/* ── SHOW DETAIL OVERLAY ── */
#show-detail {
  position: fixed; inset: 0; z-index: 95;
  background: var(--c7);
  display: flex; flex-direction: column;
}
#show-detail.hidden { display: none; }

.sd-close {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  background: rgba(19,19,19,0.08); border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--c1); transition: background .13s;
}
.sd-close:hover { background: rgba(19,19,19,0.14); }

.sd-follow-btn {
  display: inline-block; margin-top: 12px;
  padding: 8px 16px; border-radius: 20px;
  border: none; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 500;
  background: var(--c1); color: var(--c7);
  transition: opacity .13s;
}
.sd-follow-btn:hover { opacity: 0.75; }
.sd-follow-btn.following { background: var(--c5); color: var(--c2); }
.sd-follow-btn:disabled { opacity: 0.4; cursor: default; }

.sd-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
}
.sd-scroll::-webkit-scrollbar { width: 4px; }
.sd-scroll::-webkit-scrollbar-thumb { background: var(--c5); border-radius: 4px; }

.sd-hero {
  max-width: var(--w); margin: 0 auto;
  display: flex; align-items: flex-start; gap: 16px;
  padding: 56px 20px 16px;
}
.sd-art {
  width: 100px; height: 100px; border-radius: 12px; flex-shrink: 0;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}
.sd-meta { flex: 1; min-width: 0; }
.sd-name   { font-size: 20px; font-weight: 500; letter-spacing: -0.2px; margin-bottom: 4px; }
.sd-author { font-size: 14px; color: var(--c2); margin-bottom: 8px; }
.sd-desc-text {
  font-size: 13px; color: var(--c3); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}

.sd-ep-list { padding-bottom: 24px; }

/* ── MOBILE ─────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {

  /* Content areas: add side padding so cards don't hit screen edges */
  .ep-list       { padding-left: 12px; padding-right: 12px; }
  .shows-wrap    { padding-left: 12px; padding-right: 12px; }
  .settings-wrap { padding-left: 12px; padding-right: 12px; }
  .sd-hero       { padding-left: 16px; padding-right: 16px; }
  .sd-ep-list    { padding-left: 12px; padding-right: 12px; }

  /* Episode cards: tighter on small screens */
  .ep-card  { padding: 14px 16px; gap: 12px; }
  .ep-art   { width: 72px; height: 72px; }
  .ep-title { font-size: 15px; font-weight: 600; }
  .ep-desc  { font-size: 14px; -webkit-line-clamp: 2; line-clamp: 2; }

  /* Shows grid: two columns on mobile */
  .shows-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

  /* Full player: less side padding, smaller title */
  .fp-scroll { padding: 16px 20px 32px; }
  .fp-ep-t   { font-size: clamp(28px, 7vw, 44px); letter-spacing: -1px; }
  .fp-ctrls  { gap: 14px; }
  .c-btn.pp  { width: 54px; height: 54px; }

  /* Mini player dock: wider on mobile since 38dvw is too narrow */
  #bottom-dock:has(#mini.on) { width: calc(100vw - 24px); }

  /* Auth box: full width with padding */
  .auth-box    { width: calc(100vw - 48px); }
  .auth-logo   { height: 32px; }

  /* Topbar: tighter padding */
  #topbar { padding: 0 14px; }

  /* Safe-area insets for iPhones with home indicator */
  #bottom-dock {
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  }
  #main {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/* ── EPISODE CONTEXT MENU ────────────────────────────────────────────────────── */
#ep-menu-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 199;
}
#ep-menu-backdrop.hidden { display: none; }
#ep-menu.hidden           { display: none; }
.ep-menu-popup {
  position: fixed;
  z-index: 200;
  min-width: 200px;
  background: var(--bg, #fff);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 6px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.10);
  display: flex;
  flex-direction: column;
}
.em-item {
  all: unset;
  display: block;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--c1, #262626);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s;
}
.em-item:hover { background: rgba(0,0,0,.05); }
.em-divider {
  height: 1px;
  background: rgba(0,0,0,.08);
  margin: 4px 0;
}

/* ── RECENT PERIOD HEADERS ──────────────────────────────────────────────────── */
.ep-period-hdr {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 20px 0 8px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--c1);
}
.ep-period-cnt {
  font-size: 22px;
  font-weight: 600;
  color: var(--c4);
}
