:root{
  --bg:#0b0f14;
  --panel:#111826;
  --panel2:#0e1522;
  --line:rgba(255,255,255,.10);
  --text:rgba(255,255,255,.90);
  --muted:rgba(255,255,255,.65);
  --good:rgba(120,230,160,.95);
  --warn:rgba(255,210,120,.95);
  --bad:rgba(255,120,120,.95);
  --accent:rgba(120,180,255,.95);
}

html,body{height:100%;}
body{
  margin:0;
  overflow:hidden; /* no page scrolling */
  background:var(--bg);
  color:var(--text);
  font:14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  user-select:none;
}

#root{
  height:100vh;
  width:100vw;
  display:flex;
}

#gameWrap{
  position:relative;
  flex:1;
  min-width:0;
  background:linear-gradient(180deg, rgba(25,35,45,.65), rgba(10,14,18,.92));
}

.fadeOverlay{
  position:absolute;
  inset:0;
  background:#000;
  opacity:0;
  pointer-events:none;
  z-index:60;
}
.fadeOverlay.fadeFromBlack{
  opacity:1;
  animation: fadeFromBlack 1.4s ease forwards;
}
@keyframes fadeFromBlack{
  from{ opacity:1; }
  to{ opacity:0; }
}

canvas{
  width:100%;
  height:100%;
  display:block;
}

#side{
  width:340px;
  background:linear-gradient(180deg, var(--panel), var(--panel2));
  border-left:1px solid var(--line);
  display:flex;
  flex-direction:column;
  height:100%;
  overflow:hidden;
  transition:width .2s ease, border-color .2s ease;
}
#side.hidden{
  display:none;
  width:0;
  min-width:0;
  border-left:0;
}

#sideToggle{
  position:absolute;
  top:12px;
  right:12px;
  z-index:5;
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.35);
  color:var(--text);
  font-weight:900;
  cursor:pointer;
}
#sideToggle:hover{background:rgba(255,255,255,.10);}

#settingsToggle{
  position:absolute;
  top:52px;
  right:12px;
  z-index:5;
  width:34px;
  height:26px;
  border-radius:9px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.35);
  color:var(--text);
  font-weight:900;
  cursor:pointer;
}
#settingsToggle:hover{background:rgba(255,255,255,.10);}

.settingsPanel{
  position:absolute;
  top:84px;
  right:12px;
  z-index:8;
  min-width:180px;
  border:1px solid rgba(120,180,255,.38);
  border-radius:10px;
  background:rgba(10,18,26,.92);
  color:var(--text);
  padding:10px;
  box-shadow:0 8px 24px rgba(0,0,0,.35);
}
.settingsTitle{
  font-size:12px;
  font-weight:900;
  letter-spacing:.3px;
  margin-bottom:8px;
  color:rgba(210,235,255,.92);
}
.settingsRow{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:12px;
}
.settingsButtons{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
}
.settingsBtn{
  padding:5px 6px;
  border-radius:8px;
  border:1px solid rgba(130,180,220,.35);
  background:rgba(255,255,255,.05);
  color:var(--text);
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}
.settingsBtn.active{
  background:rgba(76,134,182,.55);
  border-color:rgba(130,190,235,.7);
}

body.mobile-layout #settingsToggle{
  right:172px;
  top:8px;
  width:22px;
  height:22px;
  border-radius:8px;
  font-size:11px;
  padding:0;
  z-index:94;
}
body.mobile-layout .settingsPanel{
  right:172px;
  top:36px;
  min-width:170px;
  padding:8px;
  z-index:95;
}

#tabBar{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
  padding:10px;
  border-bottom:1px solid var(--line);
  background:rgba(0,0,0,.10);
}

.tabBtn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
  font-weight:800;
}
.tabBtn:hover{background:rgba(255,255,255,.07);}
.tabBtn.active{outline:2px solid rgba(120,180,255,.35); background:rgba(120,180,255,.10);}
.tabBtn.locked{
  opacity:0.55;
  cursor:not-allowed;
}
.tabBtn.hidden{
  display:none;
}
.tabBtn:disabled{
  opacity:0.55;
  cursor:not-allowed;
}

#panelHeader{
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
}
#panelTitle{font-weight:900; letter-spacing:.2px;}
#panelHint{color:var(--muted); font-size:12px; margin-top:2px;}

#panelBody{
  flex:1;
  overflow:auto; /* only right panel scrolls */
  padding:12px;
}

.overlay{
  position:absolute;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(10,14,18,0.55);
  z-index:6;
}
.promptCard{
  background:rgba(18,22,28,0.96);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:16px;
  padding:16px 18px;
  min-width:240px;
  text-align:center;
}
.promptTitle{
  font-weight:800;
  margin-bottom:12px;
}
.promptActions{
  display:flex;
  gap:10px;
  justify-content:center;
}

#mapOverlay{
  background: rgba(10,12,16,0.80);
}
.mapOverlay{ display:flex; align-items:center; justify-content:center; }
.mapPanel{
  width: min(1100px, 92vw);
  height: min(760px, 88vh);
  background: rgba(20,22,28,0.95);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  position:relative;
}
.mapHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(15,18,24,0.85);
}
.mapTitle{
  font-weight:700;
  letter-spacing:0.5px;
  color: rgba(235,235,245,0.90);
}
.mapActions{ display:flex; gap:8px; }
#mapCanvas{
  flex:1;
  width:100%;
  height:100%;
  display:block;
  background: rgba(12,14,18,0.85);
}
.mapTooltip{
  position:absolute;
  padding:6px 10px;
  background: rgba(20,20,25,0.90);
  border:1px solid rgba(255,255,255,0.18);
  border-radius:10px;
  color: rgba(240,240,245,0.90);
  font-size:12px;
  pointer-events:none;
}

.mapLocationPill{
  position:absolute;
  left:16px;
  bottom:16px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(0,0,0,0.35);
  color: rgba(240,240,245,0.92);
  font-size:12px;
  max-width:calc(100% - 32px);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  pointer-events:none;
}

.pill{
  font-size:11px;
  font-weight:900;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.22);
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
}

/* HUD */
#hudTop{
  position:absolute;
  left:12px;
  top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  pointer-events:none;
}

#statusBar{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:2px;
  max-width:320px;
  pointer-events:auto;
}
.statusIcon{
  position:relative;
  width:26px;
  height:26px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:9px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.30);
  font-size:15px;
  line-height:1;
  cursor:default;
}
.statusIcon.buff{ border-color: rgba(120,180,255,.50); }
.statusIcon.debuff{ border-color: rgba(255,120,120,.55); }
.statusIcon.statusFlash{
  animation: statusFlash 0.6s ease-in-out infinite;
}
@keyframes statusFlash{
  0%{ opacity:1; }
  50%{ opacity:0.2; }
  100%{ opacity:1; }
}
.statusStacks{
  position:absolute;
  right:-4px;
  bottom:-4px;
  font-size:10px;
  font-weight:900;
  padding:1px 4px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(0,0,0,.70);
  color:rgba(255,255,255,.92);
}
.statusTimer{
  position:absolute;
  left:2px;
  top:2px;
  font-size:9px;
  font-weight:900;
  padding:1px 3px;
  border-radius:6px;
  background:rgba(0,0,0,0.70);
  color:rgba(255,255,255,0.90);
  line-height:1;
}
.statusTime{
  position:absolute;
  left:0;
  bottom:0;
  height:3px;
  border-bottom-left-radius:9px;
  border-bottom-right-radius:9px;
  background:rgba(255,255,255,.55);
}

