* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow-x: hidden;
  scroll-behavior: auto;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: transparent;
  color: var(--text);
  padding: 4px 10px;
  cursor: pointer;
}

button:hover,
a:hover {
  border-color: var(--muted);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.hugeicon {
  width: 17px;
  height: 17px;
  stroke-width: 1.7;
}

.shell {
  min-height: 100vh;
}

.sidebar {
  display: none;
}

main {
  width: min(100%, calc(var(--container-content) + 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 88px 24px 72px;
}

.floating-dock {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 70;
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(245, 245, 242, 0.18);
  border-radius: 16px;
  background: rgba(23, 23, 23, 0.9);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(22px) saturate(135%);
}

.floating-dock button {
  display: flex;
  width: 54px;
  height: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-color: transparent;
  border-radius: 12px;
  padding: 4px;
  color: var(--muted);
}

.floating-dock button span {
  display: grid;
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  place-items: center;
}

.floating-dock button strong {
  display: none;
}

.floating-dock button.active {
  border-color: rgba(255, 59, 48, 0.25);
  background: rgba(255, 59, 48, 0.14);
  color: var(--signal);
}

.app-header,
.page-header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 16px;
}

.app-header h1,
.page-header h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0;
  line-height: 1;
}

.header-actions,
.watching-actions,
.detail-hero-actions,
.providers,
.rating-actions,
.modal-heading {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  place-items: center;
  padding: 4px;
}

.button-primary,
.button-quiet,
.provider {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 4px 10px;
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  line-height: 18px;
  text-decoration: none;
}

.button-primary {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.button-quiet {
  background: rgba(5, 5, 5, 0.64);
}

.watching-hero,
.detail-hero,
.profile-hero {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 390px;
  align-items: flex-end;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04) 25%, rgba(0, 0, 0, 0.94) 100%),
    var(--media-art),
    var(--panel);
  background-position: center 28%;
  background-size: cover;
}

.watching-wash,
.detail-hero-wash,
.profile-hero-wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 64%);
  pointer-events: none;
}

.watching-copy,
.detail-hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 760px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 28px;
}

.eyebrow {
  width: fit-content;
  background: var(--signal);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.04em;
  line-height: 14px;
  padding: 4px 7px;
  text-transform: uppercase;
}

.watching-copy h2,
.detail-hero-copy h1 {
  font-size: clamp(36px, 5vw, var(--text-display));
  font-weight: var(--font-weight-bold);
  letter-spacing: 0;
  line-height: 1;
}

.watching-copy p,
.detail-hero-copy p {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.watching-progress {
  width: min(280px, 100%);
  height: 2px;
  overflow: hidden;
  margin: 5px 0;
  background: rgba(245, 245, 242, 0.2);
}

.watching-progress i {
  display: block;
  height: 100%;
  background: var(--signal);
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.6fr);
  gap: 22px;
  padding-top: 24px;
}

.content-stack,
.home-aside,
.detail-main,
.detail-side,
.profile-content > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 20px;
}

.section-title {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 10px;
}

.section-title h2 {
  flex-shrink: 0;
  font-size: var(--text-title-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0;
  line-height: var(--leading-title-sm);
}

.section-title i {
  height: 1px;
  flex: 1;
  background: var(--line);
}

.section-title button,
.section-title > span,
.panel-heading button {
  min-height: 28px;
  border-color: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 4px;
}

.horizontal-rail,
.profile-posters,
.cast-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 5px;
  scrollbar-width: none;
}

.horizontal-rail::-webkit-scrollbar,
.profile-posters::-webkit-scrollbar,
.cast-rail::-webkit-scrollbar {
  display: none;
}

.media-card {
  width: 174px;
  min-width: 174px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  cursor: pointer;
}

.media-card:hover,
.media-card:focus-visible {
  border-color: var(--muted);
}

.media-art {
  display: flex;
  height: 246px;
  align-items: flex-end;
  padding: 12px;
  background:
    linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.92)),
    var(--media-art),
    var(--panel-raised);
  background-position: center;
  background-size: cover;
}

.artwork-fallback {
  background: #131915 !important;
}

.media-card-copy {
  min-width: 0;
}

.media-card-copy h3 {
  overflow: hidden;
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  line-height: 19px;
  text-overflow: ellipsis;
}

.media-card-copy p {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.air-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(56px, 1fr));
  gap: 4px;
  overflow-x: auto;
}

.air-calendar button {
  display: grid;
  min-height: 64px;
  place-content: center;
  gap: 3px;
  border-radius: var(--radius-panel);
  color: var(--muted);
}

.air-calendar button span {
  font-family: var(--font-mono);
  font-size: 12px;
}

.air-calendar button strong {
  color: var(--text);
  font-size: 18px;
}

.air-calendar button.today {
  border-color: var(--signal);
  background: var(--signal);
  color: var(--bg);
}

.air-calendar button.today strong {
  color: var(--bg);
}

.airing-list {
  border-top: 1px solid var(--line);
}

.airing-list article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  min-height: 72px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 0;
}

.air-date {
  display: grid;
  width: 44px;
  height: 44px;
  place-content: center;
  gap: 1px;
  padding: 4px;
  border-color: var(--line);
  font-family: var(--font-mono);
}

.air-date span {
  color: var(--signal);
  font-size: 10px;
}

.air-date strong {
  font-size: 16px;
}

.airing-list h3 {
  font-size: 15px;
  line-height: 19px;
}

.airing-list article > div > span,
.airing-list p {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.side-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
}

.panel-heading {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 4px 12px;
}

.panel-heading > span {
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
}

.watchlist-queue,
.source-panel {
  display: flex;
  flex-direction: column;
}

.watchlist-queue button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  padding: 4px 12px;
  text-align: left;
}

.watchlist-queue small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.source-panel a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px;
  text-decoration: none;
}

.source-panel small,
.source-panel span {
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.source-panel strong {
  font-size: 14px;
  line-height: 18px;
}

.catalog-toolbar {
  display: flex;
  min-height: 60px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.filter-control,
.explore-tabs,
.search-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-control button,
.explore-tabs button,
.search-filters button {
  min-height: 30px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  line-height: 16px;
  padding: 4px 10px;
  text-transform: capitalize;
  white-space: nowrap;
}

.filter-control button.active,
.explore-tabs button.active,
.search-filters button.active {
  border-color: var(--signal);
  background: var(--signal);
  color: var(--bg);
  font-weight: var(--font-weight-semibold);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  padding: 20px 0;
}

.catalog-grid .media-card {
  width: 100%;
  min-width: 0;
}

.catalog-grid .media-art {
  height: 260px;
}

.explore-tabs {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.editorial-feed,
.episode-schedule,
.list-grid,
.stat-grid,
.profile-content {
  display: grid;
  gap: 10px;
}

.editorial-feed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 20px;
}

.editorial-card {
  display: flex;
  min-height: 176px;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  padding: 16px;
  text-decoration: none;
}

.editorial-card span,
.editorial-card p {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.editorial-card h2 {
  font-size: 20px;
  line-height: 24px;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 20px;
}

.activity-list article,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  padding: 14px;
}

.activity-list h2 {
  font-size: 17px;
}

.activity-list p,
.empty-state,
.empty-inline {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.date-readout {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.calendar-board {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
}

.calendar-weekdays,
.calendar-dates {
  display: grid;
  min-width: 620px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays span {
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 8px 4px;
  text-align: center;
}

.calendar-dates button {
  display: flex;
  min-height: 90px;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  border: 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 8px;
}

.calendar-dates button span {
  overflow: hidden;
  max-width: 100%;
  color: var(--signal);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-dates button.selected {
  box-shadow: inset 2px 0 0 var(--signal);
  background: var(--panel-raised);
}

.episode-schedule {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 10px;
}

.episode-schedule article {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  padding: 8px;
}

.schedule-art {
  width: 68px;
  height: 68px;
  border-radius: 6px;
  background: var(--media-art) center / cover, var(--panel-raised);
}

.episode-schedule span,
.episode-schedule p {
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.episode-schedule h2 {
  margin: 3px 0;
  font-size: 16px;
  line-height: 19px;
}

.collection-filter {
  padding-top: 16px;
}

.list-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.user-list {
  display: flex;
  min-height: 136px;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.94)),
    var(--list-art) center / cover,
    var(--panel);
  padding: 14px;
}

.user-list span,
.user-list p {
  color: var(--muted);
  font-size: 12px;
}

.user-list h3 {
  font-size: 19px;
  line-height: 22px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: transparent;
  color: var(--muted);
  padding: 4px 0;
}

.detail-hero-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.detail-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}

.detail-tabs button {
  position: relative;
  min-width: 120px;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  color: var(--muted);
}

.detail-tabs button.active {
  color: var(--text);
}

.detail-tabs button.active::after {
  position: absolute;
  right: 8px;
  bottom: -1px;
  left: 8px;
  height: 2px;
  background: var(--signal);
  content: "";
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.32fr);
  gap: 20px;
  padding-top: 20px;
}

.detail-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.providers {
  flex-wrap: wrap;
  margin-top: 12px;
}

.provider {
  color: var(--muted);
}

.provider.primary-provider {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.synopsis p,
.review-section p {
  max-width: 760px;
  color: var(--text);
  font-size: 16px;
  line-height: 25px;
}

.rating-actions {
  margin-top: 12px;
}

.rating-actions button {
  display: grid;
  width: 38px;
  height: 38px;
  min-height: 38px;
  place-items: center;
  padding: 4px;
}

.rating-actions button.selected {
  border-color: var(--color-rating-yellow);
  background: var(--color-rating-yellow);
  color: var(--bg);
}

.detail-side {
  overflow: hidden;
  height: fit-content;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
}

.detail-side section {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px;
}

.detail-side span {
  color: var(--muted);
  font-size: 12px;
}

.detail-side strong {
  font-size: 15px;
  text-transform: capitalize;
}

.wide-button {
  width: calc(100% - 24px);
  margin: 12px;
}

.cast-rail {
  margin-top: 12px;
}

.cast-card {
  display: flex;
  width: 118px;
  min-width: 118px;
  flex-direction: column;
  gap: 4px;
}

.cast-photo {
  width: 118px;
  height: 148px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--media-art) center / cover, var(--panel-raised);
}

.cast-card strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cast-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episodes-panel {
  padding-top: 20px;
}

.episodes-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
}

.episodes-heading h2 {
  font-size: 22px;
}

.episodes-heading > strong {
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 12px;
}

.episode-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.episode-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 0;
}

.episode-image {
  width: 112px;
  height: 64px;
  border-radius: 6px;
  background: var(--media-art) center / cover, var(--panel-raised);
}

.episode-row span,
.episode-row p {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 15px;
}

.episode-row h3 {
  margin: 2px 0;
  font-size: 15px;
  line-height: 19px;
}

.watch-toggle {
  display: grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  place-items: center;
  padding: 4px;
}

.watch-toggle.watched {
  border-color: var(--signal);
  background: var(--signal);
  color: var(--bg);
}

.profile-hero {
  min-height: 264px;
}

.profile-topline {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
}

.profile-identity {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
}

.avatar-fallback {
  display: grid;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  overflow: hidden;
  place-items: center;
  border: 2px solid var(--text);
  border-radius: 999px;
  background: var(--panel-raised);
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
}

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

.profile-identity h1 {
  font-size: 30px;
  line-height: 34px;
}

.profile-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
}

