body.is-watch #detailPage.detail-page {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  background: var(--bg-base) !important;
}

/* Final header geometry: protect the wordmark from older layout overrides. */
@media (min-width: 1381px) {
  .topbar,
  body.is-detail .topbar {
    grid-template-columns: minmax(230px, max-content) minmax(430px, 1fr) minmax(340px, 640px) max-content !important;
    column-gap: clamp(24px, 2.2vw, 44px) !important;
  }
  .topbar .logo { min-width: 230px !important; padding-left: 0 !important; }
  .topbar .header-nav { min-width: 0 !important; }
}

.watch-player-page {
  width: min(100%, 1920px);
  margin: 0 auto;
  padding: 22px clamp(14px, 2.2vw, 42px) 56px;
}

.ah-player-sourcebar {
  display: flex;
  width: min(100%, 1500px, calc((100svh - 180px) * 16 / 9));
  align-items: stretch;
  gap: 10px;
  margin: 0 auto 12px;
}

.ah-player-source,
.ah-player-telegram {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 7px;
  color: #e9eaed;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.ah-player-source {
  flex: 0 0 98px;
  background: #0d0f13;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.ah-player-source:hover { border-color: rgba(255, 255, 255, .24); background: #13161b; color: #fff; }
.ah-player-source.is-active { border-color: rgba(255, 255, 255, .34); background: #171a20; color: #fff; }

.ah-player-telegram {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  padding: 0 18px;
  border-color: rgba(73, 168, 210, .42);
  background: linear-gradient(100deg, #176d94, #218db8);
  color: #fff;
  box-shadow: 0 0 0 rgba(49, 181, 238, 0);
  animation: ah-telegram-double-pulse 1s ease-in-out infinite;
}
.ah-player-telegram svg { width: 21px; height: 21px; flex: 0 0 auto; fill: currentColor; }
.ah-player-telegram:hover { border-color: rgba(105, 199, 238, .62); background: linear-gradient(100deg, #1b789f, #2799c3); }

@keyframes ah-telegram-double-pulse {
  0%, 25%, 50%, 75%, 100% { box-shadow: 0 0 0 rgba(49, 181, 238, 0); filter: brightness(1); }
  12.5%, 62.5% { box-shadow: 0 0 18px rgba(49, 181, 238, .42); filter: brightness(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .ah-player-telegram { animation: none; }
}

.ah-player {
  --player-accent: var(--orange, #ff9367);
  --player-accent-soft: var(--orange-2, #ffc4a8);
  position: relative;
  width: min(100%, 1500px, calc((100svh - 180px) * 16 / 9));
  aspect-ratio: 16 / 9;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: var(--bg-base);
  color: #fff;
  outline: none;
  isolation: isolate;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
  user-select: none;
}

.ah-player__video,
.ah-player__upscale,
.ah-player__embed,
.ah-player__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ah-player__video { z-index: 1; object-fit: contain; background: #000; }
.ah-player__upscale { z-index: 1; display: block; object-fit: contain; background: #000; pointer-events: none; }
.ah-player__upscale[hidden] { display: none; }
.ah-player.is-upscaled .ah-player__video { opacity: 0; }
.ah-player__embed { z-index: 1; border: 0; background: #000; }
.ah-player__embed[hidden] { display: none; }
.ah-player__backdrop { z-index: 2; background: #090b0e center / cover no-repeat; transition: opacity .25s ease; }
.ah-player.has-video .ah-player__backdrop { opacity: 0; pointer-events: none; }
.ah-player.is-movie [data-player-select="season"],
.ah-player.is-movie [data-player-select="episode"],
.watch-player-page.is-movie .ah-episode-rail-wrap { display: none; }
.ah-player.is-kodik [data-player-select="season"],
.ah-player.is-kodik [data-player-select="episode"] { display: none; }

.ah-player button { font: inherit; color: inherit; }

.ah-player__upscale-notice {
  position: absolute;
  z-index: 18;
  left: 50%;
  bottom: 84px;
  max-width: min(460px, calc(100% - 36px));
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 9px;
  background: rgba(12, 13, 16, .9);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .35);
  color: rgba(255, 255, 255, .84);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transform: translateX(-50%);
}
.ah-player__upscale-notice[hidden] { display: none; }

.ah-player__shade { position: absolute; left: 0; right: 0; z-index: 3; pointer-events: none; transition: opacity .22s ease; }
.ah-player__shade--top { top: 0; height: 108px; background: linear-gradient(rgba(3, 4, 5, .86), rgba(3, 4, 5, .36) 58%, transparent); }
.ah-player__shade--bottom { bottom: 0; height: 160px; background: linear-gradient(transparent, rgba(3, 4, 5, .52) 35%, rgba(3, 4, 5, .96)); }

.ah-player__top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 8;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 15px 18px;
  transition: opacity .22s ease;
}

.ah-player__title { margin: 8px 2px 0 auto; max-width: 34%; overflow: hidden; color: rgba(255, 255, 255, .62); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ah-player-select { position: relative; }
.ah-player-select > button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  max-width: 220px;
  padding: 6px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.ah-player-select > button:hover,
.ah-player-select.is-open > button { background: rgba(255, 255, 255, .08); }
.ah-player-select.is-open > button { color: var(--player-accent); }
.ah-player-select small { color: rgba(255, 255, 255, .45); font-size: 10px; font-weight: 800; letter-spacing: .45px; text-transform: uppercase; }
.ah-player-select span { overflow: hidden; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.ah-player-select b { color: rgba(255, 255, 255, .44); font-size: 13px; transition: transform .15s ease; }
.ah-player-select.is-open b { transform: rotate(180deg); }

.ah-player-select__menu,
.ah-player-quality__menu,
.ah-player-settings__menu {
  position: absolute;
  z-index: 20;
  min-width: 190px;
  max-height: min(330px, 55vh);
  padding: 6px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 11px;
  background: rgba(12, 13, 16, .97);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .58);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity .14s ease, transform .14s ease;
  scrollbar-color: rgba(255, 255, 255, .22) transparent;
  scrollbar-width: thin;
}
.ah-player-select__menu { top: calc(100% + 5px); left: 0; }
.ah-player-select.is-open .ah-player-select__menu,
.ah-player-quality.is-open .ah-player-quality__menu,
.ah-player-settings.is-open .ah-player-settings__menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.ah-player-select__menu button,
.ah-player-quality__menu button,
.ah-player-settings__menu button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, .7);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}
.ah-player-quality__menu button:disabled { opacity: .35; cursor: not-allowed; }
.ah-player-quality__up-arrow { margin-left: auto; color: var(--player-accent); font-size: 16px; line-height: 1; }
.ah-player-select__menu button:hover,
.ah-player-quality__menu button:hover,
.ah-player-settings__menu button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.ah-player-select__menu button.is-active,
.ah-player-quality__menu button.is-active,
.ah-player-settings__menu button.is-active { color: var(--player-accent); }
.ah-player-select__menu button > span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-player-voice-badge {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 5px;
  background: rgba(255, 255, 255, .09);
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .25px;
}

.ah-player__center {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 7;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  padding: 0 0 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  color: #fff;
  transform: translate(-50%, -50%);
  transition: opacity .18s ease, transform .16s ease;
}
.ah-player__center svg { width: 34px; height: 38px; overflow: visible; fill: currentColor; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .55)); }
.ah-player__center:hover { background: transparent; color: #fff; transform: translate(-50%, -50%) scale(1.08); }
.ah-player__center[hidden] { display: none; }
.ah-player:has(.ah-player__loading:not([hidden])) .ah-player__center,
.ah-player:has(.ah-player__error:not([hidden])) .ah-player__center { display: none; }
.ah-player.is-playing .ah-player__center { opacity: 0; pointer-events: none; }

.ah-player__seek-flash { position: absolute; top: 50%; z-index: 8; display: grid; width: 92px; height: 92px; place-items: center; border-radius: 50%; background: rgba(8, 9, 11, .58); color: #fff; font-size: 14px; font-weight: 900; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(.72); }
.ah-player__seek-flash.is-left { left: 27%; }
.ah-player__seek-flash.is-right { left: 73%; }
.ah-player__seek-flash.is-visible { animation: ah-player-seek-flash .52s ease-out; }
@keyframes ah-player-seek-flash { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.7); } 28% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.12); } }

.ah-player__loading,
.ah-player__error { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; justify-items: center; gap: 13px; background: rgba(4, 5, 7, .78); text-align: center; }
.ah-player__loading[hidden], .ah-player__error[hidden] { display: none; }
.ah-player__loading span { width: 34px; height: 34px; border: 3px solid rgba(255, 255, 255, .13); border-top-color: var(--player-accent); border-radius: 50%; animation: ah-player-spin .72s linear infinite; }
.ah-player__loading p { color: rgba(255, 255, 255, .58); font-size: 13px; font-weight: 700; }
.ah-player__error strong { font-size: 18px; }
.ah-player__error span { max-width: 520px; color: rgba(255, 255, 255, .55); }
.ah-player__error button { padding: 10px 16px; border: 0; border-radius: 8px; background: #fff; color: #090a0c; cursor: pointer; font-weight: 800; }
@keyframes ah-player-spin { to { transform: rotate(360deg); } }

.ah-player__skip { position: absolute; right: 20px; bottom: 94px; z-index: 8; padding: 9px 14px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px; background: rgba(8, 9, 11, .82); cursor: pointer; font-size: 12px; font-weight: 800; opacity: 0; pointer-events: none; transition: opacity .2s ease, background .14s ease, color .14s ease; }
.ah-player__skip[hidden] { display: none; }
.ah-player.is-playing .ah-player__skip { opacity: 1; pointer-events: auto; }
.ah-player__skip:hover { background: #fff; color: #08090b; }

.ah-player__controls { position: absolute; inset: auto 0 0; z-index: 9; padding: 42px 22px 14px; transition: opacity .22s ease; }
.ah-player__seek { position: relative; display: flex; height: 26px; align-items: center; margin-bottom: 4px; cursor: pointer; touch-action: none; }
.ah-player__seek-track { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); transition: height .12s ease; }
.ah-player__seek:hover .ah-player__seek-track { height: 6px; }
.ah-player__seek-track i,
.ah-player__seek-track b { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; }
.ah-player__seek-track i { background: rgba(255, 255, 255, .22); }
.ah-player__seek-track b { background: linear-gradient(90deg, var(--player-accent), var(--player-accent-soft)); }
.ah-player__seek-track span { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: none; transform: translate(-50%, -50%) scale(.75); transition: transform .12s ease; }
.ah-player__seek:hover .ah-player__seek-track span { transform: translate(-50%, -50%) scale(1); }
.ah-player__seek em { position: absolute; bottom: calc(100% + 3px); left: 0; padding: 5px 8px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 6px; background: #0b0c0f; font-size: 11px; font-style: normal; font-weight: 800; opacity: 0; pointer-events: none; transform: translateX(-50%); }
.ah-player__seek:hover em { opacity: 1; }
.ah-player__row { display: flex; align-items: center; gap: 12px; }
.ah-player__icon,
.ah-player-quality > button { display: grid; min-width: 38px; height: 38px; place-items: center; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-weight: 800; transition: color .14s ease, background .14s ease; }
.ah-player__icon:hover,
.ah-player-quality > button:hover { background: rgba(255, 255, 255, .08); color: var(--player-accent); }
.ah-player__icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ah-player__time { display: flex; gap: 6px; color: #fff; font-size: 13px; font-variant-numeric: tabular-nums; }
.ah-player__time i { color: rgba(255, 255, 255, .42); font-style: normal; }
.ah-player__spacer { flex: 1; }
.ah-player__volume { width: 78px; accent-color: var(--player-accent); cursor: pointer; }
.ah-player-quality { position: relative; }
.ah-player-quality__menu { right: 0; bottom: calc(100% + 7px); min-width: 150px; transform: translateY(5px); }
.ah-player-settings { position: relative; }
.ah-player-settings__menu { right: 0; bottom: calc(100% + 7px); min-width: 142px; transform: translateY(5px); }
.ah-player-settings__menu > strong { display: block; padding: 7px 11px 5px; color: rgba(255, 255, 255, .42); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.ah-player-settings__menu button::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.ah-player-settings__menu button.is-active::after { background: var(--player-accent); }

.ah-player.is-playing.is-idle .ah-player__top,
.ah-player.is-playing.is-idle .ah-player__controls,
.ah-player.is-playing.is-idle .ah-player__shade,
.ah-player.is-playing.is-idle .ah-player__skip { opacity: 0; pointer-events: none; }

.ah-player.is-embed .ah-player__video,
.ah-player.is-embed .ah-player__backdrop,
.ah-player.is-embed .ah-player__center,
.ah-player.is-embed .ah-player__skip,
.ah-player.is-embed .ah-player__controls,
.ah-player.is-embed .ah-player__top,
.ah-player.is-embed .ah-player__shade--top,
.ah-player.is-embed .ah-player__shade--bottom {
  display: none !important;
}

.ah-episode-rail-wrap { display: grid; width: min(100%, 1500px, calc((100svh - 180px) * 16 / 9)); grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 10px; align-items: center; margin: 16px auto 0; }
.ah-episode-rail { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; scroll-behavior: smooth; }
.ah-episode-rail::-webkit-scrollbar { display: none; }
.ah-episode-card,
.ah-episode-arrow { flex: 0 0 auto; min-height: 50px; border: 1px solid rgba(255, 255, 255, .075); border-radius: 9px; background: #131419; color: rgba(255, 255, 255, .68); cursor: pointer; font-weight: 800; transition: background .14s ease, border-color .14s ease, color .14s ease; }
.ah-episode-card { min-width: 116px; padding: 0 18px; }
.ah-episode-arrow { width: 42px; font-size: 25px; }
.ah-episode-card:hover,
.ah-episode-arrow:hover { background: #1a1b20; color: #fff; }
.ah-episode-card.is-active { border-color: var(--orange, #ff9367); background: rgba(255, 147, 103, .1); color: #fff; }

.episode-comments {
  width: min(100%, 1500px, calc((100svh - 180px) * 16 / 9));
  margin: 56px auto 0;
  color: #f5f5f6;
}
.episode-comments > header { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.09); }
.episode-comments > header h2 { margin: 0; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.04em; }
.episode-comments > header span { min-width: 28px; padding: 5px 8px; border-radius: 999px; background: #202127; color: #a7a9b0; text-align: center; font-size: 12px; font-weight: 850; }
.episode-comment-form { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 14px; margin-top: 22px; }
.episode-comment-form > img,
.episode-comment__avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #24262c; }
.episode-comment-form textarea,
.episode-reply-form textarea { width: 100%; resize: vertical; padding: 14px 16px; border: 1px solid #30323a; border-radius: 12px; outline: 0; background: #15161a; color: #f6f6f7; font: inherit; line-height: 1.5; }
.episode-comment-form textarea:focus,
.episode-reply-form textarea:focus { border-color: rgba(255,145,102,.65); box-shadow: 0 0 0 3px rgba(255,145,102,.08); }
.episode-comment-form.is-replying textarea { border-color: rgba(255,145,102,.72); box-shadow: 0 0 0 3px rgba(255,145,102,.08); }
.episode-comment-form.is-replying footer span { color: #ffab87; }
.episode-comment-form footer,
.episode-reply-form > div { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 9px; }
.episode-comment-form footer span { margin-right: auto; color: #777a83; font-size: 12px; }
.episode-comment-form footer button,
.episode-reply-form button,
.episode-comments-more { min-height: 38px; padding: 0 15px; border: 1px solid var(--border-default); border-radius: 9px; background: #1c1e23; color: #dddfe4; font: inherit; font-size: 12px; font-weight: 850; cursor: pointer; }
.episode-comment-form footer button { border-color: transparent; background: #ff9367; color: #17100d; }
.episode-comment-form button:hover,
.episode-reply-form button:hover,
.episode-comments-more:hover { border-color: rgba(255,145,102,.62); color: var(--accent-hover); }
.episode-comment-form footer button:hover { color: #17100d; background: #ffad88; }
.episode-comment-form button:disabled,
.episode-comments-more:disabled { opacity: .55; cursor: wait; }
.episode-comments-list { margin-top: 28px; }
.episode-comments-empty { margin: 0; padding: 28px 0; color: #7f828a; }
.episode-comment { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 14px; padding: 22px 0; border-bottom: 1px solid rgba(255,255,255,.075); }
.episode-comment__content { min-width: 0; }
.episode-comment__content > header { display: flex; align-items: center; gap: 10px; }
.episode-comment__content > header button { padding: 0; border: 0; background: none; color: #f0f1f3; font: inherit; font-size: 13px; font-weight: 900; cursor: pointer; }
.episode-comment__content > header button:hover { color: #ffad88; }
.episode-comment__content > header time { color: #73767f; font-size: 11px; }
.episode-comment__content > p { margin: 11px 0 0; color: #d2d4d9; font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.episode-comment__actions { display: flex; align-items: center; gap: 5px; margin-top: 12px; }
.episode-comment__actions button { min-width: 30px; min-height: 28px; padding: 0 7px; border: 0; border-radius: 7px; background: transparent; color: #858890; font: inherit; font-size: 13px; font-weight: 850; cursor: pointer; }
.episode-comment__actions button:hover { background: rgba(255,255,255,.055); color: #f1f1f2; }
.episode-comment__actions button.is-active { background: rgba(255,145,102,.12); color: #ff9e76; }
.episode-comment__actions [data-comment-vote="up"]:hover,
.episode-comment__actions [data-comment-vote="up"].is-active { background: rgba(75, 201, 111, .13); color: #65dc88; }
.episode-comment__actions [data-comment-vote="down"]:hover,
.episode-comment__actions [data-comment-vote="down"].is-active { background: rgba(241, 88, 88, .13); color: #ff7373; }
.episode-comment__actions [data-comment-score] { min-width: 24px; color: #b3b5bc; text-align: center; font-size: 12px; font-weight: 850; }
.episode-comment__actions .episode-comment__reply { margin-left: 9px; }
.episode-comment__actions .episode-comment__delete { margin-left: auto; color: #e45f5f; }
.episode-comment__actions .episode-comment__delete:hover { background: rgba(241, 88, 88, .12); color: #ff7b7b; }
.episode-comment-replies { margin-top: 16px; padding-left: 18px; border-left: 1px solid rgba(255,145,102,.28); }
.episode-comment.is-reply { grid-template-columns: 34px minmax(0,1fr); padding: 16px 0; border-bottom: 0; }
.episode-comment.is-reply .episode-comment__avatar { width: 34px; height: 34px; }
.episode-reply-form { margin-top: 14px; }
.episode-comments-more { display: block; min-width: 150px; margin: 24px auto 0; }
.episode-comments-more[hidden] { display: none; }

/* Compact message bar: attachment mark, avatar and one-line editor. */
.episode-comment-form {
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(100%, 1120px);
  min-height: 68px;
  margin: 22px auto 0;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 12px;
  background: #08090b;
  transition: border-color .16s ease, background .16s ease;
}
.episode-comment-form:focus-within,
.episode-comment-form.is-replying { border-color: rgba(255, 255, 255, .28); background: #0b0c0f; }
.episode-comment-form > img { width: 42px; height: 42px; }
.episode-comment-form__editor { position: relative; min-width: 0; background: transparent !important; }
.episode-comment-form .episode-comment-form__editor textarea {
  display: block;
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 96px;
  padding: 12px 50px 12px 0;
  overflow-y: auto;
  resize: none;
  appearance: none;
  border: 0 !important;
  border-radius: 0;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: #fff;
  font-size: 16px;
  line-height: 24px;
}
.episode-comment-form .episode-comment-form__editor textarea:focus { border: 0; box-shadow: none; }
.episode-comment-form .episode-comment-form__editor textarea::placeholder { color: #8b8e94; opacity: 1; }
.episode-comment-form .episode-comment-form__editor footer { position: absolute; inset: 0 0 0 auto; display: flex; align-items: center; margin: 0; }
.episode-comment-form .episode-comment-form__editor footer span {
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  width: max-content;
  max-width: min(520px, 72vw);
  overflow: hidden;
  color: #a3a5aa;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.episode-comment-form .episode-comment-form__editor footer button {
  position: relative;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
  opacity: 0;
  color: transparent;
  border-color: rgba(255, 255, 255, .18);
  background: #f2f2f2;
  transform: translateX(6px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
}
.episode-comment-form .episode-comment-form__editor footer button:hover { border-color: #fff; background: #fff; }
.episode-comment-form.is-replying .episode-comment-form__editor footer span { color: #d5d6d9; }
.episode-comment-form .episode-comment-form__editor footer button::after {
  content: "↑";
  display: grid;
  position: absolute;
  inset: 0;
  place-items: center;
  color: #17100d;
  font-size: 18px;
  line-height: 1;
}
.episode-comment-form:focus-within .episode-comment-form__editor footer button,
.episode-comment-form.is-replying .episode-comment-form__editor footer button { opacity: 1; transform: translateX(0); pointer-events: auto; }

@media (max-width: 900px) {
  .watch-player-page { padding: 18px 12px 42px; }
  .ah-player { width: min(100%, calc((100svh - 120px) * 16 / 9)); border-radius: 10px; }
  .ah-episode-rail-wrap { width: min(100%, calc((100svh - 120px) * 16 / 9)); }
  .episode-comments { width: min(100%, calc((100svh - 120px) * 16 / 9)); }
  .ah-player__top { gap: 0; padding: 9px; }
  .ah-player-select small, .ah-player__title { display: none; }
  .ah-player-select > button { max-width: 150px; min-height: 38px; padding: 5px 8px; }
  .ah-player__controls { padding: 32px 12px 8px; }
  .ah-player__volume { display: none; }
  .ah-player__center { width: 62px; height: 62px; }
  .episode-comment-form { grid-template-columns: 42px minmax(0, 1fr); gap: 10px; min-height: 70px; padding: 9px 11px; }
  .episode-comment-form > img { width: 42px; height: 42px; }
  .episode-comment-form .episode-comment-form__editor textarea { height: 50px; min-height: 50px; padding-right: 52px; font-size: 15px; }
  .episode-comment-form .episode-comment-form__editor footer button { position: relative; width: 42px; min-width: 42px; padding: 0; overflow: hidden; color: transparent; }
  .episode-comment-form .episode-comment-form__editor footer button::after { content: "↑"; display: grid; position: absolute; inset: 0; place-items: center; color: #17100d; font-size: 18px; }
}

@media (max-width: 620px) {
  .ah-player-sourcebar { gap: 6px; margin-bottom: 8px; }
  .ah-player-source { flex-basis: 76px; }
  .ah-player-source, .ah-player-telegram { min-height: 38px; font-size: 11px; }
  .ah-player-telegram { gap: 6px; padding-inline: 10px; }
  .ah-player-telegram svg { width: 18px; height: 18px; }
  .ah-player__top { overflow-x: auto; }
  .ah-player-select > button { max-width: 118px; }
  .ah-player-select span { font-size: 11px; }
  .ah-player__row { gap: 4px; }
  .ah-player__icon, .ah-player-quality > button { min-width: 32px; height: 32px; padding-inline: 6px; }
  .ah-player__icon svg { width: 19px; height: 19px; }
  #ahPlayerPip { display: none; }
  .ah-player__skip { right: 10px; bottom: 70px; }
  .ah-episode-rail-wrap { grid-template-columns: minmax(0, 1fr); }
  .ah-episode-arrow { display: none; }
  .episode-comments { margin-top: 38px; }
  .episode-comment-form { grid-template-columns: 34px minmax(0,1fr); gap: 8px; }
  .episode-comment-form > img { width: 34px; height: 34px; }
  .episode-comment { grid-template-columns: 50px minmax(0,1fr); column-gap: 14px; }
  .episode-comment__avatar { width: 36px; height: 36px; }
  .episode-comment.is-reply { grid-template-columns: 40px minmax(0,1fr); column-gap: 12px; }
  .episode-comment__content > header time { display: none; }
  .episode-comment-replies { padding-left: 10px; }
}



/* ============================================================
   AnimeHub Player — Figma handoff pass (2026-09-15)
   Keeps the existing HLS/Anime4K logic and rebuilds the visual UI.
   ============================================================ */

body.is-watch .watch-player-page {
  --figma-panel: #090909;
  --figma-panel-2: #101010;
  --figma-border: rgba(255,255,255,.075);
  --figma-muted: rgba(255,255,255,.46);
  --figma-text: rgba(255,255,255,.88);
}

body.is-watch .ah-player {
  width: min(100%, 1120px, calc((100svh - 150px) * 16 / 9));
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 3px;
  background: #000;
  box-shadow: none;
}

body.is-watch .ah-player-sourcebar {
  width: min(100%, 1120px, calc((100svh - 150px) * 16 / 9));
  gap: 5px;
  margin-bottom: 7px;
}

body.is-watch .ah-player-source {
  flex-basis: 72px;
  min-height: 29px;
  border-color: rgba(255,255,255,.07);
  border-radius: 3px;
  background: #0a0a0a;
  font-size: 10px;
  font-weight: 700;
}

body.is-watch .ah-player-telegram {
  min-height: 29px;
  border-color: rgba(255,255,255,.07);
  border-radius: 3px;
  background: #0a0a0a;
  box-shadow: none;
  animation: none;
  color: rgba(255,255,255,.64);
  font-size: 10px;
  font-weight: 650;
}
body.is-watch .ah-player-telegram:hover {
  border-color: rgba(255,255,255,.14);
  background: #111;
  color: #fff;
}
body.is-watch .ah-player-telegram svg { width: 14px; height: 14px; }

body.is-watch .ah-player__shade--top {
  height: 82px;
  background: linear-gradient(rgba(0,0,0,.60), rgba(0,0,0,.16) 62%, transparent);
}
body.is-watch .ah-player__shade--bottom {
  height: 112px;
  background: linear-gradient(transparent, rgba(0,0,0,.46) 42%, rgba(0,0,0,.92));
}

body.is-watch .ah-player__top {
  gap: 2px;
  padding: 9px 12px;
}
body.is-watch .ah-player-select > button {
  min-height: 27px;
  max-width: 170px;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 3px;
}
body.is-watch .ah-player-select > button:hover,
body.is-watch .ah-player-select.is-open > button {
  background: rgba(255,255,255,.055);
}
body.is-watch .ah-player-select small {
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .18px;
}
body.is-watch .ah-player-select span {
  font-size: 9px;
  font-weight: 650;
}
body.is-watch .ah-player-select b {
  font-size: 9px;
  font-weight: 500;
}
body.is-watch .ah-player__title {
  margin-top: 6px;
  font-size: 9px;
  font-weight: 550;
}

/* Figma-like tiny, square menus */
body.is-watch .ah-player-select__menu,
body.is-watch .ah-player-quality__menu,
body.is-watch .ah-player-settings__menu,
body.is-watch .ah-player-speed__menu,
body.is-watch .ah-player-subtitles__menu {
  min-width: 142px;
  max-height: min(310px, 55vh);
  padding: 4px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 4px;
  background: rgba(7,7,7,.985);
  box-shadow: 0 14px 36px rgba(0,0,0,.5);
}

body.is-watch .ah-player-select__menu button,
body.is-watch .ah-player-quality__menu button,
body.is-watch .ah-player-settings__menu button,
body.is-watch .ah-player-speed__menu button,
body.is-watch .ah-player-subtitles__menu button {
  min-height: 26px;
  gap: 10px;
  padding: 5px 7px;
  border-radius: 2px;
  color: rgba(255,255,255,.66);
  font-size: 9px;
  font-weight: 600;
}
body.is-watch .ah-player-select__menu button:hover,
body.is-watch .ah-player-quality__menu button:hover,
body.is-watch .ah-player-settings__menu button:hover,
body.is-watch .ah-player-speed__menu button:hover,
body.is-watch .ah-player-subtitles__menu button:hover {
  background: rgba(255,255,255,.055);
  color: #fff;
}
body.is-watch .ah-player-select__menu button.is-active,
body.is-watch .ah-player-quality__menu button.is-active,
body.is-watch .ah-player-settings__menu button.is-active,
body.is-watch .ah-player-speed__menu button.is-active,
body.is-watch .ah-player-subtitles__menu button.is-active {
  background: rgba(255,255,255,.065);
  color: #fff;
}
body.is-watch .ah-player-settings__menu > strong,
body.is-watch .ah-player-speed__menu > strong,
body.is-watch .ah-player-subtitles__menu > strong {
  display: block;
  padding: 5px 7px 4px;
  color: rgba(255,255,255,.38);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: none;
}
body.is-watch .ah-player-menu-value {
  margin-left: auto;
  color: rgba(255,255,255,.38);
  font-size: 8px;
  font-style: normal;
  font-weight: 550;
}
body.is-watch .ah-player-settings__menu button.is-active .ah-player-menu-value {
  color: rgba(255,255,255,.78);
}

/* Bottom chrome */
body.is-watch .ah-player__controls {
  padding: 24px 11px 6px;
}
body.is-watch .ah-player__seek {
  height: 13px;
  margin-bottom: 0;
}
body.is-watch .ah-player__seek-track {
  height: 2px;
  border-radius: 0;
  background: rgba(255,255,255,.34);
}
body.is-watch .ah-player__seek:hover .ah-player__seek-track { height: 3px; }
body.is-watch .ah-player__seek-track i { background: rgba(255,255,255,.18); }
body.is-watch .ah-player__seek-track b { background: #f1f1f1; }
body.is-watch .ah-player__seek-track span {
  width: 7px;
  height: 7px;
  background: #fff;
  transform: translate(-50%, -50%) scale(.72);
}
body.is-watch .ah-player__seek:hover .ah-player__seek-track span {
  transform: translate(-50%, -50%) scale(1);
}
body.is-watch .ah-player__seek em {
  padding: 3px 5px;
  border-radius: 2px;
  background: #070707;
  font-size: 8px;
  font-weight: 600;
}
body.is-watch .ah-player__row {
  min-height: 27px;
  gap: 5px;
}
body.is-watch .ah-player__icon,
body.is-watch .ah-player-quality > button,
body.is-watch .ah-player-speed > button {
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  border-radius: 3px;
  color: rgba(255,255,255,.82);
  font-size: 9px;
  font-weight: 650;
}
body.is-watch .ah-player__icon:hover,
body.is-watch .ah-player-quality > button:hover,
body.is-watch .ah-player-speed > button:hover,
body.is-watch .ah-player-quality.is-open > button,
body.is-watch .ah-player-speed.is-open > button,
body.is-watch .ah-player-subtitles.is-open > button,
body.is-watch .ah-player-settings.is-open > button {
  background: rgba(255,255,255,.055);
  color: #fff;
}
body.is-watch .ah-player__icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.65;
}
body.is-watch .ah-player__cc {
  min-width: 25px;
  font-size: 8px;
  letter-spacing: -.02em;
}
body.is-watch .ah-player__time {
  gap: 4px;
  font-size: 8px;
  font-weight: 500;
}
body.is-watch .ah-player__volume {
  width: 54px;
  height: 3px;
  accent-color: #fff;
}
body.is-watch .ah-player-quality,
body.is-watch .ah-player-settings,
body.is-watch .ah-player-speed,
body.is-watch .ah-player-subtitles {
  position: relative;
}
body.is-watch .ah-player-quality__menu,
body.is-watch .ah-player-settings__menu,
body.is-watch .ah-player-speed__menu,
body.is-watch .ah-player-subtitles__menu {
  right: 0;
  bottom: calc(100% + 5px);
  transform: translateY(4px);
}
body.is-watch .ah-player-quality.is-open .ah-player-quality__menu,
body.is-watch .ah-player-settings.is-open .ah-player-settings__menu,
body.is-watch .ah-player-speed.is-open .ah-player-speed__menu,
body.is-watch .ah-player-subtitles.is-open .ah-player-subtitles__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
body.is-watch .ah-player-speed__menu,
body.is-watch .ah-player-subtitles__menu {
  position: absolute;
  z-index: 20;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}
body.is-watch .ah-player-speed > button {
  border: 0;
  background: transparent;
  cursor: pointer;
}
body.is-watch .ah-player-subtitles.is-unavailable > button,
body.is-watch .ah-player-subtitles__menu button:only-of-type {
  color: rgba(255,255,255,.42);
}
body.is-watch .ah-player__download {
  width: 26px;
  min-width: 26px;
  height: 26px;
  padding: 5px;
  border-radius: 3px;
}
body.is-watch .ah-player__download img { width: 14px; height: 14px; }

/* The original figma player is basically square and very clean. */
body.is-watch .ah-player__center {
  width: 46px;
  height: 46px;
}
body.is-watch .ah-player__center svg {
  width: 25px;
  height: 29px;
}
body.is-watch .ah-player__skip {
  right: 12px;
  bottom: 58px;
  padding: 6px 9px;
  border-radius: 3px;
  background: rgba(7,7,7,.88);
  font-size: 9px;
  font-weight: 650;
}

/* Voice menu follows the Figma "Озвучки" sample. */
body.is-watch .ah-player-select[data-player-select="translation"] .ah-player-select__menu {
  min-width: 170px;
}
body.is-watch .ah-player-voice-badge {
  padding: 1px 3px;
  border-radius: 2px;
  font-size: 7px;
  font-weight: 700;
}

/* Episode rail visually recedes so the player remains the focus. */
body.is-watch .ah-episode-rail-wrap {
  width: min(100%, 1120px, calc((100svh - 150px) * 16 / 9));
  margin-top: 13px;
}

@media (max-width: 900px) {
  body.is-watch .ah-player,
  body.is-watch .ah-player-sourcebar,
  body.is-watch .ah-episode-rail-wrap,
  body.is-watch .episode-comments {
    width: min(100%, calc((100svh - 120px) * 16 / 9));
  }
}

@media (max-width: 620px) {
  body.is-watch .ah-player {
    border-radius: 2px;
  }
  body.is-watch .ah-player__controls {
    padding: 22px 7px 4px;
  }
  body.is-watch .ah-player__row { gap: 2px; }
  body.is-watch .ah-player__icon,
  body.is-watch .ah-player-quality > button,
  body.is-watch .ah-player-speed > button {
    min-width: 24px;
    height: 24px;
    padding-inline: 4px;
  }
  body.is-watch .ah-player__time { font-size: 7px; }
  body.is-watch .ah-player__top { padding: 6px; }
  body.is-watch .ah-player-select > button { min-height: 24px; }
  body.is-watch .ah-player-select span { font-size: 8px; }
  body.is-watch #ahPlayerPip { display: none; }
  body.is-watch .ah-player__volume { display: none; }
  body.is-watch .ah-player-settings__menu,
  body.is-watch .ah-player-speed__menu,
  body.is-watch .ah-player-subtitles__menu,
  body.is-watch .ah-player-quality__menu {
    min-width: 126px;
  }
}



/* ============================================================
   AnimeHub Player — Figma v2
   Reference: designer frame + settings states.
   ============================================================ */

body.is-watch .ah-player {
  --fg-ui: #f3f3f3;
  --fg-muted: rgba(255,255,255,.52);
  --fg-dim: rgba(255,255,255,.34);
  --menu-bg: #0c0c0c;
  --menu-row: #171717;
  width: min(100%, 1120px) !important;
  aspect-ratio: 16 / 9 !important;
  max-height: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #000 !important;
  box-shadow: none !important;
}

body.is-watch .ah-player__backdrop {
  opacity: .35 !important;
  filter: blur(18px) brightness(.5) !important;
  transform: scale(1.04) !important;
}

body.is-watch .ah-player__shade--top {
  height: 72px !important;
  background: linear-gradient(rgba(0,0,0,.62), rgba(0,0,0,.08) 72%, transparent) !important;
}

body.is-watch .ah-player__shade--bottom {
  height: 74px !important;
  background: linear-gradient(transparent, rgba(0,0,0,.18) 28%, rgba(0,0,0,.82)) !important;
}

/* Top controls */
body.is-watch .ah-player__top {
  inset: 0 0 auto 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 4px !important;
  padding: 11px 13px !important;
}

body.is-watch .ah-player-select {
  position: relative !important;
}

body.is-watch .ah-player-select > button {
  min-height: 22px !important;
  max-width: 156px !important;
  gap: 5px !important;
  padding: 2px 5px !important;
  border: 0 !important;
  border-radius: 2px !important;
  background: transparent !important;
  color: rgba(255,255,255,.75) !important;
  box-shadow: none !important;
}

body.is-watch .ah-player-select > button:hover,
body.is-watch .ah-player-select.is-open > button {
  background: rgba(255,255,255,.035) !important;
  color: #fff !important;
}

body.is-watch .ah-player-select small {
  display: none !important;
}

body.is-watch .ah-player-select span {
  overflow: hidden !important;
  font-size: 8px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.is-watch .ah-player-select b {
  color: rgba(255,255,255,.55) !important;
  font-size: 8px !important;
  font-weight: 500 !important;
}

body.is-watch .ah-player__title {
  margin: 4px 0 0 auto !important;
  color: rgba(255,255,255,.52) !important;
  font-size: 8px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  text-align: right !important;
}

/* Dropdowns, including voice list */
body.is-watch .ah-player-select__menu {
  top: calc(100% + 4px) !important;
  bottom: auto !important;
  min-width: 150px !important;
  max-height: 300px !important;
  padding: 5px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: var(--menu-bg) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,.48) !important;
  transform: translateY(-2px) !important;
}

body.is-watch .ah-player-select.is-open .ah-player-select__menu {
  transform: translateY(0) !important;
}

body.is-watch .ah-player-select__menu button {
  position: relative !important;
  min-height: 26px !important;
  padding: 5px 7px 5px 20px !important;
  border-radius: 2px !important;
  color: rgba(255,255,255,.62) !important;
  font-size: 9px !important;
  font-weight: 500 !important;
}

body.is-watch .ah-player-select__menu button::before {
  content: "" !important;
  position: absolute !important;
  left: 8px !important;
  top: 50% !important;
  width: 2px !important;
  height: 2px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.56) !important;
  transform: translateY(-50%) !important;
}

body.is-watch .ah-player-select__menu button.is-active {
  background: var(--menu-row) !important;
  color: #fff !important;
}

body.is-watch .ah-player-select__menu button.is-active::before {
  width: 7px !important;
  height: 7px !important;
  background: #fff !important;
}

body.is-watch .ah-player-select__menu button:hover {
  background: rgba(255,255,255,.055) !important;
  color: #fff !important;
}

body.is-watch .ah-player-voice-badge {
  margin-left: 4px !important;
  padding: 1px 3px !important;
  border: 1px solid rgba(255,255,255,.55) !important;
  border-radius: 2px !important;
  color: rgba(255,255,255,.84) !important;
  background: transparent !important;
  font-size: 6px !important;
  font-style: normal !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

/* No giant centered play button in the designer layout */
body.is-watch .ah-player__center {
  display: none !important;
}

/* Bottom control bar: everything sits on one line, exactly like the frame */
body.is-watch .ah-player__controls {
  inset: auto 0 0 !important;
  padding: 8px 11px 7px !important;
}

body.is-watch .ah-player__row {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 22px !important;
}

body.is-watch .ah-player__play,
body.is-watch .ah-player__mute,
body.is-watch .ah-player__download,
body.is-watch #ahPlayerSettingsButton,
body.is-watch #ahPlayerPip,
body.is-watch #ahPlayerFullscreen {
  flex: 0 0 auto !important;
  display: grid !important;
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  place-items: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 2px !important;
  background: transparent !important;
  color: rgba(255,255,255,.86) !important;
  box-shadow: none !important;
}

body.is-watch .ah-player__play:hover,
body.is-watch .ah-player__mute:hover,
body.is-watch .ah-player__download:hover,
body.is-watch #ahPlayerSettingsButton:hover,
body.is-watch #ahPlayerPip:hover,
body.is-watch #ahPlayerFullscreen:hover,
body.is-watch .ah-player-settings.is-open #ahPlayerSettingsButton {
  background: rgba(255,255,255,.055) !important;
  color: #fff !important;
}

body.is-watch .ah-player__icon svg,
body.is-watch .ah-player__download svg {
  width: 14px !important;
  height: 14px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.7 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

body.is-watch .ah-player__play svg {
  width: 13px !important;
  height: 13px !important;
  stroke: none !important;
  fill: currentColor !important;
}

body.is-watch .ah-player__play .is-pause {
  display: none !important;
}
body.is-watch .ah-player.is-playing .ah-player__play .is-play {
  display: none !important;
}
body.is-watch .ah-player.is-playing .ah-player__play .is-pause {
  display: block !important;
}

body.is-watch .ah-player__mute .is-muted {
  display: none !important;
}
body.is-watch .ah-player__mute.is-muted .is-sound {
  display: none !important;
}
body.is-watch .ah-player__mute.is-muted .is-muted {
  display: block !important;
}

body.is-watch .ah-player__seek {
  position: relative !important;
  flex: 1 1 auto !important;
  min-width: 40px !important;
  height: 12px !important;
  margin: 0 !important;
  cursor: pointer !important;
}

body.is-watch .ah-player__seek-track {
  position: absolute !important;
  top: 50% !important;
  left: 0 !important;
  right: 0 !important;
  height: 2px !important;
  border-radius: 0 !important;
  background: rgba(255,255,255,.38) !important;
  transform: translateY(-50%) !important;
}

body.is-watch .ah-player__seek:hover .ah-player__seek-track {
  height: 2px !important;
}

body.is-watch .ah-player__seek-track i {
  height: 100% !important;
  background: rgba(255,255,255,.18) !important;
}
body.is-watch .ah-player__seek-track b {
  height: 100% !important;
  background: #fff !important;
}
body.is-watch .ah-player__seek-track span {
  width: 6px !important;
  height: 6px !important;
  border: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  transform: translate(-50%,-50%) !important;
}

body.is-watch .ah-player__seek em {
  bottom: 18px !important;
  padding: 2px 4px !important;
  border-radius: 2px !important;
  background: #090909 !important;
  color: rgba(255,255,255,.75) !important;
  font-size: 7px !important;
  font-weight: 500 !important;
}

body.is-watch .ah-player__time {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  color: rgba(255,255,255,.66) !important;
  font-size: 7px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
body.is-watch .ah-player__time b,
body.is-watch .ah-player__time span {
  color: inherit !important;
  font: inherit !important;
}
body.is-watch .ah-player__time i {
  color: rgba(255,255,255,.36) !important;
  font-style: normal !important;
}

body.is-watch .ah-player__volume,
body.is-watch .ah-player-quality[hidden] {
  display: none !important;
}

body.is-watch .ah-player__spacer {
  display: none !important;
}

/* Settings menu + subviews from the Figma states */
body.is-watch .ah-player-settings {
  position: relative !important;
}

body.is-watch .ah-player-settings__menu {
  position: absolute !important;
  right: 0 !important;
  bottom: calc(100% + 6px) !important;
  z-index: 40 !important;
  display: block !important;
  width: 176px !important;
  min-width: 176px !important;
  max-height: none !important;
  padding: 5px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: var(--menu-bg) !important;
  box-shadow: 0 14px 36px rgba(0,0,0,.52) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(4px) !important;
  transition: opacity .11s ease, transform .11s ease !important;
}

body.is-watch .ah-player-settings.is-open .ah-player-settings__menu {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

body.is-watch .ah-player-settings__view {
  display: none !important;
}

body.is-watch .ah-player-settings__view.is-active {
  display: block !important;
}

body.is-watch .ah-player-settings__view > button,
body.is-watch .ah-player-settings__options > button {
  position: relative !important;
  display: flex !important;
  width: 100% !important;
  min-height: 28px !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 7px !important;
  border: 0 !important;
  border-radius: 2px !important;
  background: transparent !important;
  color: rgba(255,255,255,.66) !important;
  cursor: pointer !important;
  font-size: 9px !important;
  font-weight: 500 !important;
  line-height: 1.1 !important;
  text-align: left !important;
}

body.is-watch .ah-player-settings__view > button:hover,
body.is-watch .ah-player-settings__options > button:hover {
  background: rgba(255,255,255,.05) !important;
  color: #fff !important;
}

body.is-watch .ah-player-settings__view[data-settings-view="main"] > button span {
  flex: 1 1 auto !important;
}

body.is-watch .ah-player-settings__view[data-settings-view="main"] > button em {
  flex: 0 0 auto !important;
  margin-left: auto !important;
  color: rgba(255,255,255,.82) !important;
  font-size: 8px !important;
  font-style: normal !important;
  font-weight: 500 !important;
}

body.is-watch .ah-player-settings__view[data-settings-view="main"] > button b,
body.is-watch .ah-player-settings__back b {
  flex: 0 0 auto !important;
  color: rgba(255,255,255,.56) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
}

body.is-watch .ah-player-settings__back {
  margin-bottom: 2px !important;
  color: rgba(255,255,255,.84) !important;
}

body.is-watch .ah-player-settings__back span {
  flex: 1 1 auto !important;
}

body.is-watch .ah-player-settings__options > button {
  padding-left: 20px !important;
}

body.is-watch .ah-player-settings__options > button::before {
  content: "" !important;
  position: absolute !important;
  left: 8px !important;
  top: 50% !important;
  width: 2px !important;
  height: 2px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.58) !important;
  transform: translateY(-50%) !important;
}

body.is-watch .ah-player-settings__options > button.is-active {
  background: var(--menu-row) !important;
  color: #fff !important;
}

body.is-watch .ah-player-settings__options > button.is-active::before {
  width: 7px !important;
  height: 7px !important;
  background: #fff !important;
}

body.is-watch .ah-player-settings__options > button:disabled {
  opacity: .36 !important;
  cursor: default !important;
}

body.is-watch .ah-player-settings__options > button em {
  margin-left: auto !important;
  color: rgba(255,255,255,.6) !important;
  font-size: 8px !important;
  font-style: normal !important;
}

body.is-watch .ah-player-settings__options > button img {
  width: 11px !important;
  height: 11px !important;
  margin-left: auto !important;
}

/* Skip callout */
body.is-watch .ah-player__skip {
  right: 12px !important;
  bottom: 42px !important;
  padding: 6px 9px !important;
  border: 0 !important;
  border-radius: 3px !important;
  background: rgba(12,12,12,.92) !important;
  color: rgba(255,255,255,.82) !important;
  box-shadow: none !important;
  font-size: 8px !important;
  font-weight: 550 !important;
}

/* Source switch remains functional but visually quiet outside the Figma frame */
body.is-watch .ah-player-sourcebar {
  width: min(100%,1120px) !important;
  gap: 4px !important;
  margin-bottom: 6px !important;
}
body.is-watch .ah-player-source {
  min-height: 25px !important;
  padding: 3px 8px !important;
  border: 1px solid rgba(255,255,255,.055) !important;
  border-radius: 3px !important;
  background: #0a0a0a !important;
  font-size: 8px !important;
  font-weight: 600 !important;
}
body.is-watch .ah-player-source.is-active {
  border-color: rgba(255,255,255,.16) !important;
  background: #111 !important;
  color: #fff !important;
}
body.is-watch .ah-player-telegram {
  min-height: 25px !important;
  padding: 3px 8px !important;
  border: 1px solid rgba(255,255,255,.055) !important;
  border-radius: 3px !important;
  background: #0a0a0a !important;
  color: rgba(255,255,255,.52) !important;
  box-shadow: none !important;
  animation: none !important;
  font-size: 8px !important;
}
body.is-watch .ah-player-telegram svg {
  width: 11px !important;
  height: 11px !important;
}

/* Episode rail should not visually compete with the player */
body.is-watch .ah-episode-rail-wrap {
  width: min(100%,1120px) !important;
  margin-top: 10px !important;
}

/* Responsive compression without changing the hierarchy */
@media (max-width: 700px) {
  body.is-watch .ah-player__top {
    gap: 1px !important;
    padding: 7px !important;
  }
  body.is-watch .ah-player-select > button {
    max-width: 105px !important;
    min-height: 20px !important;
    padding-inline: 4px !important;
  }
  body.is-watch .ah-player-select span,
  body.is-watch .ah-player__title {
    font-size: 7px !important;
  }
  body.is-watch .ah-player__controls {
    padding: 6px 6px 5px !important;
  }
  body.is-watch .ah-player__row {
    gap: 4px !important;
  }
  body.is-watch .ah-player__play,
  body.is-watch .ah-player__mute,
  body.is-watch .ah-player__download,
  body.is-watch #ahPlayerSettingsButton,
  body.is-watch #ahPlayerPip,
  body.is-watch #ahPlayerFullscreen {
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
  }
  body.is-watch .ah-player__icon svg,
  body.is-watch .ah-player__download svg {
    width: 12px !important;
    height: 12px !important;
  }
  body.is-watch .ah-player__time {
    font-size: 6px !important;
    gap: 2px !important;
  }
  body.is-watch .ah-player-settings__menu {
    width: 160px !important;
    min-width: 160px !important;
  }
}

/* ============================================================
   AnimeHub Player — Figma v4
   Real CSS (v3 was accidentally appended with literal \\n escapes).
   Scale and quality badges matched to the supplied Figma frames.
   ============================================================ */
body.is-watch .ah-player {
  --ah-ui: #f6f6f6;
  --ah-ui-muted: rgba(255,255,255,.72);
  --ah-menu: rgba(8,8,8,.98);
  --ah-menu-row: #191919;
  --ah-menu-border: rgba(255,255,255,.06);
}

/* player frame */
body.is-watch .ah-player {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #000 !important;
}
body.is-watch .ah-player__shade--top {
  height: 108px !important;
  background: linear-gradient(rgba(0,0,0,.48), rgba(0,0,0,.10) 68%, transparent) !important;
}
body.is-watch .ah-player__shade--bottom {
  height: 150px !important;
  background: linear-gradient(transparent, rgba(0,0,0,.12) 24%, rgba(0,0,0,.86)) !important;
}

/* top controls: actual-size, not the 29% Figma canvas preview */
body.is-watch .ah-player__top {
  inset: 0 0 auto 0 !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 18px 20px !important;
}
body.is-watch .ah-player-select > button {
  min-height: 34px !important;
  max-width: 250px !important;
  gap: 7px !important;
  padding: 5px 6px !important;
  border-radius: 5px !important;
  background: transparent !important;
  color: rgba(255,255,255,.84) !important;
}
body.is-watch .ah-player-select small { display: none !important; }
body.is-watch .ah-player-select span {
  font-size: 13px !important;
  font-weight: 560 !important;
  line-height: 1 !important;
  letter-spacing: -.01em !important;
  text-transform: uppercase !important;
}
body.is-watch .ah-player-select b {
  color: rgba(255,255,255,.62) !important;
  font-size: 13px !important;
}
body.is-watch .ah-player__title {
  margin: 0 0 0 auto !important;
  max-width: 38% !important;
  color: rgba(255,255,255,.62) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

/* designer quality plaque */
body.is-watch .ah-player-quality-plaque {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  min-width: 42px !important;
  height: 25px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 0 7px !important;
  border: 1.5px solid rgba(255,255,255,.92) !important;
  border-radius: 6px !important;
  background: rgba(255,255,255,.96) !important;
  color: #0b0b0b !important;
  box-sizing: border-box !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: -.025em !important;
  text-transform: uppercase !important;
}
body.is-watch .ah-player-quality-plaque[hidden] { display: none !important; }
body.is-watch .ah-player-quality-plaque b {
  color: #0b0b0b !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}
body.is-watch .ah-player-quality-plaque.is-upscaled {
  min-width: 49px !important;
}

/* season/episode/voice dropdowns */
body.is-watch .ah-player-select__menu {
  top: calc(100% + 8px) !important;
  bottom: auto !important;
  min-width: 235px !important;
  max-height: 390px !important;
  padding: 7px !important;
  border: 1px solid var(--ah-menu-border) !important;
  border-radius: 7px !important;
  background: var(--ah-menu) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.60) !important;
}
body.is-watch .ah-player-select__menu button {
  position: relative !important;
  min-height: 42px !important;
  padding: 9px 11px 9px 32px !important;
  border-radius: 5px !important;
  color: rgba(255,255,255,.72) !important;
  font-size: 13px !important;
  font-weight: 560 !important;
}
body.is-watch .ah-player-select__menu button::before {
  content: "" !important;
  position: absolute !important;
  left: 13px !important;
  top: 50% !important;
  width: 4px !important;
  height: 4px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.65) !important;
  transform: translateY(-50%) !important;
}
body.is-watch .ah-player-select__menu button.is-active {
  background: var(--ah-menu-row) !important;
  color: #fff !important;
}
body.is-watch .ah-player-select__menu button.is-active::before {
  width: 9px !important;
  height: 9px !important;
  background: #fff !important;
}
body.is-watch .ah-player-voice-badge {
  padding: 2px 5px !important;
  border: 1px solid rgba(255,255,255,.72) !important;
  border-radius: 3px !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 8px !important;
  font-weight: 800 !important;
}

/* bottom controls */
body.is-watch .ah-player__controls {
  inset: auto 0 0 !important;
  padding: 18px 20px 16px !important;
}
body.is-watch .ah-player__row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 44px !important;
}
body.is-watch .ah-player__play,
body.is-watch .ah-player__mute,
body.is-watch .ah-player__download,
body.is-watch #ahPlayerSettingsButton,
body.is-watch #ahPlayerPip,
body.is-watch #ahPlayerFullscreen {
  display: grid !important;
  flex: 0 0 40px !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  place-items: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #fff !important;
}
body.is-watch .ah-player__play:hover,
body.is-watch .ah-player__mute:hover,
body.is-watch .ah-player__download:hover,
body.is-watch #ahPlayerSettingsButton:hover,
body.is-watch #ahPlayerPip:hover,
body.is-watch #ahPlayerFullscreen:hover,
body.is-watch .ah-player-settings.is-open #ahPlayerSettingsButton {
  background: rgba(255,255,255,.08) !important;
}
body.is-watch .ah-player__icon svg,
body.is-watch .ah-player__download svg {
  width: 27px !important;
  height: 27px !important;
  stroke-width: 1.75 !important;
}
body.is-watch .ah-player__play svg {
  width: 24px !important;
  height: 24px !important;
}
body.is-watch .ah-player__seek {
  flex: 1 1 auto !important;
  min-width: 120px !important;
  height: 24px !important;
  margin: 0 !important;
}
body.is-watch .ah-player__seek-track {
  height: 4px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.30) !important;
}
body.is-watch .ah-player__seek:hover .ah-player__seek-track { height: 5px !important; }
body.is-watch .ah-player__seek-track b { background: #fff !important; }
body.is-watch .ah-player__seek-track span {
  width: 11px !important;
  height: 11px !important;
  background: #fff !important;
}
body.is-watch .ah-player__seek em {
  bottom: 31px !important;
  padding: 5px 7px !important;
  border-radius: 4px !important;
  font-size: 11px !important;
}
body.is-watch .ah-player__time {
  flex: 0 0 auto !important;
  gap: 6px !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 520 !important;
  line-height: 1 !important;
}
body.is-watch .ah-player__time i { color: rgba(255,255,255,.72) !important; }
body.is-watch .ah-player__volume { display: none !important; }

/* old standalone quality control stays hidden: quality lives in Settings */
body.is-watch .ah-player-quality { display: none !important; }

/* settings dropdown */
body.is-watch .ah-player-settings { position: relative !important; }
body.is-watch .ah-player-settings__menu {
  right: 0 !important;
  bottom: calc(100% + 12px) !important;
  width: 285px !important;
  min-width: 285px !important;
  max-height: 430px !important;
  padding: 8px !important;
  border: 1px solid var(--ah-menu-border) !important;
  border-radius: 8px !important;
  background: var(--ah-menu) !important;
  box-shadow: 0 22px 68px rgba(0,0,0,.64) !important;
}
body.is-watch .ah-player-settings__view > button,
body.is-watch .ah-player-settings__options > button {
  min-height: 46px !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border-radius: 5px !important;
  color: rgba(255,255,255,.82) !important;
  font-size: 14px !important;
  font-weight: 560 !important;
  line-height: 1.15 !important;
}
body.is-watch .ah-player-settings__view > button:hover,
body.is-watch .ah-player-settings__options > button:hover,
body.is-watch .ah-player-settings__options > button.is-active {
  background: var(--ah-menu-row) !important;
  color: #fff !important;
}
body.is-watch .ah-player-settings__view[data-settings-view="main"] > button em {
  margin-left: auto !important;
  color: rgba(255,255,255,.58) !important;
  font-size: 13px !important;
  font-style: normal !important;
  font-weight: 500 !important;
}
body.is-watch .ah-player-settings__view[data-settings-view="main"] > button b,
body.is-watch .ah-player-settings__back b {
  color: rgba(255,255,255,.70) !important;
  font-size: 19px !important;
}
body.is-watch .ah-player-settings__options > button {
  position: relative !important;
  padding-left: 35px !important;
}
body.is-watch .ah-player-settings__options > button::before {
  content: "" !important;
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  width: 4px !important;
  height: 4px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.62) !important;
  transform: translateY(-50%) !important;
}
body.is-watch .ah-player-settings__options > button.is-active::before {
  width: 10px !important;
  height: 10px !important;
  background: #fff !important;
}
body.is-watch .ah-player-settings__menu button::after {
  display: none !important;
  content: none !important;
}

/* quality rows use the actual plaque component */
body.is-watch .ah-player-quality-option-label {
  display: flex !important;
  flex: 1 1 auto !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}
body.is-watch .ah-quality-badge {
  display: inline-flex !important;
  min-width: 43px !important;
  height: 23px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  padding: 0 6px !important;
  border: 1.5px solid rgba(255,255,255,.95) !important;
  border-radius: 5px !important;
  background: #f3f3f3 !important;
  color: #090909 !important;
  font-size: 9px !important;
  font-style: normal !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}
body.is-watch .ah-quality-badge b {
  color: #090909 !important;
  font-size: 10px !important;
}
body.is-watch .ah-player-settings__options > button.is-active .ah-quality-badge {
  box-shadow: 0 0 0 2px rgba(255,255,255,.16) !important;
}

body.is-watch .ah-player__skip {
  right: 22px !important;
  bottom: 82px !important;
  padding: 10px 14px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

@media (max-width: 760px) {
  body.is-watch .ah-player__top { padding: 9px 10px !important; gap: 4px !important; }
  body.is-watch .ah-player-select > button { min-height: 25px !important; max-width: 125px !important; padding: 3px 5px !important; }
  body.is-watch .ah-player-select span { font-size: 9px !important; }
  body.is-watch .ah-player-quality-plaque { min-width: 34px !important; height: 20px !important; padding: 0 5px !important; font-size: 8px !important; }
  body.is-watch .ah-player__controls { padding: 8px 8px 7px !important; }
  body.is-watch .ah-player__row { gap: 4px !important; min-height: 29px !important; }
  body.is-watch .ah-player__play, body.is-watch .ah-player__mute, body.is-watch .ah-player__download, body.is-watch #ahPlayerSettingsButton, body.is-watch #ahPlayerPip, body.is-watch #ahPlayerFullscreen { flex-basis: 28px !important; width: 28px !important; min-width: 28px !important; height: 28px !important; min-height: 28px !important; }
  body.is-watch .ah-player__icon svg, body.is-watch .ah-player__download svg { width: 18px !important; height: 18px !important; }
  body.is-watch .ah-player__time { font-size: 10px !important; gap: 3px !important; }
  body.is-watch #ahPlayerPip { display: none !important; }
  body.is-watch .ah-player-settings__menu { width: 225px !important; min-width: 225px !important; }
  body.is-watch .ah-player-settings__view > button, body.is-watch .ah-player-settings__options > button { min-height: 38px !important; font-size: 12px !important; }
}


/* ============================================================
   AnimeHub Player — Figma v5
   Exact requested corrections:
   - no source/reklama strip above player
   - player selector next to dubbing
   - Unbounded Regular 14px throughout
   - quality plaques only in dubbing rows: FHD / 4K, 9px bold caps
   - white played timeline
   - Figma-shaped download/settings icons
   ============================================================ */

body.is-watch .ah-player-sourcebar {
  display: none !important;
}

/* Typography: all player UI = Unbounded Regular 14 */
body.is-watch .ah-player,
body.is-watch .ah-player button,
body.is-watch .ah-player input,
body.is-watch .ah-player-select > button,
body.is-watch .ah-player-select__menu button,
body.is-watch .ah-player-settings__menu button,
body.is-watch .ah-player__time,
body.is-watch .ah-player__title,
body.is-watch .ah-player__skip,
body.is-watch .ah-player__error,
body.is-watch .ah-player__loading {
  font-family: "Unbounded", sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

body.is-watch .ah-player-select small {
  display: none !important;
}

body.is-watch .ah-player__top {
  align-items: center !important;
  gap: 8px !important;
  padding: 16px 20px !important;
}

body.is-watch .ah-player-select > button {
  min-height: 34px !important;
  max-width: 220px !important;
  gap: 7px !important;
  padding: 6px 8px !important;
  border-radius: 4px !important;
}

body.is-watch .ah-player-select span,
body.is-watch .ah-player-select b,
body.is-watch .ah-player__title {
  font-family: "Unbounded", sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

body.is-watch .ah-player-select--player {
  flex: 0 0 auto !important;
}

body.is-watch .ah-player-select--player > button {
  min-width: 105px !important;
}

/* Dropdowns: 14px regular like Figma */
body.is-watch .ah-player-select__menu {
  min-width: 235px !important;
  padding: 6px !important;
}
body.is-watch .ah-player-select__menu button,
body.is-watch .ah-player-settings__view > button,
body.is-watch .ah-player-settings__options > button {
  min-height: 44px !important;
  font-family: "Unbounded", sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

/* Translation quality plaques: FHD/4K only, 9px bold uppercase */
body.is-watch .ah-player-voice-badge {
  display: inline-flex !important;
  min-width: 31px !important;
  height: 17px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 4px !important;
  border: 1px solid rgba(255,255,255,.9) !important;
  border-radius: 3px !important;
  background: transparent !important;
  color: #fff !important;
  font-family: "Unbounded", sans-serif !important;
  font-size: 9px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

/* remove old standalone/current-quality plaque entirely */
body.is-watch .ah-player-quality-plaque {
  display: none !important;
}

/* Quality submenu is a normal Figma list, not "Исходное качество" cards */
body.is-watch .ah-player-settings__options > button {
  justify-content: flex-start !important;
}
body.is-watch .ah-player-settings__options > button > span {
  font-family: "Unbounded", sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}
body.is-watch .ah-quality-badge,
body.is-watch .ah-player-quality-option-label {
  display: none !important;
}

/* White timeline */
body.is-watch .ah-player__seek-track {
  height: 2px !important;
  background: rgba(255,255,255,.34) !important;
  border-radius: 999px !important;
}
body.is-watch .ah-player__seek:hover .ah-player__seek-track {
  height: 3px !important;
}
body.is-watch .ah-player__seek-track i {
  background: rgba(255,255,255,.18) !important;
}
body.is-watch .ah-player__seek-track b {
  background: #fff !important;
}
body.is-watch .ah-player__seek-track span {
  width: 10px !important;
  height: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
}

/* Bottom controls and Figma icons */
body.is-watch .ah-player__controls {
  padding: 18px 20px 14px !important;
}
body.is-watch .ah-player__row {
  gap: 10px !important;
}
body.is-watch .ah-player__download,
body.is-watch #ahPlayerSettingsButton {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  background: transparent !important;
}
body.is-watch .ah-player__download svg,
body.is-watch #ahPlayerSettingsButton svg {
  width: 24px !important;
  height: 24px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
body.is-watch #ahPlayerSettingsButton svg circle {
  fill: none !important;
}
body.is-watch .ah-player__time,
body.is-watch .ah-player__time b,
body.is-watch .ah-player__time span,
body.is-watch .ah-player__time i {
  font-family: "Unbounded", sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

/* Settings menu */
body.is-watch .ah-player-settings__menu {
  width: 285px !important;
  min-width: 285px !important;
}
body.is-watch .ah-player-settings__view[data-settings-view="main"] > button em {
  font-family: "Unbounded", sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

/* Mobile keeps the same type family, only scales geometry */
@media (max-width: 760px) {
  body.is-watch .ah-player,
  body.is-watch .ah-player button,
  body.is-watch .ah-player-select span,
  body.is-watch .ah-player__time,
  body.is-watch .ah-player-settings__menu button {
    font-family: "Unbounded", sans-serif !important;
  }
  body.is-watch .ah-player-select > button {
    max-width: 132px !important;
  }
  body.is-watch .ah-player-select--player > button {
    min-width: 82px !important;
  }
  body.is-watch .ah-player-voice-badge {
    font-size: 9px !important;
    font-weight: 700 !important;
  }
}


/* ============================================================
   AnimeHub Player — Figma v6
   Final visual correction pass from the supplied Figma screenshots.
   ============================================================ */

body.is-watch #animeHubPlayer.ah-player {
  --player-accent: #ffffff !important;
  --player-accent-soft: #ffffff !important;
  --menu-bg: #101010 !important;
  --menu-row: #191919 !important;
  --menu-border: rgba(255,255,255,.045) !important;
}

/* Force the requested type everywhere inside the player.
   Badges are overridden below to 9px / bold / uppercase. */
body.is-watch #animeHubPlayer,
body.is-watch #animeHubPlayer :where(button, span, em, strong, small, b) {
  font-family: "Unbounded", sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* ---------- TOP SELECTS ---------- */
body.is-watch #animeHubPlayer .ah-player__top {
  gap: 6px !important;
  padding: 15px 20px !important;
}

body.is-watch #animeHubPlayer .ah-player-select > button {
  min-height: 36px !important;
  max-width: 230px !important;
  padding: 7px 9px !important;
  gap: 8px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: rgba(255,255,255,.88) !important;
  box-shadow: none !important;
}

body.is-watch #animeHubPlayer .ah-player-select > button:hover,
body.is-watch #animeHubPlayer .ah-player-select.is-open > button {
  background: #171717 !important;
  color: #fff !important;
}

body.is-watch #animeHubPlayer .ah-player-select > button > span {
  color: inherit !important;
  line-height: 1.15 !important;
}

body.is-watch #animeHubPlayer .ah-player-select__menu {
  top: calc(100% + 6px) !important;
  left: 0 !important;
  min-width: 220px !important;
  padding: 6px !important;
  border: 1px solid var(--menu-border) !important;
  border-radius: 9px !important;
  background: var(--menu-bg) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.48) !important;
}

body.is-watch #animeHubPlayer .ah-player-select__menu button {
  min-height: 42px !important;
  padding: 8px 10px 8px 30px !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: rgba(255,255,255,.80) !important;
  line-height: 1.1 !important;
}

body.is-watch #animeHubPlayer .ah-player-select__menu button:hover {
  background: #151515 !important;
  color: #fff !important;
}

body.is-watch #animeHubPlayer .ah-player-select__menu button.is-active {
  background: var(--menu-row) !important;
  color: #fff !important;
}

/* Figma radio dots in top dropdowns */
body.is-watch #animeHubPlayer .ah-player-select__menu button::before {
  content: "" !important;
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  width: 3px !important;
  height: 3px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.72) !important;
  transform: translateY(-50%) !important;
}

body.is-watch #animeHubPlayer .ah-player-select__menu button.is-active::before {
  width: 9px !important;
  height: 9px !important;
  background: #fff !important;
}

/* ---------- FIGMA CHEVRONS ---------- */
body.is-watch #animeHubPlayer .ah-chevron {
  display: inline-block !important;
  flex: 0 0 auto !important;
  width: 7px !important;
  height: 7px !important;
  padding: 0 !important;
  margin: 0 1px !important;
  border: 0 solid rgba(255,255,255,.72) !important;
  border-right-width: 1.4px !important;
  border-bottom-width: 1.4px !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

body.is-watch #animeHubPlayer .ah-chevron--down {
  transform: translateY(-2px) rotate(45deg) !important;
}
body.is-watch #animeHubPlayer .ah-chevron--right {
  transform: rotate(-45deg) !important;
}
body.is-watch #animeHubPlayer .ah-chevron--left {
  transform: rotate(135deg) !important;
}

body.is-watch #animeHubPlayer .ah-player-select.is-open > button .ah-chevron--down {
  transform: translateY(2px) rotate(225deg) !important;
}

/* ---------- SETTINGS BOXES ---------- */
body.is-watch #animeHubPlayer .ah-player-settings__menu {
  width: 245px !important;
  min-width: 245px !important;
  padding: 6px !important;
  border: 1px solid var(--menu-border) !important;
  border-radius: 9px !important;
  background: var(--menu-bg) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.48) !important;
}

body.is-watch #animeHubPlayer .ah-player-settings__view > button,
body.is-watch #animeHubPlayer .ah-player-settings__options > button {
  min-height: 43px !important;
  padding: 9px 10px !important;
  gap: 8px !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: rgba(255,255,255,.82) !important;
  line-height: 1.12 !important;
}

body.is-watch #animeHubPlayer .ah-player-settings__view > button:hover,
body.is-watch #animeHubPlayer .ah-player-settings__options > button:hover {
  background: #151515 !important;
  color: #fff !important;
}

body.is-watch #animeHubPlayer .ah-player-settings__view[data-settings-view="main"] > button:first-child,
body.is-watch #animeHubPlayer .ah-player-settings__options > button.is-active {
  background: var(--menu-row) !important;
}

body.is-watch #animeHubPlayer .ah-player-settings__view[data-settings-view="main"] > button > span {
  flex: 1 1 auto !important;
  color: #fff !important;
}

body.is-watch #animeHubPlayer .ah-player-settings__view[data-settings-view="main"] > button > em {
  margin-left: auto !important;
  color: rgba(255,255,255,.72) !important;
  font-style: normal !important;
}

body.is-watch #animeHubPlayer .ah-player-settings__view[data-settings-view="main"] > button > .ah-chevron {
  margin-left: 2px !important;
}

body.is-watch #animeHubPlayer .ah-player-settings__back {
  margin-bottom: 2px !important;
  padding-left: 11px !important;
  color: #fff !important;
}

body.is-watch #animeHubPlayer .ah-player-settings__back > .ah-chevron {
  order: -1 !important;
  margin-right: 7px !important;
}

/* submenu radio dots */
body.is-watch #animeHubPlayer .ah-player-settings__options > button {
  position: relative !important;
  padding-left: 31px !important;
}

body.is-watch #animeHubPlayer .ah-player-settings__options > button::before {
  content: "" !important;
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  width: 3px !important;
  height: 3px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.72) !important;
  transform: translateY(-50%) !important;
}

body.is-watch #animeHubPlayer .ah-player-settings__options > button.is-active::before {
  width: 9px !important;
  height: 9px !important;
  background: #fff !important;
}

/* ---------- QUALITY PLAQUES ---------- */
body.is-watch #animeHubPlayer .ah-player-voice-badge {
  display: inline-flex !important;
  width: auto !important;
  min-width: 31px !important;
  height: 17px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 5px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: #f3f3f3 !important;
  color: #111 !important;
  font-family: "Unbounded", sans-serif !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  line-height: 17px !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
  box-shadow: none !important;
}

/* ---------- TIMELINE: hard white, no orange survives ---------- */
body.is-watch #animeHubPlayer .ah-player__seek-track {
  height: 3px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.28) !important;
}

body.is-watch #animeHubPlayer .ah-player__seek-track > #ahPlayerBuffer {
  background: rgba(255,255,255,.14) !important;
  background-image: none !important;
}

body.is-watch #animeHubPlayer .ah-player__seek-track > #ahPlayerProgress {
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.is-watch #animeHubPlayer .ah-player__seek-track > #ahPlayerThumb {
  width: 10px !important;
  height: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
}

/* neutralize any old orange-accent hover rules */
body.is-watch #animeHubPlayer .ah-player__icon:hover,
body.is-watch #animeHubPlayer .ah-player-settings.is-open > #ahPlayerSettingsButton {
  color: #fff !important;
}

/* ---------- BOTTOM CONTROLS ---------- */
body.is-watch #animeHubPlayer .ah-player__controls {
  padding: 17px 20px 14px !important;
}

body.is-watch #animeHubPlayer .ah-player__row {
  gap: 10px !important;
}