#minimapWrap{
  position:absolute;
  right:12px;
  top:12px;
  width:360px;
  height:360px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(0,0,0,0.25);
  overflow:hidden;
  z-index:5;
  pointer-events:auto;
}
#minimapWrap.minimap--minimized{
  width:220px;
  height:26px;
}
#minimap{
  width:100%;
  height:100%;
  display:block;
  pointer-events:none;
}
#minimapToggle{
  position:absolute;
  left:8px;
  top:8px;
  width:24px;
  height:24px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.20);
  background:rgba(0,0,0,0.45);
  color:rgba(255,255,255,0.85);
  font-weight:900;
  cursor:pointer;
  z-index:2;
}
#minimapWrap.minimap--minimized #minimapToggle{
  top:1px;
  left:6px;
  height:22px;
}
#minimapToggle:hover{
  background:rgba(90,140,255,0.25);
  border-color:rgba(140,200,255,0.55);
}
#minimapZoom{
  position:absolute;
  right:8px;
  top:8px;
  display:flex;
  flex-direction:column;
  gap:6px;
  pointer-events:auto;
}
#minimapZoom button{
  width:24px;
  height:24px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.20);
  background:rgba(0,0,0,0.45);
  color:rgba(255,255,255,0.85);
  font-weight:900;
  cursor:pointer;
}
#minimapZoom button:hover{
  background:rgba(90,140,255,0.25);
  border-color:rgba(140,200,255,0.55);
}
#minimapLabel{
  position:absolute;
  left:8px;
  bottom:6px;
  font-size:11px;
  font-weight:900;
  color:rgba(255,255,255,0.8);
  background:rgba(0,0,0,0.35);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:999px;
  padding:2px 6px;
  pointer-events:none;
  display:flex;
  align-items:center;
  gap:6px;
}
#minimapCoords{white-space:nowrap;}
.minimapClock{
  position:relative;
  width:44px;
  height:10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.22);
  background:linear-gradient(90deg, rgba(255,195,120,0.35), rgba(120,170,255,0.35));
  overflow:hidden;
}
.minimapClockDot{
  position:absolute;
  top:50%;
  left:50%;
  width:8px;
  height:8px;
  border-radius:50%;
  transform:translate(-50%,-50%);
  background:rgba(255,235,200,0.95);
  box-shadow:0 0 6px rgba(255,220,170,0.55);
}
#minimapResize{
  position:absolute;
  left:4px;
  bottom:4px;
  width:12px;
  height:12px;
  border-left:2px solid rgba(255,255,255,0.35);
  border-bottom:2px solid rgba(255,255,255,0.35);
  cursor:nesw-resize;
  pointer-events:auto;
}
#minimapWrap.minimap--minimized #minimap,
#minimapWrap.minimap--minimized #minimapZoom,
#minimapWrap.minimap--minimized #minimapResize{
  display:none;
}
#minimapWrap.minimap--minimized #minimapLabel{
  display:block;
  left:36px;
  bottom:4px;
  font-size:11px;
  padding:2px 8px;
  max-width: calc(100% - 44px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chat + event log (bottom-left) */
#chatWrap{
  position:absolute;
  left:12px;
  bottom:12px;
  width: 360px;
  max-width: calc(100% - 24px);
  pointer-events: auto;
  z-index: 6;
  font-size: 12px;
  color: rgba(255,255,255,0.92);
}
#chatHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding: 6px 10px;
  margin-bottom: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.26);
  font-weight: 800;
}
#chatToggle{
  border:1px solid rgba(255,255,255,0.14);
  border-radius:10px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  cursor:pointer;
  font-size: 11px;
  font-weight: 800;
}
#chatToggle:hover{ background: rgba(255,255,255,0.10); }
#chatWrap.chatCollapsed #chatLog,
#chatWrap.chatCollapsed #chatInputRow{
  display:none;
}
#chatLog{
  max-height: 220px;
  overflow-y: auto;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.22);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}
#chatWrap.chatActive #chatLog{
  background: rgba(0,0,0,0.32);
  border-color: rgba(255,255,255,0.14);
}
.chatLine{ line-height: 1.25; padding: 2px 0; }
.chatTime{ color: rgba(255,255,255,0.55); }
.chatLine--system .chatText{ color: rgba(200,220,255,0.92); }
.chatLine--loot .chatText{ color: rgba(160,255,190,0.95); }
.chatLine--level .chatText{ color: rgba(255,210,120,0.95); }
.chatLine--upgrade .chatText{ color: rgba(255,230,150,0.92); }
.chatLine--talent .chatText{ color: rgba(200,255,240,0.92); }
.chatLine--mastery .chatText{ color: rgba(180,210,255,0.95); }
.chatLine--chat .chatText{ color: rgba(255,255,255,0.92); }

#chatInputRow{
  margin-top: 6px;
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.40);
  backdrop-filter: blur(10px);
}
.chatPrompt{
  color: rgba(255,255,255,0.70);
  font-weight: 700;
}
#chatInput{
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: rgba(255,255,255,0.94);
  font: inherit;
}

.bar{
  width:260px;
  padding:8px 10px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.30);
  backdrop-filter:blur(6px);
}
.tabBtn.flash{
  animation: tabFlash 1.2s ease-out 2;
}
@keyframes tabFlash{
  0%{ box-shadow: 0 0 0 rgba(255,220,140,0); }
  30%{ box-shadow: 0 0 12px rgba(255,220,140,0.85); }
  100%{ box-shadow: 0 0 0 rgba(255,220,140,0); }
}
.barRow{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.barLabel{font-weight:800; font-size:12px; color:rgba(255,255,255,.75)}
.barVal{font-weight:900; font-size:12px;}
.meter{height:10px; border-radius:999px; background:rgba(255,255,255,.08); overflow:hidden; margin-top:6px;}
.fill{height:100%; width:50%; background:rgba(120,230,160,.85);}

/* Hotbar */
#hotbar{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:8px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.30);
  backdrop-filter:blur(6px);
  z-index:3;
}
#hotbar.stealth{
  border-color:rgba(120,200,160,.35);
  background:linear-gradient(180deg, rgba(30,60,50,.35), rgba(10,18,14,.45));
  box-shadow:0 0 18px rgba(90,180,130,.20);
}
.hotbarRow{
  display:flex;
  gap:8px;
  justify-content:center;
}
.hotbarUtility{
  gap:6px;
  opacity:0.95;
}
.hotbarUtility.stealth{
  background:rgba(40,65,50,.25);
  border-radius:12px;
  box-shadow:0 0 10px rgba(90,180,130,.18);
}
.hotbarUtility.stealth .slot{
  border-color:rgba(120,200,160,.35);
  background:rgba(60,85,70,.20);
}

.slot{
  width:52px;
  height:52px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
}
.slot.modeActive{
  box-shadow:0 0 0 2px rgba(255,255,255,0.85);
}
.slot.small{
  width:42px;
  height:42px;
  border-radius:12px;
}

.slotKey{
  position:absolute;
  left:8px;
  top:6px;
  font-size:10px;
  color:rgba(255,255,255,.78);
  font-weight:900;
  border:1px solid rgba(255,255,255,.12);
  padding:2px 6px;
  border-radius:999px;
  background:rgba(0,0,0,.22);
}
.slot.small .slotKey{
  left:6px;
  top:5px;
  font-size:9px;
  padding:1px 5px;
}

.slotIcon{font-size:22px;}
.slotIcon,
.slotUp,
.spell .ico,
.sSlot .ico,
.upBtn{
  font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",system-ui,sans-serif;
}
.skillDrag{
  cursor:grab;
}

.slotCd{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:0%;
  background:rgba(0,0,0,.55);
  border-radius:inherit;
  pointer-events:none;
  z-index:1;
}
.slotCast{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:0%;
  background:rgba(255,255,255,.35);
  border-radius:inherit;
  pointer-events:none;
  z-index:2;
}
.slotTimer{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  font-size:11px;
  font-weight:900;
  color:rgba(255,255,255,0.95);
  text-shadow:0 0 6px rgba(0,0,0,0.7);
  pointer-events:none;
  z-index:3;
}