.profile-summary article {
  display: grid;
  min-height: 68px;
  place-content: center;
  gap: 2px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  text-align: center;
}

.profile-summary article:last-child {
  border-right: 0;
}

.profile-summary strong {
  font-size: 21px;
}

.profile-summary span,
.stat-grid span {
  color: var(--muted);
  font-size: 11px;
}

.stats-section {
  padding: 22px 0;
}

.stat-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 10px;
}

.stat-grid article {
  display: flex;
  min-height: 94px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  padding: 12px;
}

.stat-grid article .hugeicon {
  color: var(--signal);
}

.stat-grid strong {
  font-size: 27px;
  line-height: 30px;
}

.profile-content {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.profile-posters .media-card {
  width: 148px;
  min-width: 148px;
}

.profile-posters .media-art {
  height: 210px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.76);
  padding: 16px;
}

.modal {
  width: min(100%, 440px);
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.54);
  padding: 16px;
}

.modal-heading {
  justify-content: space-between;
}

.modal h2 {
  font-size: 21px;
}

.modal > p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.modal textarea,
.modal input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  outline: 0;
  background: var(--panel-raised);
  color: var(--text);
  padding: 8px;
}

.modal textarea {
  min-height: 140px;
  margin-top: 12px;
  resize: vertical;
}

.list-picker,
.modal form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.list-picker button {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  text-align: left;
}

.list-picker small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.modal form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.quick-search {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  justify-content: center;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.78);
  opacity: 0;
  padding: 18px;
  transition: opacity 160ms ease;
}

.quick-search.open {
  pointer-events: auto;
  opacity: 1;
}

.search-sheet {
  width: min(100%, 680px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  background: var(--bg);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.58);
}

.quick-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 8px;
}

.quick-search-bar > .icon-button {
  flex-shrink: 0;
  border-color: transparent;
  color: var(--muted);
}

.quick-search-bar label {
  display: flex;
  min-width: 0;
  height: 42px;
  flex: 1;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--muted);
  border-radius: var(--radius-panel);
  background: var(--panel-raised);
  padding: 4px 8px 4px 10px;
}

.quick-search-bar label > .hugeicon {
  flex-shrink: 0;
  color: var(--muted);
}

.quick-search-bar input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 20px;
}

.quick-search-bar input::placeholder {
  color: var(--muted);
}

.quick-search-bar label .icon-button {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border-color: transparent;
  color: var(--muted);
}

.search-filters {
  border-bottom: 1px solid var(--line);
  padding: 0 14px 14px 58px;
}

.search-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
}

.search-results-heading h2 {
  font-size: 20px;
  line-height: 24px;
}

.search-results-heading span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  text-transform: uppercase;
}

.search-results-heading span.loading {
  color: var(--signal);
}

.quick-results {
  display: flex;
  flex-direction: column;
  padding: 0 16px 16px;
}

.live-search-result {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 36px;
  min-height: 112px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.result-art {
  display: block;
  width: 64px;
  height: 88px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--media-art) center / cover, var(--panel-raised);
}

.person-result {
  min-height: 94px;
}

.person-art {
  height: 64px;
  border-radius: 999px;
}

.result-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.result-copy strong {
  overflow: hidden;
  font-size: 16px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-copy em {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--color-rating-yellow);
  font-size: 13px;
  font-style: normal;
}

.result-copy em .hugeicon {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.result-track {
  display: grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  place-items: center;
  border-color: var(--signal);
  color: var(--signal);
  padding: 4px;
}

.result-track.saved {
  background: var(--signal);
  color: var(--bg);
}

.person-result > .hugeicon {
  justify-self: center;
  color: var(--muted);
}

.search-loading {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.search-loading .hugeicon {
  color: var(--signal);
  animation: spin 0.8s linear infinite;
}

.provider-note,
.search-hint {
  margin: 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 19px;
  padding: 14px 0;
}

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

@media (max-width: 900px) {
  main {
    padding: 76px 16px 94px;
  }

  .home-grid,
  .detail-layout,
  .profile-content {
    grid-template-columns: 1fr;
  }

  .home-aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floating-dock {
    top: auto;
    right: 16px;
    bottom: 14px;
    left: 16px;
    justify-content: space-around;
  }

  .floating-dock button {
    height: 52px;
    min-height: 52px;
  }
}

@media (max-width: 680px) {
  main {
    padding: 14px 14px 90px;
  }

  .app-header,
  .page-header {
    min-height: 54px;
    padding-bottom: 12px;
  }

  .app-header h1,
  .page-header h1 {
    font-size: 28px;
  }

  .watching-hero,
  .detail-hero {
    min-height: 300px;
    margin-top: 12px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .watching-copy,
  .detail-hero-copy {
    gap: 7px;
    padding: 18px 4px;
  }

  .watching-copy h2,
  .detail-hero-copy h1 {
    font-size: 38px;
  }

  .home-grid {
    gap: 16px;
    padding-top: 18px;
  }

  .content-stack,
  .home-aside,
  .detail-main,
  .detail-side,
  .profile-content > div {
    gap: 16px;
  }

  .section-title h2 {
    font-size: 18px;
  }

  .media-card {
    width: 142px;
    min-width: 142px;
  }

  .media-art {
    height: 204px;
    padding: 10px;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 16px;
  }

  .catalog-grid .media-art {
    height: 210px;
  }

  .air-calendar {
    grid-template-columns: repeat(7, 56px);
  }

  .home-aside,
  .editorial-feed,
  .episode-schedule {
    grid-template-columns: 1fr;
  }

  .calendar-board {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .episode-row {
    grid-template-columns: 80px minmax(0, 1fr) 36px;
    gap: 8px;
  }

  .episode-image {
    width: 80px;
    height: 56px;
  }

  .detail-tabs button {
    flex: 1;
    min-width: 0;
  }

  .profile-hero {
    min-height: 220px;
    margin-top: 12px;
  }

  .profile-identity {
    padding: 16px;
  }

  .profile-identity h1 {
    font-size: 27px;
  }

  .stat-grid article {
    min-height: 82px;
    padding: 8px;
  }

  .stat-grid strong {
    font-size: 23px;
  }

  .floating-dock {
    right: 14px;
    bottom: 10px;
    left: 14px;
    border-radius: 18px;
  }

  .floating-dock button {
    width: 54px;
  }

  .quick-search {
    align-items: stretch;
    padding: 0;
  }

  .search-sheet {
    width: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .quick-search-bar {
    padding: max(12px, env(safe-area-inset-top)) 10px 8px 8px;
  }

  .quick-search-bar > .icon-button {
    width: 34px;
    min-width: 34px;
  }

  .search-filters {
    padding: 0 14px 14px 58px;
  }

  .search-results-heading {
    padding-top: 16px;
  }

  .live-search-result {
    grid-template-columns: 64px minmax(0, 1fr) 36px;
  }
}

@media (min-width: 1181px) {
  .sidebar {
    display: none;
  }

  .floating-dock {
    top: 16px;
    right: auto;
    left: 18px;
    display: flex;
    border-radius: 18px;
  }

  .floating-dock button {
    width: auto;
    min-width: 58px;
    padding: 4px 11px;
  }

  .floating-dock button strong {
    display: block;
    font-size: 12px;
    font-weight: 550;
  }
}

/* Final cascade: Paper detail geometry and shared media-card geometry. */
.empty-state {
  min-height: 180px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 24px;
  text-align: center;
}

.empty-state h2,
.empty-state p {
  margin-inline: auto;
  text-align: center;
}

.media-card {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.media-card .media-art {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid #22252b;
  border-radius: 4px;
  outline: 0;
  background: var(--media-art) center / cover no-repeat, #15171b;
  box-shadow: 0 20px 25px -5px #00000066, 0 8px 10px -6px #00000066;
}

.media-art-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 64%, rgba(0, 0, 0, .16));
  pointer-events: none;
}

.media-card-meta {
  gap: 3px;
  margin-top: 8px;
  padding: 0 2px 4px;
}

.media-card-meta h3 {
  margin-bottom: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 15px;
}

.media-card-meta p {
  color: #ddd;
  font-size: 10px;
  line-height: 15px;
}

.media-detail-page {
  min-height: 610px;
  align-items: stretch;
  margin-top: 0;
  border: 0;
  border-radius: 0 0 26px 26px;
  background: var(--media-art) center top / cover no-repeat, #08090b;
}

.media-detail-page .detail-hero-wash {
  background: linear-gradient(180deg, rgba(8, 9, 11, .08) 16%, rgba(8, 9, 11, .42) 54%, #08090b 100%);
}

.media-detail-page .detail-hero-copy {
  width: 100%;
  max-width: 760px;
  min-height: 610px;
  align-self: stretch;
  justify-content: flex-end;
  gap: 10px;
  margin-inline: auto;
  padding: 0 24px 28px;
  text-align: center;
}

.media-detail-page .title-treatment {
  width: min(333px, 75%);
  height: 80px;
  max-width: 75%;
  max-height: 80px;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
}

.media-detail-page .title-logo {
  width: 100%;
  height: 80px;
  object-position: center;
}

.media-detail-page .title-wordmark {
  max-width: 12ch;
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  line-height: 38px;
  text-align: center;
}

.media-detail-page .hero-summary {
  max-width: 48ch;
  margin-inline: auto;
  font-size: 14px !important;
  line-height: 22px !important;
  text-align: center;
}

.media-detail-page .hero-actions {
  justify-content: center;
  gap: 8px;
  padding-top: 11px;
}

.detail-track-button {
  height: 34px;
  min-height: 34px;
  border-radius: 6px;
  padding: 4px 22px;
}

.detail-track-button .hugeicon {
  width: 18px;
  height: 18px;
}

.detail-source-actions {
  display: flex;
  height: 34px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #ffffff1a;
  border-radius: 8px;
  background: #ffffff1a;
  box-shadow: 0 10px 15px -3px #0000000d, 0 4px 6px -4px #0000000d;
  backdrop-filter: blur(20px) saturate(150%);
}

.detail-source-action {
  display: grid;
  width: 60px;
  min-width: 60px;
  height: 100%;
  place-items: center;
  padding: 0 20px;
}

.detail-source-action img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 3px;
}

.detail-source-actions > i {
  width: 1px;
  height: 24px;
  align-self: center;
  background: #ffffff40;
}

.detail-source-actions > .icon-button {
  width: 60px;
  min-width: 60px;
  height: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 20px;
}

.detail-paper-content {
  display: block;
  width: min(100%, 700px);
  margin-inline: auto;
  padding: 0 24px;
}

.detail-paper-content .media-facts {
  margin-top: 16px;
}

.detail-tools {
  width: min(100%, 700px);
  margin: 24px auto 96px;
  padding: 0 24px;
}

.media-detail-page ~ .episodes-panel {
  width: min(100%, 700px);
  margin-inline: auto;
  padding: 0 24px 40px;
}

.media-detail-page ~ .episodes-panel .episodes-heading {
  min-height: 34px;
  justify-content: flex-start;
  padding: 0;
}

.media-detail-page ~ .episodes-panel .episodes-heading > div:first-child p,
.media-detail-page ~ .episodes-panel .season-progress,
.media-detail-page ~ .episodes-panel .season-toolbar > .icon-button {
  display: none;
}

.media-detail-page ~ .episodes-panel .season-toolbar {
  order: 2;
  margin-left: 12px;
}

.media-detail-page ~ .episodes-panel .season-toolbar label select {
  height: 34px;
  min-height: 34px;
  border: 1px solid #ffffff1a;
  border-radius: 4px;
  background: #ffffff1a;
  padding: 4px 16px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.media-detail-page ~ .episodes-panel .episode-list {
  display: flex;
  flex-direction: row;
  gap: 24px;
  overflow-x: auto;
  margin-inline: -24px;
  padding: 20px 24px 48px;
  border: 0;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 60px), transparent 100%);
}

.media-detail-page ~ .episodes-panel .episode-list::-webkit-scrollbar {
  display: none;
}

.media-detail-page ~ .episodes-panel .episode-card {
  width: 288px;
  min-width: 288px;
}

.media-detail-page ~ .episodes-panel .episode-card .episode-image {
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 4px;
}

.media-detail-page ~ .episodes-panel .episode-card-copy {
  padding-inline: 4px;
}

.media-detail-page ~ .cast-section {
  width: min(100%, 700px);
  margin-inline: auto;
  padding: 0 24px 40px;
}

.media-detail-page ~ .cast-section .cast-rail {
  gap: 20px;
  margin-inline: -24px;
  padding: 16px 24px;
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 60px), transparent 100%);
}

.media-detail-page ~ .cast-section .cast-card {
  width: 128px;
  min-width: 128px;
  align-items: center;
  gap: 12px;
}

.media-detail-page ~ .cast-section .cast-photo {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  border-color: #ffffff1a;
}

.media-detail-page ~ .cast-section .cast-card strong,
.media-detail-page ~ .cast-section .cast-card span {
  width: 128px;
  text-align: center;
}

@media (max-width: 680px) {
  .media-detail-page,
  .media-detail-page .detail-hero-copy {
    min-height: 610px;
  }

  .media-detail-page .detail-hero-copy {
    padding: 0 24px 28px;
  }

  .media-detail-page .title-treatment {
    width: min(333px, 86vw);
    max-width: 86vw;
  }

  .media-detail-page .hero-summary {
    max-width: 34ch;
  }
}

/* Final Paper alignment pass: the title page and media cards share one geometry. */
.empty-state {
  min-height: 180px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 24px;
  text-align: center;
}

.empty-state h2,
.empty-state p {
  margin-inline: auto;
  text-align: center;
}

.media-card {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.media-card .media-art {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid #22252b;
  border-radius: 4px;
  outline: 0;
  background: var(--media-art) center / cover no-repeat, #15171b;
  box-shadow: 0 20px 25px -5px #00000066, 0 8px 10px -6px #00000066;
}

.media-art-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 64%, rgba(0, 0, 0, .16));
  pointer-events: none;
}