body.is-watch #animeHubPlayer .ah-player__time,
body.is-watch #animeHubPlayer .ah-player__time * {
  color: #fff !important;
  font-variant-numeric: tabular-nums !important;
}

body.is-watch #animeHubPlayer .ah-player__time i {
  color: rgba(255,255,255,.50) !important;
}

/* keep icons crisp and matching the Figma size */
body.is-watch #animeHubPlayer .ah-player__download,
body.is-watch #animeHubPlayer #ahPlayerSettingsButton {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 6px !important;
}

body.is-watch #animeHubPlayer .ah-player__download svg,
body.is-watch #animeHubPlayer #ahPlayerSettingsButton svg {
  width: 23px !important;
  height: 23px !important;
  stroke: #fff !important;
  stroke-width: 1.8 !important;
}

/* mobile: preserve casing/typography but reduce geometry only */
@media (max-width: 760px) {
  body.is-watch #animeHubPlayer,
  body.is-watch #animeHubPlayer :where(button, span, em, strong, small, b) {
    font-family: "Unbounded", sans-serif !important;
    text-transform: none !important;
  }

  body.is-watch #animeHubPlayer .ah-player-select > button {
    max-width: 145px !important;
    padding-inline: 7px !important;
  }

  body.is-watch #animeHubPlayer .ah-player-settings__menu {
    width: 225px !important;
    min-width: 225px !important;
  }

  body.is-watch #animeHubPlayer .ah-player-voice-badge {
    font-size: 9px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
  }
}


