:root {
  --kfp-accent: #b7ff55;
  --kfp-cyan: #55d8ff;
  --kfp-panel: rgba(13, 15, 21, .94);
  --kfp-line: rgba(255, 255, 255, .14);
}

body.kfp-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.kfp {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  overflow: hidden;
  color: #fff;
  background: #000;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.kfp.open { display: block; }
.kfp * { box-sizing: border-box; }
.kfp button, .kfp select, .kfp input { font: inherit; }
.kfp button { color: inherit; }

.kfp::before {
  content: "";
  position: absolute;
  inset: -9%;
  z-index: 0;
  background: var(--kfp-poster, none) center / cover no-repeat;
  filter: blur(58px) saturate(1.2) brightness(.22);
  opacity: .72;
  transform: scale(1.12);
}

.kfp-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(20, 24, 32, .45), #000 72%);
}

.kfp-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  outline: none;
  transition: filter .16s ease;
}

.kfp-chrome {
  position: absolute;
  z-index: 4;
  inset: 0;
  opacity: 1;
  transition: opacity .28s ease;
  pointer-events: none;
}

.kfp.idle .kfp-chrome { opacity: 0; }
.kfp.idle { cursor: none; }
.kfp.paused .kfp-chrome,
.kfp.buffering .kfp-chrome,
.kfp.settings-open .kfp-chrome { opacity: 1; }
.kfp.paused, .kfp.buffering, .kfp.settings-open { cursor: default; }

.kfp-top {
  position: absolute;
  inset: 0 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 20px max(18px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(0, 0, 0, .92), rgba(0, 0, 0, .5) 58%, transparent);
  pointer-events: auto;
}

.kfp-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 15px;
  background: rgba(20, 22, 28, .66);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: background .18s, transform .18s, border-color .18s;
}

.kfp-icon:hover,
.kfp-icon:focus-visible {
  border-color: rgba(183, 255, 85, .58);
  background: rgba(38, 42, 51, .9);
  outline: none;
  transform: translateY(-1px);
}

.kfp-icon svg { width: 23px; height: 23px; fill: currentColor; }
.kfp-icon[data-active="true"] { color: var(--kfp-accent); border-color: rgba(183, 255, 85, .5); }

.kfp-heading {
  min-width: 0;
  margin-right: auto;
  text-shadow: 0 2px 16px #000;
}

.kfp-heading strong,
.kfp-heading span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kfp-heading strong { font-size: clamp(.96rem, 2vw, 1.22rem); letter-spacing: -.02em; }
.kfp-heading span { margin-top: 3px; color: rgba(255, 255, 255, .66); font-size: .78rem; }

.kfp-engine {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(183, 255, 85, .32);
  border-radius: 999px;
  background: rgba(7, 13, 8, .6);
  color: var(--kfp-accent);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .03em;
  backdrop-filter: blur(16px);
}

.kfp-engine::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--kfp-accent);
  box-shadow: 0 0 15px var(--kfp-accent);
}

.kfp-loader {
  position: absolute;
  z-index: 3;
  inset: 50% auto auto 50%;
  width: min(320px, calc(100% - 44px));
  transform: translate(-50%, -50%);
  display: none;
  place-items: center;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 24px;
  background: rgba(8, 10, 14, .72);
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
  backdrop-filter: blur(24px);
}

.kfp.buffering .kfp-loader { display: grid; }
.kfp-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, .16);
  border-top-color: var(--kfp-accent);
  border-right-color: var(--kfp-cyan);
  border-radius: 50%;
  animation: kfp-spin .8s linear infinite;
}
.kfp-loader strong { font-size: .95rem; }
.kfp-loader small { color: rgba(255, 255, 255, .62); line-height: 1.45; }
@keyframes kfp-spin { to { transform: rotate(360deg); } }

