@font-face {
  font-family: Alexandria;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/alexandria-arabic-wght-normal.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: Alexandria;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/alexandria-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --night: #0a0d14;
  --tile: #1a2130;
  --raised: #232c3f;
  --ink: #fff;
  --ink-soft: rgba(255, 255, 255, 0.84);
  --ink-quiet: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.14);
  --saffron: #f2b75b;
  --pomegranate: #b8324a;
  --indigo: #4b56c9;
  --teal: #16857f;
  --plum: #86409f;
  --forest: #2e7d4f;
  --slate: #4d6275;
  --gutter: 16px;
  --tabbar: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--night);
  color: var(--ink);
  font-family: Alexandria, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

::selection { background: var(--saffron); color: var(--night); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: inherit;
}

button:focus-visible, input:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; }

input {
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  caret-color: var(--saffron);
}

[hidden] { display: none !important; }

.quiet { color: var(--ink-quiet); }

.screen {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--night);
}

.page-title { font-size: 26px; font-weight: 600; line-height: 1.25; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 500;
  transition: transform 0.2s var(--ease), background-color 0.2s;
}

.button:active { transform: scale(0.97); }
.button svg { width: 20px; height: 20px; }
.button.is-primary { background: var(--ink); color: var(--night); font-weight: 600; }
.button.is-danger { color: #ff9aa9; }
.button:disabled { opacity: 0.5; }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: none;
}

.icon-button svg { width: 24px; height: 24px; }
[dir="rtl"] [data-back] svg { transform: scaleX(-1); }

/* Starting up. */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding-inline: var(--gutter);
  text-align: center;
}

.wordmark-pair { display: flex; gap: 20px; font-size: 44px; font-weight: 600; }
.loading-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* Signing in. */
.signin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 440px;
  margin: 0 auto;
  padding: 40px var(--gutter) 32px;
}

.field { display: flex; flex-direction: column; gap: 6px; color: var(--ink-soft); font-size: 14px; }
.field-label { margin-top: 8px; color: var(--ink-soft); font-size: 14px; }

.field input, .search-box {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--tile);
}

.signin-message { min-height: 22px; color: var(--ink-soft); }
.signin-message.is-problem { color: var(--saffron); }
.signin-note { font-size: 13px; }
.agree { display: flex; align-items: flex-start; gap: 12px; color: var(--ink-soft); font-size: 14px; line-height: 1.45; cursor: pointer; }
.agree input { flex: none; width: 22px; height: 22px; margin-top: 1px; accent-color: var(--saffron); cursor: pointer; }
.agree a, .legal-links a { color: var(--saffron); text-underline-offset: 3px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 28px var(--gutter) 0; font-size: 14px; }
a.button { color: inherit; text-decoration: none; }

/* Paying, in the Google Play edition. */
.paywall-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 440px;
  margin: 0 auto;
  padding: 56px var(--gutter) 32px;
  text-align: center;
}

.paywall-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.bilingual-part { display: block; }
.bilingual-part + .bilingual-part { margin-top: 8px; }

/* Profiles. */
.picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-top: calc(env(safe-area-inset-top) + 48px);
  text-align: center;
}

.picker-heading { display: flex; flex-direction: column; gap: 4px; font-size: 24px; font-weight: 600; }

.profiles {
  display: grid;
  grid-template-columns: repeat(2, 132px);
  gap: 24px 20px;
  list-style: none;
}

.profile-button { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; text-align: center; }
.profile-name { font-weight: 500; }
.profile-new { color: var(--saffron); font-size: 13px; line-height: 1.3; }
.profile-new.is-quiet { color: var(--ink-quiet); }
.profiles.is-managing .avatar { box-shadow: 0 0 0 3px var(--night), 0 0 0 5px var(--ink-quiet); }
.account-line { display: flex; flex-direction: column; gap: 2px; padding: 0 var(--gutter); font-size: 13px; }

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--tile);
  font-size: 44px;
  font-weight: 600;
}

