.nfx-player { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; align-items: center; justify-content: center; user-select: none; touch-action: manipulation; overflow: hidden; }
.nfx-player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.nfx-player.is-zoom video { object-fit: cover; }
.nfx-player video::cue { background: rgba(0,0,0,0.72); font-family: var(--font); font-weight: 600; text-shadow: 0 2px 4px #000; }
.nfx-player.sub-sm video::cue { font-size: 0.85em; }
.nfx-player.sub-md video::cue { font-size: 1.08em; }
.nfx-player.sub-lg video::cue { font-size: 1.38em; }
.nfx-player.sub-white video::cue { color: #ffffff; }
.nfx-player.sub-yellow video::cue { color: #fde047; }

.p-chrome { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(180deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 68%, rgba(0,0,0,0.9) 100%); padding: calc(var(--safe-t) + 10px) 14px calc(var(--safe-b) + 12px); transition: opacity 0.22s ease; }
.nfx-player.is-idle .p-chrome, .nfx-player.is-locked .p-chrome { opacity: 0; pointer-events: none; }
.p-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p-head-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.p-meta { min-width: 0; }
.p-meta strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-meta small { display: block; font-size: 12px; color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.p-center { display: flex; align-items: center; justify-content: center; gap: 36px; }
.p-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,0.34); }
.p-ic:hover { background: rgba(255,255,255,0.18); }
.p-ic svg { width: 22px; height: 22px; }
.p-big { width: 64px; height: 64px; background: rgba(0,0,0,0.52); border: 2px solid rgba(255,255,255,0.85); }
.p-big svg { width: 30px; height: 30px; }
.p-skip { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 800; background: rgba(0,0,0,0.42); border-radius: 50%; }
.p-skip svg { width: 18px; height: 18px; }

.p-bottom { display: flex; flex-direction: column; gap: 10px; }
.p-scrub { position: relative; height: 26px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.p-track { position: relative; width: 100%; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.28); }
.p-scrub.is-drag .p-track, .p-scrub:hover .p-track { height: 7px; }
.p-buf { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: rgba(255,255,255,0.42); }
.p-bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--red); }
.p-dot { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--red); border: 2px solid #fff; transform: translate(-50%, -50%); }

.p-controls-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: nowrap; }
.p-time { font-size: 12.5px; font-variant-numeric: tabular-nums; color: #e5e7eb; font-weight: 700; white-space: nowrap; }
.p-action-bar { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.p-action-bar::-webkit-scrollbar { display: none; }
.p-chip-btn { height: 34px; padding: 0 11px; border-radius: 8px; background: rgba(255,255,255,0.12); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.p-chip-btn:hover { background: rgba(255,255,255,0.22); }
.p-chip-btn svg { width: 16px; height: 16px; }
.p-chip-btn span { display: none; }
@media (min-width: 640px) { .p-chip-btn span { display: inline; } }

.p-unlock { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); z-index: 15; padding: 10px 16px; border-radius: 999px; background: rgba(18,18,22,0.9); border: 1px solid var(--border-hi); display: none; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.nfx-player.is-locked .p-unlock { display: inline-flex; }
.p-buff { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 4; display: none; pointer-events: none; }
.nfx-player.is-loading .p-buff { display: block; }
.p-flash { position: absolute; top: 50%; transform: translateY(-50%); z-index: 9; padding: 10px 16px; border-radius: 999px; background: rgba(0,0,0,0.75); font-weight: 800; opacity: 0; pointer-events: none; transition: opacity 0.18s; }
.p-flash.left { left: 14%; }
.p-flash.right { right: 14%; }
.p-flash.show { opacity: 1; }

.p-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(360px, 88%); z-index: 25; background: #0e0e12; border-left: 1px solid var(--border-hi); padding: calc(var(--safe-t) + 16px) 16px 24px; display: none; flex-direction: column; gap: 12px; overflow-y: auto; }
.p-panel.is-open { display: flex; }
.p-next-card { position: absolute; right: 16px; bottom: 84px; z-index: 22; width: min(310px, calc(100% - 32px)); background: #141419; border: 1px solid var(--red); border-radius: 14px; padding: 14px; display: none; flex-direction: column; gap: 10px; box-shadow: 0 18px 48px rgba(0,0,0,0.85); }
.p-next-card.is-open { display: flex; }
.nfx-player.is-loading .p-center { opacity: 0 !important; pointer-events: none !important; }
.nfx-player.has-panel .p-chrome { opacity: 0 !important; pointer-events: none !important; }
.p-sub-box {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 108px; z-index: 8; pointer-events: none; text-align: center;
  max-width: min(86vw, 820px); padding: 0 12px;
  transition: bottom 0.22s ease;
}
.nfx-player.is-idle .p-sub-box, .nfx-player.is-locked .p-sub-box { bottom: 28px; }
.p-sub-line {
  display: inline-block; padding: 4px 12px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.78); font-weight: 700; line-height: 1.38;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95);
}
.nfx-player.sub-sm .p-sub-line { font-size: clamp(13px, 2.2vw, 15px); }
.nfx-player.sub-md .p-sub-line { font-size: clamp(15px, 2.8vw, 19px); }
.nfx-player.sub-lg .p-sub-line { font-size: clamp(18px, 3.4vw, 25px); }
.nfx-player.sub-white .p-sub-line { color: #ffffff; }
.nfx-player.sub-yellow .p-sub-line { color: #fde047; }
.p-unlock { transition: opacity .25s ease; }
.p-unlock.is-faded { opacity: 0; pointer-events: none; }

/* === V6.30 IPHONE 13 / IOS SAFARI PLAYER SAFE-AREA & 390PX FIT === */
.p-chrome {
  padding-top: max(12px, env(safe-area-inset-top, 0px)) !important;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
  padding-left: max(14px, env(safe-area-inset-left, 0px)) !important;
  padding-right: max(14px, env(safe-area-inset-right, 0px)) !important;
}
.p-panel {
  padding-top: calc(env(safe-area-inset-top, 0px) + 16px) !important;
  padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px) !important;
}
.p-unlock {
  left: max(16px, env(safe-area-inset-left, 0px)) !important;
}
@media (max-width: 430px) {
  .p-center { gap: 24px; }
  .p-ic { width: 36px; height: 36px; }
  .p-ic svg { width: 19px; height: 19px; }
  .p-big { width: 58px; height: 58px; }
  .p-skip { width: 46px; height: 46px; }
  .p-time { font-size: 11.5px; }
  .p-chip-btn { height: 32px; padding: 0 9px; }
  .p-action-bar { gap: 4px; }
  .p-controls-row { gap: 4px; }
}
