/* ============================================================================
   wa-player-extras.css — player-page extras: Next/Share controls, resume pill,
   keyboard-shortcuts sheet, mobile bottom bar, landscape hint.
   All new UI is hidden by default or reserves its own height (zero layout shift).
   ============================================================================ */
[hidden]{display:none !important;}

/* ---------- Resume pill (toolbar) ---------- */
.wa-resume-pill{
  display:inline-flex;align-items:center;gap:6px;
  height:30px;padding:0 12px;margin:0 4px;border-radius:9999px;
  border:1px solid rgba(251,191,36,0.45);
  background:linear-gradient(135deg,rgba(180,83,9,0.35),rgba(120,53,15,0.35));
  color:#fde68a;font-size:11px;font-weight:800;cursor:pointer;
  max-width:190px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  box-shadow:0 2px 12px rgba(0,0,0,0.35);
}
.wa-resume-pill:hover{border-color:#fbbf24;color:#fff}
.wa-resume-pill::before{content:'▶';font-size:9px}

/* ---------- Next / Share buttons in the control bar ---------- */
/* Reuse .wa-ctrl-btn look from wa-ui.css; only the accent for Next. */
#waCtrlNext .wa-ctrl-ico{font-size:13px}
#waCtrlShare .wa-ctrl-ico{font-size:13px}
/* The Next button is only revealed once the catalogue resolves, which is a
   second or two after first paint. Displaying it then re-wraps the whole
   control bar — measured on play.html at 1280x800, the dock chips jumped
   667px and the stage moved down, scoring a single 0.37 layout shift and
   taking the page to CLS 0.45. Keeping the box reserved while the button is
   hidden makes the first frame and the steady state identical, so the reveal
   moves nothing. visibility (not display) is what does that; the button is
   disabled at the same time and pointer-events stops any phantom click. */
#waCtrlNext[hidden]{display:inline-flex !important;visibility:hidden;pointer-events:none;}

/* ---------- Share row (reserves the 22px the widget will occupy) ---------- */
.wa-share-row-wrap{
  display:flex;align-items:center;gap:6px;
  max-width:1280px;margin:8px auto 0;padding:0 16px;
  min-height:22px;height:22px;
}
.wa-share-row-wrap.wa-share-flash [data-wa-share-row]{
  outline:2px solid rgba(56,189,248,0.6);outline-offset:3px;border-radius:10px;
  animation:waSharePulse 1.1s ease 2;
}
@keyframes waSharePulse{
  0%,100%{box-shadow:0 0 0 0 rgba(56,189,248,0)}
  50%{box-shadow:0 0 0 6px rgba(56,189,248,0.25)}
}

/* ---------- Shortcuts sheet ---------- */
.wa-sc-sheet{
  position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;
  background:rgba(2,6,23,0.72);backdrop-filter:blur(4px);padding:16px;
}
.wa-sc-sheet-panel{
  width:100%;max-width:420px;background:linear-gradient(135deg,rgba(19,27,46,0.98),rgba(11,15,25,0.98));
  border:1px solid rgba(56,189,248,0.28);border-radius:16px;padding:16px 18px;
  box-shadow:0 24px 70px rgba(0,0,0,0.6);
}
.wa-sc-sheet-head{display:flex;align-items:center;justify-content:space-between;
  font-family:'Cinzel',serif;font-weight:900;font-size:15px;color:#fde047;margin-bottom:10px}
.wa-sc-sheet-close{background:transparent;border:0;color:#94a3b8;font-size:16px;cursor:pointer;line-height:1;padding:2px 6px;border-radius:8px}
.wa-sc-sheet-close:hover{color:#fff;background:rgba(255,255,255,0.08)}
.wa-sc-list{list-style:none;display:flex;flex-direction:column;gap:8px}
.wa-sc-list li{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:#cbd5e1}
.wa-sc-key{
  font-family:'JetBrains Mono',monospace;font-size:11px;font-weight:800;color:#7dd3fc;
  background:rgba(2,6,23,0.7);border:1px solid rgba(56,189,248,0.35);border-bottom-width:2px;
  border-radius:7px;padding:2px 8px;min-width:24px;text-align:center;flex:0 0 auto;
}
.wa-sc-note{margin-top:12px;font-size:11px;color:#aab9cb;line-height:1.6}

/* ---------- Mobile bottom bar (<=640px only) ---------- */
.wa-mobile-bar{display:none}
@media (max-width:640px){
  .wa-mobile-bar{
    display:flex;position:fixed;left:0;right:0;bottom:0;z-index:9998;
    align-items:stretch;justify-content:space-around;gap:2px;
    height:54px;padding:6px 8px calc(6px + env(safe-area-inset-bottom,0));
    background:rgba(15,23,42,0.97);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
    border-top:1px solid rgba(56,189,248,0.22);box-shadow:0 -4px 22px rgba(0,0,0,0.5);
  }
  .wa-mb-btn{
    flex:1 1 0;min-width:0;min-height:44px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
    background:transparent;border:0;border-radius:10px;color:#cbd5e1;text-decoration:none;cursor:pointer;
    font-family:inherit;
  }
  .wa-mb-btn:active{background:rgba(56,189,248,0.14)}
  .wa-mb-ico{font-size:20px;line-height:1}
  .wa-mb-label{font-size:10px;font-weight:800;letter-spacing:.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  /* Clear the fixed bar so it never covers the iframe or the #wa-ad-bottom slot.
     !important beats play.html's inline `.page-wrap{padding:0}` shorthand. */
  .page-wrap{padding-bottom:calc(64px + env(safe-area-inset-bottom,0)) !important}
  .wa-player-controls{margin-bottom:64px}
}

/* ---------- Landscape hint ---------- */
.wa-landscape-hint{
  position:fixed;left:12px;right:12px;bottom:calc(64px + env(safe-area-inset-bottom,0px));
  transform:none;z-index:9997;
  display:flex;align-items:center;gap:8px;
  padding:8px 10px;border-radius:12px;
  background:rgba(15,23,42,0.97);border:1px solid rgba(251,191,36,0.4);
  box-shadow:0 10px 30px rgba(0,0,0,0.55);font-size:11px;color:#e2e8f0;
}
.wa-landscape-hint-ico{flex:0 0 auto;font-size:16px}
/* A content-sized fixed box shrinks to a narrow column and wraps into a tall
   block that covers the player. Pin it to the viewport width and clamp. */
.wa-landscape-hint-text{
  flex:1 1 auto;min-width:0;line-height:1.4;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.wa-landscape-hint-try{
  flex:0 0 auto;background:rgba(251,191,36,0.16);border:1px solid rgba(251,191,36,0.5);
  color:#fde68a;font-weight:800;font-size:10px;padding:6px 10px;border-radius:9px;cursor:pointer;font-family:inherit;
}
.wa-landscape-hint-try:hover{background:rgba(251,191,36,0.28);color:#fff}
.wa-landscape-hint-close{flex:0 0 auto;background:transparent;border:0;color:#94a3b8;font-size:14px;cursor:pointer;line-height:1;padding:2px 4px}
.wa-landscape-hint-close:hover{color:#fff}
/* On phones the hint sits just above the bottom bar. */
@media (max-width:640px){
  .wa-landscape-hint{bottom:calc(64px + env(safe-area-inset-bottom,0px));max-width:420px;margin:0 auto}
}
@media (min-width:641px){
  .wa-landscape-hint{display:none !important}
}

/* ---------- Stage gate: the page scrolls over the player until it is picked ----------
   A cross-origin game iframe owns every swipe that lands on it, so the page
   never scrolls while the stage is under the finger. This click-through shield
   keeps panning with the page until the player deliberately taps to play. */
html { scrollbar-gutter: stable; }
html.wa-stage-selected,
body.wa-stage-selected { overflow: hidden !important; }
.wa-stage-gate{
  position:absolute;inset:0;z-index:6;
  display:flex;align-items:center;justify-content:center;
  padding:0 12px;
  background:transparent;
  cursor:pointer;
  outline:none;
  /* Vertical swipes scroll the page natively through overflow:clip; pinch
     zoom still works. The old `auto` let the wrap's scroll container eat it. */
  touch-action:pan-y pinch-zoom;
  -webkit-overflow-scrolling:touch;
}
.wa-stage-gate[hidden]{display:none!important}
.wa-stage-gate:focus-visible{box-shadow:inset 0 0 0 2px rgba(251,191,36,.6)}
.wa-stage-gate-pill{
  display:flex;flex-direction:column;align-items:center;gap:2px;
  padding:7px 14px;border-radius:999px;
  background:rgba(8,12,22,.92);
  border:1px solid rgba(251,191,36,.45);
  box-shadow:0 8px 24px rgba(0,0,0,.6);
  color:#f8fafc;font-size:12px;line-height:1.3;text-align:center;
  pointer-events:none;
  transition:border-color .15s ease, transform .15s ease;
}
.wa-stage-gate:hover .wa-stage-gate-pill,
.wa-stage-gate:focus-visible .wa-stage-gate-pill{border-color:#fbbf24;transform:translateY(-1px)}
.wa-stage-gate-pill b{font-size:13px;color:#fbbf24;font-weight:800}
.wa-stage-gate-pill>span{color:#94a3b8;font-size:11px}
.wa-stage-gate-pill>span:empty{display:none}
/* Hide the provider controls chip while the gate is visible — it looks
   interactive but clicking it triggers the gate instead. */
body:not(.wa-stage-selected) .wa-controls-chip{display:none!important}
body.wa-stage-selected .wa-stage-gate{display:none!important}