/* ============================================================
   AnimeHub Player — Figma v7
   White text / bold pass / draggable seek / no episode rail.
   ============================================================ */

/* hide the bottom episodes strip completely */
body.is-watch #watchPlayerPage .ah-episode-rail-wrap {
  display: none !important;
}

/* drag affordance on the seek bar */
body.is-watch #animeHubPlayer .ah-player__seek {
  cursor: pointer !important;
  touch-action: none !important;
  user-select: none !important;
}
body.is-watch #animeHubPlayer .ah-player__seek-track,
body.is-watch #animeHubPlayer #ahPlayerThumb {
  pointer-events: none !important;
}

/* default everything inside player to white + bold */
body.is-watch #animeHubPlayer,
body.is-watch #animeHubPlayer :where(span,b,strong,em,small,button) {
  color: #ffffff !important;
  font-family: "Unbounded", sans-serif !important;
  font-weight: 700 !important;
}

/* remove any remaining grey from meta/time text */
body.is-watch #animeHubPlayer .ah-player__time,
body.is-watch #animeHubPlayer .ah-player__time *,
body.is-watch #animeHubPlayer .ah-player-select > button,
body.is-watch #animeHubPlayer .ah-player-select > button > span,
body.is-watch #animeHubPlayer .ah-player-settings__view > button,
body.is-watch #animeHubPlayer .ah-player-settings__view > button > span,
body.is-watch #animeHubPlayer .ah-player-settings__view > button > em,
body.is-watch #animeHubPlayer .ah-player-settings__options > button,
body.is-watch #animeHubPlayer .ah-player-settings__back,
body.is-watch #animeHubPlayer .ah-player-settings__back > span,
body.is-watch #animeHubPlayer .ah-player-settings__menu,
body.is-watch #animeHubPlayer .ah-player-select__menu button,
body.is-watch #animeHubPlayer .ah-player__icon,
body.is-watch #animeHubPlayer .ah-player__icon svg,
body.is-watch #animeHubPlayer .ah-player__download,
body.is-watch #animeHubPlayer .ah-player__download svg {
  color: #fff !important;
  opacity: 1 !important;
}
body.is-watch #animeHubPlayer .ah-player__time i,
body.is-watch #animeHubPlayer .ah-player-settings__view[data-settings-view="main"] > button > em {
  color: #fff !important;
}

