/* =========================================================================
   Lingote MMORPG — Theme Stylesheet (Inspired by Beholder / OTClient)
   Steel Night Acrylic Palette, Beveled Frames, & Canonical Tibia Layout
   ========================================================================= */

:root {
  --ui-zone: 31 42 56;
  --ui-panel: 26 40 58;
  --ui-inset: 20 32 48;
  --ui-raise: 33 51 73;
  --ui-deep: 18 26 37;
  --ui-line: 45 69 96;
  --ui-line-strong: 74 115 160;
  --ui-slot: 15 23 34;
  --ui-slot-line: 91 134 181;
  --ui-slot-empty: 21 33 49;
  --ui-slot-empty-line: 63 102 144;

  --gold: #d4a34b;
  --gold-hover: #f0c27a;
  --gold-glow: rgba(212, 163, 75, 0.4);
  --hp-red: #ef4444;
  --hp-dark: #7f1d1d;
  --mp-blue: #3b82f6;
  --mp-dark: #1e3a8a;
  --green: #22c55e;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --tp-weave:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 6px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  position: fixed;
  inset: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background-color: rgb(var(--ui-deep));
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea {
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  user-select: text;
}

/* Disable double-tap-to-zoom on every control (iOS honours 'manipulation') */
button, a, input, textarea, select, [onclick],
.albion-item-btn, .albion-skill-btn, .albion-rail-btn, .albion-map-zoom-btn,
#albion-hud-overlay, #albion-action-wheel, #albion-joystick-wrap {
  touch-action: manipulation;
}
#albion-joystick-wrap, #three-canvas-mount, #three-canvas-mount canvas {
  touch-action: none;
}

/* =========================================================================
   TOP MENU BAR
   ========================================================================= */
#top-menu-bar {
  height: 36px;
  background: var(--tp-weave), rgb(var(--ui-zone));
  border-bottom: 1px solid rgb(var(--ui-line-strong));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  z-index: 50;
  flex-shrink: 0;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-gem {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #d4a34b, #b0142c 50%, #2440c0);
  border-radius: 4px;
  box-shadow: 0 0 8px var(--gold-glow);
}
.brand-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-family: monospace;
  font-weight: 600;
  color: #4ade80;
}

.top-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
}
.top-btn {
  background: rgb(var(--ui-raise));
  border: 1px solid rgb(var(--ui-line));
  color: var(--text);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.top-btn:hover {
  background: rgb(var(--ui-raise));
  border-color: var(--gold);
  color: var(--gold);
}
.top-btn.active {
  background: rgba(212, 163, 75, 0.2);
  border-color: var(--gold);
  color: #fff;
}

/* =========================================================================
   DESKTOP SCREEN LAYOUT
   ========================================================================= */
#app-container {
  display: flex;
  height: calc(100vh - 36px);
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* VIEWPORT & CHAT COLUMN */
#main-game-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #000;
  overflow: hidden;
}

#viewport-container {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  background: #090c10;
}
#three-canvas-mount {
  width: 100%;
  height: 100%;
  display: block;
}