.kfp-start-prompt {
  position: absolute;
  z-index: 5;
  inset: 50% auto auto 50%;
  width: min(310px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  display: none;
  place-items: center;
  gap: 10px;
  padding: 22px;
  border: 1px solid rgba(183, 255, 85, .28);
  border-radius: 22px;
  background: rgba(8, 10, 14, .82);
  color: #fff;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .62);
  backdrop-filter: blur(24px);
}

.kfp.playback-blocked .kfp-start-prompt { display: grid; }
.kfp-start-prompt span {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--kfp-accent);
  color: #071004;
}
.kfp-start-prompt svg { width: 34px; height: 34px; fill: currentColor; }
.kfp-start-prompt strong { font-size: 1rem; font-weight: 900; }
.kfp-start-prompt small { max-width: 220px; color: rgba(255, 255, 255, .7); line-height: 1.35; }

.kfp-flash {
  position: absolute;
  z-index: 6;
  inset: 50% auto auto 50%;
  min-width: 88px;
  transform: translate(-50%, -50%) scale(.84);
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 22px;
  background: rgba(8, 10, 14, .78);
  text-align: center;
  font-size: 1rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(18px);
  transition: opacity .16s, transform .16s;
}
.kfp-flash.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.kfp-bottom {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  border: 0;
  gap: 10px;
  padding: 54px max(20px, env(safe-area-inset-right)) max(17px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: linear-gradient(0deg, rgba(0, 0, 0, .96), rgba(0, 0, 0, .64) 55%, transparent);
  pointer-events: auto;
}

.kfp-timeline {
  position: relative;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.kfp-time {
  min-width: 48px;
  color: rgba(255, 255, 255, .82);
  font-variant-numeric: tabular-nums;
  font-size: .75rem;
  font-weight: 700;
}
.kfp-time:last-child { text-align: right; }

.kfp-seek {
  --played: 0%;
  --buffered: 0%;
  width: 100%;
  height: 44px;
  min-height: 44px;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.kfp-seek::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    var(--kfp-accent) 0 var(--played),
    rgba(255, 255, 255, .42) var(--played) var(--buffered),
    rgba(255, 255, 255, .18) var(--buffered) 100%);
}
.kfp-seek::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
}
.kfp-seek::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--kfp-accent); }
.kfp-seek::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border: 3px solid #10130e;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--kfp-accent);
  box-shadow: 0 0 0 2px rgba(183, 255, 85, .28), 0 3px 14px #000;
}
.kfp-seek::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid #10130e;
  border-radius: 50%;
  background: var(--kfp-accent);
}

.kfp-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.kfp-row .kfp-icon { width: 42px; height: 42px; border: 0; background: transparent; }
.kfp-row .kfp-icon:hover { background: rgba(255, 255, 255, .12); transform: none; }
.kfp-row .kfp-play { width: 50px; height: 50px; color: #071007; background: var(--kfp-accent); }
.kfp-row .kfp-play:hover { color: #071007; background: #cbff82; }
.kfp-spacer { flex: 1; }

.kfp-volume {
  display: flex;
  align-items: center;
  width: min(150px, 14vw);
}
.kfp-volume input { width: 100%; accent-color: var(--kfp-accent); }

.kfp-quality-pill,
.kfp-buffer-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .76);
  font-size: .68rem;
  font-weight: 800;
}
.kfp-quality-pill strong { color: var(--kfp-accent); }
.kfp-skip {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(183, 255, 85, .28);
  border-radius: 999px;
  background: rgba(183, 255, 85, .12);
  color: #f4ffe7;
  font-size: .72rem;
  font-weight: 950;
  cursor: pointer;
  white-space: nowrap;
}
.kfp-skip:hover,
.kfp-skip:focus-visible {
  background: var(--kfp-accent);
  color: #071007;
  outline: 0;
}