/* list titles regular */
body.is-watch #animeHubPlayer .ah-player-settings__back > span,
body.is-watch #animeHubPlayer .ah-player-settings__view[data-settings-view="main"] > button > span {
  font-weight: 400 !important;
}

/* lower settings menus: keep text regular except quality */
body.is-watch #animeHubPlayer .ah-player-settings__options > button {
  font-weight: 400 !important;
}
body.is-watch #animeHubPlayer #ahPlayerQualityOptions > button {
  font-weight: 700 !important;
}

/* summaries on the main settings page stay regular on the value side */
body.is-watch #animeHubPlayer .ah-player-settings__view[data-settings-view="main"] > button > em {
  font-weight: 400 !important;
}

/* top dropdown menus and chosen values bold */
body.is-watch #animeHubPlayer .ah-player-select > button > span,
body.is-watch #animeHubPlayer .ah-player-select__menu button {
  font-weight: 700 !important;
}

/* preserve white timeline from prior pass */
body.is-watch #animeHubPlayer .ah-player__seek-track,
body.is-watch #animeHubPlayer .ah-player__seek-track > #ahPlayerProgress,
body.is-watch #animeHubPlayer .ah-player__seek-track > #ahPlayerBuffer,
body.is-watch #animeHubPlayer .ah-player__seek-track > #ahPlayerThumb {
  filter: none !important;
}
body.is-watch #animeHubPlayer .ah-player__seek-track > #ahPlayerProgress,
body.is-watch #animeHubPlayer .ah-player__seek-track > #ahPlayerThumb {
  background: #fff !important;
  background-color: #fff !important;
}
body.is-watch #animeHubPlayer .ah-player__seek-track {
  background: rgba(255,255,255,.34) !important;
}
body.is-watch #animeHubPlayer .ah-player__seek-track > #ahPlayerBuffer {
  background: rgba(255,255,255,.16) !important;
}

