/* KyiPlayer JW-style professional controls
   Custom YouTube IFrame shell + encrypted subtitle overlay. */

:root {
  --kp-accent: #22c8ff;
  --kp-accent-2: #7c3aed;
  --kp-bg: #05060a;
  --kp-panel: rgba(8, 10, 16, .86);
  --kp-panel-strong: rgba(8, 10, 16, .96);
  --kp-text: #f8fafc;
  --kp-muted: rgba(248,250,252,.72);
  --kp-line: rgba(255,255,255,.14);
  --kp-control-size: 42px;
}

.kyi-watch-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 200, 255, .12), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(124, 58, 237, .13), transparent 32rem),
    linear-gradient(180deg, #070914 0%, #03040a 100%);
}

.kyi-watch-wrap {
  width: min(1240px, calc(100% - 28px));
}

.kyi-page-head {
  align-items: flex-start;
}

.kyi-page-head h1 {
  max-width: 850px;
  font-size: clamp(22px, 2.8vw, 38px);
  letter-spacing: -.035em;
}

.kyi-page-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(9, 11, 18, .72);
  color: #e5f4ff;
  backdrop-filter: blur(14px);
}

.secure-player.kyi-player {
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.12);
  background: #000;
  box-shadow: 0 30px 110px rgba(0,0,0,.56), 0 0 0 1px rgba(255,255,255,.04) inset;
  isolation: isolate;
  overflow: hidden;
}

.secure-player.kyi-player::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.72), rgba(0,0,0,0) 24%, rgba(0,0,0,0) 55%, rgba(0,0,0,.92) 100%),
    radial-gradient(circle at center, transparent 45%, rgba(0,0,0,.24));
}

.kyi-player .youtube-viewport {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
  overflow: hidden;
}

.kyi-player .youtube-frame,
.kyi-player .youtube-frame iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  pointer-events: none !important;
}

.kyi-player .youtube-frame iframe {
  transform: scale(1.018);
  transform-origin: center center;
}

.kyi-player .yt-ui-mask {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 4;
  pointer-events: none;
}

.kyi-player .yt-ui-mask-top {
  top: 0;
  height: clamp(66px, 13%, 118px);
  background: linear-gradient(180deg, rgba(0,0,0,.84), rgba(0,0,0,.32) 56%, rgba(0,0,0,0));
}

.kyi-player .yt-ui-mask-bottom {
  bottom: 0;
  height: clamp(125px, 25%, 210px);
  background: linear-gradient(0deg, rgba(0,0,0,.96), rgba(0,0,0,.58) 56%, rgba(0,0,0,0));
}

.kp-top-chrome {
  position: absolute;
  z-index: 12;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  direction: ltr;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.kyi-player.controls-visible .kp-top-chrome,
.kyi-player.has-overlay .kp-top-chrome,
.kyi-player:not(.is-playing) .kp-top-chrome,
.kyi-player.is-menu-open .kp-top-chrome {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.kp-top-left,
.kp-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.kp-back-chip,
.kp-status,
.kp-secure-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(8,10,16,.68);
  color: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
}

.kp-back-chip {
  width: 38px;
  font-size: 18px;
  text-decoration: none;
}

.kp-video-title {
  max-width: min(54vw, 740px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(8,10,16,.60);
  color: #fff;
  font-weight: 780;
  line-height: 1;
  backdrop-filter: blur(14px);
}

.kp-status,
.kp-secure-badge {
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .01em;
}

.kp-status::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 999px;
  background: var(--kp-accent);
  box-shadow: 0 0 0 4px rgba(34,200,255,.16);
}

.kyi-player.is-buffering .kp-status::before {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245,158,11,.16);
}

.kp-secure-badge {
  color: #bbf7d0;
  border-color: rgba(34,197,94,.26);
}

.kyi-player .video-surface {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  box-shadow: none;
  transform: none !important;
}

.kyi-player .video-surface:hover,
.kyi-player .video-surface:focus {
  outline: none;
  border-color: transparent;
  transform: none !important;
}

.kp-center-feedback {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  min-width: 76px;
  height: 76px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(0,0,0,.62);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.82);
  pointer-events: none;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 54px rgba(0,0,0,.42);
}

.kp-center-feedback.is-visible {
  animation: kp-center-pop .48s ease forwards;
}

@keyframes kp-center-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.82); }
  24% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.14); }
}

.kyi-player .player-overlay {
  z-index: 9;
  background: rgba(0,0,0,.44);
}

.kp-hero-card,
.kp-glass-card {
  background: linear-gradient(180deg, rgba(8,10,16,.62), rgba(8,10,16,.34));
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(18px);
}

.kyi-player .overlay-title {
  max-width: 900px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.025em;
}

@media (min-width: 601px) {
  .kyi-player .overlay-title {
    font-size: clamp(18px, calc(4vw - 6px), 26px);
  }
}

@media (min-width: 801px) {
  .kyi-player .overlay-title {
    font-size: clamp(26px, calc(1.7857vw + 11.714px), 30px);
  }
}

@media (min-width: 1025px) {
  .kyi-player .overlay-title {
    font-size: clamp(30px, calc(1.1696vw + 18.025px), 34px);
  }
}

@media (min-width: 1366px) {
  .kyi-player .overlay-title {
    font-size: 34px;
  }
}

.kyi-player .big-play {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: #06070b;
  border: 1px solid rgba(255,255,255,.32);
  box-shadow: 0 22px 62px rgba(0,0,0,.36), 0 0 0 10px rgba(255,255,255,.08);
}