.slotFlash{
  position:absolute;
  inset:-2px;
  border-radius:16px;
  border:2px solid rgba(120,230,160,0);
  pointer-events:none;
}

.slotUp{
  position:absolute;
  right:8px;
  top:6px;
  font-size:12px;
  color:rgba(120,230,160,.95);
  text-shadow:0 0 6px rgba(120,230,160,.6);
  opacity:0;
  pointer-events:none;
}

.slot.ready .slotFlash{animation:flash 1.2s ease-in-out infinite;}
@keyframes flash{
  0%{border-color:rgba(120,230,160,0)}
  50%{border-color:rgba(120,230,160,.55)}
  100%{border-color:rgba(120,230,160,0)}
}

/* Overlay screens */
.screen{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.46);
  z-index:5;
}

.loadingScreen{
  flex-direction:column;
  gap:12px;
  background:
    radial-gradient(circle at 50% 40%, rgba(70,55,35,0.35), rgba(8,6,4,0.98) 60%),
    linear-gradient(180deg, rgba(12,10,8,0.98), rgba(0,0,0,0.98));
  z-index:20;
  text-align:center;
}
.loadingBrand{
  font-family:"Palatino Linotype","Book Antiqua",Palatino,serif;
  font-size:clamp(56px, 12vw, 140px);
  letter-spacing:4px;
  color:rgba(255,225,170,0.98);
  text-shadow:
    0 6px 22px rgba(0,0,0,0.55),
    0 0 28px rgba(255,210,150,0.28);
}
.loadingSub{
  font-size:14px;
  letter-spacing:2px;
  text-transform:uppercase;
  color:rgba(240,220,190,0.75);
}

.dialogueScreen{
  align-items:flex-end;
  justify-content:center;
  padding:0 32px 24px;
  background:linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.55));
}
.dialogueScreen.show .dialoguePanel{
  animation:dialoguePop 180ms ease-out;
}
.dialoguePanel{
  width:min(980px, calc(100% - 24px));
  display:flex;
  gap:18px;
  padding:18px 20px;
  border-radius:16px;
  border:1px solid rgba(210,180,120,0.38);
  background:
    linear-gradient(180deg, rgba(26,22,18,0.96), rgba(16,14,12,0.96));
  box-shadow:0 18px 60px rgba(0,0,0,.55);
  font-family:"Palatino Linotype","Book Antiqua",Palatino,serif;
}
.dialoguePanel::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:16px;
  padding:1px;
  background:linear-gradient(135deg, rgba(230,200,140,.55), rgba(140,120,90,.25), rgba(255,255,255,0));
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask-composite:exclude;
  pointer-events:none;
}
.dialoguePanel{
  position:relative;
}
.dialoguePortrait{
  width:86px;
  height:86px;
  border-radius:14px;
  border:1px solid rgba(230,200,140,0.35);
  background:
    radial-gradient(circle at 30% 30%, rgba(255,230,180,0.15), rgba(0,0,0,0) 60%),
    linear-gradient(180deg, rgba(60,50,40,0.95), rgba(28,24,20,0.95));
  background-image:
    linear-gradient(180deg, rgba(60,50,40,0.15), rgba(28,24,20,0.25)),
    url('wizard-portrait.svg');
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,0.35);
}
.dialogueBody{
  flex:1;
  display:flex;
  flex-direction:column;
  min-width:0;
}
.dialogueTitle{
  font-size:16px;
  font-weight:800;
  letter-spacing:0.6px;
  color:rgba(245,235,210,0.95);
  margin-bottom:6px;
  text-transform:uppercase;
}
.dialogueText{
  color:rgba(230,220,200,0.92);
  font-size:15px;
  line-height:1.45;
  margin:0 0 12px 0;
}
.dialogueChoices{
  margin-top:6px;
  gap:8px;
}
.dialogueChoiceBtn{
  border-radius:10px;
  border:1px solid rgba(210,180,120,0.25);
  background:rgba(20,18,14,0.65);
  color:rgba(245,235,210,0.95);
  font-weight:800;
}
.dialogueChoiceBtn:hover{
  background:rgba(70,55,35,0.35);
  border-color:rgba(230,200,140,0.45);
}

@keyframes dialoguePop{
  0%{ transform:translateY(10px) scale(0.98); opacity:0; }
  100%{ transform:translateY(0) scale(1); opacity:1; }
}

.pulseOutline{
  animation:pulseOutline 1.25s ease-in-out infinite;
}
@keyframes pulseOutline{
  0%{ box-shadow:0 0 0 0 rgba(255,220,140,0.0), 0 0 0 1px rgba(255,220,140,0.2); }
  60%{ box-shadow:0 0 14px 2px rgba(255,220,140,0.45), 0 0 0 1px rgba(255,220,140,0.45); }
  100%{ box-shadow:0 0 0 0 rgba(255,220,140,0.0), 0 0 0 1px rgba(255,220,140,0.2); }
}

.dialogueChoices{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
  margin-bottom:10px;
}
.dialogueChoiceBtn{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(0,0,0,0.22);
  color:var(--text);
  font-weight:800;
  cursor:pointer;
}
.dialogueChoiceBtn:hover{
  background:rgba(255,255,255,0.08);
  border-color:rgba(140,200,255,0.45);
}
.dialogueKey{
  color:#f3d26b;
  font-weight:700;
}

body.mobile-layout .dialogueScreen{
  z-index:120;
  align-items:center;
  justify-content:center;
  padding:8px;
}
body.mobile-layout .dialoguePanel{
  width:min(96vw, 520px);
  max-width:min(96vw, 520px);
  max-height:78vh;
  gap:6px;
  padding:8px 8px 8px;
  border-radius:10px;
  align-items:flex-start;
  overflow:hidden;
}
body.mobile-layout .dialoguePanel::before{
  border-radius:10px;
}
body.mobile-layout .dialoguePortrait{
  width:44px;
  height:44px;
  border-radius:9px;
  flex:0 0 auto;
}
body.mobile-layout .dialogueBody{
  min-width:0;
  max-height:calc(78vh - 16px);
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
body.mobile-layout .dialogueTitle{
  font-size:12px;
  margin-bottom:3px;
}
body.mobile-layout .dialogueText{
  font-size:11px;
  line-height:1.3;
  margin:0 0 6px 0;
  white-space:normal;
  overflow-wrap:anywhere;
}
body.mobile-layout .dialogueChoices{
  margin-top:4px;
  margin-bottom:2px;
  gap:4px;
}
body.mobile-layout .dialogueChoiceBtn{
  padding:7px 7px;
  font-size:11px;
  line-height:1.2;
}

/* Main menu splash */
#mainMenuScreen{
  position:absolute;
  inset:0;
  overflow:hidden;
  background:
    radial-gradient(1200px 800px at 20% 15%, rgba(70,120,180,0.28), rgba(0,0,0,0) 60%),
    radial-gradient(900px 700px at 85% 20%, rgba(180,120,80,0.22), rgba(0,0,0,0) 55%),
    radial-gradient(1200px 900px at 50% 80%, rgba(60,90,140,0.30), rgba(0,0,0,0) 65%),
    linear-gradient(180deg, rgba(6,10,16,0.98), rgba(4,6,10,0.98));
}
#mainMenuScreen::before{
  content:"";
  position:absolute;
  inset:-20%;
  background:
    radial-gradient(2px 2px at 10% 20%, rgba(255,255,255,.08), rgba(255,255,255,0) 60%),
    radial-gradient(2px 2px at 75% 30%, rgba(255,255,255,.08), rgba(255,255,255,0) 60%),
    radial-gradient(2px 2px at 55% 70%, rgba(255,255,255,.08), rgba(255,255,255,0) 60%),
    radial-gradient(1px 1px at 35% 55%, rgba(255,255,255,.10), rgba(255,255,255,0) 60%),
    radial-gradient(1px 1px at 85% 65%, rgba(255,255,255,.10), rgba(255,255,255,0) 60%);
  opacity:.9;
  animation:menuDrift 26s linear infinite;
}
#mainMenuScreen::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.02) 0 2px, rgba(255,255,255,0) 2px 10px);
  opacity:.25;
  mix-blend-mode:screen;
}

