.xh-arcade-stage{
  position:fixed;
  left:50%;
  top:74px;
  bottom:74px;
  width:min(calc(100vw - 36px),1540px);
  transform:translateX(-50%);
  z-index:56;
  display:none;
  color:#f7ead4;
  pointer-events:none;
}
.xh-arcade-stage:before{
  content:"";
  position:fixed;
  inset:58px 0 44px;
  background:
    linear-gradient(180deg,rgba(4,5,9,.08),rgba(4,5,9,.36)),
    url("arcade-backdrop.webp") center/cover no-repeat;
  box-shadow:0 0 0 1px rgba(255,244,214,.05) inset,0 0 180px rgba(0,0,0,.36) inset;
  pointer-events:none;
  filter:saturate(1.05) contrast(1.02);
}
.xh-arcade-stage:after{
  content:"";
  position:fixed;
  inset:58px 0 44px;
  opacity:.38;
  background:
    linear-gradient(90deg,rgba(255,244,214,.055) 1px,transparent 1px),
    linear-gradient(0deg,rgba(255,244,214,.05) 1px,transparent 1px),
    radial-gradient(circle at 50% 16%,rgba(101,232,216,.13),transparent 30%);
  background-size:72px 72px,72px 72px,auto;
  pointer-events:none;
}
body.xh-arcade-open .xh-arcade-stage{display:grid;grid-template-rows:auto 1fr;gap:10px;pointer-events:auto}
body.xh-arcade-playing .xh-arcade-stage{
  top:10px;
  bottom:10px;
  width:min(calc(100vw - 20px),1680px);
  grid-template-rows:1fr;
}
body.xh-arcade-playing .xh-arcade-stage:before,
body.xh-arcade-playing .xh-arcade-stage:after{inset:0}
body.xh-arcade-playing .xha-rail{display:none}
body.xh-arcade-open .calm,
body.xh-arcade-open .dock,
body.xh-arcade-open .oe-wrap,
body.xh-arcade-open .musicbar,
body.xh-arcade-open .xh-media,
body.xh-arcade-open .roster-bar,
body.xh-arcade-open .cam-strip{opacity:0;pointer-events:none}
body.xh-arcade-open .xh-windup,
body.xh-arcade-open #xh-tour{display:none!important;pointer-events:none!important}
.xha-rail{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:56px;
  border:1px solid rgba(255,214,102,.28);
  border-radius:18px;
  background:linear-gradient(102deg,rgba(92,54,126,.84),rgba(95,42,89,.74),rgba(32,72,106,.78));
  box-shadow:0 18px 48px rgba(0,0,0,.34),0 0 0 1px rgba(255,244,214,.06) inset;
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  padding:9px 10px 9px 14px;
}
.xha-brand{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.xha-orb{
  width:30px;
  height:30px;
  flex:0 0 auto;
  border-radius:10px;
  background:linear-gradient(135deg,#ffd666,#ff898f 48%,#65e8d8);
  transform:rotate(7deg);
  box-shadow:0 0 18px rgba(255,137,143,.28),0 0 24px rgba(101,232,216,.16);
}
.xha-brand b{display:block;font-size:15px;line-height:1.15;color:#fff7dc}
.xha-brand span span{display:block;margin-top:2px;color:rgba(247,234,212,.62);font-size:11px;line-height:1.25}
.xha-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.xha-btn{
  border:1px solid rgba(255,244,214,.16);
  border-radius:999px;
  background:rgba(255,244,214,.08);
  color:#f7ead4;
  min-height:34px;
  padding:8px 12px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  cursor:pointer;
}
.xha-btn:hover{border-color:rgba(255,214,102,.42);background:rgba(255,214,102,.13)}
.xha-btn.primary{border-color:rgba(101,232,216,.36);background:linear-gradient(135deg,rgba(101,232,216,.2),rgba(255,214,102,.12));color:#fff7dc}
.xha-body{
  position:relative;
  z-index:1;
  min-height:0;
  overflow:auto;
  scrollbar-width:thin;
  border:1px solid rgba(255,244,214,.1);
  border-radius:20px;
  background:
    linear-gradient(145deg,rgba(8,8,14,.58),rgba(10,19,24,.38)),
    url("arcade-backdrop.webp") center/cover no-repeat;
  box-shadow:0 22px 70px rgba(0,0,0,.4),0 0 0 1px rgba(255,244,214,.05) inset;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  padding:14px;
}
body.xh-arcade-playing .xha-body{padding:10px;border-radius:16px}
.xha-picker{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.xha-card{
  position:relative;
  min-height:174px;
  display:grid;
  grid-template-rows:auto 1fr auto;
  gap:10px;
  text-align:left;
  border:1px solid rgba(var(--xha-accent,101,232,216),.26);
  border-radius:14px;
  background:
    linear-gradient(150deg,rgba(255,244,214,.085),rgba(255,244,214,.035));
  color:inherit;
  padding:12px;
  overflow:hidden;
  cursor:pointer;
  box-shadow:0 14px 34px rgba(0,0,0,.22);
}
.xha-card:hover,.xha-card:focus-visible{
  border-color:rgba(var(--xha-accent,101,232,216),.56);
  background:
    radial-gradient(58% 70% at 82% 6%,rgba(var(--xha-accent,101,232,216),.25),transparent 70%),
    linear-gradient(150deg,rgba(255,244,214,.12),rgba(255,244,214,.05));
  outline:none;
  transform:translateY(-1px);
}
.xha-shot{
  position:absolute;
  inset:0;
  background-position:center;
  background-size:cover;
  transform:scale(1.01);
  filter:saturate(1.03) contrast(1.02);
}
.xha-card-shade{
  position:absolute;
  inset:0;
  background:
    linear-gradient(180deg,rgba(5,6,11,.08),rgba(5,6,11,.48) 55%,rgba(5,6,11,.74)),
    radial-gradient(66% 72% at 86% 8%,rgba(var(--xha-accent,101,232,216),.24),transparent 70%);
}
.xha-card-top,.xha-copy,.xha-card-foot{position:relative;z-index:1}
.xha-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.xha-num{
  font-family:var(--mono,monospace);
  font-size:9px;
  color:rgba(var(--xha-accent,101,232,216),1);
  font-weight:900;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.xha-glyph{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  border:1px solid rgba(var(--xha-accent,101,232,216),.28);
  background:rgba(var(--xha-accent,101,232,216),.12);
  font-size:18px;
}
.xha-card b{display:block;color:#fff7dc;font-size:15px;line-height:1.15}
.xha-card p{margin:5px 0 0;color:rgba(247,234,212,.64);font-size:11px;line-height:1.35}
.xha-card-foot{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.xha-tag{
  border:1px solid rgba(var(--xha-accent,101,232,216),.24);
  border-radius:999px;
  color:rgba(var(--xha-accent,101,232,216),1);
  background:rgba(var(--xha-accent,101,232,216),.08);
  font-family:var(--mono,monospace);
  font-size:8px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:4px 6px;
}
.xha-player{height:100%;min-height:0;display:grid;grid-template-rows:auto 1fr;gap:10px}
.xha-player-head{
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:space-between;
  border:1px solid rgba(255,244,214,.1);
  border-radius:14px;
  background:rgba(255,244,214,.065);
  padding:8px 10px;
}
body.xh-arcade-playing .xha-player-head{padding:6px 8px;border-radius:12px}
.xha-player-title{min-width:0}
.xha-player-title b{display:block;color:#fff7dc;font-size:14px;line-height:1.2}
.xha-player-title span{display:block;margin-top:2px;color:rgba(247,234,212,.58);font-size:10.5px;line-height:1.25}
.xha-frame-wrap{
  min-height:0;
  overflow:hidden;
  border:1px solid rgba(255,244,214,.12);
  border-radius:16px;
  background:#080911;
  box-shadow:0 18px 56px rgba(0,0,0,.35),0 0 0 1px rgba(255,244,214,.04) inset;
}
.xha-frame-wrap:fullscreen{border-radius:0;border:0}
.xha-frame{display:block;width:100%;height:100%;border:0;background:#080911}
@media(max-width:1180px){
  .xha-picker{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
  .xh-arcade-stage{left:10px;right:10px;width:auto;top:calc(62px + env(safe-area-inset-top));bottom:calc(74px + env(safe-area-inset-bottom));transform:none}
  .xha-rail{align-items:flex-start;flex-direction:column;border-radius:16px}
  .xha-actions{width:100%;justify-content:flex-start}
  .xha-body{padding:10px;border-radius:16px}
  .xha-picker{grid-template-columns:1fr;gap:8px}
  .xha-card{min-height:138px}
  .xha-player-head{align-items:flex-start;flex-direction:column}
  .xha-frame-wrap{min-height:420px}
  body.xh-arcade-playing .xh-arcade-stage{left:4px;right:4px;top:4px;bottom:4px;width:auto}
  body.xh-arcade-playing .xha-body{padding:6px}
  body.xh-arcade-playing .xha-frame-wrap{min-height:0}
}