.kyi-player .big-play:hover {
  background: #fff;
  transform: translateY(-1px) scale(1.02);
}

.kyi-player .big-play.small {
  width: 64px;
  height: 64px;
}

.kyi-player .subtitle-layer {
  z-index: 6;
  pointer-events: none;
}

.kyi-player .subtitle-box {
  border-radius: 12px;
  padding: .22em .55em .32em;
  line-height: 1.8;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transform: translateZ(0);
}

.kp-toast {
  position: absolute;
  z-index: 16;
  left: 50%;
  bottom: 96px;
  min-width: 86px;
  max-width: min(80%, 420px);
  padding: 9px 13px;
  border-radius: 999px;
  text-align: center;
  color: #f8fafc;
  background: rgba(0,0,0,.76);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 16px 46px rgba(0,0,0,.34);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.kp-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Bottom controlbar: JW-style timeline on top and icon row below. */
.kyi-player .custom-controls.kp-controls {
  position: absolute;
  z-index: 13;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
  padding: 0 14px 12px;
  direction: ltr;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.54) 18%, rgba(0,0,0,.82) 100%);
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity .18s ease, transform .18s ease;
}

.kyi-player.controls-visible .kp-controls,
.kyi-player.has-overlay .kp-controls,
.kyi-player:not(.is-playing) .kp-controls,
.kyi-player .kp-controls:hover,
.kyi-player .kp-controls:focus-within,
.kyi-player.is-menu-open .kp-controls {
  opacity: 1 !important;
  pointer-events: auto;
  transform: translateY(0);
}

.kyi-player.is-playing:not(.controls-visible):not(.is-menu-open) .kp-controls {
  opacity: 0 !important;
  pointer-events: none;
}

.kp-progress-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: 10px 2px 3px;
}

.kp-progress-row .time-readout {
  display: none;
}

.kp-controls-row {
  display: grid;
  grid-template-columns: auto auto auto auto minmax(95px, 160px) auto 1fr auto auto auto auto;
  align-items: center;
  gap: 6px;
  min-height: 46px;
}

.kp-time-block {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 108px;
  padding-inline: 4px;
  color: rgba(255,255,255,.86);
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.kp-time-separator {
  color: rgba(255,255,255,.46);
}

.kyi-player .time-readout {
  min-width: 43px;
  color: rgba(255,255,255,.86);
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.kp-spacer {
  min-width: 10px;
}

.kyi-player .control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--kp-control-size);
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.92);
  box-shadow: none;
  transition: color .15s ease, background .15s ease, transform .15s ease, opacity .15s ease;
}

.kyi-player .control-btn:hover,
.kyi-player .control-btn:focus-visible,
.kyi-player .control-btn[aria-expanded="true"] {
  background: rgba(255,255,255,.11);
  color: #fff;
  transform: none;
  outline: none;
}

.kyi-player .control-btn:active {
  transform: scale(.96);
}

.kp-icon-btn {
  min-width: 42px;
  padding: 7px 10px;
  font-size: 17px;
  font-weight: 850;
}

.kp-play-btn {
  min-width: 46px;
  font-size: 20px;
  color: #fff !important;
}

.kp-play-btn span {
  transform: translateX(1px);
}

.kp-pill-btn {
  min-width: 58px;
  padding-inline: 10px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .01em;
}

#sub-toggle.is-off {
  color: rgba(255,255,255,.48);
}

.kp-volume-group {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.kyi-player input[type="range"].kp-seek,
.kyi-player input[type="range"].kp-volume {
  width: 100%;
  min-width: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  accent-color: var(--kp-accent);
}

.kyi-player input[type="range"].kp-seek {
  height: 20px;
}

.kyi-player input[type="range"].kp-volume {
  height: 20px;
}

.kyi-player input[type="range"].kp-seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg,
      var(--kp-accent) 0%,
      var(--kp-accent) var(--range-progress, 0%),
      rgba(255,255,255,.44) var(--range-progress, 0%),
      rgba(255,255,255,.44) var(--buffer-progress, 0%),
      rgba(255,255,255,.24) var(--buffer-progress, 0%),
      rgba(255,255,255,.24) 100%);
  transition: height .12s ease;
}

.kyi-player input[type="range"].kp-volume::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fff var(--range-progress, 0%), rgba(255,255,255,.28) var(--range-progress, 0%));
}

.kyi-player input[type="range"].kp-seek:hover::-webkit-slider-runnable-track,
.kyi-player input[type="range"].kp-seek:focus::-webkit-slider-runnable-track {
  height: 6px;
}

.kyi-player input[type="range"].kp-seek::-moz-range-track,
.kyi-player input[type="range"].kp-volume::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
}

.kyi-player input[type="range"].kp-seek::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--kp-accent);
}

.kyi-player input[type="range"].kp-volume::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: #fff;
}

.kyi-player input[type="range"].kp-seek::-webkit-slider-thumb,
.kyi-player input[type="range"].kp-volume::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  margin-top: -4.5px;
  border-radius: 999px;
  background: #fff;
  border: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.46);
  opacity: 0;
  transition: opacity .12s ease, transform .12s ease;
}

.kyi-player input[type="range"].kp-volume::-webkit-slider-thumb {
  opacity: 1;
  width: 12px;
  height: 12px;
  margin-top: -4px;
}

.kyi-player input[type="range"].kp-seek:hover::-webkit-slider-thumb,
.kyi-player input[type="range"].kp-seek:focus::-webkit-slider-thumb {
  opacity: 1;
  transform: scale(1.08);
}

