/* DRAGON SLAYER — personal 2D arena inside the existing 3D plaza. */
.dragon-slayer-overlay {
  position:absolute;inset:0;width:100%;height:100%;z-index:130;
  background:#101528;overflow:hidden;isolation:isolate;
  touch-action:none;user-select:none;
}
.dragon-slayer-overlay[hidden] {display:none!important}
#dragon-slayer-canvas {position:absolute;inset:0;display:block;width:100%;height:100%;
  touch-action:none;cursor:crosshair;outline:none}
.dragon-slayer-chrome {
  position:absolute;bottom:14px;left:11px;z-index:5;display:flex;flex-direction:column;
  align-items:flex-start;gap:7px;pointer-events:none;
}
.dragon-slayer-back,.dragon-slayer-mute {
  pointer-events:auto;min-height:39px;max-width:145px;border:1px solid #b4bcd6;
  border-radius:12px;color:#fff6e7;padding:8px 12px;font:800 11px system-ui;
  text-shadow:0 1px 3px #182338;background:linear-gradient(145deg,#485477ed,#1d2c4cee);
  box-shadow:0 4px 13px #02091bc0;
}
.dragon-slayer-mute {font-size:9px;min-height:32px;opacity:.87}
.dragon-slayer-back:focus-visible,.dragon-slayer-mute:focus-visible,
.dragon-slayer-start:focus-visible,.dragon-slayer-return:focus-visible,
.dragon-slayer-burst:focus-visible {outline:3px solid #eaf4b9;outline-offset:2px}
.dragon-slayer-intro {
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  z-index:6;width:min(88%,410px);max-height:calc(100% - 92px);
  overflow-y:auto;display:flex;flex-direction:column;gap:11px;align-items:center;
  padding:20px 18px 22px;border:1px solid #b5bad9;border-radius:19px;
  text-align:center;color:#fff3df;
  background:linear-gradient(150deg,#292b4af2 0%,#242843f5 48%,#181d32f5 100%);
  box-shadow:0 18px 68px #04051deb, inset 0 0 0 1px #fff4df24,
    0 0 28px #8ba1e14a;
  backdrop-filter:blur(14px);box-sizing:border-box;
}
.dragon-slayer-intro[hidden]{display:none!important}
.dragon-slayer-crest {
  display:grid;place-items:center;width:84px;height:67px;
  font-size:33px;border:1px solid #d7b77e;border-radius:20px;
  background:radial-gradient(circle at 50% 35%,#c99b8c77,#54446d44 61%,#252341e2);
  filter:drop-shadow(0 0 10px #cfa4cc77);
}
.dragon-slayer-title {
  font:900 clamp(20px,5vw,28px)/1.2 system-ui;
  letter-spacing:1px;color:#ffe4ae;text-shadow:0 0 13px #f0ad998c,0 2px 8px #13132f;
}
.dragon-slayer-subtitle {margin:0;font:800 14px/1.45 system-ui;color:#d0f2ff}
.dragon-slayer-instructions {
  margin:0;max-width:330px;font:500 12px/1.75 system-ui;
  color:#e6e4f2;overflow-wrap:anywhere;
}
.dragon-slayer-start,.dragon-slayer-return {
  width:100%;max-width:286px;min-height:45px;border:1px solid #fce2b6;border-radius:13px;
  padding:11px 15px;font:900 14px system-ui;color:#29223d;
  background:linear-gradient(120deg,#ffe7bb,#e6b0a2 60%,#aebdf5);
  box-shadow:0 6px 15px #040823a1,inset 0 1px 1px #fff3dc;
}
.dragon-slayer-return {
  min-height:35px;border-color:#858ea9;background:#3d4569;color:#efebfc;
  font-size:11px;box-shadow:none;
}
.dragon-slayer-burst {
  position:absolute;right:12px;bottom:16px;z-index:5;
  min-width:118px;min-height:51px;border:2px solid #fff0ad;border-radius:17px;
  background:linear-gradient(130deg,#d78675,#8d466e 55%,#4b356e);color:#fff8dc;
  box-shadow:0 0 15px #f4b88598,0 5px 16px #140e2aca;
  font:900 13px/1.3 system-ui;touch-action:manipulation;
}
.dragon-slayer-burst[hidden]{display:none!important}
.dragon-slayer-burst:disabled {
  border-color:#888fa8;background:#313c61;box-shadow:none;
  color:#c3cbe1;opacity:.86;
}
.dragon-slayer-live {
  position:absolute;width:1px;height:1px;padding:0;border:0;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;
}
#dragon-slayer-guide {
  position:absolute;left:10px;top:68px;z-index:18;max-width:145px;
  background:linear-gradient(120deg,#3c3a68ed,#7c5174ee);
  border:1px solid #e0c18b;border-radius:12px;color:#fff3d3;
  padding:8px 11px;box-shadow:0 4px 16px #070d29a8;
  font:900 11px/1.25 system-ui;letter-spacing:.1px;
}
#dragon-slayer-guide:focus-visible {outline:2px solid #fff3ba}
@media(max-width:390px){
  .dragon-slayer-intro{width:94%;padding:13px 12px}
  .dragon-slayer-crest{width:64px;height:51px;font-size:26px}
  .dragon-slayer-title{font-size:20px}
  .dragon-slayer-subtitle{font-size:12px}
  .dragon-slayer-instructions{font-size:11px}
  #dragon-slayer-guide{font-size:10px;max-width:123px}
  .dragon-slayer-back,.dragon-slayer-mute{max-width:115px;padding:7px 9px}
  .dragon-slayer-burst{min-width:105px;min-height:45px;font-size:11px}
}
@media(prefers-reduced-motion:reduce){
  .dragon-slayer-overlay *{scroll-behavior:auto}
}

/* Cinematic perspective battle: keep the character artwork, hide controls
   until play, and reserve mobile safe areas without masking the arena. */
.dragon-slayer-spells{
  position:absolute;right:10px;bottom:85px;z-index:6;
  width:min(74%,318px);display:flex;justify-content:flex-end;
  gap:5px;align-items:stretch;pointer-events:auto;
}
.dragon-slayer-spells[hidden]{display:none!important}
.dragon-slayer-spell{
  touch-action:manipulation;flex:1;min-width:0;min-height:47px;
  padding:5px 3px;border:1px solid #b0c9e7;border-radius:13px;
  color:#fff5db;font:900 11px/1.3 system-ui;
  background:linear-gradient(157deg,#273455fa,#15192dee);
  box-shadow:inset 0 1px 0 #eff7ff31,0 5px 16px #090a25b0;
  text-shadow:0 1px 3px #09091e;
}
.dragon-slayer-spell-fire{border-color:#ffac78;box-shadow:0 0 16px #ff7a4438}
.dragon-slayer-spell-ice{border-color:#a6f4ff;box-shadow:0 0 16px #74daef33}
.dragon-slayer-spell-lightning{border-color:#c2b8ff;box-shadow:0 0 16px #9e9af347}
.dragon-slayer-spell:disabled{opacity:.55;filter:saturate(.5)}
.dragon-slayer-spell:focus-visible{outline:3px solid #ffeeb0;outline-offset:2px}
.dragon-slayer-burst{right:11px;bottom:19px}
.dragon-slayer-overlay .dragon-slayer-chrome{bottom:12px;left:10px}
@media (max-width:390px){
  .dragon-slayer-spells{right:7px;bottom:79px;width:76%;gap:3px}
  .dragon-slayer-spell{font-size:10px;min-height:43px;padding:4px 2px}
  .dragon-slayer-burst{bottom:14px}
}
@media(prefers-reduced-motion:reduce){
  .dragon-slayer-spell{transition:none}
}

/* Native Three.js arena view: exactly the same avatar/animal/dragon meshes
   that render in the 3D plaza, beneath the transparent HUD/input surface. */
.dragon-slayer-3d-canvas{
  position:absolute;inset:0;width:100%;height:100%;display:block;
  z-index:0;pointer-events:none;touch-action:none;
}
#dragon-slayer-canvas{z-index:1}
.dragon-slayer-overlay[data-original3d="true"]{
  background:#090d1d;
}

/* Wide dynamic-range fantasy blast over the original Three.js meshes.
   Pointer passthrough keeps all existing movement/casting controls usable. */
.dragon-slayer-cinematic-impact{
  position:absolute;inset:0;z-index:1;pointer-events:none;
  opacity:0;mix-blend-mode:screen;will-change:opacity;
}
#dragon-slayer-canvas{z-index:2}