.kfp .kfp-intro {
  position: absolute;
  z-index: 5;
  top: 50%;
  right: max(28px, env(safe-area-inset-right));
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: min(208px, calc(100% - 32px));
  min-height: 64px;
  padding: 14px 22px;
  border: 2px solid rgba(255, 255, 255, .8);
  border-radius: 6px;
  background: rgba(16, 16, 18, .86);
  color: #fff;
  box-shadow: 0 3px 18px rgba(0, 0, 0, .32);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .15s, color .15s, border-color .15s;
}
.kfp .kfp-intro[hidden] { display: none !important; }
.kfp .kfp-intro:hover,
.kfp .kfp-intro:active,
.kfp .kfp-intro:focus-visible {
  background: #fff;
  color: #111;
  border-color: #fff;
}
.kfp .kfp-intro:focus-visible { outline: 3px solid var(--kfp-accent); outline-offset: 4px; }
.kfp.settings-open .kfp-intro,
.kfp.picker-open .kfp-intro,
.kfp.buffering .kfp-intro,
.kfp.playback-blocked .kfp-intro { visibility: hidden; pointer-events: none; }

@media (max-width: 760px), (pointer: coarse) {
  .kfp .kfp-intro {
    right: max(16px, env(safe-area-inset-right));
    width: min(184px, calc(100% - 32px));
    min-height: 56px;
    padding: 12px 18px;
    font-size: 17px;
  }
}

.kfp-panel {
  position: absolute;
  z-index: 8;
  top: max(78px, calc(env(safe-area-inset-top) + 62px));
  right: max(18px, env(safe-area-inset-right));
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 80px));
  width: min(390px, calc(100% - 36px));
  display: none;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--kfp-line);
  border-radius: 24px;
  background: var(--kfp-panel);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .72);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}
.kfp-panel.open { display: grid; }
.kfp-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 0 15px 0 18px;
  border-bottom: 1px solid var(--kfp-line);
}
.kfp-panel-head strong { margin-right: auto; }
.kfp-panel-body { overflow: auto; padding: 16px; }
.kfp-field { display: grid; gap: 7px; margin-bottom: 15px; }
.kfp-field label,
.kfp-section-label {
  color: rgba(255, 255, 255, .58);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.kfp-field select {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--kfp-line);
  border-radius: 13px;
  outline: 0;
  background: #20232d;
  color: #fff;
}
.kfp-field select:focus { border-color: rgba(183, 255, 85, .55); }
.kfp-toggle {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 2px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: .88rem;
}
.kfp-toggle input { width: 20px; height: 20px; accent-color: var(--kfp-accent); }
.kfp-help { color: rgba(255, 255, 255, .56); font-size: .76rem; line-height: 1.5; }

.kfp-stats {
  position: absolute;
  z-index: 7;
  left: max(18px, env(safe-area-inset-left));
  top: max(92px, calc(env(safe-area-inset-top) + 72px));
  width: min(360px, calc(100% - 36px));
  display: none;
  padding: 14px;
  border: 1px solid rgba(85, 216, 255, .28);
  border-radius: 18px;
  background: rgba(7, 10, 14, .88);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .62);
  font: 700 .72rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  color: rgba(255, 255, 255, .78);
  pointer-events: auto;
  backdrop-filter: blur(18px);
}
.kfp-stats.open { display: block; }
.kfp-stats b { color: var(--kfp-cyan); }
.kfp-stats-grid { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; }
.kfp-stats-grid span:nth-child(odd) { color: rgba(255, 255, 255, .46); }