.kyi-player input[type="range"].kp-seek::-moz-range-thumb,
.kyi-player input[type="range"].kp-volume::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: #fff;
  border: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.46);
}

.kp-seek-tooltip {
  position: absolute;
  bottom: 30px;
  left: 0;
  z-index: 22;
  min-width: 48px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,.88);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
}

.kp-progress-row:hover .kp-seek-tooltip,
.kp-progress-row:focus-within .kp-seek-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.kp-menu-wrap {
  position: relative;
}

.kp-menu,
.kp-subtitle-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 20;
  display: grid;
  gap: 4px;
  min-width: 156px;
  padding: 8px;
  border-radius: 4px;
  background: var(--kp-panel-strong);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 22px 72px rgba(0,0,0,.52);
  backdrop-filter: blur(18px);
}

.kp-menu[hidden],
.kp-subtitle-panel[hidden] {
  display: none !important;
}

.kp-menu::after,
.kp-subtitle-panel::after {
  content: "";
  position: absolute;
  right: 17px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: var(--kp-panel-strong);
  border-right: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.kp-menu button {
  min-height: 35px;
  padding: 8px 10px;
  border-radius: 3px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.86);
  justify-content: flex-start;
  font-weight: 700;
}

.kp-menu button:hover,
.kp-menu button.is-active {
  background: rgba(255,255,255,.10);
  color: #fff;
}

.kp-menu button.is-active::after {
  content: "";
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--kp-accent);
  box-shadow: 0 0 0 4px rgba(34,200,255,.14);
}

.kp-subtitle-panel {
  right: 46px;
  min-width: 286px;
  padding: 12px;
  border-radius: 6px;
}

.kp-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 0 2px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.kp-panel-head strong {
  color: #fff;
}

.kp-panel-head span {
  color: rgba(255,255,255,.56);
  font-size: 12px;
}

.kp-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 10px;
}

.kp-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  color: rgba(255,255,255,.74);
  font-size: 12px;
  font-weight: 800;
}

.kp-field select {
  min-height: 38px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.48);
  color: #fff;
  padding: 8px 10px;
}

.kp-shortcuts {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(226,232,240,.78);
  border-radius: 18px;
  background: rgba(8,10,16,.52);
}

@media (max-width: 980px) {
  .kp-secure-badge,
  .kp-video-title {
    display: none;
  }

  .kp-controls-row {
    grid-template-columns: auto auto auto auto minmax(75px, 118px) auto 1fr auto auto auto;
  }

  .kp-time-block {
    min-width: 92px;
  }

  #sub-panel-toggle {
    display: none;
  }
}

@media (max-width: 680px) {
  :root {
    --kp-control-size: 38px;
  }

  .secure-player.kyi-player {
    border-radius: 18px;
  }

  .kyi-player .custom-controls.kp-controls {
    padding: 0 9px 8px;
  }

  .kp-progress-row {
    padding-top: 8px;
  }

  .kp-controls-row {
    grid-template-columns: auto auto auto 1fr auto auto;
    gap: 4px;
  }

  .kp-time-block,
  .kp-volume,
  #sub-panel-toggle,
  #speed-toggle,
  #skip-back,
  #skip-forward {
    display: none !important;
  }

  .kp-volume-group {
    grid-template-columns: auto;
    justify-self: end;
  }

  .kp-icon-btn {
    min-width: 38px;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 13px;
  }

  .kp-pill-btn {
    min-width: 54px;
    padding-inline: 8px;
  }

  .kp-top-chrome {
    top: 8px;
    left: 8px;
    right: 8px;
  }

  .kp-status {
    display: none;
  }

  .kyi-player .big-play {
    width: 68px;
    height: 68px;
  }

  .kyi-player .subtitle-layer[data-position="bottom"] {
    padding-bottom: 18%;
  }

  .kp-shortcuts {
    display: none;
  }
}

@media (hover: none) {
  .kyi-player.is-playing:not(.controls-visible):not(.is-menu-open) .kp-controls,
  .kyi-player.is-playing:not(.controls-visible):not(.is-menu-open) .kp-top-chrome {
    opacity: .94 !important;
    pointer-events: auto;
    transform: translateY(0);
  }
}


/* =========================================================
   KyiPlayer Strong Bright Mode Fix
   Removes persistent video-dimming overlays. Keep only a light
   control readability shade at the very bottom.
   ========================================================= */
.secure-player.kyi-player::before,
.custom-shell.secure-player::before {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  background: none !important;
}

.kyi-player .yt-ui-mask,
.custom-shell .yt-ui-mask,
.kyi-player .yt-ui-mask-top,
.kyi-player .yt-ui-mask-bottom,
.custom-shell .yt-ui-mask-top,
.custom-shell .yt-ui-mask-bottom {
  opacity: 0 !important;
  background: transparent !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  display: none !important;
}

.kyi-player .youtube-frame iframe,
.kyi-player .youtube-frame {
  filter: none !important;
  opacity: 1 !important;
}

.kyi-player .custom-controls.kp-controls,
.custom-shell .custom-controls.kp-controls {
  background: linear-gradient(180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,.08) 28%,
    rgba(0,0,0,.26) 72%,
    rgba(0,0,0,.40) 100%) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.kyi-player .kp-top-chrome,
.kyi-player .kp-subtitle-panel,
.kyi-player .kp-menu {
  background-color: rgba(8,10,16,.58) !important;
  backdrop-filter: blur(10px) !important;
}

.kyi-player .player-overlay {
  background: rgba(0,0,0,.18) !important;
}