.media-card-meta {
  gap: 3px;
  margin-top: 8px;
  padding: 0 2px 4px;
}

.media-card-meta h3 {
  margin-bottom: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 15px;
}

.media-card-meta p {
  color: #ddd;
  font-size: 10px;
  line-height: 15px;
}

.media-detail-page {
  min-height: 610px;
  align-items: stretch;
  margin-top: 0;
  border: 0;
  border-radius: 0 0 26px 26px;
  background: var(--media-art) center top / cover no-repeat, #08090b;
}

.media-detail-page .detail-hero-wash {
  background: linear-gradient(180deg, rgba(8, 9, 11, .08) 16%, rgba(8, 9, 11, .42) 54%, #08090b 100%);
}

.media-detail-page .detail-hero-copy {
  width: 100%;
  max-width: 760px;
  min-height: 610px;
  align-self: stretch;
  justify-content: flex-end;
  gap: 10px;
  margin-inline: auto;
  padding: 0 24px 28px;
  text-align: center;
}

.media-detail-page .title-treatment {
  width: min(333px, 75%);
  height: 80px;
  max-width: 75%;
  max-height: 80px;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
}

.media-detail-page .title-logo {
  width: 100%;
  height: 80px;
  object-position: center;
}

.media-detail-page .title-wordmark {
  max-width: 12ch;
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  line-height: 38px;
  text-align: center;
}

.media-detail-page .hero-summary {
  max-width: 48ch;
  margin-inline: auto;
  font-size: 14px !important;
  line-height: 22px !important;
  text-align: center;
}

.media-detail-page .hero-actions {
  justify-content: center;
  gap: 8px;
  padding-top: 11px;
}

.detail-track-button {
  height: 34px;
  min-height: 34px;
  border-radius: 6px;
  padding: 4px 22px;
}

.detail-track-button .hugeicon {
  width: 18px;
  height: 18px;
}

.detail-source-actions {
  display: flex;
  height: 34px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #ffffff1a;
  border-radius: 8px;
  background: #ffffff1a;
  box-shadow: 0 10px 15px -3px #0000000d, 0 4px 6px -4px #0000000d;
  backdrop-filter: blur(20px) saturate(150%);
}

.detail-source-action {
  display: grid;
  width: 60px;
  min-width: 60px;
  height: 100%;
  place-items: center;
  padding: 0 20px;
}

.detail-source-action img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 3px;
}

.detail-source-action .hugeicon {
  width: 18px;
  height: 18px;
}

.detail-source-actions > i {
  width: 1px;
  height: 24px;
  align-self: center;
  background: #ffffff40;
}

.detail-source-actions > .icon-button {
  width: 60px;
  min-width: 60px;
  height: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 20px;
}

.detail-paper-content {
  display: block;
  width: min(100%, 700px);
  margin-inline: auto;
  padding: 0 24px;
}

.detail-paper-content .media-facts {
  margin-top: 16px;
}

.detail-tools {
  width: min(100%, 700px);
  margin: 24px auto 96px;
  padding: 0 24px;
}

.media-detail-page ~ .episodes-panel {
  width: min(100%, 700px);
  margin-inline: auto;
  padding: 0 24px 40px;
}

.media-detail-page ~ .episodes-panel .episodes-heading {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
}

.media-detail-page ~ .episodes-panel .episodes-heading > div:first-child p,
.media-detail-page ~ .episodes-panel .season-progress {
  display: none;
}

.media-detail-page ~ .episodes-panel .season-toolbar {
  order: 2;
  margin-left: 12px;
}

.media-detail-page ~ .episodes-panel .season-toolbar > .icon-button {
  display: none;
}

.media-detail-page ~ .episodes-panel .season-toolbar label select {
  height: 34px;
  min-height: 34px;
  border: 1px solid #ffffff1a;
  border-radius: 4px;
  background: #ffffff1a;
  padding: 4px 16px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.media-detail-page ~ .episodes-panel .episode-list {
  display: flex;
  flex-direction: row;
  gap: 24px;
  overflow-x: auto;
  margin-inline: -24px;
  padding: 20px 24px 48px;
  border: 0;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 60px), transparent 100%);
}

.media-detail-page ~ .episodes-panel .episode-list::-webkit-scrollbar {
  display: none;
}

.media-detail-page ~ .episodes-panel .episode-card {
  width: 288px;
  min-width: 288px;
}

.media-detail-page ~ .episodes-panel .episode-card .episode-image {
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 4px;
}

.media-detail-page ~ .episodes-panel .episode-card-copy {
  padding-inline: 4px;
}

.media-detail-page ~ .cast-section {
  width: min(100%, 700px);
  margin-inline: auto;
  padding: 0 24px 40px;
}

.media-detail-page ~ .cast-section .cast-rail {
  gap: 20px;
  margin-inline: -24px;
  padding: 16px 24px;
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 60px), transparent 100%);
}

.media-detail-page ~ .cast-section .cast-card {
  width: 128px;
  min-width: 128px;
  align-items: center;
  gap: 12px;
}

.media-detail-page ~ .cast-section .cast-photo {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  border-color: #ffffff1a;
}

.media-detail-page ~ .cast-section .cast-card strong,
.media-detail-page ~ .cast-section .cast-card span {
  width: 128px;
  text-align: center;
}