/* FLOATING OVERLAYS IN VIEWPORT */
.viewport-hud-row {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
  z-index: 10;
  pointer-events: none;
}
.bp-item-count {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #facc15;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
  z-index: 2;
}
@keyframes lootPulse {
  0% { box-shadow: inset 0 0 0 2px #4ade80, 0 0 14px #22c55e; border-color: #4ade80; }
  50% { box-shadow: inset 0 0 0 3px #86efac, 0 0 20px #4ade80; border-color: #86efac; }
  100% { box-shadow: none; border-color: transparent; }
}
.bp-cell.just-looted {
  animation: lootPulse 2.5s ease-out;
}
.hud-chip {
  pointer-events: auto;
  background: var(--tp-weave), rgba(16, 21, 28, 0.9);
  border: 1px solid rgb(var(--ui-line));
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-family: monospace;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

#floating-combat-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 45;
}

/* Base Albion Combat Number */
.albion-combat-num {
  position: absolute;
  font-family: 'Cinzel', 'Impact', 'Trebuchet MS', 'Segoe UI Black', -apple-system, sans-serif;
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  text-align: center;
  will-change: transform, opacity;
}

/* 1. ROJO / BLANCO: DAÑO FÍSICO */
.albion-num-physical {
  font-size: 1.35rem;
  color: #ffffff;
  background: linear-gradient(180deg, #ffffff 0%, #fee2e2 40%, #ef4444 80%, #991b1b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #450a0a) 
          drop-shadow(0 -1.5px 0 #450a0a) 
          drop-shadow(1.5px 0 0 #450a0a) 
          drop-shadow(-1.5px 0 0 #450a0a) 
          drop-shadow(0 0 6px rgba(239, 68, 68, 0.75))
          drop-shadow(0 4px 6px rgba(0, 0, 0, 0.95));
  animation: albionFloatArc 1.25s forwards cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* 2. NARANJA BRILLANTE: CRÍTICO (¡450!) O DAÑO DE FUEGO */
.albion-num-crit {
  font-size: 1.85rem;
  color: #fef08a;
  background: linear-gradient(180deg, #ffffff 0%, #fef08a 25%, #facc15 50%, #f97316 78%, #c2410c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
  filter: drop-shadow(0 2.5px 0 #7c2d12) 
          drop-shadow(0 -2px 0 #7c2d12) 
          drop-shadow(2px 0 0 #7c2d12) 
          drop-shadow(-2px 0 0 #7c2d12) 
          drop-shadow(0 0 14px rgba(249, 115, 22, 1))
          drop-shadow(0 0 24px rgba(234, 88, 12, 0.7))
          drop-shadow(0 6px 10px rgba(0, 0, 0, 0.95));
  animation: albionCritPop 1.45s forwards cubic-bezier(0.16, 1.08, 0.38, 1.2);
}

.albion-num-fire {
  font-size: 1.45rem;
  color: #fed7aa;
  background: linear-gradient(180deg, #fff7ed 0%, #fed7aa 30%, #fb923c 65%, #c2410c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #7c2d12) 
          drop-shadow(0 -1.5px 0 #7c2d12) 
          drop-shadow(1.5px 0 0 #7c2d12) 
          drop-shadow(-1.5px 0 0 #7c2d12) 
          drop-shadow(0 0 8px rgba(249, 115, 22, 0.85))
          drop-shadow(0 4px 6px rgba(0, 0, 0, 0.9));
  animation: albionFloatArc 1.25s forwards cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* 3. VERDE: CURACIONES (+100) */
.albion-num-heal {
  font-size: 1.45rem;
  color: #bbf7d0;
  background: linear-gradient(180deg, #ffffff 0%, #bbf7d0 30%, #4ade80 65%, #15803d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #052e16) 
          drop-shadow(0 -1.5px 0 #052e16) 
          drop-shadow(1.5px 0 0 #052e16) 
          drop-shadow(-1.5px 0 0 #052e16) 
          drop-shadow(0 0 10px rgba(74, 222, 128, 0.9))
          drop-shadow(0 4px 6px rgba(0, 0, 0, 0.9));
  animation: albionHealRise 1.35s forwards cubic-bezier(0.22, 1, 0.36, 1);
}

/* 4. AZUL / CIAN: DAÑO MÁGICO / ENERGÍA */
.albion-num-magic {
  font-size: 1.4rem;
  color: #bae6fd;
  background: linear-gradient(180deg, #ffffff 0%, #bae6fd 35%, #38bdf8 70%, #0369a1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #082f49) 
          drop-shadow(0 -1.5px 0 #082f49) 
          drop-shadow(1.5px 0 0 #082f49) 
          drop-shadow(-1.5px 0 0 #082f49) 
          drop-shadow(0 0 10px rgba(56, 189, 248, 0.85))
          drop-shadow(0 4px 6px rgba(0, 0, 0, 0.9));
  animation: albionFloatArc 1.25s forwards cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* 5. PLATEADO / GRIS: BLOQUEO DE ESCUDO */
.albion-num-block {
  font-size: 1.15rem;
  color: #f1f5f9;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 45%, #94a3b8 80%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.8px;
  filter: drop-shadow(0 1.5px 0 #0f172a) 
          drop-shadow(0 -1px 0 #0f172a) 
          drop-shadow(1.5px 0 0 #0f172a) 
          drop-shadow(-1.5px 0 0 #0f172a) 
          drop-shadow(0 0 6px rgba(148, 163, 184, 0.6))
          drop-shadow(0 3px 6px rgba(0, 0, 0, 0.85));
  animation: albionFloatArc 1.15s forwards ease-out;
}

/* 5b. ÁMBAR / RELOJ DE ARENA: EXHAUSTED (EN RECARGA DE ATAQUE) */
.albion-num-exhausted {
  font-size: 1.08rem;
  color: #fde68a;
  background: linear-gradient(180deg, #fef3c7 0%, #fbbf24 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.9px;
  filter: drop-shadow(0 1.5px 0 #451a03) 
          drop-shadow(0 -1px 0 #451a03) 
          drop-shadow(1.5px 0 0 #451a03) 
          drop-shadow(-1.5px 0 0 #451a03) 
          drop-shadow(0 0 8px rgba(245, 158, 11, 0.7))
          drop-shadow(0 3px 6px rgba(0, 0, 0, 0.9));
  animation: albionFloatArc 1.05s forwards ease-out;
}

/* 6. MENSAJES DE ESTADO COMPACTOS (Comiendo, Sin Objetivo) */
.albion-status-msg {
  font-size: 0.85rem;
  font-weight: 800;
  text-shadow: 0 1px 3px #000, 0 0 4px #000;
  animation: albionStatusRise 1.2s forwards ease-out;
}

/* Legacy compatibility fallback */
.floating-num {
  position: absolute;
  font-family: 'Cinzel', 'Impact', 'Trebuchet MS', -apple-system, sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  filter: drop-shadow(0 2px 4px #000);
  animation: albionFloatArc 1.2s forwards ease-out;
}

.floating-speech-bubble {
  position: absolute;
  background: rgba(14, 18, 25, 0.95);
  color: #fff;
  border: 1px solid var(--gold);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.7);
  animation: floatSpeech 3.5s forwards ease-out;
}

/* Static Overhead Creature Voice (NPCs & Monsters - No Animation Effect) */
.overhead-voice-text {
  position: absolute;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  margin: 0;
  transform: translate(-50%, -100%);
  z-index: 50;
  animation: voiceFadeOut 2.8s forwards;
}
.overhead-voice-text.voice-monster {
  color: #fb923c;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 2px 4px rgba(0,0,0,0.85);
}
.overhead-voice-text.voice-npc {
  color: #fef08a;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 2px 4px rgba(0,0,0,0.85);
}
@keyframes voiceFadeOut {
  0% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; }
}

/* --- KEYFRAMES --- */
@keyframes albionFloatArc {
  0% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px) * 0.2), calc(var(--dy, 0px) + 8px)) scale(0.6);
  }
  14% {
    opacity: 1;
    transform: translate(calc(-50% + var(--dx, 0px) * 0.6), calc(var(--dy, 0px) - 20px)) scale(1.24);
  }
  28% {
    opacity: 1;
    transform: translate(calc(-50% + var(--dx, 0px) * 0.9), calc(var(--dy, 0px) - 34px)) scale(1.0);
  }
  75% {
    opacity: 1;
    transform: translate(calc(-50% + var(--dx, 0px) * 1.3), calc(var(--dy, 0px) - 52px)) scale(0.96);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px) * 1.6), calc(var(--dy, 0px) - 72px)) scale(0.82);
  }
}

@keyframes albionCritPop {
  0% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px) * 0.1), calc(var(--dy, 0px) + 10px)) scale(0.4);
  }
  12% {
    opacity: 1;
    transform: translate(calc(-50% + var(--dx, 0px) * 0.5), calc(var(--dy, 0px) - 28px)) scale(1.6);
  }
  22% {
    opacity: 1;
    transform: translate(calc(-50% + var(--dx, 0px) * 0.8), calc(var(--dy, 0px) - 24px)) scale(1.3);
  }
  70% {
    opacity: 1;
    transform: translate(calc(-50% + var(--dx, 0px) * 1.2), calc(var(--dy, 0px) - 60px)) scale(1.15);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px) * 1.5), calc(var(--dy, 0px) - 86px)) scale(0.9);
  }
}

@keyframes albionHealRise {
  0% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px) * 0.2), calc(var(--dy, 0px) + 6px)) scale(0.7);
  }
  18% {
    opacity: 1;
    transform: translate(calc(-50% + var(--dx, 0px) * 0.6), calc(var(--dy, 0px) - 18px)) scale(1.22);
  }
  75% {
    opacity: 1;
    transform: translate(calc(-50% + var(--dx, 0px) * 1.0), calc(var(--dy, 0px) - 46px)) scale(1.0);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px) * 1.3), calc(var(--dy, 0px) - 68px)) scale(0.88);
  }
}

@keyframes albionStatusRise {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.85); }
  15% { opacity: 1; transform: translate(-50%, -10px) scale(1.05); }
  75% { opacity: 1; transform: translate(-50%, -24px) scale(1.0); }
  100% { opacity: 0; transform: translate(-50%, -40px) scale(0.9); }
}

@keyframes floatSpeech {
  0% { opacity: 1; transform: translate(-50%, 0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* =========================================================================
   BOTTOM CHAT & BEHOLDER 24-SLOT HOTKEY ACTION BAR
   ========================================================================= */
#bottom-dock {
  height: 178px;
  background: var(--tp-weave), rgb(var(--ui-panel));
  border-top: 2px solid rgb(var(--ui-line-strong));
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

#action-bar {
  min-height: 44px;
  background: #12151b;
  border-bottom: 1px solid rgb(var(--ui-line));
  display: flex;
  align-items: center;
  padding: 3px 6px;
  gap: 3px;
  overflow-x: auto;
  overflow-y: hidden;
  user-select: none;
  scrollbar-width: thin;
}

.spell-bar-slots {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.spell-btn {
  position: relative;
  flex: 1 0 34px;
  max-width: 40px;
  height: 38px;
  padding: 0;
  border-radius: 0;
  border: 3px solid transparent;
  border-image: url('/lingote/images/inventory/containerslot.png') 3 fill / 3px stretch;
  background: #181818;
  color: #dfdfdf;
  font-family: Verdana, system-ui, sans-serif;
  font-size: 0.68rem;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.1s ease;
}
.spell-btn:hover {
  filter: brightness(1.18);
}
.spell-btn:active {
  filter: brightness(0.9);
}
.spell-btn.empty-slot {
  color: #6b7280;
}
.spell-btn img.spell-face {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  pointer-events: none;
}
.bp-item-count {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #facc15;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
  z-index: 2;
}
@keyframes lootPulse {
  0% { box-shadow: inset 0 0 0 2px #4ade80, 0 0 14px #22c55e; border-color: #4ade80; }
  50% { box-shadow: inset 0 0 0 3px #86efac, 0 0 20px #4ade80; border-color: #86efac; }
  100% { box-shadow: none; border-color: transparent; }
}
.bp-cell.just-looted {
  animation: lootPulse 2.5s ease-out;
}
.spell-btn img.item-face {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}
.bp-item-count {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #facc15;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
  z-index: 2;
}
@keyframes lootPulse {
  0% { box-shadow: inset 0 0 0 2px #4ade80, 0 0 14px #22c55e; border-color: #4ade80; }
  50% { box-shadow: inset 0 0 0 3px #86efac, 0 0 20px #4ade80; border-color: #86efac; }
  100% { box-shadow: none; border-color: transparent; }
}
.bp-cell.just-looted {
  animation: lootPulse 2.5s ease-out;
}
.spell-btn .text-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 2px;
  line-height: 1;
  pointer-events: none;
  max-width: 100%;
}
.spell-btn .text-face .text-bubble {
  font-size: 0.85rem;
}
.spell-btn .text-face .text-label {
  max-width: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.55rem;
  color: #e2e8f0;
}
.spell-btn .spell-key {
  position: absolute;
  top: 1px;
  right: 1px;
  z-index: 2;
  min-width: 13px;
  padding: 0 2px;
  background: rgba(0, 0, 0, 0.85);
  color: #dfdfdf;
  font-family: Verdana, sans-serif;
  font-size: 0.58rem;
  line-height: 1.15;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}
.bp-item-count {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #facc15;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
  z-index: 2;
}
@keyframes lootPulse {
  0% { box-shadow: inset 0 0 0 2px #4ade80, 0 0 14px #22c55e; border-color: #4ade80; }
  50% { box-shadow: inset 0 0 0 3px #86efac, 0 0 20px #4ade80; border-color: #86efac; }
  100% { box-shadow: none; border-color: transparent; }
}
.bp-cell.just-looted {
  animation: lootPulse 2.5s ease-out;
}
.spell-btn.empty-slot .spell-key {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  color: #8b95a5;
  font-weight: 600;
  font-size: 0.62rem;
  opacity: 0.72;
}
.spell-btn.empty-slot .spell-key.unbound {
  opacity: 0.35;
}
.spell-btn .item-count {
  position: absolute;
  right: 2px;
  bottom: 2px;
  z-index: 2;
  color: #ffffff;
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000;
  pointer-events: none;
}
.bp-item-count {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #facc15;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
  z-index: 2;
}
@keyframes lootPulse {
  0% { box-shadow: inset 0 0 0 2px #4ade80, 0 0 14px #22c55e; border-color: #4ade80; }
  50% { box-shadow: inset 0 0 0 3px #86efac, 0 0 20px #4ade80; border-color: #86efac; }
  100% { box-shadow: none; border-color: transparent; }
}
.bp-cell.just-looted {
  animation: lootPulse 2.5s ease-out;
}
.spell-btn .item-count.worn {
  color: #4ade80;
}
.spell-btn .cd {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 24, 0.76);
  transform-origin: bottom;
  transform: scaleY(0);
  pointer-events: none;
  z-index: 3;
}
.spell-btn .ab-cds {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd15c;
  font-size: 0.72rem;
  font-weight: 800;
  text-shadow: 0 0 3px #000, 1px 1px 0 #000;
  pointer-events: none;
}
.bp-item-count {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #facc15;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
  z-index: 2;
}
@keyframes lootPulse {
  0% { box-shadow: inset 0 0 0 2px #4ade80, 0 0 14px #22c55e; border-color: #4ade80; }
  50% { box-shadow: inset 0 0 0 3px #86efac, 0 0 20px #4ade80; border-color: #86efac; }
  100% { box-shadow: none; border-color: transparent; }
}
.bp-cell.just-looted {
  animation: lootPulse 2.5s ease-out;
}
.spell-btn .ab-cds:empty {
  display: none;
}
/* Category colour strip at bottom of slot (Beholder Proposal C) */
.spell-btn[data-kind]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  z-index: 3;
  background: var(--hk-kind, transparent);
  pointer-events: none;
}
.bp-item-count {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #facc15;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
  z-index: 2;
}
@keyframes lootPulse {
  0% { box-shadow: inset 0 0 0 2px #4ade80, 0 0 14px #22c55e; border-color: #4ade80; }
  50% { box-shadow: inset 0 0 0 3px #86efac, 0 0 20px #4ade80; border-color: #86efac; }
  100% { box-shadow: none; border-color: transparent; }
}
.bp-cell.just-looted {
  animation: lootPulse 2.5s ease-out;
}
.spell-btn[data-kind="healing"], .hotbar-tip [data-kind="healing"] { --hk-kind: #4ade80; }
.spell-btn[data-kind="attack"], .hotbar-tip [data-kind="attack"] { --hk-kind: #f87171; }
.spell-btn[data-kind="support"], .hotbar-tip [data-kind="support"] { --hk-kind: #38bdf8; }
.spell-btn[data-kind="item"], .hotbar-tip [data-kind="item"] { --hk-kind: #facc15; }
.spell-btn[data-kind="equip"], .hotbar-tip [data-kind="equip"] { --hk-kind: #c084fc; }
.spell-btn[data-kind="text"], .hotbar-tip [data-kind="text"] { --hk-kind: #cbd5e1; }

.spell-btn.hk-dragging { opacity: 0.35; }
.spell-btn.swap-target, .spell-btn.drop-target {
  outline: 2px dashed #facc15;
  outline-offset: -2px;
}
@keyframes hk-flash {
  0% { box-shadow: 0 0 0 2px #facc15 inset; }
  100% { box-shadow: 0 0 0 0 transparent inset; }
}
.spell-btn.hk-flash {
  animation: hk-flash 0.6s ease-out;
}

/* Action Bar Lock & Config Control Cell */
.ab-ctl {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 26px;
  height: 38px;
  flex-shrink: 0;
}
.ab-ctl button {
  flex: 1;
  border: 1px solid #333a48;
  background: #1b2028;
  color: #cbd5e1;
  font-size: 0.65rem;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}
.ab-ctl button:hover {
  background: #2a313d;
  color: #fff;
  border-color: #d4a34b;
}
.ab-ctl button.locked {
  color: #facc15;
}

/* Beholder Hotbar Slot Menu (.hk-menu) */
.hk-menu {
  position: fixed;
  z-index: 2600;
  width: 245px;
  padding: 5px;
  border-radius: 6px;
  background: #1a1e26;
  color: #d8dee9;
  border: 1px solid #4a5262;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.85);
  font: 12px/1.3 system-ui, -apple-system, sans-serif;
  user-select: none;
}
.hk-menu .hk-hd {
  padding: 3px 6px 5px;
  color: #f4d35e;
  font-size: 11px;
  font-weight: 700;
  border-bottom: 1px solid #2e3440;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}
.hk-menu input {
  box-sizing: border-box;
  width: 100%;
  margin: 2px 0 5px;
  padding: 5px 7px;
  border-radius: 4px;
  background: #11141a;
  color: #fff;
  border: 1px solid #3b4252;
  font: 12px system-ui, sans-serif;
}
.hk-menu input:focus {
  outline: none;
  border-color: #d4a34b;
}
.hk-menu .hk-list {
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.hk-menu .hk-grp {
  padding: 5px 6px 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hk-menu .hk-grp[data-kind="healing"] { color: #4ade80; }
.hk-menu .hk-grp[data-kind="attack"] { color: #f87171; }
.hk-menu .hk-grp[data-kind="support"] { color: #38bdf8; }
.hk-menu .hk-grp[data-kind="item"] { color: #facc15; }
.hk-menu .hk-grp[data-kind="equip"] { color: #c084fc; }
.hk-menu .hk-it {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 4px 6px;
  border: 0;
  border-radius: 3px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hk-menu .hk-it:hover {
  background: #2b3240;
  color: #fff;
}
.hk-menu .hk-it .hk-ic {
  width: 18px;
  height: 18px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.hk-menu .hk-it .hk-ic img {
  width: 18px;
  height: 18px;
  image-rendering: pixelated;
}
.hk-menu .hk-it .hk-nm {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hk-menu .hk-it small {
  color: #8b95a5;
  flex: none;
  font-size: 10.5px;
}
.hk-menu .hk-acts {
  border-top: 1px solid #2e3440;
  margin-top: 4px;
  padding-top: 4px;
}
.hk-menu .hk-it.danger {
  color: #f87171;
}

/* Beholder Hover Tooltip Card (.hotbar-tip) */
.hotbar-tip {
  position: fixed;
  z-index: 2650;
  pointer-events: none;
  min-width: 175px;
  max-width: 245px;
  padding: 7px 9px;
  background: #181c24;
  color: #d8dee9;
  border: 1px solid #4a5262;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
  font: 11.5px/1.45 system-ui, sans-serif;
}
.hotbar-tip[hidden] { display: none; }
.hotbar-tip .hk-t {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  font-weight: 700;
}
.hotbar-tip .hk-ty {
  color: var(--hk-kind, #94a3b8);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hotbar-tip .hk-w {
  color: #f4d35e;
  font-style: italic;
}
.hotbar-tip .hk-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #94a3b8;
}
.hotbar-tip .hk-row b {
  color: #e2e8f0;
  font-weight: 600;
}
.hotbar-tip .hk-h {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #2e3440;
  color: #8b95a5;
  font-size: 10px;
}
.hk-drag-ghost {
  position: fixed;
  z-index: 2700;
  width: 34px;
  height: 34px;
  pointer-events: none;
  opacity: 0.88;
  overflow: hidden;
  border: 1px solid #facc15;
  border-radius: 4px;
  background: rgba(24, 28, 36, 0.92);
  display: grid;
  place-items: center;
  color: #fff;
  font: 600 9px/1 system-ui, sans-serif;
}
.hk-drag-ghost img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

#chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgb(var(--ui-panel));
  min-height: 0;
}
#chat-tab-bar {
  display: flex;
  background: rgb(var(--ui-zone));
  border-bottom: 1px solid rgb(var(--ui-line));
}
.chat-tab-btn {
  padding: 3px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-right: 1px solid rgb(var(--ui-line));
  background: rgb(var(--ui-zone));
  border-top: none;
  border-left: none;
  border-bottom: none;
}
.chat-tab-btn.active {
  color: var(--gold);
  background: rgb(var(--ui-panel));
  border-bottom: 2px solid var(--gold);
}
#chat-feed {
  flex: 1;
  padding: 4px 10px;
  overflow-y: auto;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgb(var(--ui-inset));
}
.chat-msg {
  display: flex;
  gap: 6px;
  line-height: 1.3;
}
.chat-time {
  color: var(--text-dim);
  font-size: 0.68rem;
  font-family: monospace;
}
.chat-sender {
  color: var(--gold);
  font-weight: 700;
}
.chat-text {
  color: var(--text);
}
.chat-msg.system .chat-text {
  color: #38bdf8;
  font-style: italic;
}
.chat-msg.combat .chat-text {
  color: #f87171;
}

#chat-input-row {
  height: 28px;
  background: rgb(var(--ui-panel));
  border-top: 1px solid rgb(var(--ui-line));
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 4px;
}
#chat-text-input {
  flex: 1;
  background: rgb(var(--ui-slot));
  border: 1px solid rgb(var(--ui-slot-empty-line));
  border-radius: 3px;
  color: #fff;
  padding: 3px 8px;
  font-size: 0.75rem;
  outline: none;
}
#chat-text-input:focus {
  border-color: var(--gold);
}
.chat-submit-btn {
  background: var(--gold);
  color: #0e1117;
  border: none;
  border-radius: 3px;
  padding: 3px 10px;
  font-weight: 700;
  font-size: 0.72rem;
  cursor: pointer;
}

/* =========================================================================
   RIGHT SIDEBAR (BEHOLDER WEB CLIENT CONSOLE + WINDOWS)
   ========================================================================= */
#sidebar-right {
  width: 198px;
  background: #18181b;
  border-left: 2px solid #0e0e10;
  box-shadow: inset 1px 0 0 #3f3f46;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  scrollbar-width: thin;
}

/* Unified Top Beholder Console (.sidebar-console) */
.sidebar-console {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px;
  background: #232326;
  border-top: 1px solid #444;
  border-left: 1px solid #444;
  border-right: 1px solid #111;
  border-bottom: 1px solid #111;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
  box-sizing: border-box;
  width: 100%;
  flex-shrink: 0;
}

/* BEHOLDER CLIENT MINIMAP (FULL-WIDTH RECTANGULAR AUTOMAP) */
#minimap-mount {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
}
.sc-minimap-row {
  display: flex;
  gap: 2px;
  width: 100%;
  box-sizing: border-box;
}
.sc-map-frame {
  flex: 1;
  min-width: 0;
  height: 110px;
  background: #000;
  border: 1px solid #000;
  border-right: 1px solid #555;
  border-bottom: 1px solid #555;
  box-shadow: inset 1px 1px 2px #000, 0 1px 4px rgba(0,0,0,0.8);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.sc-map-frame.dragging {
  cursor: grabbing;
}
.sc-map-frame canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  image-rendering: pixelated;
}
.sc-mm-ov {
  position: absolute;
  z-index: 6;
  display: flex;
  gap: 2px;
  align-items: center;
  transition: opacity 0.15s;
}
.sc-mm-floorbox { top: 3px; right: 3px; }
.sc-mm-zoombox { bottom: 3px; right: 3px; }
.sc-mm-navbox { top: 3px; left: 3px; }
.sc-mm-hover { opacity: 0.85; pointer-events: auto; }
.sc-map-frame:hover .sc-mm-hover { opacity: 1; pointer-events: auto; }
@media (hover: none) { .sc-mm-hover { opacity: 1; pointer-events: auto; } }

.sc-ctrl-btn.sc-mm-btn {
  width: 16px;
  height: 16px;
  padding: 0;
  display: grid;
  place-items: center;
  background-image: url(/lingote/images/automap/automap_buttons.png);
  background-repeat: no-repeat;
  background-size: 32px 48px;
  border: none;
  border-radius: 2px;
  color: transparent;
  cursor: pointer;
  image-rendering: pixelated;
  box-shadow: 0 1px 2px rgba(0,0,0,0.65);
}
.sc-ctrl-btn.sc-mm-btn[title="Zoom in"] {
  background-position: 0 -32px;
}
.sc-ctrl-btn.sc-mm-btn[title="Zoom in"]:active:not(:disabled) {
  background-position: -16px -32px;
}
.sc-ctrl-btn.sc-mm-btn[title="Zoom out"] {
  background-position: 0 -16px;
}
.sc-ctrl-btn.sc-mm-btn[title="Zoom out"]:active:not(:disabled) {
  background-position: -16px -16px;
}
.sc-ctrl-btn.sc-mm-btn[title="Open full map"] {
  background-position: 0 0;
}
.sc-ctrl-btn.sc-mm-btn[title="Open full map"]:active:not(:disabled) {
  background-position: -16px 0;
}
.sc-ctrl-btn.sc-mm-btn[title="Floor up"] {
  background-image: url(/lingote/images/ui/buttons/automap-button-moveup-up.png);
  background-position: center;
  background-size: contain;
}
.sc-ctrl-btn.sc-mm-btn[title="Floor up"]:active:not(:disabled) {
  background-image: url(/lingote/images/ui/buttons/automap-button-moveup-down.png);
}
.sc-ctrl-btn.sc-mm-btn[title="Floor down"] {
  background-image: url(/lingote/images/ui/buttons/automap-button-movedown-up.png);
  background-position: center;
  background-size: contain;
}
.sc-ctrl-btn.sc-mm-btn[title="Floor down"]:active:not(:disabled) {
  background-image: url(/lingote/images/ui/buttons/automap-button-movedown-down.png);
}
.sc-ctrl-btn.sc-mm-btn[title="Center minimap"] {
  background: rgba(16, 21, 28, 0.88);
  border: 1px solid #000;
  border-radius: 2px;
  color: #ffffff;
  font: 700 10px/1 system-ui, sans-serif;
}
.sc-ctrl-btn.sc-mm-btn:hover:not(:disabled) { filter: brightness(1.22); }
.sc-ctrl-btn.sc-mm-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.sc-mm-floor {
  min-width: 18px;
  height: 16px;
  padding: 0 2px;
  box-sizing: border-box;
  border: 1px solid #000;
  border-radius: 2px;
  background: rgba(12, 16, 22, 0.86);
  color: #f4d35e;
  font: 700 10px/16px monospace, system-ui, sans-serif;
  text-align: center;
  pointer-events: none;
}
.bp-item-count {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #facc15;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
  z-index: 2;
}
@keyframes lootPulse {
  0% { box-shadow: inset 0 0 0 2px #4ade80, 0 0 14px #22c55e; border-color: #4ade80; }
  50% { box-shadow: inset 0 0 0 3px #86efac, 0 0 20px #4ade80; border-color: #86efac; }
  100% { box-shadow: none; border-color: transparent; }
}
.bp-cell.just-looted {
  animation: lootPulse 2.5s ease-out;
}
.sc-mm-floor.other {
  color: #60a5fa;
}
.sc-mm-coords {
  position: absolute;
  left: 3px;
  bottom: 2px;
  z-index: 6;
  pointer-events: none;
  color: #e2e8f0;
  font: 700 8.5px/1 monospace, system-ui, sans-serif;
  letter-spacing: 0.1px;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

/* Minimap Marks, Places, Tooltips, Context Menu & Full Map (Beholder D126) */
.tp-mm-mark {
  position: absolute;
  width: 13px;
  height: 13px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #101010;
  border: 1px solid #000;
  box-sizing: border-box;
  color: #fff;
  font: bold 9px/11px system-ui, sans-serif;
  text-align: center;
  pointer-events: none;
  z-index: 6;
  text-shadow: 0 0 2px #000;
  display: none;
}
.tp-mm-place {
  position: absolute;
  width: 11px;
  height: 11px;
  margin: -5px 0 0 -5px;
  pointer-events: none;
  z-index: 5;
  display: none;
}
.tp-mm-place svg { display: block; }
.tp-mm-tip {
  position: absolute;
  z-index: 8;
  pointer-events: none;
  display: none;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 8px));
  background: rgba(10, 13, 18, 0.94);
  border: 1px solid #d4a34b;
  border-radius: 3px;
  color: #fff;
  font: 700 11px/1.2 system-ui, sans-serif;
  padding: 2px 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.75);
}
.tp-fullmap {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(4, 8, 16, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, sans-serif;
  color: #e2e8f0;
  font-size: 0.82rem;
  user-select: none;
  padding: 10px;
  box-sizing: border-box;
}

.tp-fullmap-win {
  position: relative;
  width: min(460px, 94vw);
  height: min(640px, 90vh);
  background: linear-gradient(180deg, #0b111e 0%, #10192b 45%, #0d1524 100%);
  border: 2.5px solid #d4a34b;
  border-radius: 5px;
  box-shadow:
    0 0 0 1.5px #3b2006,
    inset 0 0 0 2px #070b14,
    inset 0 0 0 3.5px rgba(212, 163, 75, 0.65),
    0 18px 48px rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  padding: 10px 12px 12px 12px;
  box-sizing: border-box;
}

.tp-fullmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 8px 18px;
  flex: 0 0 auto;
}

.tp-fullmap-header .title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #e2b857;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95);
}

.tp-fullmap-corner-close {
  width: 22px;
  height: 22px;
  padding: 0;
  background: linear-gradient(180deg, #3a3f4b 0%, #22262e 100%);
  border: 1.5px solid #646b7a;
  border-radius: 3px;
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 4px rgba(0, 0, 0, 0.8);
}
.tp-fullmap-corner-close:hover {
  background: #4b5262;
  color: #ffffff;
  border-color: #d4a34b;
}

.tp-fullmap-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 4px 10px 4px;
  flex: 0 0 auto;
}

.tp-fullmap-ctrl-btn {
  min-width: 38px;
  height: 30px;
  padding: 0 10px;
  background: linear-gradient(180deg, #253042 0%, #17202e 55%, #111824 100%);
  border: 1.8px solid #b58d3d;
  border-radius: 4px;
  box-shadow:
    0 0 0 1px #090d14,
    inset 0 1px 1px rgba(254, 240, 138, 0.25),
    0 3px 6px rgba(0, 0, 0, 0.85);
  color: #e5b85c;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s, filter 0.15s, border-color 0.15s;
}
.tp-fullmap-ctrl-btn:hover {
  filter: brightness(1.18);
  border-color: #facc15;
}
.tp-fullmap-ctrl-btn:active {
  transform: scale(0.95);
}

.tp-fullmap-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  border: 3px solid #c89d46;
  border-radius: 3px;
  box-shadow:
    0 0 0 1.5px #2e1b05,
    inset 0 0 0 1.5px #422808,
    0 6px 20px rgba(0, 0, 0, 0.9);
  display: flex;
  overflow: visible;
}

/* 4 Faceted Sapphire-Blue Corner Gems on Map Frame */
.tp-map-gem {
  position: absolute;
  width: 11px;
  height: 11px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #93c5fd 0%, #3b82f6 42%, #1d4ed8 78%, #0f172a 100%);
  border: 1.6px solid #eab308;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.85), 0 1px 3px #000;
  z-index: 12;
  pointer-events: none;
}
.tp-map-gem.gem-tl { top: -5px; left: -5px; }
.tp-map-gem.gem-tr { top: -5px; right: -5px; }
.tp-map-gem.gem-bl { bottom: -5px; left: -5px; }
.tp-map-gem.gem-br { bottom: -5px; right: -5px; }

.tp-fullmap-view {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  background: #1b2c1a;
}
.tp-fullmap-view.dragging { cursor: grabbing; }
.tp-fullmap-view canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  display: block;
}

.tp-fullmap-info-box {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(11, 17, 29, 0.78);
  border-left: 1px solid rgba(212, 163, 75, 0.25);
  border-bottom: 1px solid rgba(212, 163, 75, 0.25);
  border-bottom-left-radius: 5px;
  padding: 7px 11px;
  text-align: right;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.36;
  color: #d1d5db;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
  pointer-events: none;
  z-index: 8;
}
.tp-action-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
}
.tp-action-sheet {
  position: fixed;
  z-index: 301;
  min-width: 140px;
  background: #1c2026;
  border: 1px solid #555d6b;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.8);
  padding: 3px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.tp-action-sheet button {
  background: transparent;
  border: none;
  color: #e2e8f0;
  font: 600 12px/1.4 system-ui, sans-serif;
  text-align: left;
  padding: 5px 10px;
  border-radius: 2px;
  cursor: pointer;
}
.tp-action-sheet button:hover {
  background: #2e3540;
  color: #f4d35e;
}
.tp-mm-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 310;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tp-mm-dialog-win {
  width: 280px;
  background: #1e2229;
  border: 1px solid #586070;
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  font-family: system-ui, sans-serif;
}
.tp-mm-dialog-title {
  background: #2b303b;
  border-bottom: 1px solid #454c59;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #f4d35e;
}
.tp-mm-dialog-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tp-mm-icons {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.tp-mm-icons button {
  height: 26px;
  border-radius: 3px;
  border: 1px solid #4a5160;
  background: #14171c;
  color: #fff;
  cursor: pointer;
  font: bold 13px system-ui, sans-serif;
}
.tp-mm-icons button.on {
  border-color: #ffd15c;
  box-shadow: 0 0 0 1px #ffd15c inset;
  background: #282c34;
}
.tp-mm-dialog-body input[type=text] {
  width: 100%;
  box-sizing: border-box;
  background: #12151a;
  color: #eee;
  border: 1px solid #4a5160;
  border-radius: 3px;
  padding: 5px 7px;
  font-size: 0.78rem;
  outline: none;
}
.tp-mm-dialog-body input[type=text]:focus {
  border-color: #ffd15c;
}
.tp-mm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 10px 10px 10px;
}
.tp-mm-dialog-btn {
  background: #2d333f;
  border: 1px solid #555e6e;
  color: #e2e8f0;
  border-radius: 3px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.tp-mm-dialog-btn:hover { background: #3c4454; color: #fff; }
.tp-mm-dialog-btn.confirm { border-color: #d4a34b; color: #f4d35e; }
.tp-mm-dialog-btn.danger { border-color: #ef4444; color: #f87171; }

/* =========================================================================
   BEHOLDER VITALS BARS (.sc-bars-container)
   ========================================================================= */
.sc-bars-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.sc-bar {
  position: relative;
  width: 100%;
  height: 12px;
  background: #141414;
  border: 1px solid #000;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.85), 0 1px 0 #3a3a3e;
  overflow: hidden;
  box-sizing: border-box;
}
.sc-bar::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: 3;
  image-rendering: pixelated;
  pointer-events: none;
}
.bp-item-count {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #facc15;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
  z-index: 2;
}
@keyframes lootPulse {
  0% { box-shadow: inset 0 0 0 2px #4ade80, 0 0 14px #22c55e; border-color: #4ade80; }
  50% { box-shadow: inset 0 0 0 3px #86efac, 0 0 20px #4ade80; border-color: #86efac; }
  100% { box-shadow: none; border-color: transparent; }
}
.bp-cell.just-looted {
  animation: lootPulse 2.5s ease-out;
}
.sc-bar.hp::before {
  background-image: url('/lingote/images/healthmana/hitpoints_symbol.png');
}
.sc-bar.mp::before {
  background-image: url('/lingote/images/healthmana/mana_symbol.png');
}
.sc-bar-fill {
  height: 100%;
  transition: width 0.15s ease-out;
}
.sc-bar.hp .sc-bar-fill {
  background: linear-gradient(180deg, #ff5252 0%, #c81e1e 55%, #771010 100%);
}
.sc-bar.mp .sc-bar-fill {
  background: linear-gradient(180deg, #5698ff 0%, #1d56d8 55%, #0f2d7a 100%);
}
.sc-bar-text {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Verdana, Tahoma, sans-serif;
  font-size: 8.5px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  pointer-events: none;
}
.bp-item-count {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #facc15;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
  z-index: 2;
}
@keyframes lootPulse {
  0% { box-shadow: inset 0 0 0 2px #4ade80, 0 0 14px #22c55e; border-color: #4ade80; }
  50% { box-shadow: inset 0 0 0 3px #86efac, 0 0 20px #4ade80; border-color: #86efac; }
  100% { box-shadow: none; border-color: transparent; }
}
.bp-cell.just-looted {
  animation: lootPulse 2.5s ease-out;
}

/* =========================================================================
   BEHOLDER MIDDLE CONSOLE (PAPERDOLL + COMBAT MODES + 2-COL MENU GRID)
   ========================================================================= */
.sc-middle-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
}

/* Left: 3x4 Equipment Grid + Row 4 Cap/Soul */
.sc-equip-grid {
  display: grid;
  grid-template-columns: repeat(3, 32px);
  grid-template-rows: repeat(4, 32px);
  gap: 2px;
  flex-shrink: 0;
}

.sc-slot {
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  border: 3px solid transparent;
  border-image: url('/lingote/images/inventory/containerslot.png') 3 fill / 3px stretch;
  background-color: #181818;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

/* Official Beholder Paperdoll Slot Silhouettes (Empty State Only) */
.sc-slot::before {
  content: '';
  position: absolute;
  inset: 2px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
  image-rendering: pixelated;
  opacity: 0.36;
  filter: grayscale(100%) brightness(0.95);
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.sc-slot.active-item::before,
.sc-slot.active-bp.active-item::before {
  opacity: 0;
}
.sc-slot.active-bp:not(.active-item)::before {
  opacity: 0.92;
  filter: none;
}
.sc-slot.neck   { grid-column: 1; grid-row: 1; }
.sc-slot.head   { grid-column: 2; grid-row: 1; }
.sc-slot.back   { grid-column: 3; grid-row: 1; }
.sc-slot.lhand  { grid-column: 1; grid-row: 2; }
.sc-slot.body   { grid-column: 2; grid-row: 2; }
.sc-slot.rhand  { grid-column: 3; grid-row: 2; }
.sc-slot.finger { grid-column: 1; grid-row: 3; }
.sc-slot.legs   { grid-column: 2; grid-row: 3; }
.sc-slot.ammo   { grid-column: 3; grid-row: 3; }
.sc-slot.feet   { grid-column: 2; grid-row: 4; }

.sc-slot.neck::before   { background-image: url('/lingote/images/brand-icons/slot-amulet.png'); }
.sc-slot.head::before   { background-image: url('/lingote/images/brand-icons/slot-helmet.png'); }
.sc-slot.back::before   { background-image: url('/lingote/images/brand-icons/slot-backpack.png'); }
.sc-slot.lhand::before  { background-image: url('/lingote/images/brand-icons/slot-weapon.png'); }
.sc-slot.body::before   { background-image: url('/lingote/images/brand-icons/slot-armor.png'); }
.sc-slot.rhand::before  { background-image: url('/lingote/images/brand-icons/slot-shield.png'); }
.sc-slot.finger::before { background-image: url('/lingote/images/brand-icons/slot-ring.png'); }
.sc-slot.legs::before   { background-image: url('/lingote/images/brand-icons/slot-legs.png'); }
.sc-slot.ammo::before   { background-image: url('/lingote/images/brand-icons/slot-ammo.png'); }
.sc-slot.feet::before   { background-image: url('/lingote/images/brand-icons/slot-boots.png'); }

.sc-slot.active-item:hover,
.sc-slot.active-bp:hover {
  filter: brightness(1.18);
}
.sc-slot.drop-target {
  outline: 2px dashed #facc15;
  outline-offset: -2px;
}

.sc-item-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 2;
}
.sc-slot-rarity-bar {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 1px;
  height: 2px;
  border-radius: 1px;
  pointer-events: none;
  z-index: 3;
}

/* Cap & Soul Cells (Row 4 Col 1 & Col 3) */
.sc-slot.cap-cell {
  grid-column: 1;
  grid-row: 4;
  flex-direction: column;
  justify-content: center;
  padding: 1px;
  background-color: #161618;
  font-family: Verdana, Tahoma, sans-serif;
}
.sc-slot.cap-cell::before {
  display: none;
}
.sc-slot.cap-cell.soul-cell {
  grid-column: 3;
  grid-row: 4;
}
.sc-stat-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 7px;
  color: #a1a1aa;
  line-height: 1;
}
.sc-stat-label::before {
  content: '';
  width: 7.5px;
  height: 7.5px;
  background: url('/lingote/images/brand-icons/icon-cap.svg') no-repeat center / contain;
  opacity: 0.85;
}
.sc-slot.soul-cell .sc-stat-label::before {
  background-image: url('/lingote/images/brand-icons/icon-soul.svg');
}
.sc-stat-val {
  font-size: 8px;
  font-weight: 700;
  color: #f4f4f5;
  line-height: 1.1;
  text-shadow: 1px 1px 0 #000;
}

/* Middle Column: 6 Vertical Combat Stance / Chase / Safe Buttons */
.sc-combat-col {
  display: flex;
  flex-direction: column;
  gap: 1.5px;
  width: 22px;
  flex-shrink: 0;
}
.sc-mode-btn {
  width: 22px;
  height: 21px;
  padding: 0;
  border: 1px solid #0e0e10;
  background: #242428 url('/lingote/images/options/button_empty.png') no-repeat center / 100% 100%;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}
.sc-mode-btn:hover {
  filter: brightness(1.18);
}
.sc-mode-btn.active {
  box-shadow: inset 0 0 0 1px #facc15, inset 0 1px 4px rgba(0, 0, 0, 0.85);
  background-color: #18181b;
}
.sc-mode-icon {
  width: 14px;
  height: 14px;
  display: block;
  background-color: #9ca3af;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}
.sc-mode-btn.active .icon-offensive { background-color: #f87171; }
.sc-mode-btn.active .icon-balanced  { background-color: #facc15; }
.sc-mode-btn.active .icon-defensive { background-color: #38bdf8; }
.sc-mode-btn.active .icon-stand     { background-color: #4ade80; }
.sc-mode-btn.active .icon-chase     { background-color: #4ade80; }
.sc-mode-btn.active .icon-safe      { background-color: #facc15; }

.icon-offensive { -webkit-mask-image: url('/lingote/images/brand-icons/btn-attack-offensive.svg'); mask-image: url('/lingote/images/brand-icons/btn-attack-offensive.svg'); }
.icon-balanced  { -webkit-mask-image: url('/lingote/images/brand-icons/btn-attack-balanced.svg');  mask-image: url('/lingote/images/brand-icons/btn-attack-balanced.svg'); }
.icon-defensive { -webkit-mask-image: url('/lingote/images/brand-icons/btn-attack-defensive.svg'); mask-image: url('/lingote/images/brand-icons/btn-attack-defensive.svg'); }
.icon-stand     { -webkit-mask-image: url('/lingote/images/brand-icons/btn-stand.svg');            mask-image: url('/lingote/images/brand-icons/btn-stand.svg'); }
.icon-chase     { -webkit-mask-image: url('/lingote/images/brand-icons/btn-chase.svg');            mask-image: url('/lingote/images/brand-icons/btn-chase.svg'); }
.icon-safe      { -webkit-mask-image: url('/lingote/images/brand-icons/btn-safe-fight.svg');       mask-image: url('/lingote/images/brand-icons/btn-safe-fight.svg'); }

/* Right Column: 2-Column Beholder Menu Icon Grid */
.sc-menu-col.sc-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 22px);
  grid-auto-rows: 21px;
  gap: 1.5px;
  flex-shrink: 0;
}
.sc-icon-btn {
  width: 22px;
  height: 21px;
  padding: 0;
  border: 1px solid #0e0e10;
  background: #242428 url('/lingote/images/options/button_empty.png') no-repeat center / 100% 100%;
  color: #b4b8c2;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}
.sc-icon-btn svg {
  width: 12px;
  height: 12px;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.85));
}
.sc-icon-btn:hover {
  filter: brightness(1.2);
  color: #ffffff;
}
.sc-icon-btn[data-state="open"] {
  color: #f4d35e;
  box-shadow: inset 0 0 0 1px rgba(244, 211, 94, 0.55);
}
.sc-icon-btn[data-state="open"]::after {
  content: '';
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 3px #4ade80;
}

/* Floating Menu Tooltip (.sc-menu-tip) */
.sc-menu-tip {
  position: fixed;
  z-index: 2800;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.1s ease, transform 0.1s ease;
  background: #14171f;
  color: #f4d35e;
  border: 1px solid #525b6c;
  border-radius: 4px;
  padding: 3px 7px;
  font: 600 11px/1.2 system-ui, sans-serif;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85);
}
.sc-menu-tip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Row 4: Recessed Condition / Status Bar */
.sc-conditions-bar {
  width: 100%;
  min-height: 15px;
  background: #141416;
  border: 1px solid #09090b;
  border-right-color: #3f3f46;
  border-bottom-color: #3f3f46;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1px 3px;
  box-sizing: border-box;
}
.sc-cond-pill {
  font-family: Verdana, sans-serif;
  font-size: 8px;
  color: #a1a1aa;
  white-space: nowrap;
}

/* =========================================================================
   FLOATING MOVABLE WINDOWS (Skills, Battle, etc. - OTClient / MMO Style)
   ========================================================================= */
.floating-movable-window {
  position: fixed;
  display: flex;
  flex-direction: column;
  background: #18181b;
  border: 1px solid #4a4a52;
  border-top: 1px solid #71717a;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8), 0 0 0 1px #09090b;
  border-radius: 3px;
  overflow: hidden;
  z-index: 120;
  user-select: none;
  font-family: Verdana, Tahoma, sans-serif;
  min-width: 190px;
}

.floating-movable-window.active-focus {
  border-color: var(--gold);
}

.floating-win-header {
  height: 22px;
  background: linear-gradient(180deg, #323238 0%, #202024 100%);
  border-bottom: 1px solid #09090b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.floating-win-header:active {
  cursor: grabbing;
}

.floating-win-title-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  pointer-events: none;
}
.bp-item-count {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #facc15;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
  z-index: 2;
}
@keyframes lootPulse {
  0% { box-shadow: inset 0 0 0 2px #4ade80, 0 0 14px #22c55e; border-color: #4ade80; }
  50% { box-shadow: inset 0 0 0 3px #86efac, 0 0 20px #4ade80; border-color: #86efac; }
  100% { box-shadow: none; border-color: transparent; }
}
.bp-cell.just-looted {
  animation: lootPulse 2.5s ease-out;
}

.floating-win-title {
  font-size: 10px;
  font-weight: 700;
  color: #cfcfd4;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-win-count {
  font-family: Verdana, sans-serif;
  font-size: 9px;
  color: #9ca3af;
}

.floating-win-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
}

.win-ctrl-btn {
  width: 15px;
  height: 15px;
  padding: 0;
  background: #27272a;
  border: 1px solid #3f3f46;
  border-radius: 2px;
  color: #a1a1aa;
  font-family: Verdana, Tahoma, sans-serif;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.1);
  transition: background 0.1s, color 0.1s;
}

.win-ctrl-btn:hover {
  background: #3f3f46;
  color: #ffffff;
  border-color: #71717a;
}

.win-ctrl-btn.close:hover {
  background: #b91c1c;
  border-color: #ef4444;
  color: #ffffff;
}

.floating-win-body {
  background: #141416;
  padding: 6px 8px;
  overflow-y: auto;
  max-height: 380px;
}

.floating-movable-window.minimized .floating-win-body,
.floating-movable-window.minimized .container-pane-body {
  display: none !important;
}

#window-backpack {
  width: 220px;
}

/* Skills Stat Table */
.skills-stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.skills-stat-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.skills-stat-table td {
  padding: 4px 2px;
}
.skills-stat-table td.stat-label {
  color: #a1a1aa;
}
.skills-stat-table td.stat-val {
  text-align: right;
  font-weight: 700;
  color: #f4f4f5;
}

/* Top bar button active state */
.top-btn.active {
  background: rgba(212, 163, 75, 0.25) !important;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
}

/* Draggable modal windows */
.modal-titlebar {
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.modal-titlebar:active {
  cursor: grabbing;
}

/* =========================================================================
   BEHOLDER COLLAPSIBLE WINDOWS: MAIN BACKPACK & BATTLE LIST
   ========================================================================= */
.container-pane-window,
.battle-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #1e1e22;
  border-top: 1px solid #3f3f46;
  border-left: 1px solid #3f3f46;
  border-right: 1px solid #09090b;
  border-bottom: 1px solid #09090b;
  box-sizing: border-box;
  flex-shrink: 0;
}

.container-pane-header,
.battle-list-header {
  height: 18px;
  background: #2b2b2b url('/lingote/images/ui/panel/miniwindow_header.png') repeat-x top left;
  background-size: auto 100%;
  border-bottom: 1px solid #111;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  cursor: pointer;
  user-select: none;
}

.container-pane-title-wrap,
.battle-list-title-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.container-pane-icon {
  width: 12px;
  height: 12px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: brightness(1.1);
}

.battle-list-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  background-color: #cbd5e1;
  -webkit-mask: url('/lingote/images/brand-icons/btn-attack-offensive.svg') no-repeat center / contain;
  mask: url('/lingote/images/brand-icons/btn-attack-offensive.svg') no-repeat center / contain;
}

.container-pane-title,
.battle-list-title {
  font-family: Verdana, Tahoma, sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #cfcfd4;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.container-pane-count,
.battle-list-count {
  font-family: Verdana, sans-serif;
  font-size: 9px;
  color: #9ca3af;
}

.container-pane-controls,
.battle-list-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}

.container-pane-btn {
  width: 12px;
  height: 12px;
  padding: 0;
  border: none;
  background-color: transparent;
  background-image: url('/lingote/images/ui/panel/miniwindow_buttons.png');
  background-repeat: no-repeat;
  cursor: pointer;
  image-rendering: pixelated;
}
.container-pane-btn.minimize {
  background-position: -14px 0;
}
.container-pane-btn.minimize:hover {
  background-position: -14px -14px;
}
.container-pane-window.collapsed .container-pane-btn.minimize,
.battle-list.collapsed .container-pane-btn.minimize {
  background-position: -28px 0;
}

.container-pane-window.collapsed .container-pane-body,
.battle-list.collapsed .battle-list-body {
  display: none;
}

/* Main Backpack 4-Column Grid */
.container-pane-body {
  padding: 5px;
  background: #1b1b1e;
}

.backpack-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.bp-cell {
  aspect-ratio: 1 / 1;
  height: 44px;
  border: 3px solid transparent;
  border-image: url('/lingote/images/inventory/containerslot.png') 3 fill / 3px stretch;
  background-color: #161618;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
  user-select: none;
}
.bp-cell.has-item {
  cursor: pointer;
  background-color: #1d1d22;
}
.bp-cell.has-item:hover {
  filter: brightness(1.2);
}
.bp-cell.has-item::after {
  content: '';
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 1px;
  height: 2px;
  background: var(--slot-rarity, #64748b);
  pointer-events: none;
}
.bp-item-count {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #facc15;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
  z-index: 2;
}
@keyframes lootPulse {
  0% { box-shadow: inset 0 0 0 2px #4ade80, 0 0 14px #22c55e; border-color: #4ade80; }
  50% { box-shadow: inset 0 0 0 3px #86efac, 0 0 20px #4ade80; border-color: #86efac; }
  100% { box-shadow: none; border-color: transparent; }
}
.bp-cell.just-looted {
  animation: lootPulse 2.5s ease-out;
}
.bp-item-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
  margin-top: -4px;
}
.bp-item-tag {
  position: absolute;
  bottom: 3px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: Verdana, sans-serif;
  font-size: 7.5px;
  font-weight: 700;
  line-height: 1;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  pointer-events: none;
}
.bp-item-count {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #facc15;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
  z-index: 2;
}
@keyframes lootPulse {
  0% { box-shadow: inset 0 0 0 2px #4ade80, 0 0 14px #22c55e; border-color: #4ade80; }
  50% { box-shadow: inset 0 0 0 3px #86efac, 0 0 20px #4ade80; border-color: #86efac; }
  100% { box-shadow: none; border-color: transparent; }
}
.bp-cell.just-looted {
  animation: lootPulse 2.5s ease-out;
}

/* Battle List Body & Creature Entries */
.battle-list-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 3px;
  max-height: 165px;
  overflow-y: auto;
  background: #161618;
  scrollbar-width: thin;
}

.battle-empty {
  padding: 8px 4px;
  text-align: center;
  font-family: Verdana, sans-serif;
  font-size: 9.5px;
  color: #71717a;
}

.battle-entry {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 4px;
  background: #1e1e22;
  border: 1px solid #27272a;
  cursor: pointer;
}
.battle-entry:hover {
  background: #27272c;
  border-color: #3f3f46;
}
.battle-entry.active {
  background: rgba(220, 38, 38, 0.22);
  border-color: #ef4444;
}
.battle-sprite {
  width: 20px;
  height: 20px;
  background: #141416;
  border: 1px solid #09090b;
  display: grid;
  place-items: center;
  font-size: 12px;
  flex-shrink: 0;
}
.battle-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.battle-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: Verdana, Tahoma, sans-serif;
  font-size: 9.5px;
  color: #e4e4e7;
  text-shadow: 1px 1px 0 #000;
}
.battle-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.battle-pct {
  font-size: 8.5px;
  color: #a1a1aa;
  margin-left: 4px;
}
.battle-hp-track {
  width: 100%;
  height: 5px;
  background: #09090b;
  border: 1px solid #000;
  box-sizing: border-box;
  overflow: hidden;
}
.battle-hp-fill {
  height: 100%;
  transition: width 0.15s ease-out;
}

/* =========================================================================
   MODALS (OTClient Classic Windows)
   ========================================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.modal-window {
  width: 440px;
  max-width: 90vw;
  background: rgb(var(--ui-panel));
  border: 2px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  overflow: hidden;
}
.modal-titlebar {
  background: var(--tp-weave), rgb(var(--ui-raise));
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgb(var(--ui-line-strong));
}
.modal-caption {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
}
.modal-close-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}
.modal-close-icon:hover { color: #fff; }
.modal-inner {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.8rem;
}

/* Exhaustion & Cooldown Visual State */
.action-slot.exhausted, .touch-action-btn.exhausted {
  opacity: 0.38 !important;
  filter: grayscale(0.85) brightness(0.7) !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

#chat-input:disabled {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: #ef4444 !important;
  cursor: not-allowed !important;
}

#chat-send-btn:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}

/* Albion World Map Pin Radar Pulse */
@keyframes pinPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  70% {
    transform: scale(2.4);
    opacity: 0;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* NPC Trade Modal Styles */
.trade-offer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid rgba(212, 163, 75, 0.2);
  border-radius: 6px;
  transition: border-color 0.15s, background 0.15s;
}
.trade-offer-card:hover {
  background: rgba(26, 36, 56, 0.9);
  border-color: rgba(212, 163, 75, 0.5);
}
.trade-offer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.trade-offer-icon {
  width: 36px;
  height: 36px;
  background: #0b0e14;
  border: 1px solid rgba(212, 163, 75, 0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.trade-offer-icon img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}
.trade-offer-info {
  display: flex;
  flex-direction: column;
}
.trade-offer-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #f1f5f9;
}
.trade-offer-meta {
  font-size: 0.75rem;
  color: #94a3b8;
}
.trade-offer-actions {
  display: flex;
  gap: 6px;
}
.btn-trade-buy {
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  border: 1px solid #10b981;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, filter 0.1s;
}
.btn-trade-buy:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.btn-trade-sell {
  background: linear-gradient(135deg, #475569, #334155);
  color: #f1f5f9;
  border: 1px solid #64748b;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, filter 0.1s;
}
.btn-trade-sell:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* Canary & OTClient Beholder Modal Window Styles */
.canary-modal-window {
  background: rgb(var(--ui-panel));
  border: 2px solid var(--gold);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.canary-modal-inner {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 82vh;
}
.canary-modal-prompt {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.35);
  padding: 10px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--gold);
}
.canary-modal-purse {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #94a3b8;
  padding: 4px 6px;
}
.canary-gold-val {
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
}
.canary-choices-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.canary-choice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid rgba(212, 163, 75, 0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}
.canary-choice-row:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(212, 163, 75, 0.5);
  transform: translateX(2px);
}
.canary-choice-row.selected {
  background: rgba(30, 58, 92, 0.9);
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}
.canary-choice-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.canary-choice-icon {
  width: 32px;
  height: 32px;
  background: #090d14;
  border: 1px solid rgba(212, 163, 75, 0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.canary-choice-icon img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}
.canary-choice-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #f1f5f9;
}
.canary-choice-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.canary-modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(212, 163, 75, 0.2);
  flex-wrap: wrap;
}
.btn-canary-action {
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
  border: 1px solid transparent;
}
.btn-canary-action.btn-primary {
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  border-color: #10b981;
}
.btn-canary-action.btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}
.btn-canary-action.btn-secondary {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  border-color: #f59e0b;
}
.btn-canary-action.btn-secondary:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}
.btn-canary-action.btn-cancel {
  background: #334155;
  color: #cbd5e1;
  border-color: #475569;
}
.btn-canary-action.btn-cancel:hover {
  background: #475569;
  color: #ffffff;
}




/* =========================================================================
   ALBION ONLINE HUD SYSTEM (Parity with Albion Mobile & PC)
   Player Vitals, Target Unit Frame, Diamond Minimap, Radial Combat Wheel,
   and 360° Virtual Analog Joystick
   ========================================================================= */

#albion-hud-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  user-select: none;
}

/* 1. TOP-LEFT: ALBION PLAYER UNIT FRAME */
#albion-player-frame {
  position: absolute;
  top: 14px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 60;
  pointer-events: auto;
}

.albion-portrait-ring {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 3px solid var(--gold, #d4a34b);
  box-shadow: 0 4px 16px rgba(0,0,0,0.85), inset 0 0 10px rgba(0,0,0,0.6);
  background: radial-gradient(circle, #2d3e52 0%, #111a26 100%);
  position: relative;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.albion-portrait-ring:hover {
  transform: scale(1.05);
  border-color: #fef08a;
}
.albion-portrait-ring img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}
.albion-portrait-level {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #d4a34b;
  color: #0b0f17;
  font-weight: 900;
  font-size: 0.72rem;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0b0f17;
}

.albion-vitals-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.albion-name-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.albion-name-tag {
  color: #f8fafc;
  font-weight: 800;
  font-size: 0.92rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
  letter-spacing: 0.4px;
}
.albion-guild-tag {
  color: #d4a34b;
  font-weight: 700;
  font-size: 0.68rem;
  text-shadow: 0 1px 3px #000;
}

.albion-bar-wrap {
  width: 146px;
  height: 16px;
  background: rgba(10, 15, 22, 0.9);
  border: 1.5px solid #475569;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.8);
}
.albion-bar-fill.hp {
  background: linear-gradient(180deg, #f87171 0%, #dc2626 50%, #991b1b 100%);
  height: 100%;
  transition: width 0.2s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 0 8px rgba(239,68,68,0.5);
}
.albion-bar-fill.mp {
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 50%, #1e40af 100%);
  height: 100%;
  transition: width 0.2s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 0 8px rgba(37,99,235,0.5);
}
.albion-bar-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

/* 2. TOP-CENTER: ALBION TARGET UNIT FRAME */
#albion-target-frame {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 60;
  background: rgba(15, 22, 33, 0.94);
  border: 1.5px solid rgba(212,163,75,0.7);
  border-radius: 20px;
  padding: 4px 12px 4px 6px;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.75);
  pointer-events: auto;
}
.albion-portrait-ring.target {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #261212;
  border: 2px solid #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.albion-vitals-stack.target {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.albion-bar-wrap.hp.target {
  width: 130px;
  height: 14px;
}
.albion-target-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s;
}
.albion-target-close:hover {
  color: #ef4444;
}

/* 3. TOP-RIGHT: ALBION ZONE BANNER & ISOMETRIC DIAMOND MINIMAP */
#albion-zone-minimap-wrap {
  position: absolute;
  top: 12px;
  right: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 60;
  pointer-events: auto;
}
.albion-zone-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, rgba(30,44,62,0.95) 0%, rgba(14,20,30,0.98) 100%);
  border: 1.5px solid #d4a34b;
  border-radius: 20px;
  padding: 3px 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  margin-bottom: 8px;
}
.albion-crest-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(212,163,75,0.25);
  border: 1px solid #d4a34b;
  color: #d4a34b;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, background 0.1s;
}
.albion-crest-btn:hover {
  transform: scale(1.1);
  background: rgba(212,163,75,0.45);
}
.albion-zone-title-box {
  padding: 0 4px;
  text-align: center;
}
.albion-zone-name {
  font-weight: 800;
  font-size: 0.8rem;
  color: #fef08a;
  text-shadow: 0 1px 3px #000;
  white-space: nowrap;
}
.albion-zone-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.66rem;
  color: #cbd5e1;
  font-weight: 700;
}
.albion-diamond-pip {
  color: #eab308;
  font-size: 0.55rem;
}

.albion-minimap-container {
  position: relative;
  width: 158px;
  height: auto;
  margin: 4px 6px 0 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.albion-minimap-diamond {
  width: 110px;
  height: 110px;
  margin: 22px auto 24px auto;
  transform: rotate(45deg);
  overflow: hidden;
  border: 2.5px solid #d4a34b;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 6px 22px rgba(0,0,0,0.9), inset 0 0 12px rgba(0,0,0,0.85);
  position: relative;
}
.albion-minimap-diamond #minimap-mount {
  width: 100%;
  height: 100%;
  position: relative;
}
.albion-minimap-diamond .sc-minimap-row,
.albion-minimap-diamond .sc-map-frame {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  position: absolute !important;
  inset: 0 !important;
  box-shadow: none !important;
}
.albion-minimap-diamond .sc-mm-ov,
.albion-minimap-diamond .sc-mm-coords,
.albion-minimap-diamond .tp-mm-tip,
.albion-minimap-diamond .minimap-player-marker,
.albion-minimap-diamond .minimap-walk-marker,
.albion-minimap-diamond .tp-mm-place,
.albion-minimap-diamond .tp-mm-mark {
  display: none !important;
}
.albion-minimap-diamond canvas {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 160px !important;
  height: 160px !important;
  transform: translate(-50%, -50%) rotate(-45deg) !important;
  transform-origin: center center !important;
  display: block !important;
  pointer-events: none !important;
}
.albion-compass-n {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 900;
  color: #facc15;
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
  z-index: 10;
}
.albion-map-zoom-btns {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
  z-index: 12;
}
.albion-map-zoom-btn {
  width: 34px;
  height: 32px;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(30,45,64,0.95) 0%, rgba(14,20,30,0.98) 100%);
  border: 1.5px solid #d4a34b;
  box-shadow: 0 3px 10px rgba(0,0,0,0.8);
  color: #fef08a;
  font-weight: 900;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, border-color 0.15s;
}
.albion-map-zoom-btn:active {
  transform: scale(0.9);
  border-color: #ffffff;
}

.albion-vertical-rail {
  position: relative;
  margin-top: 10px;
  margin-right: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.albion-rail-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(30,45,64,0.94) 0%, rgba(14,20,30,0.98) 100%);
  border: 2px solid rgba(212,163,75,0.85);
  box-shadow: 0 5px 14px rgba(0,0,0,0.75);
  color: #fff;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform 0.15s, border-color 0.15s;
  position: relative;
}
.albion-rail-btn:hover {
  transform: scale(1.1);
  border-color: #fef08a;
}
.albion-rail-btn .rail-tooltip {
  display: none;
  position: absolute;
  right: 48px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  white-space: nowrap;
}
.albion-rail-btn:hover .rail-tooltip {
  display: block;
}
#albion-rail-heal {
  border-color: rgba(239, 68, 68, 0.9);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}
#albion-rail-heal:active {
  transform: scale(0.92);
  filter: brightness(1.3);
}
#albion-rail-jump {
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}
#albion-rail-jump:active {
  transform: scale(0.92);
  filter: brightness(1.3);
}

/* 4. BOTTOM-LEFT: ALBION VIRTUAL ANALOG JOYSTICK (Mobile / Touch Only) */
#albion-joystick-wrap {
  position: absolute;
  bottom: 22px;
  left: 20px;
  width: 138px;
  height: 138px;
  z-index: 60;
  pointer-events: auto;
  touch-action: none;
  display: none; /* Differentiated: Hidden on PC Desktop, enabled on Mobile */
}
.albion-joystick-base {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20,32,48,0.62) 0%, rgba(10,16,25,0.82) 100%);
  border: 2.5px solid rgba(212,163,75,0.45);
  box-shadow: 0 8px 24px rgba(0,0,0,0.8), inset 0 0 20px rgba(0,0,0,0.6);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.albion-joystick-ring {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.18);
  pointer-events: none;
}
.albion-joystick-knob {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #475569 0%, #1e293b 60%, #0f172a 100%);
  border: 2.8px solid #d4a34b;
  box-shadow: 0 4px 15px rgba(0,0,0,0.9), inset 0 2px 4px rgba(255,255,255,0.35);
  position: relative;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.knob-core {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d4a34b;
  box-shadow: 0 0 8px rgba(212,163,75,0.6);
}
.albion-joystick-arrow {
  position: absolute;
  color: rgba(212,163,75,0.45);
  font-size: 0.65rem;
  font-weight: 900;
  pointer-events: none;
}
.albion-joystick-arrow.n { top: 3px; }
.albion-joystick-arrow.s { bottom: 3px; }
.albion-joystick-arrow.w { left: 4px; }
.albion-joystick-arrow.e { right: 4px; }

/* 5. BOTTOM-RIGHT: ALBION RADIAL COMBAT ACTION WHEEL (Mobile / Touch Only) */
#albion-action-wheel {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 280px;
  height: 280px;
  z-index: 60;
  pointer-events: none;
  display: none; /* Differentiated: Hidden on PC Desktop, enabled on Mobile */
}
.albion-btn-primary {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3447 0%, #172033 55%, #0b1120 100%);
  border: 3.8px solid #d4a34b;
  outline: 2px solid rgba(0,0,0,0.7);
  box-shadow: 0 8px 24px rgba(0,0,0,0.9), 0 0 18px rgba(212,163,75,0.5), inset 0 2px 5px rgba(255,255,255,0.35), inset 0 -3px 8px rgba(0,0,0,0.8);
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: transform 0.1s, filter 0.15s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.albion-btn-primary .albion-sword-svg {
  width: 52px;
  height: 52px;
}
.albion-btn-primary:active, .albion-btn-primary.pressed {
  transform: scale(0.92);
  filter: brightness(1.25);
  box-shadow: 0 2px 10px rgba(212,163,75,0.85);
}
.albion-btn-primary.on-cooldown {
  filter: grayscale(0.55) brightness(0.65);
}
.btn-sword-icon {
  font-size: 1.85rem;
  filter: drop-shadow(0 2px 4px #000);
}
.btn-hotkey-badge {
  font-size: 0.58rem;
  font-weight: 900;
  color: #fef08a;
  letter-spacing: 0.5px;
  margin-top: -2px;
}

/* Albion Clockwise Radial Cooldown Overlay */
.albion-cd-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(rgba(0, 0, 0, 0.78) var(--cd-pct, 0%), transparent var(--cd-pct, 0%) 100%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.albion-cd-timer {
  font-family: 'Cinzel', 'Trajan Pro', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(0,0,0,0.95), 0 2px 4px #000;
  pointer-events: none;
  z-index: 6;
}
@keyframes albionReadyPulse {
  0% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.85); }
  50% { box-shadow: 0 0 22px 8px rgba(234, 179, 8, 0.95); }
  100% { box-shadow: 0 8px 24px rgba(0,0,0,0.9), 0 0 16px rgba(212,163,75,0.45); }
}
.albion-ready-flash {
  animation: albionReadyPulse 0.45s ease-out;
}

.albion-btn-target {
  position: absolute;
  bottom: 108px;
  right: 14px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #334155 0%, #1e293b 100%);
  border: 2.2px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.85), inset 0 1px 3px rgba(255,255,255,0.3);
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, filter 0.1s;
}
.albion-btn-target svg {
  width: 26px;
  height: 26px;
}
.albion-btn-target:active, .albion-btn-target.pressed {
  transform: scale(0.9);
  filter: brightness(1.2);
}

.albion-btn-jump {
  position: absolute;
  bottom: 84px;
  right: 98px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1e3a5f 0%, #0f172a 100%);
  border: 2.5px solid #38bdf8;
  box-shadow: 0 5px 16px rgba(0,0,0,0.85), 0 0 14px rgba(56,189,248,0.5), inset 0 1px 4px rgba(255,255,255,0.35);
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.1s, filter 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.albion-btn-jump svg {
  width: 30px;
  height: 30px;
}
.albion-btn-jump:active, .albion-btn-jump.pressed {
  transform: scale(0.9);
  filter: brightness(1.3);
}
.albion-btn-jump.on-cooldown {
  filter: grayscale(0.6) brightness(0.65);
}

/* 6 Radial Skill Buttons — Large Ergonomic Touch Targets (52x52px) with Zero Overlap */
.albion-skill-btn {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1e293b 0%, #0f172a 100%);
  border: 2.4px solid rgba(255,255,255,0.35);
  box-shadow: 0 5px 15px rgba(0,0,0,0.8);
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  transition: transform 0.1s, filter 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.albion-skill-btn:active, .albion-skill-btn.pressed {
  transform: scale(0.9);
  filter: brightness(1.3);
}
.albion-skill-btn.on-cooldown {
  filter: grayscale(0.8) brightness(0.7);
}
.albion-skill-btn img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px #000);
}
.albion-key-pill {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: rgba(0,0,0,0.88);
  border: 1px solid #d4a34b;
  color: #fef08a;
  font-size: 0.58rem;
  font-weight: 900;
  padding: 0 4px;
  border-radius: 4px;
  pointer-events: none;
}

/* Radial Arc Coordinates (Expanded outer arc radius ~160px for 52px buttons) */
.albion-skill-btn.slot-r { bottom: 166px; right: 20px; border-color: #3b82f6; box-shadow: 0 0 12px rgba(59,130,246,0.45); }
.albion-skill-btn.slot-e { bottom: 180px; right: 82px; border-color: #ef4444; box-shadow: 0 0 12px rgba(239,68,68,0.45); }
.albion-skill-btn.slot-w { bottom: 162px; right: 146px; border-color: #f97316; box-shadow: 0 0 12px rgba(249,115,22,0.45); }
.albion-skill-btn.slot-q { bottom: 112px; right: 188px; border-color: #a855f7; box-shadow: 0 0 12px rgba(168,85,247,0.45); }
.albion-skill-btn.slot-d { bottom: 50px;  right: 196px; border-color: #22c55e; box-shadow: 0 0 12px rgba(34,197,94,0.45); }
.albion-skill-btn.slot-f { bottom: 4px;   right: 142px; border-color: #eab308; box-shadow: 0 0 12px rgba(234,179,8,0.45); }

/* Consumables Row — Placed to the left of Jump/Attack buttons */
.albion-consumables-row {
  position: absolute;
  bottom: 12px;
  right: 175px;
  display: flex;
  gap: 10px;
  pointer-events: auto;
}
.albion-item-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid rgba(212,163,75,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.75);
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.albion-item-btn:active, .albion-item-btn.pressed {
  transform: scale(0.9);
}
.albion-item-btn img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.albion-item-btn .stance-icon {
  font-size: 1.2rem;
}