.kyi-player .player-poster {
  background-color: #000 !important;
  background-blend-mode: normal !important;
}

.kyi-player .kp-hero-card,
.kyi-player .kp-glass-card,
.kyi-player .overlay-card {
  background: rgba(8,10,16,.44) !important;
  box-shadow: 0 16px 48px rgba(0,0,0,.24) !important;
  backdrop-filter: blur(10px) !important;
}

.kyi-player .subtitle-layer {
  z-index: 10 !important;
  pointer-events: none !important;
}

.kyi-player .video-surface {
  background: transparent !important;
}


/* =========================================================
   KyiPlayer Mobile Fullscreen + Touch Auto-Hide Fix
   ========================================================= */
html.kp-player-lock-scroll,
body.kp-player-lock-scroll {
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
  background: #000 !important;
}

.secure-player.kyi-player:fullscreen,
.secure-player.kyi-player:-webkit-full-screen,
.secure-player.kyi-player.kp-native-fullscreen,
.secure-player.kyi-player.kp-faux-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #000 !important;
  z-index: 2147483000 !important;
  aspect-ratio: auto !important;
}

.secure-player.kyi-player.kp-faux-fullscreen {
  position: fixed !important;
}

.secure-player.kyi-player.kp-fullscreen-active .youtube-viewport,
.secure-player.kyi-player.kp-fullscreen-active .youtube-frame,
.secure-player.kyi-player.kp-fullscreen-active .youtube-frame iframe {
  width: 100% !important;
  height: 100% !important;
}

.secure-player.kyi-player.kp-fullscreen-active .kp-controls {
  padding-left: max(12px, env(safe-area-inset-left)) !important;
  padding-right: max(12px, env(safe-area-inset-right)) !important;
  padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
}

.secure-player.kyi-player.kp-fullscreen-active .kp-top-chrome {
  top: max(10px, env(safe-area-inset-top)) !important;
  left: max(10px, env(safe-area-inset-left)) !important;
  right: max(10px, env(safe-area-inset-right)) !important;
}

/* Fallback for mobile browsers that refuse programmatic orientation lock.
   In portrait viewport, rotate our custom fullscreen container into landscape. */
@media (hover: none) and (orientation: portrait) {
  .secure-player.kyi-player.kp-fullscreen-active.kp-force-landscape {
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: 100vh !important;
    height: 100vw !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    transform-origin: center center !important;
  }

  .secure-player.kyi-player.kp-fullscreen-active.kp-force-landscape .kp-top-chrome {
    top: max(10px, env(safe-area-inset-left)) !important;
    left: max(10px, env(safe-area-inset-bottom)) !important;
    right: max(10px, env(safe-area-inset-top)) !important;
  }

  .secure-player.kyi-player.kp-fullscreen-active.kp-force-landscape .kp-controls {
    padding-left: max(12px, env(safe-area-inset-bottom)) !important;
    padding-right: max(12px, env(safe-area-inset-top)) !important;
    padding-bottom: max(10px, env(safe-area-inset-right)) !important;
  }
}

/* Fix previous mobile rule that forced controls visible forever on touch devices. */
@media (hover: none) {
  .kyi-player.is-playing:not(.controls-visible):not(.is-menu-open):not(.has-overlay) .kp-controls {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(18px) !important;
  }

  .kyi-player.is-playing:not(.controls-visible):not(.is-menu-open):not(.has-overlay) .kp-top-chrome {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-12px) !important;
  }

  .kyi-player .video-surface {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .kyi-player .control-btn,
  .kyi-player .kp-seek,
  .kyi-player .kp-volume {
    touch-action: manipulation;
  }
}

@media (max-width: 680px) and (orientation: landscape) {
  .secure-player.kyi-player.kp-fullscreen-active .kp-controls-row {
    grid-template-columns: auto auto auto auto minmax(80px, 120px) 1fr auto auto auto !important;
    gap: 5px !important;
  }

  .secure-player.kyi-player.kp-fullscreen-active .kp-time-block,
  .secure-player.kyi-player.kp-fullscreen-active #speed-toggle,
  .secure-player.kyi-player.kp-fullscreen-active #skip-back,
  .secure-player.kyi-player.kp-fullscreen-active #skip-forward {
    display: inline-flex !important;
  }

  .secure-player.kyi-player.kp-fullscreen-active .kp-volume {
    display: none !important;
  }

  .secure-player.kyi-player.kp-fullscreen-active .subtitle-layer[data-position="bottom"] {
    padding-bottom: 14% !important;
  }
}

/* =========================================================
   KyiPlayer Subtitle Position Production Controls v1.3.6
   Presets + fine vertical offset, saved in browser storage.
   ========================================================= */
.kyi-player .subtitle-layer {
  --subtitle-y: 84%;
  --subtitle-default-y: 84%;
  display: block !important;
  padding: 0 18px !important;
  z-index: 10 !important;
}

.kyi-player .subtitle-layer .subtitle-box {
  position: absolute !important;
  left: 50% !important;
  top: clamp(8%, var(--subtitle-y, 84%), 94%) !important;
  width: max-content;
  max-width: min(92%, var(--subtitle-max-width, 92%));
  text-align: center;
  transform: translate(-50%, -50%) translateZ(0) !important;
  transition: top .16s ease, transform .16s ease;
}

.kp-subtitle-panel {
  min-width: min(360px, calc(100vw - 28px));
}

.kp-position-field,
.kp-range-field {
  grid-column: 1 / -1;
}