@media (max-width: 680px) {
  .media-detail-page {
    min-height: 610px;
    border-radius: 0 0 26px 26px;
  }

  .media-detail-page .detail-hero-copy {
    min-height: 610px;
    padding: 0 24px 28px;
  }

  .media-detail-page .title-treatment {
    width: min(333px, 86vw);
    max-width: 86vw;
  }

  .media-detail-page .hero-summary {
    max-width: 34ch;
  }

  .detail-paper-content,
  .media-detail-page ~ .episodes-panel,
  .media-detail-page ~ .cast-section,
  .detail-tools {
    width: 100%;
  }
}

@media (min-width: 681px) and (max-width: 1180px) {
  .floating-dock {
    top: 16px;
    right: auto;
    bottom: auto;
    left: 18px;
  }

  .floating-dock button {
    width: auto;
    min-width: 58px;
    padding: 4px 10px;
  }

  .floating-dock button strong {
    display: block;
    font-size: 12px;
    font-weight: 550;
  }
}

/* Cue empty states and gesture rails share the same compact, tactile language. */
.empty-state {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(244, 243, 239, 0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(21, 23, 27, 0.86), rgba(16, 18, 22, 0.72));
  padding: 24px;
  text-align: center;
}

.empty-state-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 999px;
  background: rgba(155, 246, 109, 0.1);
  color: var(--signal);
}

.empty-state-mark .hugeicon {
  width: 20px;
  height: 20px;
}

.empty-state h2 {
  color: var(--text);
  font-size: 16px;
  line-height: 20px;
}

.empty-state p {
  max-width: 30ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.empty-state .button-primary {
  min-height: 36px;
  margin-top: 6px;
  border-radius: 999px;
  padding: 4px 12px;
}

.home-date-rail {
  touch-action: pan-y;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
}

.home-date {
  flex: 0 0 68px;
  scroll-snap-align: start;
}

.home-close {
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  padding: 0;
  color: var(--muted);
}

.home-close .hugeicon {
  width: 20px;
  height: 20px;
}

/* Title treatments keep supplied wordmarks intact and give API-only titles a clean fallback. */
.title-treatment {
  display: flex;
  max-width: 100%;
  flex-direction: column;
  align-items: flex-start;
}

.title-treatment.detail {
  align-items: flex-start;
}

.title-treatment .title-logo {
  display: block;
}

.title-wordmark {
  max-width: 12ch;
  margin: 0;
  color: var(--text);
  font-family: var(--title-font, "Arial Narrow", "Avenir Next Condensed", Inter, sans-serif);
  font-size: 44px;
  font-stretch: condensed;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 46px;
  text-transform: uppercase;
  text-wrap: balance;
}

.title-treatment.detail .title-wordmark {
  font-size: 40px;
  line-height: 44px;
  text-transform: none;
}

@media (max-width: 680px) {
  .title-wordmark {
    font-size: 34px;
    line-height: 37px;
  }

  .title-treatment.detail .title-wordmark {
    font-size: 34px;
    line-height: 38px;
  }
}

/* Cue browse rails: compact, tactile choices before the cinematic content. */
.home-browse {
  display: grid;
  gap: 12px;
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 14px 0 0;
}

.home-quick-rail,
.home-filter-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.home-quick-rail::-webkit-scrollbar,
.home-filter-rail::-webkit-scrollbar,
.recent-searches::-webkit-scrollbar,
.search-source-grid::-webkit-scrollbar {
  display: none;
}

.home-quick-option,
.home-filter {
  display: inline-flex;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--panel-soft);
  padding: 4px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.home-quick-option .hugeicon {
  width: 16px;
  height: 16px;
}

.home-quick-option.active,
.home-filter.active {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.home-filter {
  min-width: 36px;
  padding-inline: 10px;
  font-size: 12px;
}

.home-filter img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.home-filter-divider {
  width: 1px;
  min-width: 1px;
  height: 22px;
  align-self: center;
  background: var(--line-soft);
}

.search-discovery {
  display: grid;
  gap: 10px;
  padding: 10px 16px 6px;
}

.search-discovery-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-discovery-heading h2,
.search-discovery-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-transform: uppercase;
}

.search-discovery-heading .icon-button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border-color: transparent;
  color: var(--faint);
}

.recent-searches {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.recent-searches button {
  display: inline-flex;
  min-height: 32px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: transparent;
  padding: 4px 9px;
  color: var(--muted);
  font-size: 12px;
}

.recent-searches button .hugeicon {
  width: 14px;
  height: 14px;
}

.search-discovery-empty {
  color: var(--faint);
  font-size: 12px;
}

.search-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.search-source-link {
  display: grid;
  min-height: 72px;
  align-content: center;
  justify-items: center;
  gap: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--muted);
  text-align: center;
  text-decoration: none;
}

.search-source-link > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.search-source-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.search-source-link strong {
  overflow: hidden;
  max-width: 100%;
  font-size: 11px;
  font-weight: 550;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Section rhythm is carried by spacing and surfaces; dividers are reserved for controls. */
.page-header,
.home-header,
.search-filters,
.live-search-result,
.search-loading,
.provider-note,
.search-hint,
.home-signal-list,
.home-signal-item {
  border-top-color: transparent;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-left-color: transparent;
}

.section-title i {
  display: none;
}

@media (max-width: 680px) {
  .home-browse {
    margin-right: -12px;
    padding-right: 12px;
    padding-top: 12px;
  }

  .home-quick-rail,
  .home-filter-rail {
    padding-right: 12px;
  }

  .quick-search {
    align-items: flex-start;
    padding: max(56px, env(safe-area-inset-top)) 12px 12px;
  }

  .search-sheet {
    border-radius: 14px;
  }

  .quick-search-bar {
    padding: 12px 10px 8px;
  }

  .quick-search-bar label {
    height: 46px;
    border-radius: 999px;
  }

  .search-filters {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 14px 8px 58px;
    scrollbar-width: none;
  }

  .search-filters::-webkit-scrollbar {
    display: none;
  }

  .search-filters button {
    min-height: 32px;
    flex: 0 0 auto;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 12px;
  }

  .search-discovery {
    padding-inline: 14px;
  }

  .quick-results {
    padding-inline: 14px;
  }
}

@media (max-width: 390px) {
  .catalog-grid .media-art {
    height: 196px;
  }

  .search-filters {
    padding-left: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (min-width: 1181px) {
  .sidebar { display: none; }
  .floating-dock {
    top: 16px;
    right: auto;
    left: 18px;
    display: flex;
    border-radius: 18px;
  }
  .floating-dock button {
    width: auto;
    min-width: 58px;
    padding: 4px 11px;
  }
  .floating-dock button strong {
    display: block;
    font-size: 12px;
    font-weight: 550;
  }
}

/* Dedicated title page: Paper's centered mobile hierarchy, adapted for desktop. */
.media-detail-page .detail-hero-copy {
  align-items: center;
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.media-detail-page .title-treatment {
  align-items: center;
  width: 100%;
}

.media-detail-page .title-logo {
  object-position: center;
}

.media-meta-row {
  display: flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  color: rgba(244, 243, 239, 0.82);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.media-meta-row > span:not(.media-score)::before {
  content: "·";
  margin-right: 12px;
  color: rgba(244, 243, 239, 0.4);
}

.media-meta-row > span:first-child::before {
  display: none;
}

.media-score {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
}

.media-score .imdb-mark,
.media-score .rt-mark {
  width: 32px;
  height: 16px;
}

.media-score-rt {
  gap: 4px;
  color: rgba(244, 243, 239, 0.78);
  font-size: 14px;
  font-weight: 500;
}

.media-score-rt .rt-mark,
.media-score-popcorn .rt-popcorn-mark {
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 0;
  background-color: transparent;
  background-size: contain;
}

.media-detail-page .hero-summary {
  max-width: 48ch;
}

.media-facts {
  border-radius: 14px;
}

.media-facts section {
  min-height: 48px;
  padding: 8px 14px;
}

.media-facts .wide-button {
  margin: 10px;
  width: calc(100% - 20px);
}

@media (max-width: 680px) {
  .media-detail-page {
    min-height: 78svh;
    border-radius: 0 0 26px 26px;
  }

  .media-detail-page .detail-hero-copy {
    width: 100%;
    padding: 28px 24px 32px;
  }

  .media-detail-page .hero-actions {
    justify-content: center;
  }

  .media-detail-page .hero-summary {
    max-width: 34ch;
    font-size: 14px !important;
    line-height: 20px !important;
  }

  .media-meta-row {
    gap: 8px;
    font-size: 13px;
  }

  .media-meta-row > span:not(.media-score)::before {
    margin-right: 8px;
  }
}

/* Home 5.1: airing-first cinematic layout and compact editorial signal. */
.home-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 12px;
}

.home-header > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 12px;
}

.home-schedule-picker {
  position: relative;
}

.home-schedule-trigger,
.home-calendar-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  border: 0;
  padding: 4px 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 650;
  line-height: 30px;
}

.home-schedule-trigger .hugeicon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.home-header-date {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.home-calendar-link {
  width: 40px;
  min-width: 40px;
  height: 40px;
  justify-content: center;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--muted);
}

.home-schedule-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 12;
  display: grid;
  min-width: 156px;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(16, 18, 22, .96);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .3);
  backdrop-filter: blur(18px);
}

.home-schedule-menu button {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: start;
}

.home-schedule-menu button.active,
.home-schedule-menu button:hover {
  background: var(--panel-raised);
  color: var(--text);
}

.home-hero-slider {
  position: relative;
  min-height: min(72vh, 700px);
  overflow: hidden;
  border: 1px solid rgba(242, 241, 237, .12);
  border-radius: var(--radius-shell);
  background: var(--panel);
  isolation: isolate;
}

.home-hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  opacity: 0;
  pointer-events: none;
  background: var(--media-art) center 28% / cover, var(--panel);
  transition: opacity 450ms var(--ease-smooth-out);
}

.home-hero-slide.active {
  z-index: 1;
  opacity: 1;
  pointer-events: auto;
}

.home-hero-slide .watching-wash {
  background:
    linear-gradient(180deg, rgba(5, 6, 7, .02) 8%, rgba(5, 6, 7, .12) 34%, color-mix(in srgb, var(--media-deep) 86%, transparent) 70%, var(--bg) 100%),
    linear-gradient(90deg, rgba(5, 6, 7, .74), transparent 72%);
}

.home-hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  max-width: 620px;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 48px;
}