/* seek tooltip & misc helper copy also white */
body.is-watch #animeHubPlayer #ahPlayerSeekTip,
body.is-watch #animeHubPlayer .ah-player__seek-flash,
body.is-watch #animeHubPlayer .ah-player__seek-flash * {
  color: #fff !important;
}


/* ============================================================
   AnimeHub Player — Figma v8
   Fix settings visibility/clickability + compact mobile layout.
   ============================================================ */

/* IMPORTANT: keep menu hidden until the settings wrapper is actually open.
   v7 accidentally forced opacity:1 on the menu itself. */
body.is-watch #animeHubPlayer .ah-player-settings__menu {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(4px) !important;
}
body.is-watch #animeHubPlayer .ah-player-settings.is-open .ah-player-settings__menu {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

/* Dropdowns follow the same closed/open rule. */
body.is-watch #animeHubPlayer .ah-player-select__menu {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
body.is-watch #animeHubPlayer .ah-player-select.is-open .ah-player-select__menu {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Never let player-surface click handling win over interactive UI. */
body.is-watch #animeHubPlayer .ah-player-settings,
body.is-watch #animeHubPlayer .ah-player-settings *,
body.is-watch #animeHubPlayer .ah-player-select,
body.is-watch #animeHubPlayer .ah-player-select *,
body.is-watch #animeHubPlayer .ah-player__controls,
body.is-watch #animeHubPlayer .ah-player__controls * {
  pointer-events: auto;
}

