:root {
  --player-bg: #070708;
  --player-panel: rgba(17, 17, 20, 0.88);
  --player-line: rgba(255, 255, 255, 0.1);
  --player-copy: #f6f6f7;
  --player-muted: rgba(246, 246, 247, 0.62);
  --player-accent: var(--sd-accent);
  --player-accent-2: #ff8a65;
}

.premium-player-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(320px, 450px) minmax(240px, 0.95fr);
  justify-content: center;
  align-items: stretch;
  gap: 28px;
  padding: 24px clamp(20px, 4vw, 64px);
  background:
    radial-gradient(circle at 50% 10%, rgb(var(--sd-accent-rgb) / 0.14), transparent 38%),
    linear-gradient(145deg, #09090b, #020203 68%);
  color: var(--player-copy);
  overflow: hidden;
}

.premium-player-rail,
.premium-player-context {
  align-self: center;
}

.premium-player-brand {
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 800;
}

.premium-player-rail-copy {
  margin-top: min(26vh, 230px);
  display: grid;
  gap: 10px;
}

.premium-player-rail-copy span,
.premium-player-context-eyebrow {
  color: var(--player-accent);
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 800;
}

.premium-player-rail-copy strong {
  max-width: 240px;
  font-size: clamp(25px, 3vw, 42px);
  line-height: 0.98;
}

.premium-player-rail-copy p,
.premium-player-context p {
  color: var(--player-muted);
}

.premium-player-shortcuts {
  margin-top: 36px;
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.36);
  font-size: 11px;
}

.premium-player-frame {
  position: relative;
  isolation: isolate;
  height: calc(100dvh - 48px);
  max-height: 900px;
  aspect-ratio: 9 / 16;
  align-self: center;
  justify-self: center;
  border-radius: 26px;
  overflow: hidden;
  background: #000;
  box-shadow:
    0 35px 90px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  touch-action: pan-x;
  user-select: none;
}

.premium-player-video,
.premium-player-vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.premium-player-video {
  object-fit: cover;
  background: #000;
}

.premium-player-vignette {
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.48), transparent 20%, transparent 54%, rgba(0, 0, 0, 0.76)),
    linear-gradient(to right, transparent 58%, rgba(0, 0, 0, 0.22));
}

.premium-player-topbar,
.premium-player-copy,
.premium-player-actions,
.premium-player-controls {
  position: absolute;
  z-index: 4;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.premium-player-topbar {
  top: max(18px, env(safe-area-inset-top));
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.premium-player-title {
  min-width: 0;
  display: grid;
  text-align: center;
}

.premium-player-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.premium-player-title strong {
  margin-top: 2px;
  font-size: 13px;
}

.premium-player-icon-button,
.premium-player-actions button,
.premium-player-center-play {
  border: 0;
  color: #fff;
  background: rgba(12, 12, 14, 0.54);
  backdrop-filter: blur(18px);
  cursor: pointer;
}

.premium-player-icon-button {
  width: 38px;
  height: 38px;
  border-radius: 999px;
}

.premium-player-icon-button:disabled,
.premium-player-actions button:disabled,
.premium-player-controls button:disabled,
.premium-player-context-nav button:disabled,
.premium-player-sheet button:disabled {
  opacity: 0.32;
  cursor: default;
}

.premium-player-center-play {
  position: absolute;
  z-index: 6;
  inset: 50% auto auto 50%;
  width: 66px;
  height: 66px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  font-size: 22px;
  padding-left: 5px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.38);
}

.premium-player-copy {
  left: 18px;
  right: 82px;
  bottom: 92px;
}

.premium-player-kicker {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--player-accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.premium-player-copy h1 {
  margin: 10px 0 5px;
  font-size: clamp(19px, 4vw, 26px);
  line-height: 1.05;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.premium-player-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.premium-player-actions {
  right: 14px;
  bottom: 94px;
  display: grid;
  gap: 12px;
}

.premium-player-actions button {
  width: 50px;
  min-height: 50px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 7px 4px;
  font-size: 18px;
}

.premium-player-actions button span {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.72);
}

.premium-player-controls {
  left: 14px;
  right: 14px;
  bottom: max(14px, env(safe-area-inset-bottom));
}

.premium-player-controls input[type="range"] {
  --progress: 0%;
  width: 100%;
  height: 3px;
  appearance: none;
  border-radius: 999px;
  outline: none;
  background:
    linear-gradient(
      to right,
      #fff 0 var(--progress),
      rgba(255, 255, 255, 0.24) var(--progress) 100%
    );
}

.premium-player-controls input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #fff;
}

.premium-player-controls > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.66);
}