.kfp-next {
  position: absolute;
  z-index: 7;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(112px, calc(env(safe-area-inset-bottom) + 100px));
  width: min(390px, calc(100% - 40px));
  display: none;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 13px;
  padding: 11px;
  border: 1px solid var(--kfp-line);
  border-radius: 19px;
  background: rgba(12, 14, 19, .94);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .7);
  pointer-events: auto;
  backdrop-filter: blur(22px);
}
.kfp-next.show { display: grid; }
.kfp-next-poster { min-height: 68px; border-radius: 12px; background: #222 center / cover; }
.kfp-next small { color: rgba(255, 255, 255, .55); }
.kfp-next strong { display: block; margin: 4px 0 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kfp-next button { min-height: 34px; padding: 0 11px; border: 0; border-radius: 10px; background: var(--kfp-accent); color: #091008; font-weight: 900; cursor: pointer; }

.kfp-error {
  position: absolute;
  z-index: 9;
  inset: 50% auto auto 50%;
  width: min(480px, calc(100% - 36px));
  display: none;
  transform: translate(-50%, -50%);
  padding: 24px;
  border: 1px solid rgba(255, 90, 112, .35);
  border-radius: 24px;
  background: rgba(21, 10, 14, .95);
  text-align: center;
  box-shadow: 0 30px 90px #000;
}
.kfp-error.show { display: block; }
.kfp-error p { color: rgba(255, 255, 255, .68); line-height: 1.5; }
.kfp-error button { min-height: 42px; padding: 0 15px; border: 0; border-radius: 12px; background: #fff; color: #111; font-weight: 850; cursor: pointer; }

@media (max-width: 760px) {
  .kfp-top { min-height: 72px; gap: 9px; padding-bottom: 12px; }
  .kfp-icon { width: 42px; height: 42px; border-radius: 13px; }
  .kfp-engine { display: none; }
  .kfp-heading span { max-width: 58vw; }
  .kfp-bottom { padding-top: 42px; gap: 5px; }
  .kfp-row { justify-content: space-between; }
  .kfp-row .kfp-icon { width: 40px; height: 40px; }
  .kfp-row .kfp-play { width: 48px; height: 48px; }
  .kfp-volume, .kfp-buffer-pill, .kfp-cast { display: none !important; }
  .kfp-skip { min-height: 32px; padding-inline: 10px; font-size: .66rem; }
  .kfp-quality-pill { margin-left: auto; }
  .kfp-panel { inset: auto 0 0; width: 100%; max-height: 75dvh; bottom: 0; border-width: 1px 0 0; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .kfp-stats { top: max(76px, calc(env(safe-area-inset-top) + 62px)); }
  .kfp-next { bottom: max(105px, calc(env(safe-area-inset-bottom) + 94px)); }
}

@media (max-width: 420px) {
  .kfp-top .kfp-pip { display: none; }
  .kfp-heading strong { max-width: 48vw; }
  .kfp-time { min-width: 42px; font-size: .68rem; }
  .kfp-timeline { gap: 7px; }
  .kfp-row .kfp-rewind,
  .kfp-row .kfp-forward,
  #kfpCredits { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .kfp *, .kfp *::before, .kfp *::after { transition: none !important; animation-duration: .01ms !important; }
}

/* Player Pro 3.1: controles táctiles estables y selectores persistentes */
.kfp-picker-open .kfp-chrome,
.kfp.picker-open .kfp-chrome,
.kfp.stats-open .kfp-chrome { opacity: 1; }
.kfp-quality-pill {
  color: rgba(255, 255, 255, .76);
  cursor: pointer;
  touch-action: manipulation;
}
.kfp-quality-pill:focus-visible {
  outline: 2px solid var(--kfp-accent);
  outline-offset: 2px;
}
.kfp-panel,
.kfp-panel-body {
  overscroll-behavior: contain;
}
.kfp-panel-body {
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.kfp.touch-ui .kfp-field { margin-bottom: 18px; }
.kfp.touch-ui .kfp-field select {
  height: 56px;
  padding-inline: 15px 42px;
  border-radius: 15px;
  font-size: 16px;
  font-weight: 720;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.kfp.touch-ui .kfp-toggle {
  min-height: 58px;
  padding-block: 12px;
}
.kfp.touch-ui .kfp-toggle input { width: 26px; height: 26px; }
.kfp-picker {
  position: absolute;
  z-index: 14;
  inset: 0;
  display: none;
  place-items: end center;
  pointer-events: auto;
}
.kfp-picker.open { display: grid; }
.kfp-picker-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(0, 0, 0, .56);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.kfp-picker-card {
  position: relative;
  width: min(540px, 100%);
  max-height: min(78dvh, 720px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .17);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background: rgba(14, 16, 22, .985);
  box-shadow: 0 -28px 90px rgba(0, 0, 0, .72);
  padding-bottom: env(safe-area-inset-bottom);
  animation: kfp-picker-in .18s ease-out;
}
@keyframes kfp-picker-in {
  from { transform: translateY(18px); opacity: .6; }
  to { transform: translateY(0); opacity: 1; }
}
.kfp-picker-head {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 20px;
  border-bottom: 1px solid var(--kfp-line);
}
.kfp-picker-head > div { min-width: 0; margin-right: auto; }
.kfp-picker-head small,
.kfp-picker-head strong { display: block; }
.kfp-picker-head small {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, .5);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.kfp-picker-head strong { font-size: 1rem; }
.kfp-picker-options {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding: 12px 14px 18px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.kfp-picker-option {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  background: rgba(255, 255, 255, .055);
  color: #fff;
  text-align: left;
  font-size: 1rem;
  font-weight: 760;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.kfp-picker-option strong {
  color: var(--kfp-accent);
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.kfp-picker-option[aria-selected="true"] {
  border-color: rgba(183, 255, 85, .52);
  background: rgba(183, 255, 85, .12);
}
.kfp-picker-option:active { transform: scale(.985); }
.kfp-picker-option:disabled { opacity: .36; }

@media (max-width: 760px) {
  .kfp-panel { max-height: 86dvh; }
  .kfp-panel-head { min-height: 68px; }
  .kfp-panel-body { padding: 18px 16px 28px; }
  .kfp-picker-card { max-height: 84dvh; }
}

/* Player Pro 3.2: landscape compacto, controles persistentes y selectores visibles */
@media (orientation: landscape) and (max-height: 620px) and (pointer: coarse) {
  .kfp-top {
    min-height: 58px;
    gap: 7px;
    padding: max(5px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 7px max(10px, env(safe-area-inset-left));
  }
  .kfp-heading span, .kfp-engine, .kfp-stats, .kfp-volume, .kfp-buffer-pill, .kfp-cast { display: none !important; }
  .kfp-icon { width: 40px; height: 40px; border-radius: 12px; }
  .kfp-heading strong { max-width: 38vw; font-size: .88rem; }
  .kfp-bottom {
    gap: 2px;
    padding: 28px max(10px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }
  .kfp-row { min-height: 42px; gap: 3px; }
  .kfp-row .kfp-icon { width: 38px; height: 38px; }
  .kfp-row .kfp-play { width: 44px; height: 44px; }
  .kfp-time { min-width: 38px; font-size: .64rem; }
  .kfp-panel {
    inset: 0 0 0 auto;
    width: min(560px, 72vw);
    max-height: 100dvh;
    border-width: 0 0 0 1px;
    border-radius: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) 0;
  }
  .kfp-panel-head { min-height: 54px; padding: 5px 10px 5px 15px; }
  .kfp-panel-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 8px 12px;
    padding: 10px 12px 14px;
  }
  .kfp.touch-ui .kfp-field { min-width: 0; margin: 0; gap: 3px; }
  .kfp.touch-ui .kfp-field select { height: 48px; font-size: 15px; }
  .kfp-panel-body > .kfp-toggle, .kfp-panel-body > .kfp-help { grid-column: 1 / -1; }
  .kfp.touch-ui .kfp-toggle { min-height: 46px; padding-block: 5px; }
  .kfp-picker { z-index: 30; place-items: stretch; }
  .kfp-picker-card {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
  .kfp-picker-head { min-height: 54px; padding: 5px 10px 5px 16px; }
  .kfp-picker-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 8px 12px 12px;
  }
  .kfp-picker-option { min-height: 48px; padding: 8px 13px; font-size: .9rem; }
}

@media (orientation: landscape) and (max-height: 420px) and (pointer: coarse) {
  .kfp-rewind, .kfp-forward, .kfp-next-button, .kfp-pip { display: none !important; }
  .kfp-panel { width: min(620px, 82vw); }
  .kfp-picker-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