.avatar.is-small { width: 32px; height: 32px; font-size: 15px; }
.avatar.is-large { width: 112px; height: 112px; margin: 0 auto 8px; font-size: 48px; }
.avatar-photo { display: block; width: 100%; height: 100%; object-fit: cover; }

.who-pomegranate { background: var(--pomegranate); }
.who-indigo { background: var(--indigo); }
.who-teal { background: var(--teal); }
.who-plum { background: var(--plum); }
.who-forest { background: var(--forest); }
.who-slate { background: var(--slate); }

/* The profile editor and other pages with a bar on top. */
.sheet-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  padding: 0 8px;
  background: rgba(10, 13, 20, 0.92);
}

.sheet-bar.is-floating { position: absolute; inset-inline: 0; background: none; }
.sheet-bar.is-floating .icon-button { background: rgba(10, 13, 20, 0.6); }
.sheet-title { font-size: 18px; font-weight: 600; }

.editor-body { display: flex; flex-direction: column; gap: 10px; max-width: 480px; margin: 0 auto; padding: 16px var(--gutter) 40px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }

.choice {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.choice.is-chosen { background: var(--ink); color: var(--night); }
.choice.picture { width: 52px; height: 52px; padding: 0; overflow: hidden; border-radius: 50%; font-size: 14px; }
.choice.picture.is-chosen, .choice.swatch.is-chosen { box-shadow: 0 0 0 3px var(--night), 0 0 0 5px var(--ink); background: var(--tile); color: var(--ink); }
.choice.swatch { width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%; }
.choice.swatch.is-chosen { background: inherit; }
.editor-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

/* The main screen. */
.main { overflow: hidden; padding: 0; }

.topbar {
  position: absolute;
  top: 0;
  inset-inline: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 8px) var(--gutter) 8px;
  background: linear-gradient(rgba(10, 13, 20, 0.95), rgba(10, 13, 20, 0));
}

.wordmark { font-size: 22px; font-weight: 600; }

.tab-page {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top) + 60px) 0 calc(env(safe-area-inset-bottom) + var(--tabbar) + 24px);
}

.tab-page > .page-title, .tab-page > .quiet, .tab-page > .facts, .tab-page > .actions { margin-inline: var(--gutter); }
.empty { padding: 40px var(--gutter); text-align: center; }

.tabbar {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  z-index: 3;
  display: flex;
  justify-content: space-around;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  background: rgba(10, 13, 20, 0.96);
}

.tab {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink-quiet);
  font-size: 10.5px;
  white-space: nowrap;
}

.tab svg { width: 24px; height: 24px; }
.tab.is-current { color: var(--ink); }
.tab.is-current svg { color: var(--saffron); }

/* The hero at the top of Home. */
.hero-holder { padding: 0 var(--gutter) 8px; }

.hero {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: var(--tile);
}

.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.hero-text {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 48px 16px 16px;
  background: linear-gradient(rgba(10, 13, 20, 0), rgba(10, 13, 20, 0.92));
}

.hero-title { font-size: 24px; font-weight: 600; line-height: 1.2; }
/* An English title on an Arabic page still lines up on the right, with the details under it. */
[dir="rtl"] .hero-title, [dir="rtl"] .title-name { text-align: right; }

/* Rows of titles. */
.row { margin-top: 22px; }

.row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 var(--gutter) 10px;
}

.row-title { font-size: 18px; font-weight: 600; }
.see-all { color: var(--saffron); font-size: 14px; white-space: nowrap; }

.track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 var(--gutter);
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}

.track::-webkit-scrollbar { display: none; }

.card {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 6px;
  scroll-snap-align: start;
  transition: transform 0.2s var(--ease);
}

.card:active { transform: scale(0.97); }
.card-poster { width: 112px; }
.card-landscape { width: 220px; }
.card-channel { width: 150px; }

.tile-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: var(--tile);
}

.card-poster .tile-frame { aspect-ratio: 2 / 3; }
.card-landscape .tile-frame, .card-channel .tile-frame { aspect-ratio: 16 / 9; }