.hero-title-fallback {
  max-width: 12ch;
  font-size: 44px;
  font-weight: 700;
  line-height: 46px;
  text-wrap: balance;
}

.hero-source-links {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 10px;
}

.hero-source,
.imdb-link {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  border: 0;
  color: rgba(244, 243, 239, .85);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.hero-source .provider-brand-mark {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.imdb-badge {
  display: inline-grid;
  min-width: 34px;
  height: 20px;
  place-items: center;
  border-radius: 2px;
  background: #f5cf00;
  color: #111;
  font-size: 10px;
  font-weight: 800;
}

.hero-slider-controls {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-slider-controls > span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-slider-controls > span i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(244, 243, 239, .4);
}

.hero-slider-controls > span i.active {
  width: 18px;
  border-radius: 999px;
  background: var(--text);
}

.hero-slider-controls .icon-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border-color: rgba(244, 243, 239, .16);
  border-radius: 8px;
  background: rgba(8, 9, 11, .42);
}

.home-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(100%, 1240px);
  margin: 0 auto;
  padding-top: 34px;
}

.home-section .air-calendar {
  margin-top: -2px;
}

.home-section .section-title button {
  min-height: 30px;
  color: var(--muted);
}

.home-signal-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-soft);
}

.home-signal-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  min-height: 86px;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 0;
  text-decoration: none;
}

.home-signal-item > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.home-signal-item span {
  overflow: hidden;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 11px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-signal-item span small {
  color: var(--faint);
  font-family: var(--font-sans);
  text-transform: none;
}

.home-signal-item strong {
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  line-height: 21px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-signal-item img {
  width: 96px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  outline: 1px solid rgba(255, 255, 255, .1);
}

.media-card {
  border-color: transparent;
  background: transparent;
}

.media-card .media-art {
  height: auto;
  aspect-ratio: 2 / 3;
  padding: 0;
  border-radius: 8px;
  background:
    var(--media-art),
    var(--panel-raised);
  outline: 1px solid rgba(255, 255, 255, .1);
}

.media-card-meta {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 8px 2px 0;
}

.media-card-meta h3,
.media-card-meta p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-card-meta h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
}

.media-card-meta p {
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.media-card:hover .media-art,
.media-card:focus-visible .media-art {
  outline-color: rgba(244, 243, 239, .42);
}

@media (max-width: 680px) {
  .home-header {
    min-height: 72px;
    margin: 0 -1px 12px;
  }

  .home-header > div {
    display: grid;
    align-items: start;
    gap: 1px;
  }

  .home-schedule-trigger {
    font-size: 24px;
    line-height: 28px;
  }

  .home-hero-slider {
    min-height: 70svh;
    border-radius: 12px;
  }

  .media-card .media-art {
    aspect-ratio: 2 / 3;
  }

  .home-hero-copy {
    max-width: 100%;
    gap: 9px;
    padding: 24px 18px 54px;
  }

  .home-hero-copy .title-logo {
    max-width: min(280px, 78vw);
    max-height: 92px;
  }

  .hero-title-fallback {
    font-size: 34px;
    line-height: 37px;
  }

  .home-hero-copy .hero-summary {
    display: -webkit-box;
    max-width: 34ch;
    font-size: 14px !important;
    line-height: 20px !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .hero-slider-controls {
    right: 12px;
    bottom: 12px;
  }

  .home-section {
    padding-top: 28px;
  }

  .home-section .air-calendar {
    margin-right: -12px;
    padding-right: 12px;
  }

  .air-calendar {
    grid-template-columns: repeat(7, minmax(50px, 1fr));
  }

  .home-signal-item {
    grid-template-columns: minmax(0, 1fr) 84px;
    min-height: 76px;
    gap: 12px;
  }

  .home-signal-item strong {
    font-size: 14px;
    line-height: 19px;
  }

  .home-signal-item img {
    width: 84px;
    height: 54px;
  }
}

/* Cue 3.0: velvet theatre */

button,
.button-primary,
.button-quiet,
.provider {
  transition: border-color 180ms cubic-bezier(.22, 1, .36, 1), background-color 180ms cubic-bezier(.22, 1, .36, 1), color 180ms cubic-bezier(.22, 1, .36, 1), transform 120ms ease-out;
}

button:active,
.button-primary:active,
.button-quiet:active {
  transform: scale(.96);
}

.sidebar {
  position: fixed;
  top: 14px;
  right: 24px;
  left: 24px;
  z-index: 80;
  display: flex;
  max-width: 1240px;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  border: 1px solid rgba(244, 243, 239, .13);
  border-radius: 999px;
  background: rgba(16, 18, 22, .82);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .28);
  padding: 5px 7px 5px 14px;
  backdrop-filter: blur(24px) saturate(135%);
}

.sidebar .brand {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.sidebar .brand span,
.sidebar .brand .brand-mark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: #101512;
  object-fit: cover;
}

.sidebar nav,
.nav-actions,
.detail-topbar > div,
.hero-actions,
.season-toolbar,
.season-toolbar label,
.episode-information {
  display: flex;
  align-items: center;
}

.sidebar nav {
  gap: 2px;
}

.sidebar nav button {
  min-height: 38px;
  border-color: transparent;
  border-radius: 999px;
  color: var(--muted);
  padding: 4px 12px;
  font-size: 13px;
}

.sidebar nav button span {
  display: none;
}

.sidebar nav button.active,
.sidebar nav button:hover {
  background: rgba(244, 243, 239, .09);
  color: var(--text);
}

.nav-actions {
  gap: 3px;
}

.nav-actions .icon-button,
.nav-avatar {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border-color: transparent;
  border-radius: 999px;
  padding: 4px;
}

.nav-avatar {
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
}

.floating-dock {
  display: none;
}

main {
  padding-top: 82px;
}

.cinematic-hero,
.watching-hero {
  min-height: min(78vh, 760px);
  border-radius: 14px;
  background-position: center 22%;
}

.detail-hero-wash,
.watching-wash,
.profile-hero-wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(8, 9, 11, .08) 20%, rgba(8, 9, 11, .35) 52%, #08090b 100%), linear-gradient(90deg, rgba(8, 9, 11, .72), transparent 62%);
  pointer-events: none;
}

.hero-video {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  border: 0;
}

.detail-topbar {
  position: absolute;
  top: 18px;
  right: 18px;
  left: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-topbar .icon-button {
  border-color: rgba(244, 243, 239, .19);
  border-radius: 999px;
  background: rgba(8, 9, 11, .58);
  backdrop-filter: blur(16px);
}

.detail-hero-copy,
.watching-copy {
  z-index: 2;
  max-width: 680px;
  padding: 34px;
}

.detail-hero-copy h1,
.watching-copy h2 {
  max-width: 12ch;
  font-size: 40px;
  line-height: 44px;
  text-wrap: balance;
}

.title-logo {
  width: min(430px, 70vw);
  max-height: 150px;
  object-fit: contain;
  object-position: left bottom;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
}

.hero-actions .button-primary,
.hero-actions .button-quiet {
  min-height: 44px;
  border-radius: 999px;
  padding: 4px 17px;
}

.hero-actions > .icon-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(8, 9, 11, .55);
}

.status-button {
  background: rgba(21, 23, 27, .78);
  backdrop-filter: blur(14px);
}

.season-toolbar {
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.season-toolbar label {
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.season-toolbar select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--panel-raised);
  color: var(--text);
  padding: 4px 30px 4px 10px;
  font: inherit;
}

.season-toolbar .button-quiet {
  background: var(--panel-raised);
}

.season-toolbar .selected {
  border-color: rgba(255, 77, 68, .38);
  color: var(--signal);
}

.season-progress {
  height: 2px;
  overflow: hidden;
  background: var(--line);
}

.season-progress i {
  display: block;
  height: 100%;
  background: var(--signal);
}

.episodes-heading p {
  color: var(--muted);
  font-size: 13px;
}

.episode-row {
  grid-template-columns: 168px minmax(0, 1fr) 44px;
  min-height: 118px;
  cursor: pointer;
}

.episode-row:hover {
  background: rgba(244, 243, 239, .025);
}

.episode-image {
  position: relative;
  width: 168px;
  height: 94px;
  overflow: hidden;
}

.episode-image > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 9, 11, .2);
  opacity: 0;
  transition: opacity 180ms ease-out;
}

.episode-row:hover .episode-image > span,
.episode-row:focus-visible .episode-image > span {
  opacity: 1;
}

.watch-toggle {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 999px;
}

.status-sheet,
.confirmation-sheet {
  width: min(100%, 420px);
  padding: 18px;
}

.modal-heading > div > span {
  color: var(--muted);
  font-size: 12px;
}

.status-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 16px;
}

.status-options button {
  display: grid;
  min-height: 58px;
  grid-template-columns: 36px minmax(0, 1fr) 24px;
  align-items: center;
  border-color: transparent;
  padding: 6px 8px;
  text-align: left;
}

.status-options button > span:first-child {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: var(--panel-raised);
}

.status-options button > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.status-options small {
  color: var(--muted);
  font-size: 12px;
}

.status-options button.selected {
  background: rgba(255, 77, 68, .1);
  color: var(--signal);
}

.status-options .remove-status {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  color: var(--signal);
}

.confirmation-sheet {
  text-align: center;
}

.confirmation-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(255, 77, 68, .12);
  color: var(--signal);
}

.confirmation-sheet p {
  margin: 6px 0 18px;
  color: var(--muted);
}

.confirmation-sheet > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.confirmation-sheet button {
  min-height: 44px;
}

.button-text {
  border-color: transparent;
  color: var(--muted);
}

.episode-detail {
  min-height: calc(100vh - 154px);
}

.episode-detail-media {
  position: relative;
  display: grid;
  min-height: min(62vh, 610px);
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--media-art) center / cover, var(--panel);
}

.episode-detail-media .hero-video {
  z-index: 1;
}

.episode-play {
  position: relative;
  z-index: 2;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-color: rgba(244, 243, 239, .4);
  border-radius: 999px;
  background: rgba(244, 243, 239, .92);
  color: var(--bg);
}

.episode-play .hugeicon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.episode-detail-content {
  max-width: 820px;
  padding: 26px 0 20px;
}

.parent-show {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 4px;
  border-color: transparent;
  color: var(--muted);
  padding: 4px 0;
}

.episode-code {
  display: block;
  margin-top: 14px;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
}