/* MOBILE — scale everything down so top row and bottom controls fit. */
@media (max-width: 760px) {
  body.is-watch #animeHubPlayer,
  body.is-watch #animeHubPlayer :where(button, span, em, strong, small, b) {
    font-size: 10px !important;
    line-height: 1.05 !important;
  }

  body.is-watch #animeHubPlayer .ah-player__top {
    gap: 2px !important;
    padding: 7px 7px !important;
    align-items: center !important;
  }

  body.is-watch #animeHubPlayer .ah-player-select > button {
    min-height: 25px !important;
    max-width: 92px !important;
    padding: 4px 5px !important;
    gap: 4px !important;
    border-radius: 5px !important;
    font-size: 10px !important;
  }

  body.is-watch #animeHubPlayer .ah-player-select > button > span {
    font-size: 10px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.is-watch #animeHubPlayer .ah-player-select--player > button {
    min-width: 66px !important;
    max-width: 78px !important;
  }

  body.is-watch #animeHubPlayer .ah-chevron {
    width: 5px !important;
    height: 5px !important;
    border-right-width: 1px !important;
    border-bottom-width: 1px !important;
  }

  body.is-watch #animeHubPlayer .ah-player__title {
    display: none !important;
  }

  body.is-watch #animeHubPlayer .ah-player-select__menu {
    min-width: 160px !important;
    max-width: 210px !important;
    padding: 4px !important;
    border-radius: 7px !important;
  }

  body.is-watch #animeHubPlayer .ah-player-select__menu button {
    min-height: 32px !important;
    padding: 6px 7px 6px 25px !important;
    font-size: 10px !important;
    border-radius: 5px !important;
  }

  body.is-watch #animeHubPlayer .ah-player-select__menu button::before {
    left: 9px !important;
  }

  body.is-watch #animeHubPlayer .ah-player-voice-badge {
    min-width: 25px !important;
    height: 14px !important;
    padding: 0 3px !important;
    border-radius: 3px !important;
    font-size: 7px !important;
    line-height: 14px !important;
  }

  body.is-watch #animeHubPlayer .ah-player__controls {
    padding: 12px 7px 6px !important;
  }

  body.is-watch #animeHubPlayer .ah-player__row {
    gap: 3px !important;
    min-height: 25px !important;
  }

  body.is-watch #animeHubPlayer .ah-player__play,
  body.is-watch #animeHubPlayer .ah-player__mute,
  body.is-watch #animeHubPlayer .ah-player__download,
  body.is-watch #animeHubPlayer #ahPlayerSettingsButton,
  body.is-watch #animeHubPlayer #ahPlayerPip,
  body.is-watch #animeHubPlayer #ahPlayerFullscreen {
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 3px !important;
    border-radius: 4px !important;
  }

  body.is-watch #animeHubPlayer .ah-player__icon svg,
  body.is-watch #animeHubPlayer .ah-player__download svg,
  body.is-watch #animeHubPlayer #ahPlayerSettingsButton svg {
    width: 17px !important;
    height: 17px !important;
  }

  body.is-watch #animeHubPlayer .ah-player__time,
  body.is-watch #animeHubPlayer .ah-player__time * {
    font-size: 9px !important;
    gap: 2px !important;
    white-space: nowrap !important;
  }

  body.is-watch #animeHubPlayer .ah-player__seek {
    min-width: 0 !important;
    margin-inline: 1px !important;
  }

  body.is-watch #animeHubPlayer .ah-player__seek-track {
    height: 2px !important;
  }

  body.is-watch #animeHubPlayer #ahPlayerThumb {
    width: 8px !important;
    height: 8px !important;
  }

  body.is-watch #animeHubPlayer .ah-player-settings__menu {
    width: 186px !important;
    min-width: 186px !important;
    padding: 4px !important;
    border-radius: 7px !important;
    right: 0 !important;
    bottom: calc(100% + 4px) !important;
  }

  body.is-watch #animeHubPlayer .ah-player-settings__view > button,
  body.is-watch #animeHubPlayer .ah-player-settings__options > button {
    min-height: 32px !important;
    padding: 6px 7px !important;
    gap: 5px !important;
    border-radius: 5px !important;
    font-size: 10px !important;
  }

  body.is-watch #animeHubPlayer .ah-player-settings__options > button {
    padding-left: 24px !important;
  }

  body.is-watch #animeHubPlayer .ah-player-settings__options > button::before {
    left: 9px !important;
  }

  body.is-watch #animeHubPlayer .ah-player-settings__back > span,
  body.is-watch #animeHubPlayer .ah-player-settings__view[data-settings-view="main"] > button > span,
  body.is-watch #animeHubPlayer .ah-player-settings__view[data-settings-view="main"] > button > em,
  body.is-watch #animeHubPlayer .ah-player-settings__options > button {
    font-size: 10px !important;
  }

  /* PiP is redundant on very narrow phones and costs too much width. */
  @media (max-width: 430px) {
    body.is-watch #animeHubPlayer #ahPlayerPip {
      display: none !important;
    }
  }
}