.kp-position-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.kp-position-preset {
  min-height: 34px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.86);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.kp-position-preset:hover,
.kp-position-preset:focus-visible,
.kp-position-preset.is-active {
  color: #fff;
  background: rgba(34,200,255,.18);
  border-color: rgba(34,200,255,.44);
  outline: none;
}

.kp-range-field > span:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#sub-position-readout {
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

#sub-position-y {
  width: 100%;
  accent-color: var(--kp-accent);
}

.kp-range-hints {
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,.52);
  font-size: 11px;
  font-weight: 750;
}

@media (max-width: 680px) {
  .kp-subtitle-panel {
    right: 6px !important;
    left: 6px !important;
    min-width: 0 !important;
    width: auto !important;
    max-height: min(72vh, 420px);
    overflow: auto;
    overscroll-behavior: contain;
  }

  .kp-position-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kp-position-preset {
    min-height: 36px;
  }

  .kyi-player .subtitle-layer .subtitle-box {
    top: clamp(10%, var(--subtitle-y, 84%), 92%) !important;
  }
}

@media (max-width: 680px) and (orientation: landscape) {
  .secure-player.kyi-player.kp-fullscreen-active .subtitle-layer .subtitle-box {
    top: clamp(8%, var(--subtitle-y, 84%), 94%) !important;
  }
}

/* =========================================================
   KyiPlayer Mobile Controls Rebuild v1.2.5
   Full replacement mobile control model:
   - no legacy forced-visible mobile controls
   - controls are above the video tap layer and subtitle layer
   - compact seek-to-buttons spacing
   - native touch activation for buttons and sliders
   ========================================================= */
.kyi-player.kp-controls-ready .custom-controls.kp-controls,
.custom-shell.kyi-player.kp-controls-ready .custom-controls.kp-controls {
  z-index: 80 !important;
  pointer-events: none;
}

.kyi-player.kp-controls-ready.controls-visible .custom-controls.kp-controls,
.kyi-player.kp-controls-ready.has-overlay .custom-controls.kp-controls,
.kyi-player.kp-controls-ready:not(.is-playing) .custom-controls.kp-controls,
.kyi-player.kp-controls-ready.is-menu-open .custom-controls.kp-controls,
.kyi-player.kp-controls-ready .custom-controls.kp-controls:focus-within,
.kyi-player.kp-controls-ready .custom-controls.kp-controls:hover {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

.kyi-player.kp-controls-ready.is-playing:not(.controls-visible):not(.is-menu-open):not(.has-overlay) .custom-controls.kp-controls {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(14px) !important;
}

.kyi-player.kp-controls-ready .custom-controls.kp-controls *,
.kyi-player.kp-controls-ready .control-btn,
.kyi-player.kp-controls-ready input[type="range"] {
  -webkit-tap-highlight-color: transparent;
}

.kyi-player.kp-controls-ready .control-btn,
.kyi-player.kp-controls-ready input[type="range"],
.kyi-player.kp-controls-ready .kp-menu button,
.kyi-player.kp-controls-ready .kp-subtitle-panel button {
  pointer-events: auto !important;
}

.kyi-player.kp-controls-ready .video-surface {
  z-index: 5 !important;
  pointer-events: auto !important;
  touch-action: manipulation;
}

.kyi-player.kp-controls-ready .subtitle-layer {
  z-index: 10 !important;
  pointer-events: none !important;
}

.kyi-player.kp-controls-ready .player-overlay {
  z-index: 20 !important;
}

.kyi-player.kp-controls-ready .custom-controls.kp-controls {
  background: linear-gradient(180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,.12) 24%,
    rgba(0,0,0,.42) 68%,
    rgba(0,0,0,.72) 100%) !important;
}

.kyi-player.kp-controls-ready .kp-progress-row {
  padding: 7px 2px 2px !important;
  min-height: 18px !important;
  margin: 0 !important;
  align-items: center !important;
}

.kyi-player.kp-controls-ready input[type="range"].kp-seek {
  height: 18px !important;
  min-height: 18px !important;
}

.kyi-player.kp-controls-ready input[type="range"].kp-seek::-webkit-slider-runnable-track {
  height: 4px !important;
}

.kyi-player.kp-controls-ready input[type="range"].kp-seek::-moz-range-track,
.kyi-player.kp-controls-ready input[type="range"].kp-seek::-moz-range-progress {
  height: 4px !important;
}

.kyi-player.kp-controls-ready input[type="range"].kp-seek::-webkit-slider-thumb {
  opacity: 1 !important;
  width: 14px !important;
  height: 14px !important;
  margin-top: -5px !important;
}

.kyi-player.kp-controls-ready input[type="range"].kp-seek::-moz-range-thumb {
  width: 14px !important;
  height: 14px !important;
}

