:root {
  --bg: #070b16;
  --ink: #eef2f8;
  --muted: #9aa8bd;
  --gold: #d4af37;
  --gold-2: #ffd76a;
  --violet: #7c3aed;
  --hp: #c43b3b;
  --hp-2: #ff6a6a;
  --xp: #8a5cff;
  --line: rgba(212, 175, 55, 0.32);
  --panel: rgba(10, 14, 26, 0.88);
  --panel-2: rgba(16, 22, 40, 0.94);
  --serif: "Cinzel", Georgia, serif;
  --display: "Cinzel Decorative", "Cinzel", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --ui-panel: url("../assets/ui/kenney-rpg/PNG/panel_brown.png");
  --ui-panel-beige: url("../assets/ui/kenney-rpg/PNG/panel_beige.png");
  --ui-inset: url("../assets/ui/kenney-rpg/PNG/panelInset_brown.png");
  --ui-inset-beige: url("../assets/ui/kenney-rpg/PNG/panelInset_beigeLight.png");
  --ui-slot: url("../assets/ui/kenney-rpg/PNG/buttonSquare_brown.png");
  --ui-slot-beige: url("../assets/ui/kenney-rpg/PNG/buttonSquare_beige.png");
  --ui-btn: url("../assets/ui/kenney-rpg/PNG/buttonLong_brown.png");
  --ui-btn-gold: url("../assets/ui/kenney-rpg/PNG/buttonLong_beige.png");
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #050814; color: var(--ink); font-family: var(--sans); }
button, input { font-family: inherit; }
button { cursor: pointer; }
canvas#world { display: block; width: 100vw; height: 100vh; height: 100dvh; outline: none; }

.hidden { display: none !important; }

/* ===== overlays ===== */
.overlay {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
}
#title { z-index: 50; flex-direction: column; align-items: stretch; justify-content: flex-start; }
.title-bg {
  position: absolute; inset: 0;
  background:
    url("../assets/art/world_map_concept.jpg") center/cover no-repeat,
    #070b16;
  filter: saturate(1.1) contrast(1.05);
}
.title-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(124, 58, 237, 0.28), transparent 55%),
    linear-gradient(180deg, rgba(5, 8, 20, 0.55) 0%, rgba(5, 8, 20, 0.72) 40%, rgba(5, 8, 20, 0.92) 100%);
}
.title-top, .title-hero, .title-body { position: relative; z-index: 1; }
.title-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
}
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark { color: var(--gold-2); font-size: 22px; text-shadow: 0 0 18px rgba(255, 215, 106, 0.6); }
.brand strong { display: block; font-family: var(--display); letter-spacing: 0.18em; font-size: 15px; }
.brand em { font-style: normal; color: var(--muted); font-size: 11px; letter-spacing: 0.12em; }
.title-hero { text-align: center; padding: 8px 24px 18px; }
.eyebrow { letter-spacing: 0.28em; color: var(--gold); font-size: 11px; margin: 0 0 8px; }
.title-hero h1 {
  font-family: var(--display); font-size: clamp(48px, 8vw, 92px); margin: 0;
  letter-spacing: 0.14em;
  background: linear-gradient(180deg, #fff6d0, #d4af37 55%, #8a5cff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 8px 28px rgba(124, 58, 237, 0.35));
}
.lede { max-width: 680px; margin: 10px auto 0; color: #d5deea; line-height: 1.5; }
.title-body {
  display: grid; grid-template-columns: 280px 1fr; gap: 22px;
  padding: 0 28px 28px; min-height: 0; flex: 1;
}
.slot-col, .create-col {
  background: linear-gradient(180deg, rgba(12,10,18,.82), rgba(8,10,16,.9));
  border: 14px solid transparent; border-image: var(--ui-panel) 12;
  border-radius: 0; padding: 16px 18px; backdrop-filter: blur(10px);
}
.slot-col h2, .create-col h2, .panel h2 {
  font-family: var(--serif); font-size: 15px; letter-spacing: 0.08em; margin: 0 0 12px; color: var(--gold-2);
}
.slots { display: flex; flex-direction: column; gap: 10px; }
.slot {
  text-align: left; border: 1px solid var(--line); background: rgba(255,255,255,0.03);
  color: var(--ink); border-radius: 12px; padding: 12px; display: flex; gap: 10px; align-items: center;
}
.slot:hover, .slot.active { border-color: var(--gold); background: rgba(212, 175, 55, 0.08); }
.slot canvas { width: 48px; height: 48px; border-radius: 8px; background: #111; }
.slot b { display: block; }
.slot small { color: var(--muted); }
.hint { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 14px; }
.class-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.class-card {
  border: 1px solid var(--line); background: #0c1220; border-radius: 10px; padding: 0; overflow: hidden; color: var(--ink);
}
.class-card img, .class-card canvas.face { width: 100%; height: 132px; object-fit: cover; display: block; }
.class-card span { display: block; padding: 6px 4px 8px; font-size: 12px; font-family: var(--serif); }
.class-card:hover, .class-card.active { border-color: var(--gold-2); box-shadow: 0 0 0 1px var(--gold-2) inset; }
.create-preview { display: grid; grid-template-columns: 220px 1fr; gap: 16px; margin-top: 14px; align-items: center; }
#preview { background: radial-gradient(circle at 50% 70%, #1c2744, #080c16); border-radius: 12px; border: 1px solid var(--line); width: 220px; height: 260px; }
#class-blurb { color: #d5deea; margin: 0 0 10px; min-height: 44px; }
.create-meta label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.create-meta input, #chat-in, #pm-in, .panel input[type="text"], .panel input[type="range"] {
  width: 100%; margin-top: 4px; background: #0b1020; border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: 8px 10px;
}
.look-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.look-row input[type="range"] { flex: 1; accent-color: var(--gold-2); }

.btn, .ghost, .icon-btn {
  border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); color: var(--ink);
  padding: 9px 14px;
}
.btn.gold, .btn.primary {
  background: linear-gradient(180deg, #f0d36a, #b8862a); color: #1a1204; border-color: #ffe08a; font-weight: 700;
}
.btn.gold:hover { filter: brightness(1.08); }
.ghost { background: transparent; }
.icon-btn { padding: 4px 8px; }

/* ===== HUD ===== */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#hud [data-ui], #hud .dock, #hud .player-card, #hud .wallet, #hud .tracker, #hud .chat, #hud .hotbar, #hud .utilbar, #hud .target, #hud .boss { pointer-events: auto; }
.hud-tl { position: absolute; top: 14px; left: 14px; width: 320px; display: flex; flex-direction: column; gap: 8px; }
.hud-tr { position: absolute; top: 14px; right: 14px; width: 280px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.hud-tc { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: min(560px, 46vw); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hud-bl { position: absolute; left: 14px; bottom: 14px; width: 340px; }
.hud-bc { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hud-br { position: absolute; right: 14px; bottom: 58px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.player-card, .wallet, .tracker, .chat, .target, .boss, .party .mate {
  background: linear-gradient(180deg, rgba(10, 12, 22, 0.86), rgba(8, 10, 18, 0.92));
  border: 10px solid transparent;
  border-image: var(--ui-panel) 12;
  border-radius: 0;
  backdrop-filter: blur(8px);
}
.player-card { display: flex; gap: 10px; padding: 8px; }
#portrait {
  width: 64px; height: 64px; border-radius: 0; background: #111;
  border: 6px solid transparent; border-image: var(--ui-inset) 8 fill;
}
.pc-name { display: flex; gap: 6px; align-items: baseline; }
.pc-name em { color: var(--gold-2); font-size: 11px; font-style: normal; }
.pc-sub { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.bar { position: relative; height: 12px; background: #1a1020; border-radius: 99px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); }
.bar i { position: absolute; inset: 0 auto 0 0; width: 100%; transform-origin: left; }
.bar.hp i { background: linear-gradient(90deg, #7a1c1c, var(--hp-2)); }
.bar.res i { background: linear-gradient(90deg, #2a4a9a, #7ec8ff); }
.bar.xp i { background: linear-gradient(90deg, #4a2080, #c89aff); }
.bar span { position: relative; z-index: 1; display: block; text-align: center; font-size: 10px; line-height: 12px; text-shadow: 0 1px 2px #000; }
.bar.slim { height: 10px; }
.bar.slim span { line-height: 10px; }
.player-card .bar { margin-top: 3px; }
.party { display: flex; flex-direction: column; gap: 4px; }
.party .mate { padding: 6px 8px; font-size: 12px; }
.buffs { display: flex; flex-wrap: wrap; gap: 4px; }
.buff { min-width: 28px; height: 28px; border-radius: 6px; background: #1a1428; border: 1px solid var(--line); font-size: 10px; display: grid; place-items: center; color: #fff; padding: 0 4px; }

.region-title { text-align: center; pointer-events: none; animation: fadeup 4s ease forwards; }
.region-title b { display: block; font-family: var(--display); font-size: 28px; letter-spacing: 0.12em; color: #fff6d0; text-shadow: 0 4px 24px #000; }
.region-title span { color: #c8d4e4; font-size: 13px; }
@keyframes fadeup { 0% { opacity: 0; transform: translateY(8px); } 15% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }

.target, .boss { width: 100%; padding: 8px 10px; }
.boss-name { font-family: var(--serif); text-align: center; color: #ffb070; }
.bossbar { height: 16px; }
.bossbar span { line-height: 16px; }
.boss-cast { position: relative; height: 12px; margin-top: 4px; background: #2a1a10; border-radius: 6px; overflow: hidden; }
.boss-cast i { position: absolute; inset: 0 auto 0 0; background: #ff8a3a; }
.boss-cast span { position: relative; display: block; text-align: center; font-size: 10px; }

.wallet { display: flex; gap: 10px; align-items: center; padding: 6px 10px; }
.tracker { width: 100%; padding: 10px 12px; font-size: 13px; }
.tracker h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 13px; color: var(--gold-2); }
.tracker .goal { color: #d5deea; cursor: pointer; }
.tracker .side { margin-top: 8px; color: #9fe0ff; font-size: 12px; cursor: pointer; }
.tracker .goal:hover, .tracker .side:hover { color: #fff; }
.panel .goal, .panel .skill-row[data-go] { cursor: pointer; }

.chat { padding: 8px; }
.chat-log { height: 128px; overflow-y: auto; font-size: 12px; line-height: 1.4; color: #d5deea; }
.chat-log .sys { color: #ffd76a; }
.chat-log .loot { color: #c89aff; }
#chat-in { margin-top: 6px; }

.castbar {
  width: 360px; height: 16px; background: #1a1420; border: 1px solid var(--line); border-radius: 8px;
  position: relative; overflow: hidden;
}
.castbar i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #7c3aed, #ffd76a); }
.castbar span { position: relative; display: block; text-align: center; font-size: 11px; line-height: 16px; }
.xpwrap { width: 520px; max-width: 70vw; position: relative; }
.xpwrap .bar { height: 8px; }
#txt-xp { position: absolute; right: 0; top: -14px; font-size: 10px; color: #c8b0ff; }
.hotbar { display: flex; gap: 6px; }
.slot-key {
  width: 56px; height: 56px; border-radius: 6px; border: 0;
  background: linear-gradient(180deg, rgba(8,10,16,.28), rgba(6,8,12,.4)), var(--ui-slot) center/100% 100% no-repeat;
  position: relative; color: #fff; padding: 0;
}
.slot-key img.sk-ico { width: 34px; height: 34px; margin-top: 10px; object-fit: contain; pointer-events: none; }
.slot-key .cd { position: absolute; inset: 0; background: rgba(0,0,0,0.55); display: grid; place-items: center; font-size: 13px; }
.slot-key .key { position: absolute; top: 2px; left: 4px; font-size: 10px; color: #ffd76a; }
.slot-key .nm { font-size: 10px; padding: 16px 3px 0; line-height: 1.15; }
.slot-key.locked { opacity: 0.4; }
.slot-key.empty { opacity: 0.35; }
.utilbar { display: flex; gap: 6px; }
.util {
  position: relative; min-width: 78px; border: 0; color: #fff; border-radius: 4px; padding: 6px 8px 6px 36px;
  background: linear-gradient(180deg, rgba(8,10,16,.2), rgba(6,8,12,.35)), var(--ui-btn) center/100% 100% no-repeat;
}
.util img { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; }
.util em { display: block; color: var(--gold-2); font-size: 10px; font-style: normal; }
.util i { position: absolute; inset: 0; background: rgba(0,0,0,0.5); pointer-events: none; transform-origin: bottom; }

#minimap { width: 168px; height: 168px; border-radius: 12px; border: 1px solid var(--line); background: #0a0e16; pointer-events: auto; }
.prompt { background: rgba(8,10,18,0.8); border: 1px solid var(--line); padding: 6px 10px; border-radius: 8px; font-size: 12px; }

.dock {
  position: absolute; right: 14px; bottom: 12px; display: flex; gap: 4px; pointer-events: auto;
}
.dock button {
  width: 38px; height: 38px; border-radius: 4px; border: 0; color: #fff6d0; font-family: var(--serif);
  background: linear-gradient(180deg, rgba(8,10,16,.15), rgba(6,8,12,.28)), var(--ui-slot) center/100% 100% no-repeat;
}

/* ===== panels ===== */
#panels { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.panel {
  position: absolute; pointer-events: auto;
  background:
    linear-gradient(180deg, rgba(12, 10, 18, 0.88), rgba(8, 10, 16, 0.92));
  border: 14px solid transparent;
  border-image: var(--ui-panel) 12;
  border-radius: 0;
  min-width: 420px; max-width: 860px; max-height: min(82vh, 820px);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 28px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(40, 28, 12, 0.8);
}
.panel-char { min-width: 640px; }
.panel-inv { min-width: 760px; }
.panel-storage { min-width: 820px; }
.panel-skills, .panel-merchant, .panel-enhance, .panel-auction { min-width: 520px; }
.panel header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px 10px; cursor: move;
  background: linear-gradient(180deg, rgba(80, 52, 18, 0.28), transparent);
  border-bottom: 1px solid rgba(212, 175, 55, 0.22);
}
.panel header h2 { margin: 0; text-shadow: 0 1px 0 #2a1a08; }
.panel .body { padding: 12px 14px; overflow: auto; }
.panel label { display: block; margin: 8px 0; font-size: 13px; color: var(--muted); }
.panel .x {
  width: 28px; height: 28px; padding: 0; border: 0;
  background: var(--ui-slot) center/100% 100% no-repeat;
  display: grid; place-items: center;
}
.panel .x img { width: 12px; height: 12px; }

.grid-inv { display: grid; grid-template-columns: repeat(6, 52px); gap: 5px; }
.cell, .eq-slot {
  width: 52px; height: 52px; border: 0; border-radius: 4px;
  background: linear-gradient(180deg, rgba(10,10,16,.38), rgba(6,6,10,.5)), var(--ui-slot) center/100% 100% no-repeat;
  display: grid; place-items: center; font-size: 10px; text-align: center; padding: 4px; color: #fff; position: relative;
}
.cell img, .eq-slot img { width: 34px; height: 34px; object-fit: contain; pointer-events: none; image-rendering: pixelated; }
.cell .qty, .eq-slot em {
  position: absolute; bottom: 3px; right: 5px; font-size: 10px; font-style: normal;
  color: #fff6d0; text-shadow: 0 1px 2px #000; font-weight: 700;
}
.eq-slot { width: 56px; height: 62px; padding-bottom: 14px; }
.eq-slot small {
  position: absolute; left: 0; right: 0; bottom: 2px;
  font-size: 8px; letter-spacing: 0.04em; color: #d8c8a0; text-transform: uppercase;
}
.eq-slot.empty img { opacity: 0.32; filter: grayscale(0.4); }
.cell.empty { opacity: 0.88; }
.r-Uncommon { box-shadow: 0 0 0 1px #5fd35f, 0 0 10px rgba(95,211,95,.28); }
.r-Rare { box-shadow: 0 0 0 1px #4aa3ff, 0 0 10px rgba(74,163,255,.3); }
.r-Epic { box-shadow: 0 0 0 1px #b36bff, 0 0 12px rgba(179,107,255,.32); }
.r-Legendary { box-shadow: 0 0 0 1px #ff9a2e, 0 0 12px rgba(255,154,46,.35); }
.r-Mythic { box-shadow: 0 0 0 1px #ff4f6d, 0 0 14px rgba(255,79,109,.4); }

.sheet { display: grid; grid-template-columns: 230px 1fr; gap: 16px; align-items: start; }
.inv-layout { display: grid; grid-template-columns: 230px 1fr; gap: 16px; }
.doll { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.doll-row { display: grid; grid-template-columns: 56px 132px 56px; gap: 8px; align-items: center; justify-content: center; }
.eq-gap { width: 56px; height: 1px; }
.doll-hero {
  width: 132px; height: 168px; position: relative; overflow: hidden;
  border: 10px solid transparent; border-image: var(--ui-inset) 10 fill;
  box-shadow: inset 0 0 24px rgba(0,0,0,.45);
}
.doll-hero img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.08) contrast(1.04); }
.doll-hero .doll-tag {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 6px 6px;
  background: linear-gradient(180deg, transparent, rgba(8,6,10,.92));
  font-size: 11px; text-align: center; color: #fff6d0; font-family: var(--serif);
}
.sheet-meta p { margin: 0 0 8px; }
.inv-wallet, .vault-cap {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-top: 10px; padding: 6px 8px;
  background: linear-gradient(180deg, rgba(8,10,16,.25), rgba(6,8,12,.4)), var(--ui-inset-beige) center/100% 100% no-repeat;
  color: #fff6d0; font-size: 12px;
}
.inv-wallet b, .vault-cap b { color: var(--gold-2); }
.vault-col.bag h3, .vault-col.bag .vault-cap { color: #3a2a14; }
.vault { display: grid; grid-template-columns: 1fr 28px 1fr; gap: 10px; align-items: start; }
.vault-col {
  padding: 10px 10px 12px;
  border: 10px solid transparent;
  min-height: 220px;
}
.vault-col.bag { border-image: var(--ui-panel-beige) 12 fill; }
.vault-col.chest { border-image: var(--ui-panel) 12 fill; }
.vault-col h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 13px; color: #3a2a14; text-align: center; }
.vault-col.chest h3 { color: #fff6d0; }
.vault-col.chest .grid-inv .cell {
  background: linear-gradient(180deg, rgba(10,10,16,.2), rgba(6,6,10,.35)), var(--ui-slot-beige) center/100% 100% no-repeat;
}
.vault-xfer { align-self: center; width: 22px; opacity: 0.9; filter: drop-shadow(0 2px 4px #000); }
.two { display: grid; grid-template-columns: 240px 1fr; gap: 12px; }
.stats-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 13px; }
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(180deg, rgba(8,10,16,.35), rgba(6,8,12,.5)), var(--ui-inset) center/100% 100% no-repeat;
  padding: 7px 10px; color: #e8e0d0;
}
.stat-row button {
  margin-left: 6px; width: 22px; height: 22px; border: 0; color: #2a1a08; font-weight: 700;
  background: var(--ui-slot-beige) center/100% 100% no-repeat;
}
.skill-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.05); padding: 8px 0; }
.skill-row .sk-ico { width: 40px; height: 40px; flex: none; background: var(--ui-slot) center/100% 100% no-repeat; padding: 4px; }
.map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.map-card { text-align: left; border: 1px solid var(--line); background: #101624; color: #fff; border-radius: 10px; padding: 10px; }
.map-card.lock { opacity: 0.45; }
.map-card b { display: block; font-family: var(--serif); }
.shop-row, .auc-row, .rec-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.it-chip { display: flex; gap: 8px; align-items: center; min-width: 0; }
.it-chip img {
  width: 36px; height: 36px; flex: none;
  background: var(--ui-slot) center/100% 100% no-repeat; padding: 3px;
}
.it-chip b { display: block; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs button {
  border: 0; color: #3a2a14; border-radius: 3px; padding: 6px 12px; font-weight: 700;
  background: var(--ui-btn) center/100% 100% no-repeat;
}
.tabs button.on { color: #1a1204; background: var(--ui-btn-gold) center/100% 100% no-repeat; filter: brightness(1.08); }

.dlg {
  width: min(560px, 92vw);
  background: linear-gradient(180deg, rgba(12,10,18,.88), rgba(8,10,16,.92));
  border: 14px solid transparent; border-image: var(--ui-panel) 12;
  border-radius: 0; padding: 16px 18px;
}
.dlg.slim { width: min(380px, 92vw); }
.dlg header { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.dlg header em { display: block; color: var(--muted); font-size: 12px; font-style: normal; }
.dlg canvas { border-radius: 0; background: #111; border: 6px solid transparent; border-image: var(--ui-inset) 8 fill; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.death-card, .load-card {
  text-align: center;
  background: linear-gradient(180deg, rgba(12,10,18,.9), rgba(8,10,16,.94));
  border: 14px solid transparent; border-image: var(--ui-panel) 12;
  border-radius: 0; padding: 28px 32px;
}
.death-card h2 { font-family: var(--display); color: #ff8080; margin: 0 0 8px; }
.spin { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--gold-2); border-radius: 50%; margin: 0 auto 12px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.announce {
  position: fixed; top: 22%; left: 50%; transform: translateX(-50%); z-index: 30;
  font-family: var(--display); font-size: 36px; letter-spacing: 0.1em; text-shadow: 0 6px 28px #000; pointer-events: none;
}
#toasts { position: fixed; right: 18px; top: 36%; z-index: 30; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { background: rgba(10,14,24,0.88); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font-size: 13px; }
#loots { position: fixed; left: 18px; top: 38%; z-index: 30; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.loot { font-size: 13px; text-shadow: 0 2px 8px #000; display: flex; align-items: center; gap: 6px; }
.loot img { width: 22px; height: 22px; }
.tip {
  position: fixed; z-index: 60; max-width: 300px; pointer-events: none;
  background: linear-gradient(180deg, rgba(12,10,18,.96), rgba(8,10,16,.96));
  border: 10px solid transparent; border-image: var(--ui-panel) 12;
  border-radius: 0; padding: 8px 10px; font-size: 12px;
}
.tip .tip-top { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.tip .tip-top img { width: 40px; height: 40px; background: var(--ui-slot) center/100% 100% no-repeat; padding: 3px; }

@media (max-width: 980px) {
  .title-body { grid-template-columns: 1fr; }
  .class-grid { grid-template-columns: repeat(3, 1fr); }
  .create-preview { grid-template-columns: 1fr; }
  .hud-bl { width: 240px; }
  .xpwrap { width: 90vw; }
  .slot-key { width: 44px; height: 44px; }
}
