:root {
  --bg: #0b0e14;
  --panel: rgba(13, 17, 26, 0.84);
  --panel-solid: #111622;
  --panel-border: rgba(212, 175, 95, 0.28);
  --panel-border-hi: rgba(242, 204, 114, 0.58);
  --gold: #eab95c;
  --gold-bright: #ffd984;
  --crimson: #e11d48;
  --emerald: #22c55e;
  --sky: #38bdf8;
  --violet: #a855f7;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  user-select: none;
  -webkit-user-select: none;
}

/* Fullscreen Canvas Stage */
#stage-wrap {
  position: fixed;
  inset: 0;
  background: #080b11;
  overflow: hidden;
}

#world-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

/* Top Navigation & Mode Switcher Bar */
.topbar {
  position: fixed;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  flex-wrap: wrap;
}

.topbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 5px 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 6px 2px 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-crest {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: radial-gradient(circle at 30% 30%, #ffd984, #b45309 70%, #451a03);
  border: 1px solid rgba(255, 224, 150, 0.7);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  color: #1c0f02;
  box-shadow: 0 0 12px rgba(234, 185, 92, 0.45);
}

.brand-title {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--gold-bright);
  white-space: nowrap;
}

.brand-sub {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-pill {
  text-decoration: none;
  color: #d1d5db;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.16s ease;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  font-family: inherit;
}

.nav-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.nav-pill.active {
  color: #161006;
  background: linear-gradient(135deg, #ffd984, #d99b38);
  border-color: #ffe7ac;
  box-shadow: 0 0 14px rgba(234, 185, 92, 0.35);
}

.status-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.dot.live {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.dot.offline {
  background: var(--crimson);
  box-shadow: 0 0 8px var(--crimson);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.icon-btn:hover {
  background: rgba(234, 185, 92, 0.18);
  border-color: var(--panel-border-hi);
  color: var(--gold-bright);
}

.icon-btn.primary {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-color: rgba(255, 217, 132, 0.65);
  color: #fff;
}

.icon-btn.primary:hover {
  filter: brightness(1.1);
  color: #fff;
}

/* Map switcher & spectator banner */
.map-bar {
  position: fixed;
  top: 60px;
  left: 12px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 4px 6px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.map-pill {
  background: transparent;
  border: 1px solid transparent;
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  transition: all 0.15s;
}

.map-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.map-pill.active {
  background: rgba(234, 185, 92, 0.22);
  border-color: var(--panel-border-hi);
  color: var(--gold-bright);
}

.empire-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* Player Vitals Card (Top-Left below map bar when logged in) */
.player-hud {
  position: fixed;
  top: 104px;
  left: 12px;
  z-index: 25;
  width: 268px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 10px 12px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  display: none;
}

.player-hud.visible {
  display: block;
}

.player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.player-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--gold-bright);
}

.player-lvl {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(234, 185, 92, 0.2);
  border: 1px solid rgba(234, 185, 92, 0.5);
  color: var(--gold-bright);
}

.bar-row {
  margin-bottom: 6px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #d1d5db;
  margin-bottom: 2px;
}

.bar-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.2s ease;
}

.bar-fill.hp {
  background: linear-gradient(90deg, #dc2626, #f43f5e);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.55);
}

.bar-fill.sp {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.bar-fill.exp {
  background: linear-gradient(90deg, #ca8a04, #facc15);
}

.player-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  color: #d1d5db;
}

.yang-val {
  color: #fde047;
  font-weight: 700;
}

.coord-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #93c5fd;
}

/* Target Bar (Top Center) */
.target-hud {
  position: fixed;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  min-width: 240px;
  max-width: 340px;
  background: var(--panel);
  border: 1px solid rgba(244, 63, 94, 0.45);
  border-radius: 12px;
  padding: 8px 12px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  display: none;
}

.target-hud.visible {
  display: block;
}

.target-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.target-name {
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  white-space: nowrap;
}

.target-actions {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}

.target-actions button {
  flex: 1;
  font-size: 11px;
  padding: 4px 7px;
}

/* Right Column: Minimap Radar + Live Tribe Legend / Entity Inspector */
.right-dock {
  position: fixed;
  top: 60px;
  right: 12px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}

.minimap-card {
  width: 178px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 7px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.minimap-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-bright);
  margin-bottom: 5px;
}

#minimap-canvas {
  display: block;
  width: 162px;
  height: 202px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  background: #0a0f18;
}

.minimap-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--muted);
}