#mainMenuScreen .card{
  width:min(680px, calc(100% - 48px));
  padding:26px 26px 22px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(240px 160px at 12% 8%, rgba(180,210,255,.10), rgba(0,0,0,0) 60%),
    linear-gradient(180deg, rgba(10,16,24,.96), rgba(8,12,18,.92));
  box-shadow:
    0 30px 80px rgba(0,0,0,.55),
    inset 0 0 0 1px rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
  font-family: "Palatino Linotype","Book Antiqua",Palatino,serif;
  animation:menuCardIn .6s ease-out;
  position:relative;
  z-index:1;
}
#mainMenuScreen .card::before{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:22px;
  padding:1px;
  background:linear-gradient(135deg, rgba(255,215,140,.35), rgba(120,180,255,.25), rgba(255,255,255,0));
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask-composite:exclude;
  opacity:.55;
  pointer-events:none;
}
#mainMenuScreen .card h1{
  margin:0 0 6px 0;
  font-size:28px;
  letter-spacing:.8px;
  text-transform:uppercase;
  color:rgba(240,245,255,.95);
  text-shadow:0 6px 20px rgba(0,0,0,.6);
}
#mainMenuScreen .card p{
  font-size:13px;
  color:rgba(210,220,230,.80);
}
#mainMenuScreen .menuActions{
  margin-top:18px;
  gap:12px;
}
#mainMenuScreen .menuBtn{
  border-radius:14px;
  padding:12px 16px;
  background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(0,0,0,.10));
  border:1px solid rgba(255,255,255,.18);
  text-transform:uppercase;
  letter-spacing:.6px;
  font-weight:900;
  transition:transform 120ms ease, background 120ms ease, border-color 120ms ease;
  animation:menuBtnIn .65s ease-out;
}
#mainMenuScreen .menuBtn:hover{
  background:linear-gradient(180deg, rgba(140,200,255,.22), rgba(0,0,0,.12));
  border-color:rgba(140,200,255,.45);
  transform:translateY(-1px);
}
#mainMenuScreen .menuBtn:disabled{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.08);
}
#mainMenuScreen #mainMenuHint{
  margin-top:12px;
  font-size:12px;
  color:rgba(200,190,160,.85);
}

@keyframes menuDrift{
  0%{ transform:translate3d(0,0,0); opacity:.7; }
  50%{ transform:translate3d(-2%, -1%, 0); opacity:.9; }
  100%{ transform:translate3d(0,0,0); opacity:.7; }
}
@keyframes menuCardIn{
  from{ transform:translateY(10px); opacity:0; }
  to{ transform:translateY(0); opacity:1; }
}
@keyframes menuBtnIn{
  from{ transform:translateY(6px); opacity:0; }
  to{ transform:translateY(0); opacity:1; }
}

.card{
  width:min(560px, calc(100% - 40px));
  border-radius:18px;
  border:1px solid var(--line);
  background:rgba(10,14,18,.90);
  box-shadow:0 18px 60px rgba(0,0,0,.45);
  padding:18px;
  backdrop-filter:blur(8px);
}

.card h1{margin:0 0 8px 0; font-size:18px; letter-spacing:.2px;}
.menuActions{
  display:flex;
  gap:10px;
  margin-top:14px;
  flex-wrap:wrap;
}
.menuActionsSmall{
  margin-top:10px;
  gap:8px;
}
.menuBtn{
  flex:1;
  min-width:140px;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 12px;
  background:rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
  font-weight:800;
  text-align:center;
}
.menuBtn.ghost{
  min-width:120px;
  padding:8px 10px;
  font-size:12px;
  background:rgba(255,255,255,.03);
}
.menuBtn:hover{ background:rgba(255,255,255,.10); }
.menuBtn:disabled{ opacity:.55; cursor:not-allowed; }
.card p{margin:8px 0 0 0; color:var(--muted)}
.kbd{display:inline-block; padding:2px 8px; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.04); font-weight:800; color:rgba(255,255,255,.85)}

#upgradeOverlay{display:none;}
#upgradeOverlay.show{display:flex;}

.upgGrid{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  text-align:left;
  margin:10px auto 12px;
  width:min(520px, 100%);
}
.upgGrid#upgradeLootChoices{
  margin-top:6px;
  border-top:1px solid rgba(255,255,255,.10);
  padding-top:10px;
}
.upg.loot .uTag{ color: rgba(140,220,255,0.95); }
.upg{
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  padding:10px 12px;
  cursor:pointer;
  display:grid;
  grid-template-columns:38px 1fr auto;
  gap:10px;
  align-items:center;
  transition:transform 80ms ease, border-color 80ms ease, background 80ms ease;
  user-select:none;
}
.upg:hover{border-color:rgba(255,255,255,.22); transform:translateY(-1px); background:rgba(90,140,255,.08);}
.upg.selected{border-color:rgba(120,190,255,.55); background:rgba(90,140,255,.12);}
.upg .uIco{
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  display:flex;
  align-items:center;
  justify-content:center;
  background:radial-gradient(circle at 30% 25%, rgba(255,255,255,.22), rgba(0,0,0,.18));
  font-size:16px;
}
.upg .uName{font-weight:750;}
.upg .uDesc{font-size:12px; color:var(--muted); margin-top:2px;}
.upg .uTag{
  font-size:11px;
  color:rgba(255,255,255,.75);
  padding:4px 8px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
  background:rgba(0,0,0,.18);
}
.upgradeBtn{
  cursor:pointer;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(90,140,255,.18);
  color:var(--text);
  font-weight:650;
  min-width:140px;
}
.upgradeBtn:hover{border-color:rgba(255,255,255,.26);}
.upgradeBtn:disabled{cursor:not-allowed; opacity:.55; filter:grayscale(20%);}

/* Tooltip */
#tip{
  position:fixed;
  z-index:20;
  pointer-events:none;
  opacity:0;
  max-width:320px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(10,14,18,.92);
  color:var(--text);
  box-shadow:0 18px 60px rgba(0,0,0,.45);
  backdrop-filter:blur(6px);
  font-size:12px;
  line-height:1.25;
  white-space:pre-line;
}

/* Right panel content */
.small{font-size:12px; color:var(--muted);}

.grid{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:10px;
}