/* ============================================================
   AnimeHub Player — Figma v9
   Rounded shell / soft non-fullscreen shades / readable error / mobile fullscreen menus.
   ============================================================ */

body.is-watch #animeHubPlayer.ah-player {
  border-radius: 14px !important;
  overflow: hidden !important;
}

/* Barely-visible cinematic shading, only in the embedded player. */
body.is-watch #animeHubPlayer:not(:fullscreen):not(:-webkit-full-screen) .ah-player__shade--top {
  height: 88px !important;
  opacity: 1 !important;
  background: linear-gradient(to bottom, rgba(0,0,0,.18), rgba(0,0,0,.055) 56%, transparent) !important;
}
body.is-watch #animeHubPlayer:not(:fullscreen):not(:-webkit-full-screen) .ah-player__shade--bottom {
  height: 112px !important;
  opacity: 1 !important;
  background: linear-gradient(to top, rgba(0,0,0,.22), rgba(0,0,0,.06) 58%, transparent) !important;
}
body.is-watch #animeHubPlayer:fullscreen,
body.is-watch #animeHubPlayer:-webkit-full-screen {
  border-radius: 0 !important;
}
body.is-watch #animeHubPlayer:fullscreen .ah-player__shade,
body.is-watch #animeHubPlayer:-webkit-full-screen .ah-player__shade {
  opacity: 0 !important;
}