@media (hover: none), (pointer: coarse) {
  .kyi-player.kp-controls-ready,
  .kyi-player.kp-controls-ready * {
    -webkit-touch-callout: none;
  }

  .kyi-player.kp-controls-ready .custom-controls.kp-controls,
  .custom-shell.kyi-player.kp-controls-ready .custom-controls.kp-controls {
    padding: 0 max(8px, env(safe-area-inset-left)) max(5px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right)) !important;
    gap: 0 !important;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
  }

  .kyi-player.kp-controls-ready .kp-progress-row {
    min-height: 14px !important;
    height: 14px !important;
    padding: 0 2px 0 !important;
    margin: 0 0 -1px !important;
  }

  .kyi-player.kp-controls-ready input[type="range"].kp-seek {
    height: 18px !important;
    min-height: 18px !important;
    touch-action: none !important;
  }

  .kyi-player.kp-controls-ready input[type="range"].kp-volume,
  .kyi-player.kp-controls-ready #sub-position-y {
    touch-action: none !important;
  }

  .kyi-player.kp-controls-ready .kp-controls-row {
    grid-template-columns: auto auto auto auto 1fr auto auto !important;
    align-items: center !important;
    gap: 2px !important;
    min-height: 36px !important;
    height: 36px !important;
    margin: 0 !important;
  }

  .kyi-player.kp-controls-ready .kp-time-block,
  .kyi-player.kp-controls-ready #speed-toggle,
  .kyi-player.kp-controls-ready #sub-panel-toggle,
  .kyi-player.kp-controls-ready .kp-menu-wrap {
    display: none !important;
  }

  .kyi-player.kp-controls-ready #skip-back,
  .kyi-player.kp-controls-ready #skip-forward {
    display: inline-flex !important;
  }

  .kyi-player.kp-controls-ready .kp-spacer {
    min-width: 0 !important;
  }

  .kyi-player.kp-controls-ready .kp-volume-group {
    grid-template-columns: auto !important;
    justify-self: end !important;
    position: relative !important;
    z-index: 90 !important;
  }

  .kyi-player.kp-controls-ready .control-btn {
    min-height: 34px !important;
    touch-action: manipulation !important;
    position: relative;
    z-index: 91;
  }

  .kyi-player.kp-controls-ready .kp-icon-btn {
    min-width: 34px !important;
    min-height: 34px !important;
    padding: 4px 5px !important;
    font-size: 12px !important;
  }

  .kyi-player.kp-controls-ready .kp-play-btn {
    min-width: 38px !important;
    font-size: 17px !important;
  }

  .kyi-player.kp-controls-ready .kp-pill-btn,
  .kyi-player.kp-controls-ready #sub-toggle.kp-cc-btn,
  .kyi-player.kp-controls-ready .kp-cc-btn {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    font-size: 11px !important;
    line-height: 1 !important;
  }

  .kyi-player.kp-controls-ready .kp-volume-group .kp-volume {
    display: none !important;
  }

  .kyi-player.kp-controls-ready .kp-volume-group.is-volume-open::before {
    content: "";
    position: absolute;
    right: -6px;
    bottom: calc(100% + 6px);
    z-index: 92;
    width: 158px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(8,10,16,.90);
    box-shadow: 0 18px 52px rgba(0,0,0,.52);
    backdrop-filter: blur(16px);
  }

  .kyi-player.kp-controls-ready .kp-volume-group.is-volume-open::after {
    content: "";
    position: absolute;
    right: 13px;
    bottom: calc(100% + 0px);
    z-index: 93;
    width: 12px;
    height: 12px;
    transform: rotate(45deg);
    background: rgba(8,10,16,.90);
    border-right: 1px solid rgba(255,255,255,.14);
    border-bottom: 1px solid rgba(255,255,255,.14);
  }

  .kyi-player.kp-controls-ready .kp-volume-group.is-volume-open .kp-volume {
    display: block !important;
    position: absolute !important;
    right: 30px !important;
    bottom: calc(100% + 16px) !important;
    z-index: 94 !important;
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    height: 24px !important;
  }

  .kyi-player.kp-controls-ready .kp-volume-group.is-volume-open .kp-volume-readout {
    display: none !important;
  }

  .kyi-player.kp-controls-ready .kp-volume-group.is-volume-open #mute-toggle {
    color: #fff;
    background: rgba(255,255,255,.14);
  }

  .kyi-player.kp-controls-ready .kp-seek-tooltip {
    bottom: 18px !important;
  }

  .kyi-player.kp-controls-ready .kp-toast {
    bottom: 52px !important;
  }

  .secure-player.kyi-player.kp-controls-ready.kp-fullscreen-active .custom-controls.kp-controls {
    padding-left: max(10px, env(safe-area-inset-left)) !important;
    padding-right: max(10px, env(safe-area-inset-right)) !important;
    padding-bottom: max(6px, env(safe-area-inset-bottom)) !important;
  }

  .secure-player.kyi-player.kp-controls-ready.kp-fullscreen-active .kp-controls-row {
    grid-template-columns: auto auto auto minmax(82px, 120px) auto 1fr auto auto auto auto !important;
    min-height: 38px !important;
    height: 38px !important;
    gap: 4px !important;
  }

  .secure-player.kyi-player.kp-controls-ready.kp-fullscreen-active .kp-time-block,
  .secure-player.kyi-player.kp-controls-ready.kp-fullscreen-active #speed-toggle,
  .secure-player.kyi-player.kp-controls-ready.kp-fullscreen-active #skip-back,
  .secure-player.kyi-player.kp-controls-ready.kp-fullscreen-active #skip-forward,
  .secure-player.kyi-player.kp-controls-ready.kp-fullscreen-active #sub-panel-toggle {
    display: inline-flex !important;
  }

  .secure-player.kyi-player.kp-controls-ready.kp-fullscreen-active .kp-menu-wrap {
    display: block !important;
  }

  .secure-player.kyi-player.kp-controls-ready.kp-fullscreen-active .kp-volume {
    display: none !important;
  }
}