/* Entity Inspector Card (when clicking a bot / stall / player) */
.inspector-card {
  width: 248px;
  background: var(--panel);
  border: 1px solid var(--panel-border-hi);
  border-radius: 12px;
  padding: 10px 12px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  pointer-events: auto;
  display: none;
}

.inspector-card.visible {
  display: block;
}

.inspector-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.inspector-title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--gold-bright);
}

.inspector-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.inspector-close {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  padding: 0 4px;
}

.inspector-close:hover {
  color: #fff;
}

.inspector-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  padding: 3px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
}

.inspector-row:last-of-type {
  border-bottom: none;
}

.inspector-k { color: var(--muted); }
.inspector-v { color: var(--text); font-weight: 600; text-align: right; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.inspector-btns {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.inspector-btns button {
  flex: 1;
  justify-content: center;
  font-size: 11px;
  padding: 5px 6px;
}

/* Bottom-Left Chat & Whisper Panel */
.chat-dock {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 26;
  width: 372px;
  max-width: calc(100vw - 24px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: height 0.2s ease;
}

.chat-dock.collapsed .chat-log,
.chat-dock.collapsed .chat-input-row {
  display: none;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.chat-tabs {
  display: flex;
  gap: 4px;
}

.chat-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}

.chat-tab.active {
  background: rgba(234, 185, 92, 0.2);
  border-color: var(--panel-border);
  color: var(--gold-bright);
}

.chat-log {
  height: 150px;
  overflow-y: auto;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  line-height: 1.38;
  user-select: text;
  -webkit-user-select: text;
}

.chat-log::-webkit-scrollbar { width: 5px; }
.chat-log::-webkit-scrollbar-thumb { background: rgba(234, 185, 92, 0.35); border-radius: 99px; }

.chat-line {
  word-break: break-word;
}

.chat-line.TALKING .chat-sender { color: #fef08a; font-weight: 700; }
.chat-line.SHOUT { color: #86efac; }
.chat-line.SHOUT .chat-sender { color: #4ade80; font-weight: 700; }
.chat-line.INFO { color: #93c5fd; }
.chat-line.NOTICE { color: #fcd34d; font-weight: 600; }
.chat-line.WHISPER { color: #f9a8d4; }
.chat-line.WHISPER .chat-sender { color: #f472b6; font-weight: 700; }
.chat-line.SYSTEM { color: #cbd5e1; font-style: italic; }

.chat-input-row {
  display: flex;
  gap: 5px;
  padding: 6px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
}

.chat-mode-sel {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold-bright);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
}

.chat-input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  color: #fff;
  padding: 5px 8px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
}

.chat-input:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.11);
}

.chat-whisper-target {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(236, 72, 153, 0.16);
  border-top: 1px solid rgba(236, 72, 153, 0.35);
  font-size: 11px;
  color: #fbcfe8;
}

.chat-whisper-target.visible {
  display: flex;
}

/* Bottom-Center Quick Action Bar */
.action-dock {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 26;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 6px 8px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.skill-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 54px;
  padding: 6px 10px 4px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.skill-btn:hover {
  border-color: var(--gold);
  background: rgba(234, 185, 92, 0.18);
  transform: translateY(-2px);
}

.skill-btn:active {
  transform: translateY(0);
}

.skill-btn.active-buff {
  border-color: #facc15;
  background: rgba(234, 179, 8, 0.26);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.45);
}

.skill-btn.active-risk {
  border-color: #f43f5e;
  background: rgba(225, 29, 72, 0.28);
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.55);
}

.skill-ico { font-size: 16px; line-height: 1.1; margin-top: 4px; }
.skill-lbl { font-size: 10px; font-weight: 700; margin-top: 2px; color: #e5e7eb; }
.skill-key {
  position: absolute;
  top: 2px;
  right: 5px;
  font-size: 8.5px;
  opacity: 0.78;
  color: var(--gold-bright);
  font-family: ui-monospace, monospace;
}

/* Mobile Touch Controls */
.mobile-controls {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 24;
  display: none;
}

.mobile-controls.visible {
  display: block;
}

.joystick-zone {
  position: fixed;
  left: 20px;
  bottom: 92px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.48);
  border: 2px solid rgba(234, 185, 92, 0.42);
  pointer-events: auto;
  touch-action: none;
}

.joystick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd984, #b45309);
  border: 2px solid #fff3c4;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.mobile-action-pad {
  position: fixed;
  right: 18px;
  bottom: 96px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}

.mobile-fab {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid rgba(255, 217, 132, 0.65);
  background: radial-gradient(circle at 30% 30%, #ef4444, #991b1b);
  color: #fff;
  font-size: 22px;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.mobile-fab.loot {
  width: 48px;
  height: 48px;
  font-size: 18px;
  background: radial-gradient(circle at 30% 30%, #f59e0b, #92400e);
}

/* Landing / Login Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: radial-gradient(circle at 50% 42%, rgba(11, 14, 20, 0.52), rgba(5, 7, 12, 0.84));
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: opacity 0.22s ease;
}

.modal-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-card {
  width: 440px;
  max-width: 100%;
  background: linear-gradient(180deg, rgba(20, 25, 38, 0.96), rgba(11, 14, 22, 0.98));
  border: 1px solid var(--panel-border-hi);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 40px rgba(234, 185, 92, 0.14);
}

.modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(234, 185, 92, 0.16);
  border: 1px solid rgba(234, 185, 92, 0.45);
  color: var(--gold-bright);
  margin-bottom: 10px;
}

.modal-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #fff5d6, #eab95c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-desc {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.48;
  color: #cbd5e1;
}

.spectate-cta {
  width: 100%;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(37, 99, 235, 0.25));
  color: #e0f2fe;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  transition: all 0.16s ease;
  font-family: inherit;
}

.spectate-cta:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.4), rgba(37, 99, 235, 0.4));
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.28);
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 12px 0;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.form-grid {
  display: grid;
  gap: 9px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.field input, .field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  padding: 9px 11px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.field input:focus, .field select:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.1);
}

.play-cta {
  width: 100%;
  margin-top: 6px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid #ffe49c;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.35);
  transition: all 0.16s ease;
  font-family: inherit;
}

.play-cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.play-cta:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.login-error {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(225, 29, 72, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.5);
  color: #fecdd3;
  font-size: 12px;
  display: none;
}

.login-error.visible {
  display: block;
}

.modal-foot {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--muted);
}

.modal-foot a {
  color: var(--gold-bright);
  text-decoration: none;
  font-weight: 600;
}

.modal-foot a:hover { text-decoration: underline; }

/* Toast notification */
.toast-stack {
  position: fixed;
  top: 108px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.toast {
  background: rgba(15, 20, 32, 0.92);
  border: 1px solid var(--panel-border-hi);
  color: var(--gold-bright);
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: toastIn 0.2s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Controls hint pill */
.controls-hint {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 24;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 11px;
  color: #cbd5e1;
  backdrop-filter: blur(10px);
  display: flex;
  gap: 10px;
  align-items: center;
}

.controls-hint kbd {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
  color: var(--gold-bright);
  font-family: ui-monospace, monospace;
}

@media (max-width: 980px) {
  .controls-hint { display: none; }
  .action-dock { bottom: 10px; left: auto; right: 10px; transform: none; }
  .chat-dock { width: 290px; }
  .minimap-card { width: 138px; }
  #minimap-canvas { width: 122px; height: 152px; }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .chat-dock { width: calc(100vw - 24px); bottom: 68px; }
  .chat-log { height: 96px; }
  .action-dock { left: 50%; right: auto; transform: translateX(-50%); bottom: 8px; padding: 4px 6px; }
  .skill-btn { min-width: 52px; height: 44px; padding: 3px 5px; }
  .minimap-card { display: none; }
}