/* Error state: keep the useful error, but make every bit readable. */
body.is-watch #animeHubPlayer .ah-player__error {
  color: #fff !important;
  background: rgba(0,0,0,.36) !important;
  text-shadow: 0 2px 12px rgba(0,0,0,.85) !important;
}
body.is-watch #animeHubPlayer .ah-player__error strong,
body.is-watch #animeHubPlayer .ah-player__error span {
  color: #fff !important;
  opacity: 1 !important;
}
body.is-watch #animeHubPlayer .ah-player__error button {
  min-width: 116px !important;
  background: #fff !important;
  color: #0b0b0b !important;
  text-shadow: none !important;
  font-weight: 700 !important;
}

/* Explicit upscale chip in the Quality submenu. */
body.is-watch #animeHubPlayer .ah-player-upscale-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-left: auto !important;
  padding: 3px 6px !important;
  border: 1px solid rgba(255,255,255,.55) !important;
  border-radius: 4px !important;
  color: #fff !important;
  background: rgba(255,255,255,.055) !important;
  font-family: "Unbounded", sans-serif !important;
  font-size: 9px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* Custom fullscreen menus must stay inside a phone viewport. */
@media (max-width: 820px) {
  body.is-watch #animeHubPlayer:fullscreen .ah-player-select__menu,
  body.is-watch #animeHubPlayer:-webkit-full-screen .ah-player-select__menu {
    position: fixed !important;
    z-index: 2147483646 !important;
    top: 48px !important;
    left: 8px !important;
    right: 8px !important;
    bottom: auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: calc(100dvh - 104px) !important;
    overflow: auto !important;
    transform: none !important;
  }

  body.is-watch #animeHubPlayer:fullscreen .ah-player-settings__menu,
  body.is-watch #animeHubPlayer:-webkit-full-screen .ah-player-settings__menu {
    position: fixed !important;
    z-index: 2147483646 !important;
    left: 8px !important;
    right: 8px !important;
    top: auto !important;
    bottom: 52px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: calc(100dvh - 104px) !important;
    overflow: auto !important;
    transform: none !important;
  }

  body.is-watch #animeHubPlayer:fullscreen .ah-player__top,
  body.is-watch #animeHubPlayer:-webkit-full-screen .ah-player__top {
    z-index: 40 !important;
  }
  body.is-watch #animeHubPlayer:fullscreen .ah-player__controls,
  body.is-watch #animeHubPlayer:-webkit-full-screen .ah-player__controls {
    z-index: 40 !important;
  }
}

/* Portrait/mobile embedded mode: keep everything compact. */
@media (max-width: 620px) {
  body.is-watch #animeHubPlayer.ah-player {
    border-radius: 10px !important;
  }
  body.is-watch #animeHubPlayer .ah-player__top {
    gap: 2px !important;
    padding: 7px 8px !important;
  }
  body.is-watch #animeHubPlayer .ah-player-select > button,
  body.is-watch #animeHubPlayer .ah-player-select > button > span,
  body.is-watch #animeHubPlayer .ah-player-select__menu button {
    font-size: 8px !important;
  }
  body.is-watch #animeHubPlayer .ah-player-select > button {
    min-height: 25px !important;
    max-width: 88px !important;
    padding: 4px 5px !important;
    gap: 4px !important;
  }
  body.is-watch #animeHubPlayer .ah-player-select--player > button {
    min-width: 58px !important;
  }
  body.is-watch #animeHubPlayer .ah-player-select__menu {
    min-width: 150px !important;
  }
  body.is-watch #animeHubPlayer .ah-player-select__menu button,
  body.is-watch #animeHubPlayer .ah-player-settings__view > button,
  body.is-watch #animeHubPlayer .ah-player-settings__options > button {
    min-height: 32px !important;
    font-size: 9px !important;
  }
  body.is-watch #animeHubPlayer .ah-player-settings__menu {
    width: 190px !important;
    min-width: 190px !important;
  }
  body.is-watch #animeHubPlayer .ah-player__time,
  body.is-watch #animeHubPlayer .ah-player__time * {
    font-size: 8px !important;
  }
  body.is-watch #animeHubPlayer .ah-player__controls {
    padding: 12px 7px 5px !important;
  }
  body.is-watch #animeHubPlayer .ah-player__row {
    gap: 2px !important;
  }
  body.is-watch #animeHubPlayer .ah-player__icon,
  body.is-watch #animeHubPlayer .ah-player__download,
  body.is-watch #animeHubPlayer #ahPlayerSettingsButton {
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
  }
  body.is-watch #animeHubPlayer .ah-player__icon svg,
  body.is-watch #animeHubPlayer .ah-player__download svg,
  body.is-watch #animeHubPlayer #ahPlayerSettingsButton svg {
    width: 16px !important;
    height: 16px !important;
  }
  body.is-watch #animeHubPlayer .ah-player-upscale-badge {
    font-size: 7px !important;
    padding: 2px 4px !important;
  }
}

/* ============================================================
   AnimeHub Player — Figma v12
   Unbounded 900 everywhere + corrected Figma plaques.
   ============================================================ */

/* User decision: every text element inside the player uses Unbounded Black 900. */
body.is-watch #animeHubPlayer,
body.is-watch #animeHubPlayer :where(button, span, b, strong, em, small, label, p) {
  font-family: "Unbounded", sans-serif !important;
  font-weight: 900 !important;
}

/* Keep the exact requested 14px desktop player type unless a more specific
   component size (e.g. plaques) overrides it below. */
body.is-watch #animeHubPlayer :where(button, span, b, strong, em, small, label, p) {
  font-style: normal !important;
}

/* FHD / 4K / UPSCALE plaques — exactly one shared visual definition. */
body.is-watch #animeHubPlayer .ah-player-voice-badge,
body.is-watch #animeHubPlayer .ah-player-upscale-badge {
  display: inline-flex !important;
  width: auto !important;
  min-width: 31px !important;
  height: 17px !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 5px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: #f3f3f3 !important;
  color: #101010 !important;
  font-family: "Unbounded", sans-serif !important;
  font-size: 9px !important;
  font-style: normal !important;
  font-weight: 900 !important;
  line-height: 17px !important;
  letter-spacing: -0.18px !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

/* In the quality menu the UPSCALE plaque sits at the right edge, same component. */
body.is-watch #animeHubPlayer #ahPlayerQualityOptions .ah-player-upscale-badge {
  margin-left: auto !important;
}

/* Quality labels are also 900 now. */
body.is-watch #animeHubPlayer #ahPlayerQualityOptions > button,
body.is-watch #animeHubPlayer #ahPlayerQualityOptions > button > span {
  font-family: "Unbounded", sans-serif !important;
  font-weight: 900 !important;
}

/* Translation menu + selected translation also use 900. */
body.is-watch #animeHubPlayer .ah-player-select > button,
body.is-watch #animeHubPlayer .ah-player-select > button > span,
body.is-watch #animeHubPlayer .ah-player-select__menu button,
body.is-watch #animeHubPlayer .ah-player-select__menu button > span {
  font-weight: 900 !important;
}

/* Settings and bottom controls follow the same weight. */
body.is-watch #animeHubPlayer .ah-player-settings__view > button,
body.is-watch #animeHubPlayer .ah-player-settings__view > button > span,
body.is-watch #animeHubPlayer .ah-player-settings__view > button > em,
body.is-watch #animeHubPlayer .ah-player-settings__options > button,
body.is-watch #animeHubPlayer .ah-player-settings__options > button > span,
body.is-watch #animeHubPlayer .ah-player__time,
body.is-watch #animeHubPlayer .ah-player__time * {
  font-weight: 900 !important;
}

@media (max-width: 820px) {
  body.is-watch #animeHubPlayer .ah-player-voice-badge,
  body.is-watch #animeHubPlayer .ah-player-upscale-badge {
    min-width: 25px !important;
    height: 14px !important;
    padding: 0 3px !important;
    border-radius: 3px !important;
    font-size: 7px !important;
    font-weight: 900 !important;
    line-height: 14px !important;
    letter-spacing: -0.12px !important;
  }
}

/* ANIMEHUB_LOADING_BANNER_V48_BEGIN */
/*
  Loading banner rules:
  - while the player is loading/buffering, the anime banner fills the whole player;
  - once loading ends, the banner is removed from rendering completely;
  - the <video> element itself has no poster, so a stale/blurred banner cannot remain
    over the first decoded video frames.
*/
.ah-player__backdrop {
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

.ah-player:not(.is-loading) .ah-player__backdrop {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.ah-player.is-loading .ah-player__backdrop {
  display: block !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none !important;
}

.ah-player.is-loading .ah-player__loading {
  background: rgba(4, 5, 7, .52) !important;
}
/* ANIMEHUB_LOADING_BANNER_V48_END */

/* EMBED_PLAYER_SWITCH_V3_BEGIN */
/* Kodik/Senku: показываем только СУЩЕСТВУЮЩИЙ переключатель плееров.
   Дизайн кнопки/меню не меняем — только положение. */
.ah-player.is-embed .ah-player__top {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: none !important;
  background: transparent !important;
}
.ah-player.is-embed .ah-player__top > * {
  display: none !important;
}
.ah-player.is-embed .ah-player__top > [data-player-select="player"] {
  display: block !important;
  position: absolute !important;
  top: 15px !important;
  right: 150px !important;
  left: auto !important;
  margin: 0 !important;
  z-index: 30 !important;
  pointer-events: auto !important;
}
.ah-player.is-embed .ah-player__top > [data-player-select="player"] > .ah-player-select__menu {
  right: 0 !important;
  left: auto !important;
}

/* Mobile Senku: как в V2 — второй ряд слева. */
@media (max-width: 900px) {
  .ah-player.is-senku.is-embed .ah-player__top > [data-player-select="player"] {
    top: 54px !important;
    left: 10px !important;
    right: auto !important;
  }
  .ah-player.is-senku.is-embed .ah-player__top > [data-player-select="player"] > .ah-player-select__menu {
    left: 0 !important;
    right: auto !important;
  }

  /* Mobile Kodik: его собственные кнопки уже занимают две строки.
     Ставим наш переключатель на высоту второй строки, но справа и на 2px выше. */
  .ah-player.is-kodik.is-embed .ah-player__top > [data-player-select="player"] {
    top: 52px !important;
    right: 10px !important;
    left: auto !important;
  }
  .ah-player.is-kodik.is-embed .ah-player__top > [data-player-select="player"] > .ah-player-select__menu {
    right: 0 !important;
    left: auto !important;
  }
}
/* EMBED_PLAYER_SWITCH_V3_END */