.tile-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s;
}

.tile-art.is-ready { opacity: 1; }
.tile-art.is-logo { padding: 14%; object-fit: contain; }

.tile-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.3;
}

.tile-rating {
  position: absolute;
  top: 6px;
  inset-inline-start: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px 1px 5px;
  border-radius: 6px;
  background: rgba(10, 13, 20, 0.8);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tile-rating::before {
  content: "";
  width: 11px;
  height: 11px;
  background: var(--saffron);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3.2l2.7 5.6 6.1.8-4.5 4.3 1.1 6.1-5.4-3-5.4 3 1.1-6.1-4.5-4.3 6.1-.8z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3.2l2.7 5.6 6.1.8-4.5 4.3 1.1 6.1-5.4-3-5.4 3 1.1-6.1-4.5-4.3 6.1-.8z'/></svg>") center / contain no-repeat;
}

.tile-new {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--saffron);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.card-bar {
  position: absolute;
  inset: auto 8px 8px;
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(10, 13, 20, 0.62);
}

.card-bar i { display: block; height: 100%; background: var(--ink); }
.card-caption { overflow: hidden; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.card-note { margin-top: -4px; color: var(--ink-quiet); font-size: 12.5px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 14px 10px;
  padding: 12px var(--gutter) 40px;
}

.grid.is-channels { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid.is-list { display: flex; flex-direction: column; gap: 0; }
.grid .card { width: auto; }
.search-box { display: block; width: calc(100% - 2 * var(--gutter)); margin: 4px var(--gutter) 10px; }
#search-status { padding: 0 var(--gutter); }

/* The details line under a title. */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--ink-soft); font-size: 14px; }
.spot-new { padding: 1px 8px; border-radius: 6px; background: var(--saffron); color: var(--night); font-weight: 600; }
.spot-progress { color: var(--saffron); }
.spot-rating { display: inline-flex; align-items: center; gap: 3px; }
.spot-rating svg { width: 14px; height: 14px; color: var(--saffron); }

/* Title pages. */
.sheet { z-index: 5; }
.title-page { padding-top: 0; }
.title-art { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--tile); -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.title-info { display: flex; flex-direction: column; gap: 12px; margin-top: -40px; padding: 0 var(--gutter) 48px; }
.title-name { font-size: 28px; font-weight: 600; line-height: 1.2; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.plot { color: var(--ink-soft); }
.cast { font-size: 13.5px; }

.chips { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; scrollbar-width: none; }
.chip { flex: none; min-height: 38px; padding: 0 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); white-space: nowrap; }
.chip.is-chosen { background: var(--ink); color: var(--night); }
.episode-list { display: flex; flex-direction: column; margin-top: 8px; }

.episode {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.episode-play {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 14px 0 16px;
}

.episode-number { font-weight: 500; }
.episode-note { overflow: hidden; color: var(--ink-quiet); font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.episode.is-watched .episode-number { color: var(--ink-quiet); }
.episode-play .card-bar { position: static; width: 120px; margin-top: 6px; }
.download { color: var(--ink-soft); }
.download.is-busy { color: var(--saffron); animation: pulse 1.4s ease-in-out infinite; }

@keyframes pulse { 50% { opacity: 0.4; } }

/* Account. */
.facts { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.fact dt { color: var(--ink-quiet); font-size: 13px; }
.tab-page > .actions { margin-top: 24px; }

/* The player. */
.player { z-index: 8; padding: 0; background: #000; }
.player-video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }

.player-bar {
  position: absolute;
  top: 0;
  inset-inline: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: calc(env(safe-area-inset-top) + 4px) 8px 16px;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.player-bar .icon-button { pointer-events: auto; }
.player-title { font-weight: 600; }
.player-bar .quiet { font-size: 13px; }

.player-card {
  position: absolute;
  inset: auto var(--gutter) calc(env(safe-area-inset-bottom) + 80px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(26, 33, 48, 0.96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.player-card-title { font-size: 18px; font-weight: 600; }
.player-card-actions { margin-top: 8px; }

.toast {
  position: fixed;
  inset: auto var(--gutter) calc(env(safe-area-inset-bottom) + var(--tabbar) + 16px);
  z-index: 10;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--raised);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.3s var(--ease);
  pointer-events: none;
}

.toast.is-on { opacity: 1; transform: none; }

/* Arrows at the ends of a row, for a mouse. Hidden until a big screen with a mouse asks for them below. */
.track-wrap { position: relative; }

.track-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  width: max(var(--gutter), 40px);
  background: rgba(10, 13, 20, 0.74);
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.2s, background-color 0.2s;
}

.track-arrow.is-back { inset-inline-start: 0; }
.track-arrow.is-next { inset-inline-end: 0; }
.track-arrow svg { width: 30px; height: 30px; transition: transform 0.2s var(--ease); }
.track-arrow.is-next svg, [dir="rtl"] .track-arrow.is-back svg { transform: scaleX(-1); }
[dir="rtl"] .track-arrow.is-next svg { transform: none; }

/* A computer, or a tablet on its side: the tabs move up beside the name, and everything gets room to breathe. */
@media (min-width: 900px) {
  :root { --gutter: clamp(32px, 4vw, 64px); --tabbar: 0px; }

  .screen, .tab-page { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
  .screen::-webkit-scrollbar, .tab-page::-webkit-scrollbar { width: 10px; }
  .screen::-webkit-scrollbar-thumb, .tab-page::-webkit-scrollbar-thumb { border: 3px solid var(--night); border-radius: 999px; background: rgba(255, 255, 255, 0.22); }

  /* Solid behind the tabs, so titles scrolling up never show through them, then a short fade. */
  .topbar { min-height: 92px; align-items: flex-start; padding-block: 18px 0; background: linear-gradient(var(--night) 78%, rgba(10, 13, 20, 0)); }
  .wordmark { font-size: 26px; }

  .tabbar {
    top: 0;
    bottom: auto;
    /* Between the name and the profile picture, never over either. */
    inset-inline: calc(var(--gutter) + 116px) calc(var(--gutter) + 52px);
    z-index: 4;
    justify-content: flex-start;
    gap: 4px;
    align-items: center;
    height: 72px;
    padding: 0;
    border: 0;
    background: none;
  }

  .tab {
    flex: none;
    flex-direction: row;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 15px;
    transition: color 0.2s, background-color 0.2s;
  }

  .tab svg { width: 20px; height: 20px; }
  .tab.is-current { background: rgba(255, 255, 255, 0.1); }

  .tab-page { padding: 88px 0 64px; }
  .empty { padding-block: 80px; }

  .hero-holder { padding-bottom: 12px; }
  .hero { aspect-ratio: auto; height: clamp(320px, 56vh, 600px); border-radius: 20px; }
  .hero-art { transition: transform 0.6s var(--ease); }
  .hero-text { gap: 10px; padding: 120px clamp(28px, 3vw, 48px) clamp(28px, 3vw, 44px); }
  .hero-title { max-width: 22ch; font-size: clamp(34px, 3.4vw, 54px); text-wrap: balance; }
  .hero .meta { font-size: 15.5px; }

  .row { margin-top: 36px; }
  .row-head { padding-bottom: 14px; }
  .row-title { font-size: 22px; }
  .see-all { font-size: 15px; }
  .track { gap: 16px; }
  .card { gap: 8px; }
  .card-poster { width: clamp(144px, 11.5vw, 200px); }
  .card-landscape { width: clamp(264px, 21vw, 380px); }
  .card-channel { width: clamp(184px, 14vw, 240px); }
  .tile-frame { border-radius: 12px; }
  .card-caption { font-size: 15px; }
  .card-note { font-size: 13.5px; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 28px 18px; padding-top: 20px; }
  .grid.is-channels { grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); }
  .search-box { max-width: 640px; height: 54px; margin-top: 8px; font-size: 18px; }
  .sheet-bar { min-height: 68px; padding-inline: calc(var(--gutter) - 12px); }
  .sheet-title { font-size: 22px; }

  /* The title page: the picture across the top, the words over its lower part, and episodes in a readable column. */
  .title-art { aspect-ratio: auto; height: clamp(340px, 70vh, 720px); }
  .title-info { position: relative; gap: 16px; max-width: 1040px; margin-top: -200px; padding-bottom: 80px; }
  .title-name { max-width: 22ch; font-size: clamp(36px, 3.6vw, 56px); text-wrap: balance; }
  .title-info .meta { font-size: 15.5px; }
  .plot { max-width: 68ch; font-size: 17px; line-height: 1.55; }
  .cast { max-width: 80ch; font-size: 14.5px; }
  .chips { margin-top: 20px; }
  .episode-play { padding: 18px 0 20px; }
  .episode-number { font-size: 17px; }
  .episode-note { font-size: 14.5px; }

  .picker { justify-content: center; gap: 40px; min-height: 100%; padding-block: 48px; }
  .picker-heading { font-size: 36px; }
  .profiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 36px 32px; max-width: 1040px; }
  .profiles > li { width: 164px; }
  .avatar { width: 144px; height: 144px; font-size: 60px; }
  .profile-name { font-size: 18px; }
  .profile-new { font-size: 14px; }
  .account-line { font-size: 14px; }

  .signin-form { padding-top: 12vh; }
  .tab-page > .page-title { font-size: 32px; }
  .facts { max-width: 640px; }

  .player-bar { padding: 16px calc(var(--gutter) - 12px) 32px; }
  .player-title { font-size: 19px; }
  .player-bar .quiet { font-size: 14.5px; }
  .player-card { left: auto; right: auto; inset-inline-end: var(--gutter); bottom: 104px; width: 400px; }

  .toast { inset: auto auto 32px 50%; max-width: 560px; transform: translate(-50%, 8px); }
  .toast.is-on { transform: translate(-50%, 0); }
}

/* A narrower window: the tab names alone, so all six fit in Arabic too. */
@media (min-width: 900px) and (max-width: 1099px) {
  .tab { padding: 0 13px; }
  .tab svg { display: none; }
}

/* Hover belongs to a mouse, never to a finger. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .track-arrow { display: flex; }
  .track-wrap:hover .track-arrow { opacity: 1; }
  .track-arrow:hover { background: rgba(10, 13, 20, 0.9); }
  .track-arrow.is-back:hover svg { transform: translateX(-3px); }
  .track-arrow.is-next:hover svg { transform: scaleX(-1) translateX(-3px); }
  [dir="rtl"] .track-arrow.is-back:hover svg { transform: scaleX(-1) translateX(-3px); }
  [dir="rtl"] .track-arrow.is-next:hover svg { transform: translateX(-3px); }

  .card .tile-frame { transition: box-shadow 0.2s, transform 0.3s var(--ease); }
  .card:hover .tile-frame { box-shadow: 0 0 0 2px var(--ink), 0 10px 24px rgba(0, 0, 0, 0.45); transform: translateY(-3px); }
  .card:hover .card-caption { color: var(--ink); }
  .hero:hover .hero-art { transform: scale(1.025); }
  .button:hover { background: rgba(255, 255, 255, 0.2); }
  .button.is-primary:hover { background: rgba(255, 255, 255, 0.86); }
  .tab:hover { color: var(--ink); }
  .tab:not(.is-current):hover { background: rgba(255, 255, 255, 0.06); }
  .chip:not(.is-chosen):hover, .choice:not(.is-chosen):hover { background: rgba(255, 255, 255, 0.18); }
  .episode-play:hover .episode-number { color: var(--saffron); }
  .see-all:hover { text-decoration: underline; text-underline-offset: 4px; }
  .profile-button:hover .avatar { box-shadow: 0 0 0 3px var(--night), 0 0 0 5px var(--ink); }
  .icon-button:hover { background: rgba(255, 255, 255, 0.12); }
}

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