@media (max-width: 380px) and (hover: none), (max-width: 380px) and (pointer: coarse) {
  .kyi-player.kp-controls-ready .custom-controls.kp-controls,
  .custom-shell.kyi-player.kp-controls-ready .custom-controls.kp-controls {
    padding-left: 6px !important;
    padding-right: 6px !important;
    padding-bottom: max(4px, env(safe-area-inset-bottom)) !important;
  }

  .kyi-player.kp-controls-ready .kp-controls-row {
    min-height: 34px !important;
    height: 34px !important;
    gap: 1px !important;
  }

  .kyi-player.kp-controls-ready .kp-progress-row {
    min-height: 13px !important;
    height: 13px !important;
    margin-bottom: -2px !important;
  }

  .kyi-player.kp-controls-ready .kp-icon-btn {
    min-width: 32px !important;
    min-height: 32px !important;
    padding-inline: 4px !important;
    font-size: 11px !important;
  }

  .kyi-player.kp-controls-ready .kp-play-btn {
    min-width: 35px !important;
  }

  .kyi-player.kp-controls-ready .kp-pill-btn,
  .kyi-player.kp-controls-ready #sub-toggle.kp-cc-btn,
  .kyi-player.kp-controls-ready .kp-cc-btn {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
  }
}


/* Provider-aware playback surfaces.
   YouTube keeps the custom KyiPlayer control shell.
   JW Player is intentionally isolated and uses the official JW native controls/skin. */
.secure-player.kyi-player[data-provider="jw"]::before {
  display: none !important;
}

.kyi-player .jw-native-viewport {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
  overflow: hidden;
}

.kyi-player[data-provider="jw"] .jw-frame,
.kyi-player[data-provider="jw"] .jw-frame .jwplayer,
.kyi-player[data-provider="jw"] .jw-frame video {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
}

.kyi-player[data-provider="youtube"] .jw-native-viewport,
.kyi-player[data-provider="youtube"] .jw-frame,
.kyi-player[data-provider="jw"] .youtube-viewport,
.kyi-player[data-provider="jw"] .youtube-frame,
.kyi-player[data-provider="jw"] .yt-ui-mask,
.kyi-player[data-provider="jw"] .kp-top-chrome,
.kyi-player[data-provider="jw"] .video-surface,
.kyi-player[data-provider="jw"] .player-overlay,
.kyi-player[data-provider="jw"] .custom-controls {
  display: none !important;
}

.kyi-player[data-provider="jw"] .jw-frame,
.kyi-player[data-provider="jw"] .jw-frame * {
  pointer-events: auto !important;
}

.kyi-player[data-provider="jw"] .subtitle-layer,
.kyi-player[data-provider="jw"] .jwplayer .subtitle-layer.kp-jw-subtitle-layer {
  position: absolute !important;
  inset: 0 !important;
  z-index: 20 !important;
  pointer-events: none !important;
}

.kyi-player[data-provider="jw"] .jwplayer .subtitle-layer.kp-jw-subtitle-layer .subtitle-box {
  z-index: 21 !important;
}

.kyi-player[data-provider="jw"] .kp-toast,
.kyi-player[data-provider="jw"] .kyi-embed-watermark {
  z-index: 7;
}

.kyi-player[data-provider="jw"] .jwplayer .jw-controlbar,
.kyi-player[data-provider="jw"] .jwplayer .jw-rightclick,
.kyi-player[data-provider="jw"] .jwplayer .jw-settings-menu {
  z-index: 30 !important;
  pointer-events: auto !important;
}


/* --------------------------------------------------------------------------
   YouTube JW-style Control Redesign
   --------------------------------------------------------------------------
   This layer intentionally affects only the YouTube custom shell. JW provider
   keeps official native JW controls. The visual language mirrors a modern JW
   control bar: clean SVG icons, bottom gradient, thin timeline, compact buttons,
   and mobile-safe spacing. */
.custom-shell.kyi-player {
  --kp-accent: #00a7e1;
  --kp-control-size: 40px;
  --kp-youtube-controlbar-height: 92px;
}

.custom-shell.kyi-player::before {
  background:
    linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,0) 22%, rgba(0,0,0,0) 55%, rgba(0,0,0,.86) 100%),
    radial-gradient(circle at center, transparent 50%, rgba(0,0,0,.18));
}

.custom-shell.kyi-player .yt-ui-mask-bottom {
  height: clamp(120px, 24%, 210px);
  background: linear-gradient(0deg, rgba(0,0,0,.94), rgba(0,0,0,.46) 58%, rgba(0,0,0,0));
}

.custom-shell.kyi-player .custom-controls.kp-controls {
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 14px 12px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.70) 26%, rgba(0,0,0,.92) 100%);
  box-shadow: none;
  backdrop-filter: none;
}

.custom-shell.kyi-player .kp-progress-row {
  height: 18px;
  margin: 0 0 2px;
  padding: 0;
  align-items: center;
}

.custom-shell.kyi-player input[type="range"].kp-seek {
  height: 16px;
  cursor: pointer;
}

.custom-shell.kyi-player input[type="range"].kp-seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--kp-accent) 0 var(--range-progress, 0%), rgba(255,255,255,.34) var(--range-progress, 0%) var(--buffer-progress, 0%), rgba(255,255,255,.18) var(--buffer-progress, 0%) 100%);
  box-shadow: none;
}

.custom-shell.kyi-player input[type="range"].kp-seek::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
}

.custom-shell.kyi-player input[type="range"].kp-seek::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--kp-accent);
}

.custom-shell.kyi-player input[type="range"].kp-seek::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  margin-top: -4.5px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0,167,225,.18), 0 2px 8px rgba(0,0,0,.45);
  opacity: 0;
  transform: scale(.84);
  transition: opacity .16s ease, transform .16s ease;
}