.invWrap{ display:flex; flex-direction:column; gap:10px; }
.invTabs{ display:flex; gap:8px; }
.invTabBtn{
  flex:1;
  height:32px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(0,0,0,0.18);
  color:rgba(255,255,255,0.9);
  font-weight:900;
  cursor:pointer;
}
.invTabBtn:hover{ background:rgba(255,255,255,0.06); }
.invTabBtn.active{ outline:2px solid rgba(120,180,255,.35); background:rgba(120,180,255,.10); }
.invHint{ margin-bottom:4px; }
.equipWrap{
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(10,14,18,0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.equipBoard{
  position: relative;
  height: 300px;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.20);
  overflow: hidden;
}
.bodySvg{
  position:absolute;
  inset: 10px 0 6px 0;
  margin:auto;
  width: 140px;
  height: 220px;
  opacity: 0.7;
}
.equipSlot{
  position:absolute;
  transform: translate(-50%, -50%);
  padding: 4px 6px;
  font-size: 10px;
  min-width: 64px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: center;
  line-height: 1.1;
  pointer-events: auto;
  cursor: default;
}
.equipSlot .eqLabel{ font-size:9px; opacity:0.75; }
.equipSlot .eqName{ font-size:10px; font-weight:700; text-transform:none; letter-spacing:0; white-space:normal; }
.ringBar{
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.ringSlot{
  position: static;
  transform: none;
  text-align: center;
  padding: 6px 0;
  border-radius: 6px;
}
.invList{ padding-top: 2px; max-height: 55vh; overflow-y: auto; overflow-x: hidden; }
.invListItems{ display:flex; flex-direction:column; gap:8px; width:100%; }
.invSectionTitle{
  margin:6px 2px -2px;
  font-size:11px;
  color:var(--muted);
  font-weight:900;
  letter-spacing:.4px;
  text-transform:uppercase;
}
.invLeft{ min-width:0; }
.invEmpty{ padding:10px 12px; border-radius:10px; border:1px dashed rgba(255,255,255,.14); color:rgba(255,255,255,.6); font-size:12px; }
.resRow{
  display:grid;
  grid-template-columns:24px 1fr auto;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.03);
}
.resIcon{ font-size:16px; text-align:center; }
.resName{ font-weight:900; }
.resAmt{ font-weight:900; color:rgba(255,255,255,.75); }
.invDiff{
  position:absolute;
  top:6px;
  right:6px;
  width:0;
  height:0;
  border-left:6px solid transparent;
  border-right:6px solid transparent;
}
.invDiff.up{ border-bottom:10px solid rgba(120,230,160,0.9); }
.invDiff.down{ border-top:10px solid rgba(255,120,120,0.9); }

.invSlot{
  min-height:72px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px;
  cursor:pointer;
  position:relative;
  gap:10px;
  width:100%;
  min-width:0;
  box-sizing:border-box;
}
.invIcon{
  width:32px;
  height:32px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  flex:0 0 auto;
}
.invSlotFlash{
  border-color: rgba(255,220,140,0.85);
  box-shadow: 0 0 0 rgba(255,220,140,0);
  animation: invPulse 1.2s ease-in-out infinite;
}
.invSlotFlash .invName{
  color: rgba(255,230,170,0.98);
}
.invSlotFlash .invMeta{
  color: rgba(255,235,200,0.9);
}
@keyframes invPulse{
  0%{ box-shadow: 0 0 0 rgba(255,220,140,0); }
  50%{ box-shadow: 0 0 14px rgba(255,220,140,0.55); }
  100%{ box-shadow: 0 0 0 rgba(255,220,140,0); }
}

.invSlot.empty{opacity:.75; cursor:default;}

.invName{font-weight:900; font-size:12px; white-space:normal; overflow:visible; text-overflow:clip;}
.invStats{font-size:12px; color:rgba(255,255,255,.82); font-weight:700;}
.invMeta{display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; color:rgba(255,255,255,.70); font-size:12px; font-weight:800;}

.spellCard{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:rgba(255,255,255,.03);
  margin-bottom:10px;
}

.statsWrap{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.statsHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.03);
}
.statsTitle{font-weight:950; letter-spacing:.2px;}
.statsSub{font-size:12px; color:var(--muted); font-weight:700;}
.statsPoints{
  font-size:12px;
  font-weight:900;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(120,180,255,.25);
  background:rgba(120,180,255,.12);
}
.statsSection{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  background:rgba(255,255,255,.03);
}
.statsSectionTitle{
  font-weight:900;
  font-size:12px;
  letter-spacing:.3px;
  text-transform:uppercase;
  color:rgba(255,255,255,.72);
  margin-bottom:8px;
}
.statsAttrGrid{display:grid; grid-template-columns:1fr; gap:6px;}
.statsAttrRow{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:8px;
  align-items:center;
  padding:6px 8px;
  border-radius:10px;
  background:rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.06);
}
.statsAttrInfo{min-width:0;}
.statsAttrLabel{font-weight:850; font-size:12px;}
.statsAttrDesc{font-size:11px; color:var(--muted); line-height:1.3;}
.statsAttrValue{
  font-size:12px;
  font-weight:900;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,0.20);
}
.statsHint{margin-top:8px; font-size:11px; color:var(--muted);}
.statsDerivedGrid{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:6px;}
.statsChip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:6px 8px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(0,0,0,0.18);
  font-size:12px;
}
.statsChip strong{font-weight:900;}
.statsProgressList{display:flex; flex-direction:column; gap:6px;}
.statsProgressGroup{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:8px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,0.18);
}
.statsProgressHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:6px 8px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  font-size:12px;
}
.statsProgressName{font-weight:900; letter-spacing:.2px;}
.statsProgressMeta{font-weight:800; color:var(--muted);}
.statsProgressItem{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:8px;
  align-items:center;
  padding:6px 8px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(0,0,0,0.12);
  font-size:12px;
}
.statsProgressItem em{font-style:normal; color:var(--muted);}

.storageToolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}
.storageSearch{
  flex:1 1 160px;
  min-width:120px;
  padding:6px 8px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.25);
  color:inherit;
  font-size:12px;
}
.storageFilters{display:flex; flex-wrap:wrap; gap:6px;}
.storageFilterBtn{
  font-size:11px;
  padding:5px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.22);
  color:rgba(255,255,255,.75);
  cursor:pointer;
}
.storageFilterBtn.active{
  border-color:rgba(120,180,255,.35);
  background:rgba(120,180,255,.15);
  color:rgba(255,255,255,.9);
}
.storageGroup{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:6px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.18);
}
.storageGroupHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:6px 8px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  font-size:12px;
  cursor:pointer;
}
.storageGroupHeader strong{font-weight:900;}
.storageGroupToggle{font-weight:900; color:var(--muted);}
.storageCompact{gap:8px;}
.storageRow{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:6px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(0,0,0,.14);
}
.storageRowMain{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font-size:12px;
}
.storageRowLeft{min-width:0; display:flex; flex-direction:column; gap:2px;}
.storageRowTitle{
  font-weight:900;
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:220px;
}
.storageRowMeta{font-size:11px; color:var(--muted);}
.storageRowRight{display:flex; align-items:center; gap:6px; flex-shrink:0;}
.storageBadge{
  padding:2px 6px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  font-size:10px;
  color:rgba(255,255,255,.8);
  background:rgba(0,0,0,.18);
}
.storagePin,
.storageExpand{
  font-size:11px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.22);
  color:rgba(255,255,255,.75);
  cursor:pointer;
}
.storagePin.active{
  border-color:rgba(255,220,120,.35);
  background:rgba(255,220,120,.15);
  color:rgba(255,255,255,.9);
}
.storageRowDetail{display:flex; flex-direction:column; gap:6px; margin-top:4px;}

