/* ==========================================================================
   ARCVEL V34 — PIXEL FANTASY IN-GAME UI (matches the purple pixel reference)
   Visual only. Loaded LAST in game.html so it wins over arcvel-ui-refresh.css,
   game-theme.css and style.css. No IDs, events, canvas size or gameplay touched.
   ========================================================================== */
:root{
  --px-font:'Pixelify Sans','Silkscreen','Courier New',monospace;
  --px-ink:#0b0a36;      /* deepest navy: bar tracks, inner frame */
  --px-panel-a:#1c1a72;  /* panel fill, top */
  --px-panel-b:#13115a;  /* panel fill, bottom */
  --px-edge:#4f45e8;     /* main indigo frame */
  --px-edge-hi:#8f86ff;  /* corner brackets, highlights */
  --px-cyan:#4fe3ff;
  --px-gold:#ffc83d;
  --px-green:#8dff5a;
  --px-red:#ff3b66;
}

/* ---------- page backdrop: deep night, big glints, meteors, side clouds ---------- */
html body{
  background:
    radial-gradient(ellipse at 50% -10%,#1b2480 0,transparent 55%),
    linear-gradient(180deg,#070a33 0%,#0b0f4a 55%,#10135e 100%) !important;
  font-family:var(--px-font) !important;
}
.pxSky{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;image-rendering:pixelated}
.pxSky i{position:absolute;display:block}
/* plus-shaped glints */
.pxSky .gl{width:7px;height:7px;background:
  linear-gradient(#fff,#fff) center/100% 1px no-repeat,
  linear-gradient(#fff,#fff) center/1px 100% no-repeat;
  filter:drop-shadow(0 0 3px #7fa8ff);animation:pxTwinkle 3.2s steps(4,end) infinite}
.pxSky .gl.big{width:15px;height:15px;background:
  linear-gradient(#cfe4ff,#cfe4ff) center/100% 3px no-repeat,
  linear-gradient(#cfe4ff,#cfe4ff) center/3px 100% no-repeat,
  linear-gradient(#fff,#fff) center/5px 5px no-repeat}
.pxSky .gl.cy{filter:drop-shadow(0 0 4px #4fe3ff)}
.pxSky .gl.vi{filter:drop-shadow(0 0 4px #a98bff)}
.pxSky .dot{width:3px;height:3px;background:#dfe9ff;animation:pxTwinkle 4.4s steps(3,end) infinite}
/* shooting stars: glowing head + fading tail */
.pxSky .ms{width:120px;height:4px;transform-origin:100% 50%;rotate:-38deg;
  background:linear-gradient(90deg,transparent,rgba(120,150,255,.55) 55%,#cfe0ff 92%,#fff);
  filter:drop-shadow(0 0 5px #7a9bff);animation:pxMeteor 9s linear infinite;opacity:0}
.pxSky .ms::after{content:"";position:absolute;right:-3px;top:-2px;width:8px;height:8px;background:#fff;box-shadow:0 0 8px 3px #8fb0ff}
.pxSky .ms.s{width:70px}
@keyframes pxTwinkle{0%,100%{opacity:.35}50%{opacity:1}}
@keyframes pxMeteor{0%{opacity:0;translate:0 0}4%{opacity:1}22%{opacity:1;translate:-110px 86px}28%,100%{opacity:0;translate:-140px 110px}}
/* pixel clouds hugging the left/right edge */
html::before,html::after{content:"";position:fixed;bottom:0;width:150px;height:235px;z-index:0;pointer-events:none;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 72' shape-rendering='crispEdges'><g fill='%232b2a9a'><rect x='0' y='30' width='30' height='42'/><rect x='6' y='20' width='24' height='12'/><rect x='12' y='12' width='16' height='10'/><rect x='24' y='38' width='14' height='34'/></g><g fill='%233b37c4'><rect x='0' y='42' width='22' height='30'/><rect x='6' y='26' width='16' height='10'/><rect x='14' y='18' width='10' height='8'/></g><g fill='%235a50e0'><rect x='8' y='20' width='14' height='3'/><rect x='14' y='12' width='8' height='3'/><rect x='0' y='30' width='8' height='3'/></g></svg>") left bottom/100% 100% no-repeat;
  image-rendering:pixelated;opacity:.9}
html::before{left:0}
html::after{right:0;scale:-1 1}
@media (max-width:1100px){html::before,html::after{display:none}}
#gameShell{position:relative;z-index:2;max-width:1360px !important;padding:22px clamp(14px,2.2vw,30px) 34px !important}

/* ---------- shared pixel-frame panels ---------- */
html body #gameShell > header,
html body #gameShell .hud,
html body #gameShell .under{
  position:relative;
  border:0 !important;border-radius:0 !important;
  margin:0 0 14px !important;
  background:
    linear-gradient(var(--px-edge-hi),var(--px-edge-hi)) left 7px top 7px/16px 3px no-repeat,
    linear-gradient(var(--px-edge-hi),var(--px-edge-hi)) left 7px top 7px/3px 16px no-repeat,
    linear-gradient(var(--px-edge-hi),var(--px-edge-hi)) right 7px top 7px/16px 3px no-repeat,
    linear-gradient(var(--px-edge-hi),var(--px-edge-hi)) right 7px top 7px/3px 16px no-repeat,
    linear-gradient(var(--px-edge-hi),var(--px-edge-hi)) left 7px bottom 7px/16px 3px no-repeat,
    linear-gradient(var(--px-edge-hi),var(--px-edge-hi)) left 7px bottom 7px/3px 16px no-repeat,
    linear-gradient(var(--px-edge-hi),var(--px-edge-hi)) right 7px bottom 7px/16px 3px no-repeat,
    linear-gradient(var(--px-edge-hi),var(--px-edge-hi)) right 7px bottom 7px/3px 16px no-repeat,
    linear-gradient(180deg,var(--px-panel-a),var(--px-panel-b)) !important;
  /* stepped (notched) pixel border */
  box-shadow:
    0 -4px 0 0 var(--px-edge),0 4px 0 0 var(--px-edge),-4px 0 0 0 var(--px-edge),4px 0 0 0 var(--px-edge),
    0 -8px 0 -2px var(--px-ink),0 8px 0 -2px var(--px-ink),-8px 0 0 -2px var(--px-ink),8px 0 0 -2px var(--px-ink),
    inset 0 0 0 3px var(--px-ink),inset 0 0 0 5px #2b27a8 !important;
  backdrop-filter:none !important;animation:none !important;
}
/* diamond studs on the left/right middle of each panel */
html body #gameShell > header::before,html body #gameShell > header::after,
html body #gameShell .hud::before,html body #gameShell .hud::after,
html body #gameShell .under::before,html body #gameShell .under::after{
  content:"" !important;position:absolute !important;top:50% !important;width:12px !important;height:12px !important;
  background:var(--px-panel-a) !important;border:3px solid var(--px-edge-hi) !important;border-radius:0 !important;
  rotate:45deg;translate:0 -50%;inset-inline:auto;animation:none !important;opacity:1 !important;pointer-events:none;
}
html body #gameShell > header::before,html body #gameShell .hud::before,html body #gameShell .under::before{left:-14px !important;right:auto !important}
html body #gameShell > header::after,html body #gameShell .hud::after,html body #gameShell .under::after{right:-14px !important;left:auto !important}

/* ---------- header ---------- */
html body #gameShell > header{padding:14px 22px !important;gap:12px;align-items:center;flex-wrap:nowrap !important;justify-content:space-between}
html body .headerBrand{gap:12px}
html body .gameHeroLogo img{image-rendering:pixelated;filter:drop-shadow(0 2px 0 #0b0a36)}
html body .arcvelBrandName{font:700 28px/1 var(--px-font) !important;letter-spacing:2px;color:#f4f2ff;text-shadow:0 3px 0 #2b27a8,0 0 14px #6f66ff88}
html body #gameShell > header small{font:600 15px/1 var(--px-font) !important;letter-spacing:3px;color:#a9a2ff}

/* buttons: dark navy slab, indigo stepped edge */
html body #gameShell .topActions button,
html body #gameShell .backHome{
  font:600 15px/1 var(--px-font) !important;letter-spacing:.5px;text-transform:uppercase;text-decoration:none;white-space:nowrap;
  color:#f4f2ff !important;padding:10px 12px !important;border:0 !important;border-radius:0 !important;
  background:linear-gradient(180deg,#201d85,#16135f) !important;
  box-shadow:0 -3px 0 0 var(--px-edge),0 3px 0 0 var(--px-edge),-3px 0 0 0 var(--px-edge),3px 0 0 0 var(--px-edge),
    inset 0 2px 0 0 #4a44d0,inset 0 -3px 0 0 #0d0b43 !important;
  transition:none !important;text-shadow:0 2px 0 #0b0a36;
}
html body #gameShell .backHome{color:var(--px-gold) !important}
html body #gameShell .topActions button:hover:not(:disabled),
html body #gameShell .backHome:hover{
  background:linear-gradient(180deg,#2c28b3,#1d1a7e) !important;transform:translateY(-2px) !important;
  box-shadow:0 -3px 0 0 var(--px-cyan),0 3px 0 0 var(--px-cyan),-3px 0 0 0 var(--px-cyan),3px 0 0 0 var(--px-cyan),
    inset 0 2px 0 0 #6a63ff,inset 0 -3px 0 0 #0d0b43 !important;
}
html body #gameShell .topActions button:active:not(:disabled){transform:translateY(1px) !important}
html body #gameShell .topActions button:focus-visible,html body #gameShell .backHome:focus-visible{outline:3px solid var(--px-gold) !important;outline-offset:3px}
html body #gameShell .topActions kbd{display:none}
html body #gameShell .topActions{gap:10px !important;flex-wrap:nowrap !important;flex:1 1 auto;justify-content:flex-end}

/* volume sliders */
html body #gameShell .volumeControl{
  font:600 14px/1 var(--px-font) !important;color:#d8d4ff !important;display:flex;align-items:center;gap:8px;white-space:nowrap;
  padding:9px 11px !important;border:0 !important;border-radius:0 !important;
  background:linear-gradient(180deg,#201d85,#16135f) !important;
  box-shadow:0 -3px 0 0 var(--px-edge),0 3px 0 0 var(--px-edge),-3px 0 0 0 var(--px-edge),3px 0 0 0 var(--px-edge),inset 0 -3px 0 0 #0d0b43 !important;
}
html body #gameShell .volumeControl input[type=range]{
  -webkit-appearance:none;appearance:none;width:62px;height:10px;margin:0;background:transparent;accent-color:#ffb629;--fill:50%;
}
html body #gameShell .volumeControl input[type=range]::-webkit-slider-runnable-track{
  height:10px;border:2px solid #2b27a8;border-radius:0;background:linear-gradient(90deg,#ffb629 var(--fill),#0d0b43 var(--fill))}
html body #gameShell .volumeControl input[type=range]::-moz-range-track{height:6px;border:2px solid #2b27a8;border-radius:0;background:#0d0b43}
html body #gameShell .volumeControl input[type=range]::-moz-range-progress{height:6px;background:#ffb629}
html body #gameShell .volumeControl input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none;width:18px;height:18px;margin-top:-6px;border-radius:50%;background:#ffc83d;border:3px solid #ff8a1f;box-shadow:0 0 0 2px #0b0a36}
html body #gameShell .volumeControl input[type=range]::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:#ffc83d;border:3px solid #ff8a1f}

/* ---------- HUD ---------- */
html body #gameShell .hud{
  display:grid !important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:28px !important;
  padding:18px 28px 20px !important;margin-bottom:34px !important;align-items:start;
}
html body #gameShell .hud span,html body #gameShell .hud small{font:600 20px/1.1 var(--px-font) !important;letter-spacing:1px;color:#f4f2ff !important;text-transform:uppercase}
html body #gameShell .hud > div:nth-child(2){align-items:center;text-align:center;gap:4px;position:relative}
html body #gameShell .hud > div:nth-child(2) > span{font-size:21px !important;letter-spacing:1px}
html body #gameShell .hud b#heroStats,html body #gameShell .hud > div:nth-child(2) > b{font:700 28px/1.1 var(--px-font) !important;color:var(--px-gold) !important;text-shadow:0 3px 0 #6a3d00}
html body #gameShell .bar{
  height:26px !important;margin-top:8px;border:0 !important;border-radius:0 !important;overflow:hidden;position:relative;
  background:var(--px-ink) !important;
  box-shadow:0 -3px 0 0 var(--px-edge),0 3px 0 0 var(--px-edge),-3px 0 0 0 var(--px-edge),3px 0 0 0 var(--px-edge),inset 0 3px 0 0 #000 !important;
}
html body #gameShell .bar i{
  display:block;height:100%;border-radius:0 !important;transition:width .25s steps(8,end) !important;position:relative;
}
html body #gameShell .bar:not(.boss) i{
  background:linear-gradient(180deg,#9ffcf0 0 20%,#37e6d0 20% 62%,#1aa9b4 62%) !important;box-shadow:0 0 12px #37e6d088 !important;
}
html body #gameShell .bar.boss i{
  background:
    repeating-linear-gradient(115deg,rgba(255,255,255,.38) 0 7px,transparent 7px 16px),
    linear-gradient(180deg,#ff8aa5 0 18%,#ff3b66 18% 64%,#c21f4a 64%) !important;box-shadow:0 0 12px #ff3b6688 !important;
}
/* SHIELD pill hangs off the bottom edge of the HUD */
html body #gameShell #shieldStatus{
  position:relative;z-index:3;margin:6px 0 -50px !important;padding:9px 34px 10px !important;border:0 !important;border-radius:0 !important;
  display:flex;gap:12px;align-items:baseline;justify-content:center;
  background:linear-gradient(180deg,#0f4b55,#0a3340) !important;
  box-shadow:0 -4px 0 0 #3a33d6,0 4px 0 0 #3a33d6,-4px 0 0 0 #3a33d6,4px 0 0 0 #3a33d6,
    0 -8px 0 -2px #0b0a36,0 8px 0 -2px #0b0a36,-8px 0 0 -2px #0b0a36,8px 0 0 -2px #0b0a36,
    inset 0 0 0 3px #0b0a36,inset 0 0 0 5px #1d8a8e !important;
  animation:none !important;
}
html body #gameShell #shieldStatus b,html body #gameShell #shieldStatus span{
  font:700 30px/1 var(--px-font) !important;letter-spacing:1px;text-transform:uppercase;color:var(--px-green) !important;
  text-shadow:0 3px 0 #0b3a1c,0 0 14px #8dff5a88;
}
html body #gameShell #shieldStatus[data-state="active"] b,html body #gameShell #shieldStatus[data-state="active"] span{color:var(--px-cyan) !important;text-shadow:0 3px 0 #06344a,0 0 14px #4fe3ff99}
html body #gameShell #shieldStatus[data-state="wait"] b,html body #gameShell #shieldStatus[data-state="wait"] span{color:#ffb15a !important;text-shadow:0 3px 0 #4a2200,0 0 10px #ff8a1f66}

/* ---------- canvas frame ---------- */
html body #gameShell #game{
  display:block;width:100%;border:0 !important;border-radius:0 !important;margin:0 0 18px;
  background:#0b0f4a;animation:none !important;image-rendering:pixelated;
  box-shadow:0 -5px 0 0 var(--px-edge),0 5px 0 0 var(--px-edge),-5px 0 0 0 var(--px-edge),5px 0 0 0 var(--px-edge),
    0 -9px 0 -2px var(--px-ink),0 9px 0 -2px var(--px-ink),-9px 0 0 -2px var(--px-ink),9px 0 0 -2px var(--px-ink),
    0 0 40px #5b4cf233 !important;
}

/* ---------- objective bar ---------- */
html body #gameShell .under{padding:16px 28px !important;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:22px !important}
html body #gameShell .mission b{font:700 22px/1.2 var(--px-font) !important;color:var(--px-gold) !important;letter-spacing:.5px;text-shadow:0 2px 0 #6a3d00}
html body #gameShell .mission span{font:500 20px/1.2 var(--px-font) !important;color:#c9c5ff !important;display:block;margin-top:2px}
html body #gameShell .skillHints{display:flex;gap:14px;flex-wrap:nowrap;justify-content:flex-end;flex:0 0 auto}
html body #gameShell .mission{flex:1 1 auto;min-width:0}
html body #gameShell .skillHints span{
  font:600 15px/1 var(--px-font) !important;color:#f4f2ff !important;text-transform:uppercase;letter-spacing:.5px;padding:11px 13px !important;white-space:nowrap;border:0 !important;border-radius:0 !important;
  background:linear-gradient(180deg,#201d85,#16135f) !important;
  box-shadow:0 -3px 0 0 var(--px-edge),0 3px 0 0 var(--px-edge),-3px 0 0 0 var(--px-edge),3px 0 0 0 var(--px-edge),inset 0 2px 0 0 #4a44d0,inset 0 -3px 0 0 #0d0b43 !important;
}

/* ---------- modals follow the same frame language ---------- */
html body .modal .panel{
  border:0 !important;border-radius:0 !important;background:linear-gradient(180deg,var(--px-panel-a),var(--px-panel-b)) !important;
  box-shadow:0 -4px 0 0 var(--px-edge),0 4px 0 0 var(--px-edge),-4px 0 0 0 var(--px-edge),4px 0 0 0 var(--px-edge),
    0 -8px 0 -2px var(--px-ink),0 8px 0 -2px var(--px-ink),-8px 0 0 -2px var(--px-ink),8px 0 0 -2px var(--px-ink),
    inset 0 0 0 3px var(--px-ink),inset 0 0 0 5px #2b27a8,0 30px 90px #000a !important;
}
html body .modal .panel h1,html body .modal .panel h2,html body .modal .panel h3{font-family:var(--px-font) !important;text-shadow:0 3px 0 #2b27a8}
html body .modal .panel button:not(.close):not(.primaryAction){
  font-family:var(--px-font) !important;border:0 !important;border-radius:0 !important;
  box-shadow:0 -3px 0 0 var(--px-edge),0 3px 0 0 var(--px-edge),-3px 0 0 0 var(--px-edge),3px 0 0 0 var(--px-edge) !important;
}
html body .modal .primaryAction{
  font-family:var(--px-font) !important;font-weight:700;border:0 !important;border-radius:0 !important;color:#2a1a00 !important;
  background:linear-gradient(180deg,#ffe38a,#ffb629) !important;
  box-shadow:0 -3px 0 0 #fff0b8,0 3px 0 0 #b86a00,-3px 0 0 0 #ffd36a,3px 0 0 0 #ffd36a,inset 0 -4px 0 0 #e58f00 !important;
}

/* ---------- small screens: keep it tidy, keep touch controls reachable ---------- */
@media (max-width:900px){
  html body #gameShell > header{padding:12px 14px !important}
  html body .arcvelBrandName{font-size:22px !important}
  html body #gameShell .topActions{gap:9px}
  html body #gameShell .topActions button,html body #gameShell .backHome{font-size:13px !important;padding:8px 10px !important}
  html body #gameShell .volumeControl{font-size:12px !important;padding:8px 10px !important}
  html body #gameShell .volumeControl input[type=range]{width:54px}
  html body #gameShell .hud{grid-template-columns:1fr 1fr;gap:14px !important;padding:12px 14px 14px !important}
  html body #gameShell .hud > div:nth-child(2){grid-column:1 / -1;order:-1}
  html body #gameShell .hud span,html body #gameShell .hud small{font-size:14px !important}
  html body #gameShell .hud > div:nth-child(2) > span{font-size:15px !important}
  html body #gameShell .hud b#heroStats{font-size:20px !important}
  html body #gameShell #shieldStatus{margin:4px 0 0 !important;padding:6px 16px 7px !important}
  html body #gameShell #shieldStatus b,html body #gameShell #shieldStatus span{font-size:20px !important}
  html body #gameShell .hud{margin-bottom:22px !important}
  html body #gameShell .under{flex-direction:column;align-items:flex-start;padding:12px 14px !important}
  html body #gameShell .mission b{font-size:17px !important}
  html body #gameShell .mission span{font-size:14px !important}
  html body #gameShell .skillHints{flex-wrap:wrap !important;justify-content:flex-start}
  html body #gameShell .skillHints span{font-size:12px !important;padding:8px 10px !important}
  html body #gameShell > header::before,html body #gameShell > header::after,
  html body #gameShell .hud::before,html body #gameShell .hud::after,
  html body #gameShell .under::before,html body #gameShell .under::after{display:none !important}
}
@media (prefers-reduced-motion:reduce){.pxSky .gl,.pxSky .dot,.pxSky .ms{animation:none !important}.pxSky .ms{display:none}}