.custom-shell.kyi-player .kp-progress-row:hover input[type="range"].kp-seek::-webkit-slider-thumb,
.custom-shell.kyi-player input[type="range"].kp-seek:focus::-webkit-slider-thumb {
  opacity: 1;
  transform: scale(1);
}

.custom-shell.kyi-player input[type="range"].kp-seek::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0,167,225,.18), 0 2px 8px rgba(0,0,0,.45);
}

.custom-shell.kyi-player .kp-controls-row {
  min-height: 44px;
  grid-template-columns: auto auto auto auto auto 1fr auto auto auto auto;
  column-gap: 4px;
  align-items: center;
}

.custom-shell.kyi-player .control-btn {
  min-width: var(--kp-control-size);
  min-height: var(--kp-control-size);
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(255,255,255,.94);
  box-shadow: none;
  text-shadow: none;
}

.custom-shell.kyi-player .control-btn:hover,
.custom-shell.kyi-player .control-btn:focus-visible,
.custom-shell.kyi-player .control-btn[aria-expanded="true"] {
  background: rgba(255,255,255,.14);
  color: #fff;
  transform: none;
  box-shadow: none;
}

.custom-shell.kyi-player .kp-play-btn {
  min-width: 48px;
}

.custom-shell.kyi-player .kp-pill-btn,
.custom-shell.kyi-player #sub-toggle.kp-cc-btn,
.custom-shell.kyi-player .kp-cc-btn {
  min-width: auto;
  height: 32px;
  min-height: 32px;
  padding: 0 9px;
  border-radius: 4px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.94);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.custom-shell.kyi-player #sub-toggle.kp-cc-btn:not(.is-off) {
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--kp-accent);
}

.custom-shell.kyi-player .kp-icon-shell,
.custom-shell.kyi-player .kp-icon-shell svg {
  display: block;
  width: 22px;
  height: 22px;
}

.custom-shell.kyi-player .kp-icon-shell svg {
  fill: currentColor;
}

.custom-shell.kyi-player .kp-play-btn .kp-icon-shell,
.custom-shell.kyi-player .kp-play-btn .kp-icon-shell svg {
  width: 26px;
  height: 26px;
}

.custom-shell.kyi-player .big-play .kp-icon-shell,
.custom-shell.kyi-player .big-play .kp-icon-shell svg {
  width: 38px;
  height: 38px;
}

.custom-shell.kyi-player .kp-icon-text {
  display: inline-flex;
  width: auto;
  height: auto;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -.02em;
}

.custom-shell.kyi-player .time-readout,
.custom-shell.kyi-player .kp-time-separator {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.86);
}

.custom-shell.kyi-player .kp-volume-group {
  gap: 2px;
}

.custom-shell.kyi-player input[type="range"].kp-volume {
  width: 74px;
  height: 18px;
}

.custom-shell.kyi-player input[type="range"].kp-volume::-webkit-slider-runnable-track {
  height: 4px;
  border: 0;
  background: linear-gradient(90deg, #fff 0 var(--range-progress, 100%), rgba(255,255,255,.24) var(--range-progress, 100%) 100%);
}

.custom-shell.kyi-player input[type="range"].kp-volume::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  margin-top: -3px;
  border: 0;
  background: #fff;
  box-shadow: none;
}

.custom-shell.kyi-player .kp-menu,
.custom-shell.kyi-player .kp-subtitle-panel {
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(15,15,18,.96);
  box-shadow: 0 18px 48px rgba(0,0,0,.48);
}

.custom-shell.kyi-player .kp-menu button:hover,
.custom-shell.kyi-player .kp-menu button.is-active {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.custom-shell.kyi-player .kp-menu button.is-active::before {
  background: var(--kp-accent);
}

.custom-shell.kyi-player .big-play {
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.54);
  color: #fff;
  box-shadow: 0 15px 46px rgba(0,0,0,.48);
}

.custom-shell.kyi-player .big-play:hover,
.custom-shell.kyi-player .big-play:focus-visible {
  background: rgba(0,167,225,.86);
  box-shadow: 0 18px 54px rgba(0,167,225,.24), 0 15px 46px rgba(0,0,0,.48);
}

.custom-shell.kyi-player .kp-top-chrome {
  top: 12px;
  left: 12px;
  right: 12px;
}

.custom-shell.kyi-player .kp-video-title,
.custom-shell.kyi-player .kp-status,
.custom-shell.kyi-player .kp-secure-badge,
.custom-shell.kyi-player .kp-back-chip {
  border-radius: 4px;
  background: rgba(0,0,0,.52);
  border-color: rgba(255,255,255,.14);
  box-shadow: none;
}

@media (max-width: 720px) {
  .custom-shell.kyi-player .custom-controls.kp-controls {
    padding: 0 10px calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .custom-shell.kyi-player .kp-controls-row {
    grid-template-columns: auto auto auto 1fr auto auto;
    min-height: 42px;
    column-gap: 2px;
  }

  .custom-shell.kyi-player .control-btn {
    --kp-control-size: 38px;
    padding: 0 8px;
  }

  .custom-shell.kyi-player .kp-play-btn {
    min-width: 42px;
  }

  .custom-shell.kyi-player .kp-icon-shell,
  .custom-shell.kyi-player .kp-icon-shell svg {
    width: 21px;
    height: 21px;
  }

  .custom-shell.kyi-player .kp-play-btn .kp-icon-shell,
  .custom-shell.kyi-player .kp-play-btn .kp-icon-shell svg {
    width: 24px;
    height: 24px;
  }
}