.alchemyWrap{display:flex; flex-direction:column; gap:12px;}
.alchemyHeader{display:flex; flex-direction:column; gap:4px;}
.alchemyTitle{font-weight:900; letter-spacing:.3px;}
.alchemySub{font-size:12px; color:var(--muted);}
.alchemySection{border:1px solid rgba(255,255,255,.10); border-radius:12px; padding:10px 12px; background:rgba(0,0,0,.16);}
.alchemySectionTitle{font-size:12px; font-weight:900; color:rgba(255,255,255,.85); margin-bottom:8px;}
.alchemyList{display:flex; flex-direction:column; gap:6px;}
.alchemyRow{display:grid; grid-template-columns:24px 1fr auto; align-items:center; gap:8px; font-size:12px; color:rgba(255,255,255,.85);}
.alchemyIcon{font-size:16px;}
.alchemyName{font-weight:800;}
.alchemyAmt{font-weight:900; color:rgba(255,255,255,.70);}
.alchemyEmpty{font-size:12px; color:var(--muted);}
.craftingWrap{display:flex; flex-direction:column; gap:12px;}
.craftingHeader{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.craftingTitle{font-weight:900; letter-spacing:.3px;}
.craftingSub{font-size:12px; color:var(--muted);}
.craftingGrid{display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:10px;}
.craftingCard{border:1px solid rgba(255,255,255,.10); border-radius:12px; padding:10px 12px; background:rgba(0,0,0,.16); display:flex; flex-direction:column; gap:8px;}
.craftingInfo{display:flex; flex-direction:column; gap:4px;}
.craftingName{font-weight:900; font-size:13px;}
.craftingDesc{font-size:12px; color:var(--muted);}
.craftingBtn{align-self:flex-start;}
.craftingBack{margin-left:auto;}
.craftingDetail{display:flex; flex-direction:column;}
.craftingRecipeList{display:flex; flex-direction:column; gap:10px; margin-top:6px;}
.craftingSectionTitle{font-size:11px; font-weight:900; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; margin-top:6px;}
.craftingRecipe{
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  padding:10px 12px;
  background:rgba(0,0,0,.16);
  display:flex;
  flex-direction:column;
  gap:6px;
}
.craftingRecipeHeader{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.craftingRecipeName{font-weight:900; font-size:13px;}
.craftingRecipeMeta{font-size:11px; color:var(--muted);}
.craftingRecipeReq,.craftingRecipeOut,.craftingRecipeTime{font-size:12px; color:rgba(255,255,255,.80);}
.craftingRecipeActions{display:flex; gap:8px; margin-top:4px;}
.craftingQty{
  width:64px;
  padding:6px 8px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.25);
  color:inherit;
  font-size:12px;
}
.craftingActive{
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  padding:8px 10px;
  background:rgba(0,0,0,.20);
  display:flex;
  flex-direction:column;
  gap:6px;
}
.craftingActiveBar{
  height:8px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
}
.craftingActiveBar > div{
  height:100%;
  background:rgba(120,230,160,.85);
  width:0%;
}

.buildingWrap{display:flex; flex-direction:column; gap:12px;}
.buildingSection{display:flex; flex-direction:column; gap:8px;}
.buildingSectionTitle{font-weight:900; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.4px;}
.buildingList{display:flex; flex-direction:column; gap:8px;}
.buildingRow{
  display:grid;
  grid-template-columns:24px 1fr auto;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.03);
}
.buildingRow--active{ cursor:pointer; }
.buildingRow--active:hover{ border-color:rgba(255,255,255,.22); background:rgba(255,255,255,.06); }
.buildingRow--disabled{ opacity:0.55; }
.buildingRow--selected{ border-color:rgba(255,210,120,.55); background:rgba(255,210,120,.08); }
.buildingSelected{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.20);
}
.buildingIcon{ font-size:16px; text-align:center; }
.buildingName{ font-weight:900; }
.buildingAmt{ font-weight:900; color:rgba(255,255,255,.75); }

.upgChoice.selected{
  outline:2px solid rgba(120,180,255,.35);
  background:rgba(120,180,255,.08);
}

.spellTop{display:flex; align-items:flex-start; justify-content:space-between; gap:10px;}
.spellName{font-weight:950; letter-spacing:.2px; display:flex; align-items:center; gap:8px; cursor:grab;}

.upBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:28px;
  min-width:36px;
  padding:0 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
  font-weight:900;
}

.upBtn:hover{background:rgba(255,255,255,.07);}
.upBtn:disabled{opacity:.45; cursor:not-allowed;}

.prog{height:10px; background:rgba(255,255,255,.08); border-radius:999px; overflow:hidden; margin-top:8px;}
.prog > div{height:100%; width:30%; background:rgba(120,180,255,.75)}

.upgradeRow{margin-top:4px; display:grid; grid-template-columns:1fr; gap:4px;}
.upLine{display:flex; align-items:center; gap:6px; flex-wrap:nowrap;}

.affRow{
  margin-top:4px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  align-items:center;
}
.affProg{
  height:8px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
}
.affProg > div{
  height:100%;
  background:rgba(120,180,255,.75);
  width:0%;
}
.affTxt{
  font-size:11px;
  color:var(--muted);
}
.masteryControls{
  display:flex;
  gap:8px;
  margin:6px 0 10px;
  flex-wrap:wrap;
}
.masteryRow{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  margin-bottom:6px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(0,0,0,0.18);
  cursor:pointer;
}
.masteryCaret{
  width:14px;
  color:var(--muted);
  font-size:12px;
  text-align:center;
  margin-left:auto;
  flex:0 0 auto;
}
.masteryRow:hover{ background:rgba(255,255,255,0.05); }
.masteryRow.open{
  border-color:rgba(120,180,255,0.45);
  background:rgba(90,140,255,0.12);
}
.masteryIcon{
  width:28px;
  height:28px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(0,0,0,0.35);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  flex:0 0 auto;
}
.masteryInfo{
  flex:1;
  display:grid;
  grid-template-columns:1fr auto;
  gap:6px;
  align-items:center;
}
.masteryName{
  font-weight:700;
  letter-spacing:0.2px;
}
.masteryLvl{
  font-size:11px;
  color:var(--muted);
  justify-self:end;
}
.masteryProg{
  grid-column:1 / 3;
  height:8px;
}
.masteryProgText{
  grid-column:1 / 3;
  font-size:11px;
  color:var(--muted);
}
.masteryDetail{
  margin:-2px 0 10px 12px;
  padding:6px 10px 8px;
  border-left:2px solid rgba(120,180,255,0.25);
}

.dragGhost{
  position:fixed;
  z-index:30;
  pointer-events:none;
  width:56px;
  height:56px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(10,14,18,.90);
  display:none;
  align-items:center;
  justify-content:center;
  font-size:22px;
  box-shadow:0 18px 60px rgba(0,0,0,.45);
}

/* Spell display (from best.html) */
#spellbar{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:8px;
  margin-bottom:10px;
}