.episode-detail h1 {
  margin-top: 4px;
  font-size: 40px;
  line-height: 44px;
}

.episode-meta,
.episode-synopsis {
  color: var(--muted);
}

.episode-synopsis {
  max-width: 68ch;
  margin-top: 24px;
  color: var(--text);
  font-size: 16px;
  line-height: 25px;
}

.episode-information {
  gap: 0;
  margin-top: 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.episode-information div {
  display: flex;
  min-width: 130px;
  flex-direction: column;
  gap: 2px;
  padding: 13px 20px 13px 0;
}

.episode-information span {
  color: var(--muted);
  font-size: 12px;
}

.episode-information strong {
  font-size: 14px;
}

@media (max-width: 1180px) {
  .sidebar {
    display: none;
  }

  .floating-dock {
    display: flex;
  }
}

@media (max-width: 680px) {
  main {
    padding-top: 0;
  }

  .floating-dock {
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 12px;
    border-radius: 999px;
    background: rgba(21, 23, 27, .9);
  }

  .floating-dock button {
    width: 56px;
    height: 52px;
    min-height: 52px;
    border-radius: 999px;
  }

  .floating-dock button.active {
    border-color: transparent;
    background: var(--text);
    color: var(--bg);
  }

  .cinematic-hero,
  .watching-hero {
    min-height: 68vh;
    margin: 0 -14px;
    border-top: 0;
    background-position: center top;
  }

  .detail-hero-copy,
  .watching-copy {
    padding: 20px 18px 22px;
  }

  .detail-hero-copy h1,
  .watching-copy h2,
  .episode-detail h1 {
    max-width: 11ch;
    font-size: 34px;
    line-height: 37px;
  }

  .detail-topbar {
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
    left: 14px;
  }

  .season-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .season-toolbar label {
    justify-content: space-between;
  }

  .episode-row {
    grid-template-columns: 112px minmax(0, 1fr) 44px;
    min-height: 94px;
  }

  .episode-image {
    width: 112px;
    height: 68px;
  }

  .episode-detail-media {
    min-height: 52vh;
    margin: 0 -14px;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .episode-detail-content {
    padding-top: 20px;
  }

  .episode-information {
    overflow-x: auto;
  }

  .modal-backdrop {
    align-items: end;
    padding: 8px;
  }

  .status-sheet,
  .confirmation-sheet {
    width: 100%;
    border-radius: 18px;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .episode-row {
    grid-template-columns: 92px minmax(0, 1fr) 40px;
  }

  .episode-image {
    width: 92px;
    height: 60px;
  }
}

/* Cue 4.0: inky cinema */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

html,
body {
  background: var(--bg);
}

body {
  font-synthesis: none;
}

::selection {
  background: var(--signal);
  color: var(--bg);
}

main {
  width: min(100%, 1512px);
  padding: 78px 24px 108px;
}

.sidebar {
  top: 12px;
  min-height: 56px;
  border-color: rgba(242, 241, 237, .12);
  background: rgba(9, 10, 11, .82);
  box-shadow: 0 18px 54px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .05);
  padding: 5px 7px 5px 12px;
  backdrop-filter: blur(28px) saturate(150%);
}

.sidebar .brand span {
  background: var(--text);
  color: var(--bg);
}

.sidebar nav button {
  min-height: 42px;
  padding: 4px 14px;
}

.sidebar nav button.active,
.sidebar nav button:hover {
  background: rgba(242, 241, 237, .12);
}

.home-cinematic-hero,
.cinematic-hero {
  min-height: min(82vh, 820px);
  margin-top: 0;
  border-color: rgba(242, 241, 237, .12);
  border-radius: var(--radius-shell);
  background: var(--media-art) center 22% / cover, var(--panel);
}

.watching-wash,
.detail-hero-wash {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(5, 6, 7, .05) 18%, rgba(5, 6, 7, .18) 42%, color-mix(in srgb, var(--media-deep) 72%, transparent) 72%, var(--bg) 100%),
    radial-gradient(80% 52% at 50% 78%, color-mix(in srgb, var(--media-glow) 72%, transparent), transparent 74%);
}

.watching-copy,
.detail-hero-copy {
  z-index: 2;
  max-width: 720px;
  gap: 12px;
  padding: 46px;
}

.watching-copy h2,
.detail-hero-copy h1 {
  max-width: 14ch;
  font-size: var(--text-display);
  font-weight: 750;
  letter-spacing: 0;
  line-height: var(--leading-display);
  text-wrap: balance;
}

.hero-genres {
  color: var(--text) !important;
  font-size: 18px !important;
  font-weight: 650;
  line-height: 24px !important;
}

.hero-summary {
  display: -webkit-box;
  max-width: 65ch;
  overflow: hidden;
  color: color-mix(in srgb, var(--text) 78%, transparent) !important;
  font-size: 16px !important;
  line-height: 1.55 !important;
  text-wrap: pretty;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.hero-meta {
  color: color-mix(in srgb, var(--text) 82%, transparent) !important;
  font-size: 15px !important;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  border: 1px solid rgba(242, 241, 237, .2);
  border-radius: 999px;
  background: rgba(5, 6, 7, .48);
  color: var(--text);
  font-family: var(--font-sans);
  letter-spacing: .04em;
  padding: 5px 10px;
  backdrop-filter: blur(12px);
}

.watching-progress {
  width: min(340px, 100%);
  height: 3px;
  border-radius: 999px;
  background: rgba(242, 241, 237, .25);
}

.watching-progress i,
.season-progress i {
  background: var(--signal);
}

.watching-actions,
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.watching-actions .button-primary,
.hero-actions .button-primary,
.hero-actions .button-quiet {
  min-height: 52px;
  border-radius: 999px;
  padding: 4px 24px;
  font-size: 16px;
}

.watching-actions .icon-button,
.hero-actions > .icon-button {
  width: 52px;
  min-width: 52px;
  height: 52px;
  border-color: rgba(242, 241, 237, .18);
  border-radius: 999px;
  background: rgba(242, 241, 237, .1);
  color: var(--text);
  backdrop-filter: blur(16px) saturate(130%);
}

.watching-actions .hugeicon,
.hero-actions .hugeicon {
  width: 21px;
  height: 21px;
}

.detail-topbar {
  top: 24px;
  right: 24px;
  left: 24px;
}

.detail-topbar .icon-button {
  width: 48px;
  min-width: 48px;
  height: 48px;
  border-color: rgba(242, 241, 237, .12);
  background: rgba(5, 6, 7, .48);
}

.provider-browse {
  padding-top: 42px;
}

.provider-rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 18px 0 8px;
  scrollbar-width: none;
}

.provider-rail::-webkit-scrollbar,
.episode-list::-webkit-scrollbar {
  display: none;
}

.provider-shortcut {
  display: flex;
  width: 112px;
  min-width: 112px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
}

.provider-shortcut > span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(242, 241, 237, .18);
  border-radius: 24px;
  background: #0a0a0b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 30px rgba(0, 0, 0, .24);
  color: var(--text);
  font-size: 23px;
  font-weight: 750;
}

.provider-shortcut strong {
  font-size: 13px;
  line-height: 17px;
}

