.pvr-viewer{
  position:relative;
  width:100%;
  max-width:100%;
  min-height:120px;
  margin-inline:auto;
  background:#111;
  border-radius:8px;
  overflow:hidden;
  isolation:isolate;
}
.pvr-viewer canvas{display:block;width:100%!important;height:100%!important;}
.pvr-wheel-hint{
  position:absolute;left:50%;top:16px;z-index:5;
  display:none;transform:translateX(-50%);
  width:min(360px,calc(100% - 32px));padding:9px 14px 8px;
  border:1px solid rgba(255,255,255,.25);border-radius:999px;
  color:#fff;text-align:center;font:600 13px/1.3 inherit;
  background:rgba(12,12,12,.72);box-shadow:0 5px 18px rgba(0,0,0,.25);
  -webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);
  pointer-events:none;opacity:0;visibility:hidden;
  transition:opacity .2s ease,visibility .2s ease,background-color .2s ease;
}
.pvr-wheel-hint.is-visible{display:block;opacity:1;visibility:visible;}
.pvr-wheel-hint.is-ready{background:rgba(12,83,52,.82);}
.pvr-wheel-hint-progress{
  display:block;height:3px;margin:6px 2px 0;overflow:hidden;
  border-radius:3px;background:rgba(255,255,255,.22);
}
.pvr-wheel-hint-progress i{
  display:block;width:0;height:100%;border-radius:inherit;background:#fff;
}
.pvr-wheel-hint.is-waiting .pvr-wheel-hint-progress i{
  animation:pvr-wheel-hint-progress 3s linear forwards;
}
@keyframes pvr-wheel-hint-progress{to{width:100%;}}
@media (hover:hover) and (pointer:fine){
  .pvr-viewer .pvr-wheel-hint{display:block;}
}
@media (prefers-reduced-motion:reduce){
  .pvr-wheel-hint-progress i{animation:none!important;width:100%;}
}
.pvr-viewer:fullscreen,
.pvr-viewer:-webkit-full-screen{
  width:100vw!important;
  max-width:none!important;
  height:100vh!important;
  height:100dvh!important;
  min-height:0!important;
  aspect-ratio:auto!important;
  border-radius:0;
}
.pvr-loading{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  color:#ccc;font-size:14px;
}
.pvr-mobile-launch{
  position:absolute;
  inset:0;
  z-index:2;
  display:none;
  width:100%;
  height:100%;
  padding:24px;
  border:0;
  border-radius:inherit;
  align-items:center;
  justify-content:center;
  gap:18px;
  color:#fff;
  text-align:left;
  cursor:pointer;
  background-color:#111;
  background-image:
    linear-gradient(rgba(0,0,0,.38), rgba(0,0,0,.58)),
    var(--pvr-launch-image, linear-gradient(135deg, #2a2a2a, #090909 72%));
  background-position:center, var(--pvr-launch-position, center);
  background-size:cover, var(--pvr-launch-size, cover);
  background-repeat:no-repeat, no-repeat;
  -webkit-tap-highlight-color:transparent;
}
.pvr-mobile-trigger .pvr-loading{display:none;}
.pvr-mobile-trigger .pvr-mobile-launch{display:flex;}
.pvr-mobile-launch:focus-visible{
  outline:3px solid #fff;
  outline-offset:-5px;
}
.pvr-mobile-launch-icon{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:74px;
  height:74px;
  border:2px solid rgba(255,255,255,.85);
  border-radius:50%;
  font-size:20px;
  font-weight:700;
  letter-spacing:-1px;
  box-shadow:0 8px 28px rgba(0,0,0,.35), inset 0 0 0 5px rgba(255,255,255,.08);
}
.pvr-mobile-launch-copy{display:flex;flex-direction:column;gap:5px;min-width:0;}
.pvr-mobile-launch-copy strong{font-size:18px;line-height:1.2;}
.pvr-mobile-launch-copy small{font-size:13px;line-height:1.35;color:rgba(255,255,255,.72);}
.pvr-mobile-launch-arrow{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:50%;
  background:rgba(255,255,255,.12);
  font-size:18px;
}
.pvr-mobile-launch.is-loading{pointer-events:none;}
.pvr-mobile-launch.is-loading .pvr-mobile-launch-icon{
  animation:pvr-pulse 1s ease-in-out infinite alternate;
}
@keyframes pvr-pulse{to{opacity:.55;transform:scale(.94);}}

/* Hiện launcher ngay cả trước khi lazy.js chạy; selector thứ hai bắt điện thoại xoay ngang. */
@media (max-width:767px), (max-width:1024px) and (pointer:coarse){
  .pvr-viewer:not([data-pvr-force-inline="1"]) > .pvr-loading{display:none;}
  .pvr-viewer:not([data-pvr-force-inline="1"]) > .pvr-mobile-launch{display:flex;}
}
.pvr-vrbtn{
  position:absolute;right:12px;top:12px;z-index:4;
  padding:8px 18px;border:1px solid #fff;border-radius:6px;
  background:rgba(0,0,0,.45);color:#fff;font:600 13px/1 inherit;cursor:pointer;
}
.pvr-vrbtn:hover{background:rgba(0,0,0,.75);}

/* Thanh điều khiển dưới đáy (trong suốt nhẹ) */
.pvr-bar{
  position:absolute;left:0;right:0;bottom:0;z-index:3;
  display:flex;align-items:center;gap:12px;
  padding:10px 16px;
  background:linear-gradient(to top, rgba(0,0,0,.38), rgba(0,0,0,.10) 70%, rgba(0,0,0,0));
  -webkit-user-select:none;user-select:none;
}
.pvr-btn{
  flex:0 0 auto;display:flex;align-items:center;justify-content:center;
  width:30px;height:30px;padding:0;border:0;border-radius:6px;
  background:transparent;color:#fff;cursor:pointer;opacity:.9;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.6));
}
.pvr-btn svg{width:22px;height:22px;}
.pvr-btn:hover{opacity:1;background:rgba(255,255,255,.15);}
.pvr-slider{
  flex:0 0 140px;height:4px;-webkit-appearance:none;appearance:none;cursor:pointer;
  background:rgba(255,255,255,.45);border-radius:3px;outline:none;
}
.pvr-slider::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;width:13px;height:13px;border-radius:50%;
  background:#fff;border:0;box-shadow:0 1px 3px rgba(0,0,0,.5);
}
.pvr-slider::-moz-range-thumb{
  width:13px;height:13px;border-radius:50%;background:#fff;border:0;box-shadow:0 1px 3px rgba(0,0,0,.5);
}
.pvr-bar-hint{
  margin-left:auto;color:#fff;font-size:14px;opacity:.9;white-space:nowrap;
  text-shadow:0 1px 3px rgba(0,0,0,.7);pointer-events:none;
}
.pvr-viewer.pvr-compact .pvr-bar{gap:8px;padding:8px 10px;}
.pvr-viewer.pvr-compact .pvr-btn{width:34px;height:34px;}
.pvr-viewer.pvr-compact .pvr-slider{
    flex:1 1 auto;
    min-width:64px;
    max-width:140px;
}
.pvr-viewer.pvr-compact .pvr-bar-hint{display:none;}

/* Popup mobile toàn màn hình. */
html.pvr-modal-lock,
body.pvr-modal-lock{
  overflow:hidden!important;
  overscroll-behavior:none;
}
.pvr-mobile-modal{
  position:fixed;
  inset:0;
  z-index:2147483000;
  width:100vw;
  height:100vh;
  height:100dvh;
  background:#000;
  opacity:0;
  transition:opacity .18s ease;
}
.pvr-mobile-modal.is-open{opacity:1;}
.pvr-mobile-modal .pvr-modal-viewer{
  width:100vw!important;
  max-width:none!important;
  height:100vh!important;
  height:100dvh!important;
  min-height:0!important;
  margin:0!important;
  border-radius:0!important;
  aspect-ratio:auto!important;
}
.pvr-modal-close{
  position:absolute;
  top:12px;
  top:max(12px, env(safe-area-inset-top));
  right:12px;
  right:max(12px, env(safe-area-inset-right));
  z-index:10;
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  padding:0;
  border:1px solid rgba(255,255,255,.7);
  border-radius:50%;
  color:#fff;
  background:rgba(0,0,0,.58);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.pvr-modal-close svg{
  width:24px;
  height:24px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
}
.pvr-modal-close:focus-visible{outline:3px solid #fff;outline-offset:2px;}
.pvr-mobile-modal .pvr-vrbtn{right:70px;right:max(70px, calc(env(safe-area-inset-right) + 70px));}
.pvr-mobile-modal .pvr-bar{
  padding-bottom:10px;
  padding-bottom:max(10px, env(safe-area-inset-bottom));
}
/* Popup mobile đã phủ toàn màn hình; không cần nút mở rộng dư thừa. */
.pvr-mobile-modal .pvr-fs{display:none!important;}
.pvr-gesture-hint{
  position:absolute;
  left:50%;
  bottom:max(72px, calc(env(safe-area-inset-bottom) + 72px));
  z-index:6;
  max-width:calc(100vw - 32px);
  padding:8px 12px;
  border-radius:999px;
  color:#fff;
  background:rgba(0,0,0,.48);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
  font-size:12px;
  white-space:nowrap;
  pointer-events:none;
  transform:translateX(-50%);
  animation:pvr-hint-out .35s ease 2.8s forwards;
}
@keyframes pvr-hint-out{to{opacity:0;visibility:hidden;}}
@media (prefers-reduced-motion:reduce){
  .pvr-mobile-modal{transition:none;}
  .pvr-mobile-launch.is-loading .pvr-mobile-launch-icon{animation:none;}
}
.pvr-notice{
  padding:10px 14px;border:1px dashed #e0a800;background:#fff8e5;color:#7a5b00;
  border-radius:6px;font-size:13px;
}