.sSlot{
  position:relative;
  height:58px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(0,0,0,0.18);
  padding:8px;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:22px 1fr;
  gap:8px;
  align-items:center;
  user-select:none;
}
.sSlot.empty{opacity:0.72;}
.sSlot.dragOver{border-color:rgba(120,190,255,0.55); background:rgba(90,140,255,0.10);}
.sSlot .key{
  position:absolute;
  left:8px;
  top:8px;
  font-size:10px;
  color:rgba(255,255,255,0.70);
  padding:2px 6px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(0,0,0,0.22);
}
.sSlot .ico{
  width:22px;
  height:22px;
  border-radius:8px;
  display:grid;
  place-items:center;
  font-size:15px;
}
.sSlot .nm{
  font-size:12px;
  font-weight:750;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sSlot .cd{
  position:absolute;
  right:8px;
  bottom:8px;
  font-size:10px;
  color:rgba(255,255,255,0.68);
}

@keyframes readyPulse{
  0%{ box-shadow: 0 0 0 0 rgba(255,255,255,0.18); }
  70%{ box-shadow: 0 0 0 10px rgba(255,255,255,0.00); }
  100%{ box-shadow: 0 0 0 0 rgba(255,255,255,0.00); }
}
.sSlot.flash{ border-color: rgba(255,255,255,0.30); animation: readyPulse 0.35s ease-out 1; }

#spellBook{ margin-top:8px; padding-top:8px; border-top:1px solid rgba(255,255,255,0.10); }
#spellBook.hidden{ display:none; }

.spellbookWrap #spellbar{
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(10,14,18,0.92);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.spell{
  display:grid;
  grid-template-columns:34px 1fr;
  gap:10px;
  align-items:center;
  padding:6px 8px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(0,0,0,0.18);
  margin-bottom:6px;
  cursor:grab;
}
.spell:active{ cursor:grabbing; }
.spell:last-child{ margin-bottom:0; }
.spell .ico{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.12);
  background:radial-gradient(circle at 30% 25%, rgba(255,255,255,0.22), rgba(0,0,0,0.20));
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
}
.spell .name{ font-size:13px; font-weight:650; margin:0; }
.spell .desc{ font-size:12px; color:var(--muted); margin:2px 0 0; }
.spellCdRow{ text-align:right; font-size:12px; color:var(--muted); margin-top:2px; }
.spellBase{ display:grid; gap:4px; margin-top:2px; }
.spellStats{ display:flex; flex-wrap:wrap; gap:2px 10px; font-size:12px; color:var(--muted); line-height:1.15; }
.spellStat{ white-space:normal; }
.spellMeta{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:4px 8px; }
.spellMetaItem{
  font-size:11px;
  font-weight:800;
  width:100
  color:rgba(255,255,255,0.78);
  background:rgba(0,0,0,0.20);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:999px;
  padding:2px 6px;
  text-align:center;
  white-space:normal;
}
.spell.active{ border-color: rgba(120,180,255,0.55); background: rgba(60,120,255,0.10); }
.spellSectionTitle{
  margin: 10px 0 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.magicAcc{
  margin-bottom: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.14);
  overflow: hidden;
}
.magicAccHead{
  width: 100%;
  display: grid;
  grid-template-columns: 18px 1fr auto 120px auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.10);
  border: 0;
  cursor: pointer;
  color: rgba(255,255,255,0.92);
}
.magicAccHead:hover{ background: rgba(0,0,0,0.18); }
.magicAccCaret{ opacity: 0.85; font-size: 13px; }
.magicAccTitle{ font-size: 12px; font-weight: 900; letter-spacing: 0.10em; text-transform: uppercase; }
.magicAccMeta{ font-size: 11px; font-weight: 900; opacity: 0.75; }
.magicAccBar{
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.magicAccFill{
  height: 100%;
  background: linear-gradient(90deg, rgba(120,180,255,0.95), rgba(80,220,255,0.85));
  width: 0%;
}
.magicAccXp{ font-size: 11px; opacity: 0.65; font-weight: 800; }
.magicAccBody{ padding: 10px 10px 8px; }
.spell .lvlBtn{
  margin-top:6px;
  width:100%;
  font-size:11px;
  padding:6px 8px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(90,140,255,0.18);
  color:rgba(255,255,255,0.92);
  cursor:pointer;
}
.spell .lvlBtn:disabled{ opacity:0.55; cursor:not-allowed; background:rgba(0,0,0,0.18); }
.spell .upgradeRow{ margin-top:4px; }

/* Talents */
.talentGroup{
  border:1px solid rgba(255,255,255,.12);
  border-radius:14px;
  background:rgba(0,0,0,.16);
  overflow:hidden;
  margin:10px 0;
}
.talentGroupHeader{
  width:100%;
  text-align:left;
  padding:10px 12px;
  border:0;
  border-bottom:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.92);
  font-weight:950;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.talentGroupHeader:hover{ background:rgba(255,255,255,.06); }
.talentGroupBody{
  padding:10px 10px 12px 10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.talentCard{
  border:1px solid rgba(255,255,255,.12);
  border-radius:14px;
  background:rgba(255,255,255,.03);
  padding:10px 10px;
}
.talentCard.owned{
  border-color:rgba(120,230,160,.35);
  background:rgba(120,230,160,.16);
}
.talentCard.locked{ opacity:0.78; }
.talentRow{
  display:flex;
  align-items:center;
  gap:10px;
}
.talentName{
  font-weight:900;
  font-size:12px;
  min-width:0;
}
.talentMeta{
  margin-left:auto;
  font-size:11px;
  color:var(--muted);
  white-space:nowrap;
}
.talentToggle{
  height:22px;
  padding:0 6px;
  border-radius:9px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.22);
  color:rgba(255,255,255,.85);
  font-weight:900;
  font-size:11px;
  line-height:1;
  cursor:pointer;
}
.talentToggle:disabled{ opacity:.55; cursor:not-allowed; }
.talentDesc{
  margin:4px 0 0 0;
  font-size:11px;
  color:var(--muted);
}

.contractsWrap{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.contractCard{
  display:flex;
  gap:10px;
  align-items:flex-start;
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  background:rgba(255,255,255,.03);
  padding:10px 10px;
}
.contractCard.tracked{
  outline:2px solid rgba(255,220,140,0.30);
  border-color:rgba(255,220,140,0.35);
  background:rgba(255,220,140,0.06);
}
.contractCard.complete{
  border-color:rgba(120,230,160,.35);
  background:rgba(120,230,160,.08);
}
.contractCard.locked{
  opacity:0.65;
}
.contractIcon{
  width:24px;
  text-align:center;
  font-size:18px;
}
.contractBody{
  flex:1;
  min-width:0;
}
.contractTitle{
  font-weight:900;
  font-size:12px;
}
.contractDesc{
  color:var(--muted);
  font-size:12px;
  margin-top:4px;
}
.contractMeta{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:6px;
  font-size:11px;
  color:var(--muted);
}
.contractTag{
  border:1px solid rgba(255,255,255,.14);
  border-radius:999px;
  padding:2px 6px;
  font-size:10px;
  color:rgba(255,255,255,.85);
}
.contractBar{
  height:6px;
  margin-top:6px;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  overflow:hidden;
}
.contractBarFill{
  height:100%;
  background:rgba(120,180,255,.65);
  width:0;
}
.contractSubList{
  margin-top:8px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.contractSubRow{
  display:grid;
  grid-template-columns:1fr 120px auto;
  gap:8px;
  align-items:center;
  font-size:11px;
  color:var(--muted);
}
.contractSubLabel{
  font-weight:800;
  color:rgba(230,230,230,0.85);
}
.contractSubProg{
  height:6px;
  border-radius:999px;
  background:rgba(255,255,255,0.10);
  overflow:hidden;
}
.contractSubProg > div{
  height:100%;
  background:rgba(200,190,140,0.75);
  width:0;
}
.contractSubVal{
  font-weight:800;
  color:rgba(220,220,220,0.75);
}
.contractStatus{
  font-size:11px;
  font-weight:900;
  color:rgba(255,255,255,.82);
}
.contractHint{
  font-size:11px;
  color:var(--muted);
  margin-bottom:6px;
}

.contractToggle{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}
.contractToggle input{
  accent-color: rgba(120,180,255,.85);
}
.contractCard.clickable{
  cursor:pointer;
  transition:background 120ms ease, border-color 120ms ease;
}
.contractCard.clickable:hover{
  background:rgba(120,180,255,.08);
  border-color:rgba(120,180,255,.25);
}
.pointerLocked,
.pointerLocked *{ cursor:none !important; }
.aimGlow{
  position:absolute;
  left:0;
  top:0;
  width:16px;
  height:16px;
  border-radius:50%;
  background:rgba(140,220,255,0.95);
  box-shadow:0 0 18px rgba(140,220,255,0.8), 0 0 40px rgba(120,180,255,0.55);
  pointer-events:none;
  z-index:45;
  display:none;
}
.pointerLocked .aimGlow{ display:block; }
.wandCasting .aimGlow{ display:block; }

/* Apprentice wand overlay */
.wandOverlay{ position:absolute; inset:0; display:none; align-items:center; justify-content:center; background:transparent; z-index:40; pointer-events:none; }
.wandOverlay.active{ cursor:none; }
.wandCasting, .wandCasting *{ cursor:none !important; }
.wandOverlay.active{ display:flex; }
.wandOverlay.blurby .wandRing::after{
  content:'';
  position:absolute;
  inset:34px;
  border-radius:50%;
  background:rgba(0,0,0,0.45);
  box-shadow:0 0 0 14px rgba(0,0,0,0.6) inset;
  pointer-events:none;
}
.wandOverlay.blurby .wandGlow,
.wandOverlay.blurby .wandTrail{ display:none; }
.wandOverlay.whip .wandGlow,
.wandOverlay.whip .wandTrail,
.wandOverlay.whip .wandKeyMap,
.wandOverlay.whip .wandRing,
.wandOverlay.whip .wandLabels{ display:none; }
.wandOverlay.whip .wandWhipGrid{ display:grid; }
.wandLabels{
  position:absolute;
  width:520px;
  height:520px;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  pointer-events:none;
  z-index:44;
}
.wandLabelPath{ fill:none; stroke:none; }
.wandLabelText{
  fill:rgba(255,255,255,0.9);
  font-size:14px;
  font-weight:800;
  letter-spacing:1px;
  text-transform:uppercase;
  paint-order:stroke;
  stroke:rgba(0,0,0,0.7);
  stroke-width:2px;
}
.wandSeg{
  fill:rgba(120,180,255,0.06);
  stroke:rgba(0,0,0,0.45);
  stroke-width:1px;
  transition:fill 0.08s ease;
}
.wandSeg.active{ fill:rgba(120,180,255,0.22); }
.wandSeg.pulse{
  animation:wandSegPulse 0.18s ease-out 1;
}
@keyframes wandSegPulse{
  0%{ stroke:rgba(180,240,255,0.15); stroke-width:1px; }
  40%{ stroke:rgba(180,240,255,0.85); stroke-width:2.5px; }
  100%{ stroke:rgba(180,240,255,0.2); stroke-width:1px; }
}
.wandRing{ position:relative; width:520px; height:520px; border-radius:50%; border:2px solid rgba(255,255,255,0.12); background:conic-gradient(rgba(120,180,255,0.22) calc(var(--wand-pct, 0) * 1turn), rgba(255,255,255,0.04) 0); box-shadow:0 0 35px rgba(120,180,255,0.10) inset, 0 0 45px rgba(0,0,0,0.45); pointer-events:auto; }
.wandTimer{ position:absolute; inset:20px; border-radius:50%; border:1px solid rgba(255,255,255,0.08); background:rgba(8,10,16,0.55); }
.wandCenter{ position:absolute; inset:150px; border-radius:50%; background:rgba(10,12,18,0.55); border:1px solid rgba(255,255,255,0.08); display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:10px; }
.wandTitle{ font-size:14px; font-weight:900; letter-spacing:0.6px; }
.wandHint{ font-size:12px; color:rgba(255,255,255,0.7); margin-top:6px; }
.wandQueue{ position:absolute; bottom:18px; left:50%; transform:translateX(-50%); background:rgba(8,10,16,0.65); border:1px solid rgba(255,255,255,0.12); padding:6px 10px; border-radius:10px; font-size:12px; color:rgba(255,255,255,0.85); pointer-events:none; }
.wandKeyMap{ position:absolute; bottom:62px; left:50%; transform:translateX(-50%); background:rgba(10,12,18,0.65); border:1px solid rgba(255,255,255,0.10); padding:6px 10px; border-radius:10px; font-size:11px; color:rgba(255,255,255,0.75); pointer-events:none; text-align:center; }
.wandKeyRow{ white-space:nowrap; }
.wandKeyRow.small{ font-size:10px; opacity:0.7; margin-top:2px; }
.wandWhipGrid{
  position:absolute;
  left:50%;
  bottom:88px;
  transform:translateX(-50%);
  display:none;
  grid-template-columns:repeat(4, 1fr);
  grid-auto-rows:74px;
  gap:10px;
  width:360px;
  padding:12px;
  background:rgba(8,10,16,0.65);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:14px;
  z-index:44;
  pointer-events:none;
}
.wandWhipGrid::before{
  content:'';
  position:absolute;
  inset:0;
  border-radius:14px;
  background:rgba(40,90,130,0.25);
  transform-origin:bottom;
  transform:scaleY(calc(1 - var(--wand-pct, 0)));
  transition:transform 0.06s linear;
  z-index:-1;
}
.whipCell{
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(12,14,20,0.55);
  border-radius:10px;
  padding:8px 6px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  text-transform:uppercase;
  letter-spacing:0.6px;
  color:rgba(255,255,255,0.85);
}
.whipKey{
  font-weight:900;
  font-size:14px;
  color:rgba(180,230,255,0.95);
}
.whipName{ font-size:12px; font-weight:800; }
.whipEffect{ font-size:10px; opacity:0.7; text-transform:none; letter-spacing:0.4px; }
.whipCell.pulse{
  animation:whipPulse 0.18s ease-out 1;
}
@keyframes whipPulse{
  0%{ box-shadow:0 0 0 rgba(140,220,255,0); border-color:rgba(255,255,255,0.12); }
  45%{ box-shadow:0 0 18px rgba(140,220,255,0.65); border-color:rgba(140,220,255,0.95); }
  100%{ box-shadow:0 0 0 rgba(140,220,255,0); border-color:rgba(255,255,255,0.12); }
}
.wandSector{ position:absolute; transform:translate(-50%,-50%); width:84px; height:84px; border-radius:16px; border:1px solid rgba(255,255,255,0.10); background:rgba(12,14,20,0.55); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; font-size:11px; text-transform:uppercase; letter-spacing:0.6px; color:rgba(255,255,255,0.85); transition:transform 0.08s ease, border-color 0.08s ease, box-shadow 0.08s ease, background 0.08s ease; }
.wandSector{ display:none; }
.wandSectorIcon{ font-weight:800; font-size:12px; }
.wandSectorName, .wandSectorShape{
  transform: rotate(var(--label-rot, 0deg));
  transform-origin: center center;
  display:block;
}
.wandSectorShape{ font-size:9px; letter-spacing:0.5px; color:rgba(255,255,255,0.55); text-transform:lowercase; }
.wandSector.hover{ border-color:rgba(120,180,255,0.75); box-shadow:0 0 18px rgba(120,180,255,0.45); transform:translate(-50%,-50%) scale(1.06); background:rgba(24,30,44,0.75); }
.wandSector.flash{ box-shadow:0 0 22px rgba(180,240,255,0.70); border-color:rgba(180,240,255,0.90); }
.wandSector.locked{ opacity:0.35; filter:saturate(0.2); }
.wandSector.queued{ border-color:rgba(180,240,255,0.75); }
.wandSector.queued::after{ content:attr(data-step); position:absolute; top:-8px; right:-6px; width:22px; height:22px; border-radius:50%; background:rgba(120,180,255,0.85); color:#0c0f18; font-weight:900; font-size:12px; display:flex; align-items:center; justify-content:center; }
.wandGlow{ position:absolute; left:0; top:0; width:16px; height:16px; border-radius:50%; background:rgba(140,220,255,0.95); box-shadow:0 0 18px rgba(140,220,255,0.8), 0 0 40px rgba(120,180,255,0.55); pointer-events:none; }
.wandTrail{ position:absolute; width:520px; height:520px; left:50%; top:50%; transform:translate(-50%,-50%); pointer-events:none; }
.wandTrail path{ fill:none; stroke:rgba(140,220,255,0.65); stroke-width:16; stroke-linecap:round; stroke-linejoin:round; filter:drop-shadow(0 0 8px rgba(140,220,255,0.55)); }