.premium-player-controls button {
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.premium-player-frame:not(.is-controls-visible) .premium-player-topbar,
.premium-player-frame:not(.is-controls-visible) .premium-player-controls {
  opacity: 0;
  pointer-events: none;
}

.premium-player-context {
  max-width: 330px;
}

.premium-player-context h2 {
  margin: 10px 0 6px;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 0.98;
}

.premium-player-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.premium-player-context-grid > div,
.premium-player-context-nav button {
  border: 1px solid var(--player-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.premium-player-context-grid > div {
  padding: 14px;
  display: grid;
  gap: 4px;
}

.premium-player-context-grid span,
.premium-player-context-nav span {
  color: var(--player-muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.premium-player-context-grid strong {
  font-size: 13px;
}

.premium-player-context-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.premium-player-context-nav button {
  padding: 15px;
  color: #fff;
  display: grid;
  gap: 5px;
  text-align: left;
  cursor: pointer;
}

.premium-player-spinner {
  position: absolute;
  z-index: 7;
  inset: 50% auto auto 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 3px solid rgba(255, 255, 255, 0.24);
  border-top-color: #fff;
  border-radius: 999px;
  animation: premium-player-spin 0.8s linear infinite;
}

@keyframes premium-player-spin {
  to {
    transform: rotate(360deg);
  }
}

.premium-player-error {
  position: absolute;
  z-index: 8;
  left: 18px;
  right: 18px;
  top: 45%;
  transform: translateY(-50%);
  padding: 16px;
  border: 1px solid rgba(255, 82, 110, 0.35);
  border-radius: 16px;
  background: rgba(20, 8, 12, 0.86);
  backdrop-filter: blur(16px);
  display: grid;
  gap: 6px;
  text-align: center;
}

.premium-player-error span {
  color: var(--player-muted);
  font-size: 12px;
}

.premium-player-seek-flash {
  position: absolute;
  z-index: 7;
  top: 46%;
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(14px);
  font-size: 12px;
  font-weight: 800;
}

.premium-player-seek-flash.is-backward {
  left: 14%;
}

.premium-player-seek-flash.is-forward {
  right: 14%;
}

.premium-player-sheet-backdrop {
  position: absolute;
  z-index: 12;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  display: flex;
  align-items: flex-end;
}

.premium-player-sheet {
  width: 100%;
  padding: 10px 16px max(18px, env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: rgba(20, 20, 23, 0.97);
  backdrop-filter: blur(24px);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.35);
}

.premium-player-sheet-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.premium-player-sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.premium-player-sheet-heading > div {
  display: grid;
  gap: 3px;
}

.premium-player-sheet-heading span,
.premium-player-sheet-current span {
  color: var(--player-accent);
  font-size: 9px;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.premium-player-sheet-heading button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 22px;
}

.premium-player-sheet > button,
.premium-player-sheet-current {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid var(--player-line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
}

.premium-player-sheet > button {
  cursor: pointer;
}

.premium-player-sheet > button span {
  color: var(--player-muted);
}

.premium-player-sheet-current {
  border-color: rgb(var(--sd-accent-rgb) / 0.28);
  background: rgb(var(--sd-accent-rgb) / 0.08);
}

@media (max-width: 900px) {
  .premium-player-shell {
    display: block;
    padding: 0;
    min-height: 100dvh;
    background: #000;
  }

  .premium-player-rail,
  .premium-player-context {
    display: none;
  }

  .premium-player-frame {
    width: 100%;
    height: 100dvh;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .premium-player-topbar,
  .premium-player-copy,
  .premium-player-actions,
  .premium-player-controls {
    transition: none;
  }

  .premium-player-spinner {
    animation-duration: 1.6s;
  }
}

.stage006-demo-root {
  margin: 0;
  min-height: 100dvh;
  background: #000;
}

.stage006-demo-state {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 30%, rgb(var(--sd-accent-rgb) / 0.18), transparent 35%),
    #070708;
  color: #f6f6f7;
}

.stage006-demo-state > div {
  width: min(100%, 420px);
  display: grid;
  gap: 12px;
  text-align: center;
}

.stage006-demo-state span {
  color: var(--sd-accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.stage006-demo-state strong {
  font-size: 22px;
}

.stage006-demo-state button {
  justify-self: center;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  background: var(--sd-accent);
  font-weight: 800;
  cursor: pointer;
}

.stage006-demo-state small {
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
}

/* UX002 Reels mode: app sidebar + vertical player + drama context form the desktop three-pane experience. */
.premium-player-shell.is-reels {
  grid-template-columns: minmax(340px, 480px) minmax(250px, 360px);
  gap: clamp(24px, 4vw, 56px);
  padding-inline: clamp(24px, 5vw, 72px);
}

.premium-player-shell.is-reels .premium-player-rail {
  display: none;
}

.premium-player-context-synopsis {
  margin-top: 20px;
  color: rgba(246, 246, 247, 0.72) !important;
  font-size: 12px;
  line-height: 1.65;
}

.premium-player-context-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.premium-player-context-actions a,
.premium-player-context-actions button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--player-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.premium-player-context-actions a:hover,
.premium-player-context-actions button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.premium-player-sheet-ranges {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: none;
}

.premium-player-sheet-ranges::-webkit-scrollbar {
  display: none;
}

.premium-player-sheet-ranges button {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid var(--player-line);
  border-radius: 999px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--player-muted);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.premium-player-sheet-ranges button.is-active {
  border-color: rgb(var(--sd-accent-rgb) / 0.42);
  background: rgb(var(--sd-accent-rgb) / 0.14);
  color: #fff;
}

.premium-player-episode-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  max-height: 42dvh;
  overflow-y: auto;
  padding: 2px 1px 5px;
}

.premium-player-episode-grid button {
  aspect-ratio: 1;
  border: 1px solid var(--player-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.premium-player-episode-grid button.is-current {
  border-color: transparent;
  background: var(--player-accent);
  color: #fff;
}

@media (max-width: 1100px) and (min-width: 901px) {
  .premium-player-shell.is-reels {
    grid-template-columns: minmax(300px, 390px) minmax(210px, 270px);
    gap: 18px;
    padding-inline: 16px;
  }
}

@media (max-width: 900px) {
  .premium-player-shell.is-reels {
    display: block;
    padding: 0;
  }

  .premium-player-shell.is-reels .premium-player-copy {
    bottom: calc(146px + env(safe-area-inset-bottom));
  }

  .premium-player-shell.is-reels .premium-player-actions {
    bottom: calc(146px + env(safe-area-inset-bottom));
  }

  .premium-player-shell.is-reels .premium-player-controls {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .premium-player-shell.is-reels .premium-player-topbar {
    top: max(14px, env(safe-area-inset-top));
  }

  .premium-player-episode-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* UX005 player recovery, long-title, and touch polish */
.premium-player-error button {
  justify-self: center;
  min-height: 40px;
  margin-top: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  padding: 0 14px;
  font-size: 10px;
  font-weight: 800;
}

.premium-player-copy h1,
.premium-player-context h2,
.premium-player-rail-copy strong {
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.premium-player-copy h1 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.premium-player-icon-button,
.premium-player-actions button,
.premium-player-sheet-heading button {
  min-width: 44px;
  min-height: 44px;
}

@media (max-width: 900px) {
  .premium-player-copy {
    bottom: calc(98px + env(safe-area-inset-bottom));
  }

  .premium-player-actions {
    bottom: calc(102px + env(safe-area-inset-bottom));
  }

  .premium-player-controls {
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 390px) {
  .premium-player-copy {
    right: 74px;
    left: 14px;
  }

  .premium-player-copy h1 {
    font-size: 18px;
  }

  .premium-player-actions {
    right: 10px;
  }
}

/* Reels UX hardening: TikTok-familiar interaction model without changing standalone player. */
.premium-player-shell.is-reels {
  grid-template-columns: minmax(320px, 430px);
  gap: 0;
  padding: 18px clamp(16px, 3vw, 36px);
  align-items: center;
  justify-items: center;
  background:
    radial-gradient(circle at 50% 8%, rgb(var(--sd-accent-rgb) / 0.08), transparent 34%),
    #020203;
}

.premium-player-shell.is-reels .premium-player-context {
  display: none;
}

.premium-player-shell.is-reels .premium-player-frame {
  height: calc(100dvh - 36px);
  max-height: 920px;
  border-radius: 18px;
  touch-action: none;
  overscroll-behavior: contain;
  animation: reels-player-snap-in 180ms cubic-bezier(.22,.78,.22,1);
}

.premium-player-shell.is-reels .premium-player-vignette {
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.42), transparent 18%, transparent 48%, rgba(0, 0, 0, 0.82)),
    linear-gradient(to right, transparent 62%, rgba(0, 0, 0, 0.18));
}

.premium-player-shell.is-reels .premium-player-title {
  min-width: 0;
  max-width: 68%;
  border: 0;
  padding: 2px 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
}

.premium-player-shell.is-reels .premium-player-title:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.premium-player-shell.is-reels .premium-player-copy {
  left: 17px;
  right: 82px;
  bottom: 54px;
}

.premium-player-shell.is-reels .premium-player-kicker {
  display: none;
}

.premium-player-shell.is-reels .premium-player-copy h1 {
  margin: 0 0 7px;
  font-size: clamp(18px, 3.5vw, 23px);
  line-height: 1.12;
  -webkit-line-clamp: 2;
}

.premium-player-shell.is-reels .premium-player-copy p {
  max-width: 100%;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: rgba(255, 255, 255, 0.79);
  font-size: 11px;
  line-height: 1.45;
  text-shadow: 0 2px 12px rgba(0,0,0,.48);
}

.premium-player-episode-chip {
  margin-top: 9px;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(10, 10, 12, 0.5);
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.premium-player-shell.is-reels .premium-player-actions {
  right: 10px;
  bottom: 78px;
  gap: 13px;
}

.premium-player-shell.is-reels .premium-player-actions .reels-action {
  width: 58px;
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  color: #fff;
  cursor: pointer;
}

.premium-player-shell.is-reels .premium-player-actions .reels-action:disabled {
  opacity: .6;
}

.reels-action-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(18, 18, 21, 0.62);
  box-shadow: 0 7px 22px rgba(0,0,0,.24);
  backdrop-filter: blur(16px);
  transition: transform 150ms ease, background 150ms ease, color 150ms ease;
}

.reels-action:hover .reels-action-icon {
  transform: scale(1.05);
  background: rgba(28, 28, 32, 0.76);
}

.reels-action.is-active .reels-action-icon {
  color: var(--player-accent);
}

.reels-action-label {
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,.94) !important;
  font-size: 9px !important;
  font-weight: 800;
  text-shadow: 0 1px 8px rgba(0,0,0,.55);
}

.premium-player-shell.is-reels .premium-player-controls {
  left: 10px;
  right: 10px;
  bottom: 12px;
}

.premium-player-shell.is-reels .premium-player-controls > div {
  display: none;
}

.premium-player-shell.is-reels .premium-player-controls input[type="range"] {
  height: 2px;
  opacity: .88;
}

.premium-player-shell.is-reels .premium-player-controls input[type="range"]::-webkit-slider-thumb {
  width: 7px;
  height: 7px;
}

.premium-player-shell.is-reels .premium-player-icon-button {
  background: rgba(10, 10, 12, 0.48);
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}

@keyframes reels-player-snap-in {
  from {
    opacity: .84;
    transform: translateY(10px) scale(.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .premium-player-shell.is-reels {
    min-height: 100dvh;
    padding: 0;
    background: #000;
  }

  .premium-player-shell.is-reels .premium-player-frame {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .premium-player-shell.is-reels .premium-player-copy {
    left: 16px;
    right: 80px;
    bottom: calc(112px + env(safe-area-inset-bottom));
  }

  .premium-player-shell.is-reels .premium-player-actions {
    right: 8px;
    bottom: calc(126px + env(safe-area-inset-bottom));
  }

  .premium-player-shell.is-reels .premium-player-controls {
    left: 12px;
    right: 12px;
    bottom: calc(83px + env(safe-area-inset-bottom));
  }

  .premium-player-shell.is-reels .premium-player-topbar {
    left: 14px;
    right: 14px;
    top: max(14px, env(safe-area-inset-top));
  }
}

@media (prefers-reduced-motion: reduce) {
  .premium-player-shell.is-reels .premium-player-frame {
    animation: none;
  }
  .reels-action-icon {
    transition: none;
  }
}

/* v2.1 Reels presentation polish: adaptive caption, TikTok-familiar rail,
   persistent search, desktop-only enlarge affordance, and compact episode sheet. */
.premium-player-shell.is-reels {
  position: relative;
}

.premium-player-shell.is-reels .premium-player-frame {
  transition:
    height 220ms cubic-bezier(.22,.78,.22,1),
    max-height 220ms cubic-bezier(.22,.78,.22,1),
    border-radius 220ms ease;
}

.premium-player-shell.is-reels.is-expanded {
  padding-block: 8px;
}

.premium-player-shell.is-reels.is-expanded .premium-player-frame {
  height: calc(100dvh - 16px);
  max-height: none;
  border-radius: 14px;
}

/* Reels top chrome: title remains contextual, search stays available. */
.premium-player-shell.is-reels .premium-player-topbar {
  justify-content: center;
  right: 58px;
}

.premium-player-shell.is-reels .premium-player-title {
  width: min(72%, 260px);
  max-width: none;
}

.premium-player-search-action {
  position: absolute;
  z-index: 8;
  top: max(17px, env(safe-area-inset-top));
  right: 15px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  opacity: .94;
  filter:
    drop-shadow(0 2px 1px rgba(0,0,0,.72))
    drop-shadow(0 0 5px rgba(0,0,0,.42));
  transition: opacity 150ms ease, transform 150ms ease;
}

.premium-player-search-action:hover {
  opacity: 1;
  transform: scale(1.04);
}

.premium-player-search-action:active {
  transform: scale(.92);
}

/* Caption follows the timeline instead of reserving empty space forever. */
.premium-player-shell.is-reels .premium-player-copy {
  bottom: 36px;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    bottom 190ms cubic-bezier(.22,.78,.22,1);
}

.premium-player-shell.is-reels .premium-player-frame.is-controls-visible .premium-player-copy {
  bottom: 58px;
}

/* Keep glyphs about the same size as before, remove the bulky dark circles. */
.premium-player-shell.is-reels .premium-player-actions {
  right: 9px;
  bottom: 72px;
  gap: 11px;
}

.premium-player-shell.is-reels .premium-player-actions .reels-action {
  width: 48px;
  min-height: 50px;
  gap: 1px;
}

.premium-player-shell.is-reels .reels-action-icon {
  width: 34px;
  height: 34px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  filter:
    drop-shadow(0 2px 1px rgba(0,0,0,.78))
    drop-shadow(0 0 5px rgba(0,0,0,.46));
  transition: transform 130ms ease, color 140ms ease;
}

.premium-player-shell.is-reels .reels-action:hover .reels-action-icon {
  transform: scale(1.045);
  background: transparent;
}

.premium-player-shell.is-reels .reels-action:active .reels-action-icon {
  transform: scale(.88);
}

.premium-player-shell.is-reels .reels-action.is-active .reels-action-icon {
  color: var(--player-accent);
}

.premium-player-shell.is-reels .reels-action-label {
  max-width: 52px;
  font-size: 9.5px !important;
  line-height: 1.1;
  text-shadow:
    0 1px 1px rgba(0,0,0,.9),
    0 0 5px rgba(0,0,0,.55);
}

/* Desktop-only enlarge affordance lives outside the video canvas. */
.premium-player-expand-control {
  display: none;
}

@media (min-width: 901px) {
  .premium-player-shell.is-reels .premium-player-expand-control {
    position: absolute;
    z-index: 8;
    top: 30px;
    left: calc(50% + 226px);
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 999px;
    padding: 0 11px;
    background: rgba(8,8,10,.38);
    color: rgba(255,255,255,.72);
    box-shadow: 0 8px 28px rgba(0,0,0,.18);
    backdrop-filter: blur(14px);
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
    opacity: .7;
    transition: opacity 150ms ease, background 150ms ease, transform 150ms ease;
  }

  .premium-player-shell.is-reels .premium-player-expand-control:hover {
    opacity: 1;
    background: rgba(16,16,19,.64);
    transform: translateY(-1px);
  }

  .premium-player-shell.is-reels.is-expanded .premium-player-expand-control {
    top: 18px;
    left: calc(50% + min(34vw, 330px));
    opacity: .86;
  }
}

/* Episode picker: compact consumer sheet, not a dashboard-like button table. */
.premium-player-shell.is-reels .premium-player-sheet-backdrop {
  background: rgba(0,0,0,.48);
  backdrop-filter: blur(3px);
}

.premium-player-shell.is-reels .premium-player-sheet {
  max-height: min(76dvh, 690px);
  overflow: hidden;
  padding: 9px 14px max(20px, env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: rgba(14,14,17,.965);
  box-shadow: 0 -22px 70px rgba(0,0,0,.46);
}

.premium-player-shell.is-reels .premium-player-sheet-handle {
  width: 34px;
  height: 3px;
  margin-bottom: 11px;
  background: rgba(255,255,255,.18);
}

.premium-player-shell.is-reels .premium-player-sheet-heading {
  margin-bottom: 10px;
}

.premium-player-shell.is-reels .premium-player-sheet-heading > div {
  gap: 2px;
  min-width: 0;
}

.premium-player-shell.is-reels .premium-player-sheet-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.2;
}

.premium-player-shell.is-reels .premium-player-sheet-heading button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  background: rgba(255,255,255,.065);
  font-size: 19px;
}

.premium-player-shell.is-reels .premium-player-sheet-ranges {
  gap: 6px;
  padding-bottom: 9px;
}

.premium-player-shell.is-reels .premium-player-sheet-ranges button {
  min-height: 29px;
  padding-inline: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  font-size: 9.5px;
}

.premium-player-shell.is-reels .premium-player-sheet-ranges button.is-active {
  border-color: rgb(var(--sd-accent-rgb) / .55);
  background: rgb(var(--sd-accent-rgb) / .16);
  color: #fff;
}

.premium-player-shell.is-reels .premium-player-episode-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  max-height: 48dvh;
  padding: 1px 1px 6px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.16) transparent;
}

.premium-player-shell.is-reels .premium-player-episode-grid button {
  aspect-ratio: auto;
  min-height: 39px;
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  color: rgba(255,255,255,.72);
  font-size: 10.5px;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.premium-player-shell.is-reels .premium-player-episode-grid button:hover {
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
}

.premium-player-shell.is-reels .premium-player-episode-grid button:active {
  transform: scale(.94);
}

.premium-player-shell.is-reels .premium-player-episode-grid button.is-current {
  border-color: transparent;
  background: var(--player-accent);
  color: #fff;
  box-shadow: 0 6px 18px rgb(var(--sd-accent-rgb) / .2);
}

@media (max-width: 900px) {
  .premium-player-shell.is-reels .premium-player-copy {
    left: 16px;
    right: 70px;
    bottom: calc(79px + env(safe-area-inset-bottom));
  }

  .premium-player-shell.is-reels .premium-player-frame.is-controls-visible .premium-player-copy {
    bottom: calc(111px + env(safe-area-inset-bottom));
  }

  .premium-player-shell.is-reels .premium-player-actions {
    right: 7px;
    bottom: calc(111px + env(safe-area-inset-bottom));
  }

  .premium-player-shell.is-reels .premium-player-topbar {
    left: 14px;
    right: 56px;
  }

  .premium-player-shell.is-reels .premium-player-title {
    width: min(82%, 280px);
  }

  .premium-player-search-action {
    top: max(14px, env(safe-area-inset-top));
    right: 11px;
    width: 38px;
    height: 38px;
  }

  .premium-player-shell.is-reels .premium-player-sheet {
    max-height: 72dvh;
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .premium-player-shell.is-reels .premium-player-episode-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    max-height: 43dvh;
  }
}

@media (max-width: 390px) {
  .premium-player-shell.is-reels .premium-player-copy {
    right: 65px;
  }

  .premium-player-shell.is-reels .premium-player-episode-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .premium-player-shell.is-reels .premium-player-copy,
  .premium-player-shell.is-reels .premium-player-frame,
  .premium-player-search-action,
  .premium-player-expand-control,
  .premium-player-shell.is-reels .reels-action-icon,
  .premium-player-shell.is-reels .premium-player-episode-grid button {
    transition: none;
  }
}

/* v2.2 consumer polish — TikTok-familiar social glyphs and contextual Reels search. */
.premium-player-shell.is-reels .premium-player-actions .reels-action {
  width: 50px;
  min-height: 53px;
  gap: 1px;
}

.premium-player-shell.is-reels .reels-action-icon {
  width: 38px;
  height: 38px;
  color: #fff;
  filter:
    drop-shadow(0 1.5px 1px rgba(0, 0, 0, .78))
    drop-shadow(0 2px 4px rgba(0, 0, 0, .32));
}

.premium-player-shell.is-reels .reels-social-glyph {
  width: 28px;
  height: 28px;
  display: block;
  overflow: visible;
}

.premium-player-shell.is-reels .reels-comment-dot {
  fill: rgba(35, 35, 39, .72);
}

.premium-player-shell.is-reels .reels-action-label {
  max-width: 54px;
  font-size: 10px !important;
  font-weight: 850;
  line-height: 1.05;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, .86),
    0 1px 4px rgba(0, 0, 0, .42);
}

.premium-player-shell.is-reels .reels-action:hover .reels-action-icon {
  transform: scale(1.04);
}

.premium-player-shell.is-reels .reels-action:active .reels-action-icon {
  transform: scale(.9);
}

/* Search is part of the same contextual top chrome as the episode label. */
.premium-player-search-action {
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, .72);
  opacity: 0;
  pointer-events: none;
  filter: none;
  transform: none;
  transition: opacity 180ms ease, color 140ms ease;
}

.premium-player-frame.is-controls-visible .premium-player-search-action {
  opacity: 1;
  pointer-events: auto;
}

.premium-player-search-action:hover {
  color: rgba(255, 255, 255, .9);
  opacity: 1;
  transform: none;
}

.premium-player-search-action:active {
  color: #fff;
  transform: none;
}

@media (max-width: 900px) {
  .premium-player-search-action {
    top: max(15px, env(safe-area-inset-top));
    right: 12px;
    width: 30px;
    height: 30px;
  }
}

/* v2.3 — calmer Reels social rail: title-tone glyphs with restrained video-safe depth. */
.premium-player-shell.is-reels .reels-action-icon {
  color: rgba(255, 255, 255, .80);
  filter:
    drop-shadow(0 1px 1px rgba(0, 0, 0, .70))
    drop-shadow(0 2px 3px rgba(0, 0, 0, .24));
}

.premium-player-shell.is-reels .reels-action-label {
  color: rgba(255, 255, 255, .74) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .52);
}

.premium-player-shell.is-reels .reels-action.is-active .reels-action-icon,
.premium-player-shell.is-reels .reels-action.is-active .reels-action-label {
  color: color-mix(in srgb, var(--player-accent, #4c8dff) 62%, rgba(255, 255, 255, .86)) !important;
}

.premium-player-shell.is-reels .reels-comment-dot {
  fill: rgba(20, 20, 24, .68);
}

/* v6.10 feed-deck mode: let the browser own vertical momentum while keeping
   taps/player controls inside the active reel. */
.premium-player-shell.is-reels .premium-player-frame.is-native-scroll {
  touch-action: pan-y pinch-zoom;
  overscroll-behavior: auto;
  animation: none;
}

.reels-motion-slide .premium-player-shell.is-reels {
  height: 100%;
  min-height: 100%;
}

@media (max-width: 900px) {
  .reels-motion-slide .premium-player-shell.is-reels .premium-player-frame {
    height: 100%;
    min-height: 100%;
  }
}
