body.is-watch #detailPage.detail-page {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  background: #030405 !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;
}

.watch-comments {
  width: min(100%, 1344px);
  margin: 38px auto 0;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.watch-comments__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.watch-comments__head h2 { margin: 0; color: #fff; font-size: clamp(25px, 3vw, 38px); line-height: 1; }
.watch-comments__head p { margin: 7px 0 0; color: rgba(255, 255, 255, .42); font-size: 12px; }
.watch-comments__head > span { color: rgba(255, 255, 255, .42); font-size: 13px; font-weight: 800; }
.watch-comments .comment-form { border-radius: 12px; background: #0d0f12; }
.watch-comments .comment-form textarea { border-radius: 9px; background: #080a0c; }
.watch-comments .comment-card { padding-inline: 8px; }
.watch-comments .comment-delete-button:hover { border-color: #e06363; color: #f08080; }

.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: #030405;
  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.is-playing .ah-player__backdrop { opacity: 0; pointer-events: 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 {
  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 { opacity: 1; pointer-events: auto; transform: translateY(0); }
.ah-player-select__menu button,
.ah-player-quality__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 { background: rgba(255, 255, 255, .07); color: #fff; }
.ah-player-select__menu button.is-active,
.ah-player-quality__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.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__shade--bottom { display: none; }
.ah-player.is-embed [data-player-select="translation"] { display: none; }
.ah-player.is-embed .ah-player__top { background: linear-gradient(rgba(3, 4, 5, .82), rgba(3, 4, 5, .2) 72%, transparent); }

.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; }

@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)); }
  .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; }
}

@media (max-width: 620px) {
  .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__skip { right: 10px; bottom: 70px; }
  .ah-episode-rail-wrap { grid-template-columns: minmax(0, 1fr); }
  .ah-episode-arrow { display: none; }
}