.provider-netflix > span,
.provider-netflix .provider-logo { color: #e50914; }
.provider-prime-video > span,
.provider-prime-video .provider-logo { color: #37a7e8; }
.provider-disney-plus > span,
.provider-disney-plus .provider-logo { color: #78d8f4; }
.provider-apple-tv-plus > span,
.provider-apple-tv-plus .provider-logo { color: #f2f1ed; }
.provider-max > span,
.provider-max .provider-logo { color: #a89aff; }
.provider-hulu > span,
.provider-hulu .provider-logo { color: #1ce783; }

.home-grid,
.detail-layout {
  width: min(100%, 1240px);
  margin: 0 auto;
}

.detail-layout {
  gap: 28px;
  padding-top: 34px;
}

.detail-main {
  gap: 34px;
}

.detail-section {
  border: 0;
  padding-bottom: 0;
}

.section-title i {
  display: none;
}

.section-title h2,
.episodes-heading h2 {
  font-size: 24px;
  line-height: 29px;
}

.providers {
  gap: 10px;
  margin-top: 16px;
}

.provider {
  min-width: 210px;
  min-height: 58px;
  justify-content: flex-start;
  gap: 10px;
  border-color: rgba(242, 241, 237, .14);
  border-radius: 18px;
  background: rgba(242, 241, 237, .07);
  color: var(--text);
  padding: 6px 12px 6px 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.provider-logo {
  display: grid;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #08090a;
  font-weight: 750;
}

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

.provider-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.provider-copy strong {
  overflow: hidden;
  max-width: 100%;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.provider > .hugeicon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.detail-side {
  border-color: rgba(242, 241, 237, .14);
  border-radius: 20px;
  background: rgba(242, 241, 237, .05);
}

.detail-side section {
  min-height: 54px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  border-color: rgba(242, 241, 237, .1);
  padding: 8px 16px;
}

.detail-side span {
  color: var(--faint);
  font-size: 13px;
}

.detail-side strong {
  font-size: 14px;
  font-weight: 550;
  text-align: end;
}

.episodes-panel {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding-top: 54px;
}

.episodes-heading {
  gap: 18px;
  padding-bottom: 18px;
}

.episodes-heading > div:first-child {
  flex: 1;
}

.episodes-heading p {
  margin-top: 4px;
}

.season-toolbar {
  justify-content: flex-end;
  gap: 8px;
  border: 0;
  padding: 0;
}

.season-toolbar .icon-button,
.season-toolbar label {
  min-height: 48px;
  border: 1px solid rgba(242, 241, 237, .16);
  border-radius: 999px;
  background: rgba(242, 241, 237, .08);
}

.season-toolbar .icon-button {
  width: 48px;
  min-width: 48px;
  height: 48px;
}

.season-toolbar .selected {
  border-color: var(--signal);
  color: var(--signal);
}

.season-toolbar label {
  padding: 0 4px 0 14px;
}

.season-toolbar select {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 4px 32px 4px 4px;
  font-size: 16px;
  font-weight: 650;
}

.season-progress {
  height: 2px;
  border-radius: 999px;
}

.episode-list {
  display: flex;
  flex-direction: row;
  gap: 24px;
  overflow-x: auto;
  border: 0;
  padding: 22px 0 10px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.episode-card {
  width: 390px;
  min-width: 390px;
  scroll-snap-align: start;
  cursor: pointer;
}

.episode-card .episode-image {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(242, 241, 237, .38);
  border-radius: 22px;
  background: var(--media-art) center / cover, var(--panel-raised);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .28);
}

.episode-number,
.episode-runtime {
  position: absolute;
  z-index: 2;
  display: grid;
  min-width: 44px;
  min-height: 40px;
  place-items: center;
  border: 1px solid rgba(242, 241, 237, .16);
  border-radius: 999px;
  background: rgba(10, 11, 12, .66);
  color: var(--text) !important;
  font-family: var(--font-sans) !important;
  font-size: 13px !important;
  font-weight: 700;
  backdrop-filter: blur(14px);
}

.episode-number {
  top: 12px;
  left: 12px;
}

.episode-runtime {
  right: 12px;
  bottom: 12px;
  min-width: 58px;
  padding: 0 12px;
}

.episode-card .watch-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-color: rgba(242, 241, 237, .18);
  border-radius: 999px;
  background: rgba(10, 11, 12, .66);
  color: var(--text);
  backdrop-filter: blur(14px);
}

.episode-card .watch-toggle.watched {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.episode-card-copy {
  padding: 14px 16px 0;
}

.episode-card-copy h3 {
  font-size: 20px;
  line-height: 25px;
}

.episode-card-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.episode-detail-media {
  min-height: min(72vh, 740px);
  border-radius: var(--radius-shell);
}

.episode-detail-content {
  width: min(100%, 920px);
  margin: 0 auto;
  padding-top: 32px;
}

.episode-code {
  color: var(--signal);
  font-family: var(--font-sans);
  letter-spacing: 0;
}

.media-card {
  border-color: rgba(242, 241, 237, .12);
  border-radius: 14px;
  background: var(--panel);
}

.media-art {
  outline: 1px solid rgba(255, 255, 255, .08);
  outline-offset: -1px;
}

.catalog-grid {
  gap: 16px;
}

.floating-dock {
  border-color: rgba(242, 241, 237, .14);
  background: rgba(14, 15, 16, .9);
  box-shadow: 0 18px 52px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(26px) saturate(145%);
}

.floating-dock button.active {
  border-color: transparent;
  background: rgba(242, 241, 237, .14);
  color: var(--text);
}

@media (max-width: 900px) {
  main {
    padding: 0 16px 100px;
  }

  .home-cinematic-hero,
  .cinematic-hero {
    min-height: 78vh;
    margin: 0 -16px;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0 0 26px 26px;
  }

  .watching-copy,
  .detail-hero-copy {
    align-items: center;
    margin: 0 auto;
    padding: 28px 22px 34px;
    text-align: center;
  }

  .watching-copy h2,
  .detail-hero-copy h1 {
    max-width: 12ch;
    font-size: 48px;
    line-height: 50px;
  }

  .hero-summary {
    max-width: 58ch;
  }

  .watching-progress {
    width: min(280px, 86vw);
  }

  .detail-layout {
    padding-top: 28px;
  }
}

@media (max-width: 680px) {
  main {
    padding: 0 14px 96px;
  }

  .home-cinematic-hero,
  .cinematic-hero {
    min-height: 82svh;
    margin: 0 -14px;
    background-position: center top;
  }

  .watching-copy,
  .detail-hero-copy {
    gap: 9px;
    padding: 22px 18px 30px;
  }

  .watching-copy h2,
  .detail-hero-copy h1,
  .episode-detail h1 {
    max-width: 12ch;
    font-size: 42px;
    line-height: 44px;
  }

  .hero-genres {
    font-size: 16px !important;
    line-height: 21px !important;
  }

  .hero-summary {
    font-size: 15px !important;
    -webkit-line-clamp: 3;
  }

  .watching-actions .button-primary,
  .hero-actions .button-primary,
  .hero-actions .button-quiet {
    min-height: 50px;
    padding: 4px 22px;
  }

  .watching-actions .icon-button,
  .hero-actions > .icon-button {
    width: 50px;
    min-width: 50px;
    height: 50px;
  }

  .provider-browse {
    padding-top: 30px;
  }

  .provider-rail {
    gap: 14px;
    margin-right: -14px;
    padding-right: 28px;
  }

  .provider-shortcut {
    width: 86px;
    min-width: 86px;
  }

  .provider-shortcut > span {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    font-size: 19px;
  }

  .detail-layout {
    gap: 28px;
  }

  .providers {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -14px;
    padding-right: 28px;
    scrollbar-width: none;
  }

  .provider {
    min-width: 196px;
  }

  .episodes-panel {
    padding-top: 44px;
  }

  .episodes-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .season-toolbar {
    width: 100%;
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .season-toolbar label {
    margin-left: auto;
  }

  .episode-list {
    gap: 14px;
    margin-right: -14px;
    padding-right: 28px;
  }

  .episode-card {
    width: min(82vw, 320px);
    min-width: min(82vw, 320px);
  }

  .episode-card .episode-image {
    border-radius: 18px;
  }

  .episode-card-copy {
    padding: 12px 10px 0;
  }

  .episode-card-copy h3 {
    font-size: 18px;
    line-height: 22px;
  }

  .episode-detail-media {
    min-height: 66svh;
    margin: 0 -14px;
    border-radius: 0 0 26px 26px;
  }

  .detail-topbar {
    top: max(18px, env(safe-area-inset-top));
    right: 16px;
    left: 16px;
  }

  .floating-dock {
    right: 16px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 16px;
    padding: 5px;
    border-radius: 999px;
  }

  .floating-dock button {
    width: 52px;
    height: 50px;
    min-height: 50px;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .sidebar,
  .floating-dock,
  .detail-topbar .icon-button,
  .hero-actions > .icon-button {
    background: var(--panel-raised);
    backdrop-filter: none;
  }
}

/* Cue 5.0: compact cinematic interface. These final rules intentionally own the
   responsive component contract while the earlier prototype styles are retired. */
.hugeicon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  overflow: visible;
}

button,
a,
[tabindex] {
  transition:
    background-color var(--duration-quick) var(--ease-smooth-out),
    border-color var(--duration-quick) var(--ease-smooth-out),
    color var(--duration-quick) var(--ease-smooth-out),
    opacity var(--duration-quick) var(--ease-smooth-out),
    transform var(--duration-quick) var(--ease-smooth-out);
}

button:active,
[tabindex]:active {
  transform: scale(var(--scale-press));
}

.page-header {
  min-height: 72px;
  align-items: flex-end;
  border-color: var(--line-soft);
  padding-bottom: 14px;
}

.page-header > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 650;
  line-height: 32px;
  text-wrap: balance;
}

.page-header p {
  max-width: 52ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  text-wrap: pretty;
}

.title-logo {
  width: min(440px, 70vw);
  max-height: 150px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.32));
}

.watching-copy h2,
.detail-hero-copy h1 {
  max-width: 13ch;
  font-size: var(--text-display);
  line-height: var(--leading-display);
  text-wrap: balance;
}

.hero-summary {
  max-width: 62ch;
  color: rgba(244, 243, 239, 0.82) !important;
  text-wrap: pretty;
}

.filter-control,
.explore-tabs {
  gap: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--panel-soft);
  padding: 4px;
}

.filter-control button,
.explore-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
}

.filter-control button.active,
.explore-tabs button.active {
  background: var(--text);
  color: var(--bg);
}

.provider-shortcut {
  width: 92px;
  min-width: 92px;
  gap: 8px;
}

.provider-shortcut > span {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.provider-shortcut img,
.provider-logo img {
  display: block;
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.provider-shortcut .provider-brand-mark,
.provider-logo .provider-brand-mark {
  filter: invert(1);
}

.provider-netflix .provider-brand-mark {
  filter: none;
}

.provider {
  min-width: 184px;
  min-height: 52px;
  border-radius: 12px;
  padding: 4px 10px 4px 5px;
}

.provider-logo {
  width: 42px;
  height: 42px;
  border-radius: 9px;
}

.provider-copy strong {
  font-size: 13px;
  line-height: 17px;
}

.provider-copy small {
  font-size: 11px;
  line-height: 14px;
}

.episode-list {
  gap: 14px;
  padding-top: 18px;
}

.episode-card {
  width: 296px;
  min-width: 296px;
  overflow: hidden;
  border-radius: 14px;
}

.episode-card .episode-image {
  aspect-ratio: 4 / 5;
  border-color: rgba(244, 243, 239, 0.18);
  border-radius: 14px;
  background-position: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.episode-image-wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(4, 5, 6, 0.02) 25%, rgba(4, 5, 6, 0.28) 55%, rgba(4, 5, 6, 0.96) 100%);
}

.episode-number {
  top: auto;
  right: 16px;
  bottom: 138px;
  left: 16px;
  display: block;
  width: auto;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(244, 243, 239, 0.78) !important;
  font-size: 11px !important;
  letter-spacing: 0.08em;
  line-height: 14px;
  text-transform: uppercase;
  backdrop-filter: none;
}

.episode-card .watch-toggle {
  top: 12px;
  right: 12px;
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-color: rgba(244, 243, 239, 0.24);
  background: rgba(8, 9, 11, 0.54);
  backdrop-filter: blur(18px) saturate(130%);
}

.episode-card-copy {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  z-index: 2;
  padding: 0;
}

.episode-card-copy h3 {
  overflow: hidden;
  font-size: 18px;
  font-weight: 650;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-card-copy p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 38px;
  margin-top: 5px;
  color: rgba(244, 243, 239, 0.76);
  font-size: 13px;
  line-height: 19px;
  text-wrap: pretty;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.episode-card-copy > div {
  display: flex;
  min-height: 24px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  color: rgba(244, 243, 239, 0.78);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.episode-card-copy > div .hugeicon {
  width: 17px;
  height: 17px;
}

.season-toolbar .icon-button,
.season-toolbar label {
  min-height: 42px;
  border-radius: 999px;
}

.season-toolbar .icon-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
}

.season-toolbar select {
  min-height: 36px;
  font-size: 14px;
}

.catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px 12px;
}

.catalog-grid .media-art {
  aspect-ratio: 2 / 3;
}

.media-card-copy {
  padding: 12px;
}

.media-card-copy h3 {
  font-size: 15px;
  line-height: 19px;
}

.media-card-copy p {
  font-size: 12px;
  line-height: 16px;
}

.profile-hero {
  min-height: 360px;
  border-radius: var(--radius-shell);
}

.profile-summary,
.stat-grid {
  border-color: var(--line-soft);
  background: transparent;
}

.profile-summary article,
.stat-grid article {
  min-height: 92px;
  border-color: var(--line-soft);
}

.profile-summary strong,
.stat-grid strong {
  font-variant-numeric: tabular-nums;
}

.floating-dock {
  border-color: rgba(244, 243, 239, 0.12);
  border-radius: 14px;
  padding: 4px;
  background: rgba(16, 18, 22, 0.82);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(140%);
}

.floating-dock button {
  width: 48px;
  height: 42px;
  min-height: 42px;
  border-radius: 10px;
}

.floating-dock button.active {
  background: rgba(244, 243, 239, 0.13);
  color: var(--text);
}

@media (max-width: 680px) {
  main {
    padding-right: 12px;
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
    padding-left: 12px;
  }

  .page-header {
    min-height: 94px;
    padding: max(18px, env(safe-area-inset-top)) 2px 12px;
  }

  .page-header h1 {
    font-size: 24px;
    line-height: 28px;
  }

  .page-header p {
    max-width: 32ch;
    font-size: 13px;
    line-height: 18px;
  }

  .page-header .icon-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .watching-copy h2,
  .detail-hero-copy h1,
  .episode-detail h1 {
    max-width: 13ch;
    font-size: 34px;
    line-height: 38px;
  }

  .title-logo {
    width: min(290px, 74vw);
    max-height: 112px;
  }

  .watching-actions .button-primary,
  .hero-actions .button-primary,
  .hero-actions .button-quiet {
    min-height: 44px;
    padding: 4px 16px;
    font-size: 14px;
  }

  .watching-actions .icon-button,
  .hero-actions > .icon-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .filter-control,
  .explore-tabs {
    max-width: 100%;
    overflow-x: auto;
  }

  .filter-control button,
  .explore-tabs button {
    min-height: 36px;
    flex: 0 0 auto;
  }

  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 7px;
  }

  .catalog-grid .media-card-copy {
    padding: 8px 5px 4px;
  }

  .catalog-grid .media-card-copy h3 {
    font-size: 13px;
    line-height: 17px;
  }

  .catalog-grid .media-card-copy p {
    margin-top: 2px;
    font-size: 10px;
    line-height: 14px;
  }

  .episodes-heading {
    gap: 12px;
  }

  .episode-list {
    margin-right: -12px;
    padding-right: 24px;
  }

  .episode-card {
    width: min(72vw, 280px);
    min-width: min(72vw, 280px);
  }

  .episode-card .episode-image {
    aspect-ratio: 4 / 5;
    border-radius: 14px;
  }

  .provider-rail {
    margin-right: -12px;
    padding-right: 24px;
  }

  .provider-shortcut {
    width: 78px;
    min-width: 78px;
  }

  .provider-shortcut > span {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }

  .profile-hero {
    min-height: 52svh;
    margin: 0 -12px;
    border-radius: 0 0 var(--radius-shell) var(--radius-shell);
  }

  .profile-summary {
    margin-top: 0;
  }

  .floating-dock {
    top: auto;
    right: 12px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 12px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    border-radius: 18px;
    padding: 4px;
  }

  .floating-dock button {
    display: flex;
    width: 100%;
    height: 54px;
    min-height: 54px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 14px;
    padding: 4px;
  }

  .floating-dock button span {
    width: 20px;
    height: 20px;
  }

  .floating-dock button .hugeicon {
    width: 20px;
    height: 20px;
  }

  .floating-dock button strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 9px;
    font-weight: 550;
    letter-spacing: 0;
    line-height: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .floating-dock button.active {
    background: rgba(244, 243, 239, 0.14);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Desktop keeps the same compact floating dock, with Tahoe-style labels. */
@media (min-width: 1181px) {
  .sidebar { display: none; }
  .floating-dock {
    top: 16px;
    right: auto;
    bottom: auto;
    left: 18px;
    display: flex;
    border-radius: 18px;
  }
  .floating-dock button {
    width: auto;
    min-width: 58px;
    padding: 4px 11px;
  }
  .floating-dock button strong {
    display: block;
    font-size: 12px;
    font-weight: 550;
  }
}

/* Last-pass overrides intentionally live at EOF so legacy passes cannot override Paper geometry. */
.empty-state { min-height: 180px; align-items: center; justify-content: center; border: 0; border-radius: 0; background: transparent; padding: 24px; text-align: center; }
.empty-state h2, .empty-state p { margin-inline: auto; text-align: center; }
.media-card { min-width: 0; border: 0; border-radius: 0; background: transparent; }
.media-card .media-art { position: relative; overflow: hidden; aspect-ratio: 2 / 3; border: 1px solid #22252b; border-radius: 4px; outline: 0; background: var(--media-art) center / cover no-repeat, #15171b; box-shadow: 0 20px 25px -5px #00000066, 0 8px 10px -6px #00000066; }
.media-art-sheen { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 64%, rgba(0, 0, 0, .16)); pointer-events: none; }
.media-card-meta { gap: 3px; margin-top: 8px; padding: 0 2px 4px; }
.media-card-meta h3 { margin-bottom: 4px; color: #fff; font-size: 12px; font-weight: 500; line-height: 15px; }
.media-card-meta p { color: #ddd; font-size: 10px; line-height: 15px; }
.media-detail-page { min-height: 610px; align-items: stretch; margin-top: 0; border: 0; border-radius: 0 0 26px 26px; background: var(--media-art) center top / cover no-repeat, #08090b; }
.media-detail-page .detail-hero-wash { background: linear-gradient(180deg, rgba(8, 9, 11, .08) 16%, rgba(8, 9, 11, .42) 54%, #08090b 100%); }
.media-detail-page .detail-hero-copy { width: 100%; max-width: 760px; min-height: 610px; align-self: stretch; justify-content: flex-end; gap: 10px; margin-inline: auto; padding: 0 24px 28px; text-align: center; }
.media-detail-page .title-treatment { width: min(333px, 75%); height: 80px; max-width: 75%; max-height: 80px; align-items: center; justify-content: center; margin-inline: auto; }
.media-detail-page .title-logo { width: 100%; height: 80px; object-position: center; }
.media-detail-page .title-wordmark { max-width: 12ch; color: #fff; font-size: 34px; font-weight: 700; line-height: 38px; text-align: center; }
.media-detail-page .hero-summary { max-width: 48ch; margin-inline: auto; font-size: 14px !important; line-height: 22px !important; text-align: center; }
.media-detail-page .hero-actions { justify-content: center; gap: 8px; padding-top: 11px; }
.detail-track-button { height: 34px; min-height: 34px; border-radius: 6px; padding: 4px 22px; }
.detail-track-button .hugeicon { width: 18px; height: 18px; }
.detail-source-actions { display: flex; height: 34px; align-items: stretch; overflow: hidden; border: 1px solid #ffffff1a; border-radius: 8px; background: #ffffff1a; backdrop-filter: blur(20px) saturate(150%); }
.detail-source-action { display: grid; width: 60px; min-width: 60px; height: 100%; place-items: center; padding: 0 20px; }
.detail-source-action img { width: 20px; height: 20px; object-fit: contain; border-radius: 3px; }
.detail-source-actions > i { width: 1px; height: 24px; align-self: center; background: #ffffff40; }
.detail-source-actions > .icon-button { width: 60px; min-width: 60px; height: 100%; min-height: 34px; border: 0; border-radius: 0; background: transparent; padding: 0 20px; }
.detail-paper-content { display: block; width: min(100%, 700px); margin-inline: auto; padding: 0 24px; }
.detail-paper-content .media-facts { margin-top: 16px; }
.detail-tools { width: min(100%, 700px); margin: 24px auto 96px; padding: 0 24px; }
.media-detail-page ~ .episodes-panel { width: min(100%, 700px); margin-inline: auto; padding: 0 24px 40px; }
.media-detail-page ~ .episodes-panel .episodes-heading { min-height: 34px; justify-content: flex-start; padding: 0; }
.media-detail-page ~ .episodes-panel .episodes-heading > div:first-child p, .media-detail-page ~ .episodes-panel .season-progress, .media-detail-page ~ .episodes-panel .season-toolbar > .icon-button { display: none; }
.media-detail-page ~ .episodes-panel .season-toolbar { order: 2; margin-left: 12px; }
.media-detail-page ~ .episodes-panel .episode-list { display: flex; flex-direction: row; gap: 24px; overflow-x: auto; margin-inline: -24px; padding: 20px 24px 48px; border: 0; scrollbar-width: none; mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 60px), transparent 100%); }
.media-detail-page ~ .episodes-panel .episode-list::-webkit-scrollbar { display: none; }
.media-detail-page ~ .episodes-panel .episode-card { width: 288px; min-width: 288px; }
.media-detail-page ~ .episodes-panel .episode-card .episode-image { aspect-ratio: 16 / 9; height: auto; border-radius: 4px; }
.media-detail-page ~ .episodes-panel .episode-card-copy { padding-inline: 4px; }
.media-detail-page ~ .cast-section { width: min(100%, 700px); margin-inline: auto; padding: 0 24px 40px; }
.media-detail-page ~ .cast-section .cast-rail { gap: 20px; margin-inline: -24px; padding: 16px 24px; mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 60px), transparent 100%); }
.media-detail-page ~ .cast-section .cast-card { width: 128px; min-width: 128px; align-items: center; gap: 12px; }
.media-detail-page ~ .cast-section .cast-photo { width: 96px; height: 96px; border-radius: 999px; border-color: #ffffff1a; }
.media-detail-page ~ .cast-section .cast-card strong, .media-detail-page ~ .cast-section .cast-card span { width: 128px; text-align: center; }
@media (max-width: 680px) {
  .media-detail-page, .media-detail-page .detail-hero-copy { min-height: 610px; }
  .media-detail-page .detail-hero-copy { padding: 0 24px 28px; }
  .media-detail-page .title-treatment { width: min(333px, 86vw); max-width: 86vw; }
  .media-detail-page .hero-summary { max-width: 34ch; }
}
