/* ═══════════════════════════════════════════════════════
   GAME.CSS — Мрак Подземелья
   Дизайн главного меню — как в menu.html
   ═══════════════════════════════════════════════════════ */

:root {
  --gold: #e1b76c;
  --gold-bright: #ffd88a;
  --gold-deep: #8b6914;
  --gold-glow: rgba(225, 183, 108, 0.4);
  --gold-glow-soft: rgba(225, 183, 108, 0.15);
  --orange: #ff8c42;
  --orange-glow: rgba(255, 140, 66, 0.5);

  --bg-dark: #0a0503;
  --bg-darker: #050201;

  --panel-bg-1: #1c1f26;
  --panel-bg-2: #16181d;
  --panel-border: #2a2e37;
  --panel-inner: #252220;

  --txt-main: #e1e4ea;
  --txt-mid: #b8aa8c;
  --txt-dim: #8b7a58;

  --border: #4a3325;
  --border-bright: #5a4328;
  --panel: #1a1510;
  --panel-light: #221b14;
  --input: #2a2118;
  --input-light: #33271c;

  --danger: #c0392b;
  --danger-light: #e74c3c;
  --success: #2ecc71;
  --damage: #ff6b6b;
  --heal: #51cf66;
  --warning: #f39c12;
  --info: #3498db;

  --modal-bg: rgba(25, 15, 8, 0.98);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  --shadow-gold: 0 0 20px rgba(225, 183, 108, 0.3);
  --glass-border: rgba(225, 183, 108, 0.15);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);

  --wrap-width-desktop: 560px;
  --wrap-width-mobile: 100%;
  --wrap-height-desktop: 95vh;
  --wrap-height-mobile: 100dvh;

  --font-display: 'Forum', 'Philosopher', 'Segoe UI', serif;
  --font-body: 'Segoe UI', 'Inter', 'Roboto', system-ui, -apple-system, Tahoma, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  touch-action: manipulation;
  background: var(--bg-dark);
}

body {
  font-family: var(--font-body);
  background: radial-gradient(ellipse at 50% 0%, #1a1008 0%, #0a0503 50%, #000000 100%);
  color: var(--txt-main);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  height: 100dvh;
}

/* ═══════════════════════════════════════════════════════
   ГЛАВНОЕ МЕНЮ — HD / объёмный стиль (как в бою)
   Скошенные панели, металлические рамки иконок,
   выпуклые плашки-кнопки с «нажимом».
   ═══════════════════════════════════════════════════════ */

#mainMenuOverlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(10,5,3,0.85), rgba(0,0,0,0.95));
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.main-menu-container {
  width: var(--wrap-width-mobile);
  height: var(--wrap-height-mobile);
  max-width: 100%;
  max-height: 100dvh;
  background:
    radial-gradient(circle at 15% 6%, rgba(225,183,108,0.10) 0%, transparent 42%),
    radial-gradient(circle at 92% 94%, rgba(168,85,85,0.08) 0%, transparent 42%),
    linear-gradient(180deg, #2a3150 0%, #1b2036 38%, #11131f 100%);
  border: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(225,183,108,0.2), inset 0 1px 0 rgba(255,255,255,0.14), inset 0 -6px 16px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 8px;
  animation: menuFadeIn 0.18s ease-out;
  position: relative;
}
/* тонкая золотая внутренняя окантовка */
.main-menu-container::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 10px;
  border: 1px solid rgba(225,183,108,0.22);
  box-shadow: inset 0 0 22px rgba(0,0,0,0.35);
  pointer-events: none;
  z-index: 0;
}

@media (min-width: 768px) {
  .main-menu-container {
    width: var(--wrap-width-desktop);
    height: var(--wrap-height-desktop);
    max-width: var(--wrap-width-desktop);
    max-height: var(--wrap-height-desktop);
    border: 2px solid var(--gold-deep);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.7), 0 0 40px rgba(225,183,108,0.28), inset 0 1px 0 rgba(255,255,255,0.14), inset 0 -6px 16px rgba(0,0,0,0.45);
  }
}

@keyframes menuFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes portPulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50%      { transform: scale(1.08); opacity: 0.1; }
}

/* ── Шапка: объёмная панель ── */
.main-menu-header {
  background: linear-gradient(180deg, #343c5e 0%, #232944 55%, #181c30 100%);
  border: 1px solid rgba(225,183,108,0.45);
  border-radius: 12px;
  box-shadow: 0 3px 0 #0a0d18, 0 8px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.18), inset 0 -4px 10px rgba(0,0,0,0.4);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Портрет — металлическая золотая рамка */
.main-menu-portrait {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid transparent;
  background:
    radial-gradient(circle at 32% 26%, rgba(255,220,150,0.28), rgba(10,8,6,0.85) 72%) padding-box,
    linear-gradient(145deg, #ffe9b0 0%, #c9962f 28%, #7a5410 55%, #e4b968 80%, #8b6914 100%) border-box;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.75), 0 3px 8px rgba(0,0,0,0.6), 0 0 18px rgba(225,183,108,0.3);
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}
.main-menu-portrait::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(225,183,108,0.3);
  animation: portPulse 3.5s ease-in-out infinite;
  pointer-events: none;
}
.main-menu-portrait svg { width: 70%; height: 70%; display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.7)); }

.main-menu-title-block { flex: 1; min-width: 0; }
.main-menu-title-block h2 {
  color: var(--gold-bright);
  font-size: 19px;
  font-family: var(--font-display);
  margin: 0 0 4px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 3px rgba(0,0,0,0.9), 0 0 12px rgba(255,200,120,0.45);
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.main-menu-title-block p {
  color: var(--txt-mid);
  font-size: 10px;
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Закрыть — выпуклая красная кнопка */
.main-menu-close-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #e2644a 0%, #ad2f1f 55%, #7b1c13 100%);
  border: 1.5px solid;
  border-color: #f6a283 #b83c2a #5a150e #b83c2a;
  color: #fff0ea;
  font-size: 15px;
  cursor: pointer;
  outline: none;
  padding: 0;
  line-height: 1;
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
  box-shadow: 0 3px 0 #4a120b, 0 6px 10px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.35);
}
.main-menu-close-btn i {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: inherit;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}
.main-menu-close-btn:hover { filter: brightness(1.12); }
.main-menu-close-btn:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 #4a120b, 0 1px 3px rgba(0,0,0,0.6), inset 0 2px 6px rgba(0,0,0,0.5);
}

/* ── Тело меню (скролл) ── */
.main-menu-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  z-index: 1;
  -webkit-overflow-scrolling: touch;
}
.main-menu-body::-webkit-scrollbar { display: none; }

/* ── Секция (категория): объёмная скошенная панель ── */
.main-menu-category {
  background: linear-gradient(180deg, #2c3453 0%, #1c2137 45%, #141829 100%);
  border: 1px solid rgba(225,183,108,0.38);
  border-radius: 12px;
  box-shadow: 0 3px 0 #090b15, 0 8px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.16), inset 0 -4px 10px rgba(0,0,0,0.35);
  overflow: hidden;
  --accent: var(--gold);
  flex-shrink: 0;
}

.main-menu-category:nth-child(1) { --accent: #e1b76c; }
.main-menu-category:nth-child(2) { --accent: #6ac8ff; }
.main-menu-category:nth-child(3) { --accent: #8ee04f; }
.main-menu-category:nth-child(4) { --accent: #b8aa8c; }

/* ── Заголовок секции: золотая медаль + линия ── */
.main-menu-category-title {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.18));
  border-bottom: 1px solid rgba(0,0,0,0.55);
  box-shadow: 0 1px 0 rgba(255,255,255,0.07);
}

.main-menu-category-icon {
  width: 24px;
  height: 24px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff4d2;
  font-size: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--accent) 55%, #fff) 0%, color-mix(in srgb, var(--accent) 45%, #000) 55%, #0c0a08 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.4), 0 2px 4px rgba(0,0,0,0.6), 0 0 8px color-mix(in srgb, var(--accent) 45%, transparent);
  filter: none;
}
.main-menu-category-icon i { filter: drop-shadow(0 1px 1px rgba(0,0,0,0.7)); }

.main-menu-category-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9), 0 0 8px color-mix(in srgb, var(--accent) 40%, transparent);
  flex-shrink: 0;
}

/* Блестящая линия-завиток справа */
.main-menu-category-title::after {
  content: '';
  flex: 1;
  height: 3px;
  margin-left: 2px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  box-shadow: 0 1px 0 rgba(0,0,0,0.6);
  opacity: 0.55;
}

/* ── Список элементов ── */
.main-menu-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px 10px;
}

/* ── Строка: выпуклая плашка ── */
.main-menu-item-wrap {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 11px;
  padding: 8px 12px 8px 8px;
  background: linear-gradient(180deg, #343d60 0%, #232a45 55%, #1a1f35 100%) !important;
  border-radius: 10px;
  border: 1px solid rgba(138,184,255,0.22);
  border-left: 4px solid var(--accent);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, filter 0.15s;
  overflow: hidden;
  height: auto !important;
  width: 100%;
  box-shadow: 0 3px 0 #0a0d18, 0 5px 9px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.16), inset 0 -3px 7px rgba(0,0,0,0.3);
}

/* глянцевый блик сверху */
.main-menu-item-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 46%);
  pointer-events: none;
}
.main-menu-item-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, var(--accent), transparent 62%);
  opacity: 0.12;
  pointer-events: none;
}

.main-menu-item-wrap:hover {
  background: linear-gradient(180deg, #3d4770 0%, #29314f 55%, #1e2540 100%) !important;
  filter: brightness(1.08);
  box-shadow: 0 3px 0 #0a0d18, 0 5px 9px rgba(0,0,0,0.45), 0 0 14px -3px var(--accent), inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -3px 7px rgba(0,0,0,0.3);
}
/* нажатие: плашка «вдавливается» */
.main-menu-item-wrap:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 #0a0d18, 0 1px 3px rgba(0,0,0,0.5), inset 0 2px 8px rgba(0,0,0,0.5);
}

/* ── Иконка: металлическая рамка в цвете раздела (как аватар союзника) ── */
.main-menu-icon-circle {
  position: static !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  width: 36px !important;
  height: 36px !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px !important;
  border: 2px solid transparent !important;
  background:
    radial-gradient(circle at 32% 24%, color-mix(in srgb, var(--accent) 38%, #1a1d2c) 0%, #0b0d16 78%) padding-box,
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 45%, #fff) 0%, var(--accent) 30%, color-mix(in srgb, var(--accent) 35%, #000) 58%, color-mix(in srgb, var(--accent) 80%, #fff) 82%, color-mix(in srgb, var(--accent) 50%, #000) 100%) border-box !important;
  color: var(--accent);
  filter: none;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.75), 0 2px 4px rgba(0,0,0,0.6), 0 0 8px color-mix(in srgb, var(--accent) 30%, transparent) !important;
  overflow: hidden;
  transition: none;
  z-index: 2;
  padding: 0;
}

.main-menu-icon-circle i {
  font-size: 16px !important;
  color: var(--accent);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8)) drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 55%, transparent));
}

.main-menu-icon-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* SVG-иконка растягивается на весь прямоугольник */
.main-menu-icon-circle svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
  padding: 4px;
  box-sizing: border-box;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}

/* ── Кнопка (тело строки) ── */
.main-menu-btn {
  position: static !important;
  transform: none !important;
  flex: 1;
  min-width: 0;
  height: auto !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  color: #f1ecdc !important;
  font-size: 13px !important;
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  text-align: left;
  letter-spacing: 0.03em;
  text-transform: none !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: none !important;
  cursor: pointer;
  mask-image: none !important;
  -webkit-mask-image: none !important;
  outline: none;
  position: relative;
  z-index: 1;
}

.main-menu-btn:hover,
.main-menu-btn:focus,
.main-menu-btn:active {
  transform: none !important;
  background: none !important;
  border: none !important;
  color: #fff !important;
  box-shadow: none !important;
}

.main-menu-btn-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  line-height: 1.15;
}

/* Стрелка — маленькая выпуклая кнопочка */
.main-menu-btn-arrow {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  font-size: 9px !important;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,0.14), rgba(0,0,0,0.5));
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.08);
  opacity: 0.8;
  flex-shrink: 0;
  transition: transform 0.2s, opacity 0.2s;
  line-height: 1;
}

.main-menu-item-wrap:hover .main-menu-btn-arrow {
  transform: translateX(3px);
  opacity: 1;
}

/* ── Адаптив меню ── */
@media (max-width: 767px) {
  .main-menu-container { padding: 8px; gap: 6px; }
  .main-menu-container::before { inset: 2px; }
  .main-menu-header { padding: 12px; gap: 12px; }
  .main-menu-portrait { width: 50px; height: 50px; }
  .main-menu-title-block h2 { font-size: 16px; }
  .main-menu-title-block p { font-size: 9px; }
  .main-menu-close-btn { width: 36px; height: 36px; font-size: 13px; }
  .main-menu-body { gap: 8px; }
  .main-menu-category-title { padding: 6px 10px; }
  .main-menu-category-icon { width: 21px; height: 21px; font-size: 10px; }
  .main-menu-category-label { font-size: 11px; letter-spacing: 0.14em; }
  .main-menu-items { padding: 6px 8px 8px; gap: 5px; }
  .main-menu-item-wrap { padding: 6px 10px 6px 6px; gap: 9px; }
  .main-menu-icon-circle { width: 32px !important; height: 32px !important; }
  .main-menu-icon-circle i { font-size: 14px !important; }
  .main-menu-btn { font-size: 12px !important; }
  .main-menu-btn-arrow { width: 18px; height: 18px; }
}

@media (max-width: 380px) {
  .main-menu-container { padding: 6px; gap: 5px; }
  .main-menu-header { padding: 10px; gap: 10px; }
  .main-menu-portrait { width: 44px; height: 44px; }
  .main-menu-title-block h2 { font-size: 14px; }
  .main-menu-title-block p { font-size: 8.5px; letter-spacing: 0.12em; }
  .main-menu-close-btn { width: 32px; height: 32px; font-size: 12px; }
  .main-menu-item-wrap { padding: 5px 9px 5px 5px; gap: 8px; }
  .main-menu-icon-circle { width: 30px !important; height: 30px !important; }
  .main-menu-icon-circle i { font-size: 13px !important; }
  .main-menu-btn { font-size: 11.5px !important; }
}

/* ── Loading ── */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: column;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  opacity: 1;
  visibility: visible;
}
.loading-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-spinner { text-align: center; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(74, 51, 37, 0.3);
  border-top: 3px solid var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loading-text {
  color: var(--gold);
  font-weight: 800;
  font-family: var(--font-display);
  text-shadow: 0 0 8px var(--gold-glow);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 13px !important;
}

/* ═══════════ ОСНОВНОЙ КОНТЕЙНЕР ═══════════ */
.app-container {
  width: 100%;
  height: 800px;
  max-height: 100dvh;
  background: linear-gradient(145deg, rgba(40,25,15,0.98), rgba(25,15,8,0.99));
  padding: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
  box-shadow: 0 0 30px rgba(225,183,108,0.2), inset 0 1px 0 rgba(225,183,108,0.1);
}
.app-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(225,183,108,0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(168,85,85,0.05) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}
@media (min-width: 768px) {
  .app-container {
    width: 560px;
    max-width: 560px;
    height: 95vh;
    border-radius: 12px;
    border: 2px solid var(--border);
    padding: 12px;
  }
}
@media (max-width: 767px) {
  .app-container {
    height: 100dvh;
    max-height: 100dvh;
    padding: 8px;
    gap: 6px;
  }
}

/* ── Page content ── */
.page-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
  z-index: 1;
  animation: pageFade 0.35s ease;
}
@keyframes pageFade {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 767px) {
  .page-content { gap: 6px; }
}

/* ═══════════ ПАНЕЛИ ═══════════ */
.panel-wrapper {
  background: linear-gradient(180deg, var(--panel-bg-1) 0%, var(--panel-bg-2) 100%);
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.panel-block {
  padding: 8px 10px;
  border-bottom: 1px solid var(--panel-inner);
  position: relative;
}
.panel-block:last-child { border-bottom: none; }

.panel-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Forum', 'Philosopher', 'Segoe UI', serif;
  flex-shrink: 0;
  min-width: 0;
}
.panel-title .sec-icon {
  width: 16px; height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 10px;
  filter: none;
  flex-shrink: 0;
}
.panel-title .counter {
  margin-left: auto;
  font-size: 11px;
  color: var(--gold-bright);
  font-weight: 700;
  font-family: 'Forum', 'Philosopher', 'Segoe UI', serif;
  letter-spacing: 0.05em;
  text-shadow: 0 0 6px rgba(255,200,120,0.35);
}
.panel-title .title-text {
  flex-shrink: 0;
  white-space: nowrap;
}

.panel-wrapper.ps-stretch {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.panel-wrapper.ps-stretch .panel-block {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ═══════════ ЛОКАЦИЯ ═══════════ */
.cave-empty-slot {
  width: 100%;
  height: 78px;
  min-height: 78px;
  padding: 0;
  background: linear-gradient(180deg, rgba(40,32,18,0.6) 0%, rgba(20,15,8,0.6) 100%);
  border: 1px solid rgba(225,183,108,0.22);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.cave-empty-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 5px;
  filter: brightness(0.9) contrast(1.05) saturate(0.9);
  z-index: 0;
  transition: transform 0.3s ease;
}
.cave-empty-slot:hover img { transform: scale(1.02); }
.cave-empty-slot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,5,3,0.55) 0%, rgba(10,5,3,0.1) 40%, rgba(10,5,3,0.65) 100%);
  pointer-events: none;
  border-radius: 5px;
  z-index: 2;
}

.cave-title {
  position: absolute;
  left: 11px;
  bottom: 8px;
  z-index: 4;
  font-family: 'Forum', 'Philosopher', serif;
  padding: 2px 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(60,45,20,0.92) 0%, rgba(30,20,8,0.92) 100%);
  border: 1px solid rgba(225,183,108,0.6);
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(225,183,108,0.3), inset 0 1px 0 rgba(255,220,150,0.15);
  text-shadow: 0 0 6px rgba(255,200,120,0.5);
  line-height: 1;
  opacity: 0.85;
}

.cave-lvl-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: 'Forum', 'Philosopher', 'Segoe UI', serif;
  color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(60,45,20,0.92) 0%, rgba(30,20,8,0.92) 100%);
  border: 1px solid rgba(225,183,108,0.6);
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(225,183,108,0.3), inset 0 1px 0 rgba(255,220,150,0.15);
  text-shadow: 0 0 6px rgba(255,200,120,0.5);
}
.cave-lvl-badge i {
  font-size: 10px;
  color: var(--gold);
  filter: none;
}

.description-toggle {
  position: relative;
  width: 28px;
  height: 28px;
  background: linear-gradient(180deg, rgba(40,32,18,0.92) 0%, rgba(20,15,8,0.92) 100%);
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  cursor: pointer;
  transition: var(--transition-normal);
  z-index: 5;
  box-shadow: 0 0 8px rgba(225,183,108,0.3), inset 0 1px 0 rgba(255,220,150,0.15);
}
.description-toggle:hover {
  background: var(--gold);
  color: var(--bg-dark);
  transform: scale(1.1);
}
.description-toggle i { font-size: 12px !important; }

.description-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-bg);
  border-radius: 6px;
  padding: 14px;
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 6;
  overflow-y: auto;
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--gold);
  scrollbar-width: none;
}
.description-overlay::-webkit-scrollbar { display: none; }
.description-overlay.active {
  transform: translateY(0);
  opacity: 1;
}
.description-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.description-content {
  color: var(--txt-main);
  font-size: 12px !important;
  line-height: 1.55;
}

/* ═══════════ ELEM-SWITCH ═══════════ */
.elem-switch {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(20,12,6,0.6);
  flex-shrink: 0;
  max-width: 100%;
}
.panel-title .elem-switch {
  margin-left: auto;
  flex-shrink: 1;
  min-width: 0;
}
.elem-switch.scrollable {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}
.elem-switch.scrollable::-webkit-scrollbar { display: none; }
.elem-switch.scrollable::after {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 1px;
}
.elem-switch-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'Forum', 'Philosopher', 'Segoe UI', serif;
  color: var(--txt-dim);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}
.elem-switch-btn:hover {
  color: var(--txt-mid);
  background: rgba(225,183,108,0.05);
}
.elem-switch-btn.active {
  color: #1a1008;
  background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 100%);
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.elem-switch-btn + .elem-switch-btn {
  border-left: 1px solid var(--border);
}

/* ═══════════ SCROLL AREA ═══════════ */
.scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 2px;
}
.scroll-area::-webkit-scrollbar { display: none; }

/* ═══════════ ENTITY-CELL ═══════════ */
.entity-cell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: linear-gradient(135deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 100%);
  border-radius: 7px;
  border: 1px solid rgba(0,0,0,0.5);
  border-left: 3px solid currentColor;
  overflow: hidden;
  min-height: 48px;
  flex-shrink: 0;
  color: #8ee04f;
  transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s ease;
  cursor: pointer;
}
.entity-cell::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, currentColor, transparent 65%);
  opacity: 0.07; pointer-events: none;
}
.entity-cell:hover {
  transform: translateX(3px);
  box-shadow: 0 0 12px rgba(225,183,108,0.18);
}
.entity-cell.filtered-out { display: none !important; }
.entity-cell .ec-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(0,0,0,0.5);
  border: 1px solid currentColor;
  color: inherit;
  font-size: 20px;
  filter: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  position: relative;
  z-index: 1;
}
.entity-cell .ec-icon i {
  font-size: 20px;
  line-height: 1;
  display: block;
}
.entity-cell .ec-icon img {
  width: 28px; height: 28px; object-fit: contain;
}
.entity-cell .ec-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  position: relative;
  z-index: 1;
}
.entity-cell .ec-name {
  font-size: 14px;
  font-weight: 800;
  color: #f5d28a;
  font-family: 'Forum', 'Philosopher', serif;
  letter-spacing: 0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.entity-cell .ec-desc {
  font-size: 12px;
  color: var(--txt-mid);
  letter-spacing: 0.04em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.entity-cell .ec-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: inherit;
  font-size: 14px;
  opacity: 0.85;
  filter: none;
  position: relative;
  z-index: 1;
}

.entity-cell.npc { color: #7cc47c; border-left-color: #7cc47c; }
.entity-cell.npc .ec-name { color: #a0e0a0; }
.entity-cell.npc .ec-desc { color: #8ac88a; }

.entity-cell.object { color: #6ac8ff; border-left-color: #6ac8ff; }
.entity-cell.object .ec-name { color: #a8e0ff; }
.entity-cell.object .ec-desc { color: #8ac8e8; }

.entity-cell.location { color: var(--gold); border-left-color: var(--gold); }
.entity-cell.location .ec-name { color: var(--gold-bright); }
.entity-cell.location .ec-desc { color: var(--txt-mid); }

.entity-cell.monster { color: #e74c3c; border-left-color: #e74c3c; }
.entity-cell.monster .ec-name { color: #ff8a8a; }
.entity-cell.monster .ec-desc { color: #e09090; }

.entity-cell.corpse {
  color: #8b7a58;
  border-left-color: #6e6558;
  border-color: rgba(80,70,55,0.5);
  opacity: 0.65;
}
.entity-cell.corpse .ec-name { color: #b8aa8c; }
.entity-cell.corpse .ec-desc { color: #8b7a58; }
.entity-cell.corpse .ec-icon {
  background: rgba(0,0,0,0.65);
  border-color: #6e6558;
  color: #8b7a58;
  filter: none;
}

.entity-cell.player { color: #c888e8; border-left-color: #c888e8; }
.entity-cell.player .ec-name { color: #dca8ff; }
.entity-cell.player .ec-desc { color: #b090d0; }

.entity-cell.item { color: var(--gold); border-left-color: var(--gold); }
.entity-cell.item .ec-name { color: var(--gold-bright); }
.entity-cell.item .ec-desc { color: var(--txt-mid); }

/* NPC — без свечения */
.entity-cell.npc::before { display: none !important; }
.entity-cell.npc .ec-icon { filter: none !important; }
.entity-cell.npc .ec-arrow { filter: none !important; }
.entity-cell.npc .ec-name {
  color: #e6f5e6 !important;
  text-shadow: none !important;
}
.entity-cell.npc .ec-desc {
  color: #9ed49e !important;
  text-shadow: none !important;
}
.entity-cell.npc:hover {
  box-shadow: 0 0 10px rgba(124, 196, 124, 0.15) !important;
}

/* ═══════════ ШАПКА ГЕРОЯ ═══════════ */
.hero-header { display: flex; gap: 12px; align-items: center; }
.hero-portrait {
  position: relative !important;
  width: 76px; height: 76px; flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,220,150,0.15), rgba(0,0,0,0.6) 70%);
  border: 2px solid rgba(225,183,108,0.55);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.6), 0 0 18px rgba(225,183,108,0.25);
  overflow: visible;
}
.hero-portrait::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(225,183,108,0.3);
  animation: portPulse 3.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
.hero-portrait .avatar-character {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  clip-path: circle(50%);
  z-index: 3;
}

.hero-portrait .level-badge {
  position: absolute !important;
  top: auto !important;
  left: auto !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 0 !important;
  max-width: none !important;
  border-radius: 50% !important;
  background: linear-gradient(180deg, #3d2c17 0%, #1a1008 100%) !important;
  border: 1.5px solid var(--gold) !important;
  color: var(--gold-bright) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Courier New', monospace !important;
  line-height: 1 !important;
  z-index: 4 !important;
  box-shadow: 0 0 6px rgba(225,183,108,0.55), inset 0 1px 0 rgba(255,220,150,0.2), 0 1px 3px rgba(0,0,0,0.6) !important;
  text-shadow: 0 0 4px rgba(255,200,120,0.5) !important;
  margin: 0 !important;
}

.hero-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.hero-name-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: nowrap;
}
.hero-name {
  font-size: 14px; font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 0 8px rgba(255,200,120,0.4), 0 1px 3px rgba(0,0,0,0.8);
  line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: 'Forum', 'Philosopher', 'Segoe UI', serif;
  letter-spacing: 0.03em;
}
.hero-class-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px; border-radius: 20px;
  color: var(--txt-mid);
  background: rgba(225,183,108,0.1);
  border: 1px solid var(--border);
  flex-shrink: 0;
  font-family: 'Segoe UI', sans-serif;
  white-space: nowrap;
}
.hero-clan {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-bright);
  padding: 2px 8px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(225,183,108,0.14) 0%, rgba(225,183,108,0.06) 100%);
  border: 1px solid rgba(225,183,108,0.45);
  box-shadow: 0 0 8px rgba(225,183,108,0.18), inset 0 1px 0 rgba(255,220,150,0.12);
  text-shadow: 0 0 6px rgba(255,200,120,0.35);
  white-space: nowrap;
  flex-shrink: 0;
}
.hero-clan.no-clan {
  color: var(--txt-mid);
  background: rgba(225,183,108,0.05);
  border-color: rgba(225,183,108,0.2);
  box-shadow: none;
  text-shadow: none;
}

.hero-bars-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-bars {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.hero-menu-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(40,32,18,0.85) 0%, rgba(20,15,8,0.85) 100%);
  border: 1px solid rgba(225,183,108,0.4);
  border-radius: 8px;
  color: var(--gold-bright);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,220,150,0.1), 0 0 6px rgba(225,183,108,0.12);
}
.hero-menu-btn i {
  filter: none;
  line-height: 1;
}
.hero-menu-btn:hover {
  background: linear-gradient(180deg, rgba(60,45,20,0.95) 0%, rgba(30,20,8,0.95) 100%);
  border-color: rgba(225,183,108,0.8);
  color: #fff8e0;
  box-shadow: inset 0 1px 0 rgba(255,220,150,0.2), 0 0 12px rgba(225,183,108,0.4);
}
.hero-menu-btn:active {
  transform: scale(0.96);
}

.stat { display: flex; align-items: center; gap: 0; width: 100%; }
.stat-icon {
  width: 18px; height: 18px; min-width: 18px;
  background: var(--bg-dark);
  border: 1px solid rgba(74, 51, 37, 0.7);
  border-right: none;
  border-radius: 9px 0 0 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; z-index: 2;
}
.stat-icon i { font-size: 8px; line-height: 1; }
.stat-icon.hp-icon { color: #e74c3c; }
.stat-icon.st-icon { color: #2ecc71; }
.stat-icon.xp-icon { color: #f1c40f; }
.stat-icon.mp-icon { color: #4da3ff; }
.bar-wrap { flex: 1; position: relative; }
.bar {
  height: 18px;
  border-radius: 0 9px 9px 0;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(74, 51, 37, 0.5);
  border-left: none;
  position: relative; overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.6);
  width: 100%;
}
.bar > i {
  position: absolute; left: 0; top: 0; bottom: 0;
  border-radius: 0 8px 8px 0;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}
.bar-value {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8), 0 0 3px rgba(0,0,0,0.5);
  z-index: 3; font-size: 9px;
  font-family: 'Segoe UI', sans-serif;
}
.bar.hp > i {
  background: linear-gradient(180deg, #e74c3c, #c0392b);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 0 8px rgba(231, 76, 60, 0.3);
}
.bar.st > i {
  background: linear-gradient(180deg, #2ecc71, #1e8449);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 0 8px rgba(46, 204, 113, 0.3);
}
.bar.xp > i {
  background: linear-gradient(180deg, #f1c40f, #c9a35e);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 0 8px rgba(241, 196, 15, 0.3);
}
.bar.mp > i {
  background: linear-gradient(180deg, #4080d8, #103070);
  box-shadow: inset 0 1px 0 rgba(180,220,255,0.3), 0 0 8px rgba(40,100,200,0.4);
}

.buffs { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.buff {
  width: 18px; height: 18px;
  background: linear-gradient(180deg, rgba(40,32,18,0.85) 0%, rgba(20,15,8,0.85) 100%);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
  font-size: 14px !important;
}

/* ═══════════ КУРТИНА (группа) ═══════════ */
.curtain-container {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
  border-radius: inherit;
}
.curtain-backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
  border-radius: inherit;
}
.curtain-backdrop.active { opacity: 1; pointer-events: auto; }
.curtain {
  position: absolute;
  top: 0; left: 0;
  width: 260px;
  max-width: 80%;
  height: 100%;
  background: linear-gradient(180deg, var(--panel-bg-1) 0%, var(--panel-bg-2) 100%);
  border-right: 1px solid var(--panel-border);
  box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: auto;
  z-index: 2;
  display: flex;
  flex-direction: column;
}
.curtain.active { transform: translateX(0); }
.curtain-header {
  background: linear-gradient(180deg, rgba(40,32,18,0.9) 0%, rgba(20,15,8,0.95) 100%);
  color: var(--gold-bright);
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid var(--panel-inner);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  flex-shrink: 0;
  font-size: 14px !important;
}
.curtain-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.4;
}
.curtain-body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.curtain-body::-webkit-scrollbar { display: none; }
.curtain-toggle {
  position: absolute;
  top: 110px;
  left: 100%;
  transform: translateY(-50%);
  width: 22px !important;
  height: 36px !important;
  flex-direction: column;
  gap: 2px;
  background: linear-gradient(180deg, rgba(40,32,18,0.9) 0%, rgba(20,15,8,0.95) 100%);
  border: 1px solid var(--panel-border);
  border-left: none;
  border-radius: 0 5px 5px 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  cursor: pointer;
  transition: var(--transition-normal);
  z-index: 3;
  pointer-events: auto;
  padding: 0 2px;
}
.curtain-toggle:hover { width: 24px !important; background: var(--gold); color: var(--bg-dark); }
.curtain-toggle i { font-size: 10px !important; }
/* счёт отряда «2/4» под иконкой группы */
.curtain-count { font: 800 8.5px/1 'Courier New', monospace; color: var(--gold-bright); letter-spacing: -0.03em; white-space: nowrap; pointer-events: none; }
.curtain-count:empty { display: none; }
.curtain-toggle:hover .curtain-count { color: var(--bg-dark); }

.curtain-group-title {
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px !important;
  text-align: center;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, rgba(225,183,108,0.08), transparent);
  border-bottom: 1px solid var(--panel-inner);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.empty-group-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
  background: linear-gradient(180deg, var(--panel-bg-1) 0%, var(--panel-bg-2) 100%);
  border: 1px dashed var(--panel-border);
  border-radius: 10px;
  margin: 8px;
}
.empty-group-icon {
  width: 48px; height: 48px;
  background: linear-gradient(180deg, rgba(40,32,18,0.85) 0%, rgba(20,15,8,0.85) 100%);
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 20px !important;
  margin-bottom: 12px;
  box-shadow: 0 0 15px var(--gold-glow-soft);
}
.empty-group-text {
  color: var(--txt-mid);
  font-size: 11px !important;
  margin-bottom: 16px;
  font-family: var(--font-body);
}
.empty-group-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(180deg, rgba(225,183,108,0.2), rgba(201,163,94,0.1));
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: 0 0 12px var(--gold-glow-soft);
}
.empty-group-button:hover {
  background: linear-gradient(180deg, rgba(225,183,108,0.35), rgba(201,163,94,0.2));
  box-shadow: 0 0 20px var(--gold-glow);
  transform: translateY(-1px);
}
.empty-group-button:active { transform: translateY(0); }

.loot-info {
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(40,32,18,0.5) 0%, rgba(20,15,8,0.7) 100%);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  margin-bottom: 12px;
}
.control-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.control-label { color: var(--txt-mid); font-size: 10px !important; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.control-label i { color: var(--gold); font-size: 11px !important; }
.dropdown {
  flex: 1;
  padding: 6px 10px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--txt-main);
  font-size: 10px !important;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition-fast);
  outline: none;
}
.dropdown:hover, .dropdown:focus { border-color: var(--gold); background: var(--input-light); }
.dropdown option { background: var(--panel); color: var(--txt-main); padding: 4px; }
.loot-display {
  flex: 1;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--txt-main);
  font-size: 10px !important;
  text-align: center;
}
.control-item.readonly { opacity: 0.8; }
.members-section { margin-bottom: 12px; }
.section-title {
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px !important;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: linear-gradient(180deg, rgba(225,183,108,0.08), transparent);
  border-bottom: 1px solid var(--panel-inner);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title i { margin-right: 6px; font-size: 10px !important; }
.section-title span { color: var(--txt-dim); font-family: var(--font-body); font-weight: 500; }
.members-list { display: flex; flex-direction: column; gap: 8px; padding: 0 4px; }
.member-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 100%);
  border: 1px solid rgba(0,0,0,0.5);
  border-left: 3px solid var(--gold);
  border-radius: 7px;
  transition: var(--transition-normal);
  position: relative;
}
.member-card.leader {
  border-left-color: var(--gold-bright);
  background: linear-gradient(135deg, rgba(225,183,108,0.12) 0%, rgba(0,0,0,0.2) 100%);
  box-shadow: 0 0 12px var(--gold-glow-soft);
}
.member-card:hover { border-left-color: var(--gold-bright); }
.member-avatar {
  width: 36px; height: 36px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 14px !important;
  flex-shrink: 0;
  filter: none;
}
.member-info { flex: 1; min-width: 0; }
.member-name { color: var(--gold-bright); font-size: 11px !important; font-weight: 700; margin-bottom: 3px; display: flex; align-items: center; gap: 4px; font-family: var(--font-display); }
.member-details { display: flex; align-items: center; gap: 6px; }
.member-level-class { display: flex; align-items: center; gap: 6px; }
.member-level { color: var(--txt-mid); font-size: 9px !important; background: rgba(0,0,0,0.4); padding: 2px 6px; border-radius: 10px; border: 1px solid var(--border); }
.member-class { color: var(--gold-deep); font-size: 9px !important; }
.member-health { width: 80px; flex-shrink: 0; }
.health-bar { height: 6px; background: rgba(0, 0, 0, 0.5); border-radius: 3px; overflow: hidden; margin-bottom: 3px; border: 1px solid var(--border); }
.health-fill { height: 100%; background: var(--success); border-radius: 3px; transition: width 0.4s ease; }
.health-text { color: var(--txt-mid); font-size: 8px !important; text-align: right; font-weight: 600; }
.member-mana, .member-energy { width: 80px; flex-shrink: 0; }
.mana-bar, .energy-bar { height: 4px; background: rgba(0, 0, 0, 0.5); border-radius: 2px; overflow: hidden; margin-bottom: 2px; border: 1px solid rgba(74, 51, 37, 0.5); }
.mana-fill { height: 100%; background: var(--info); border-radius: 2px; transition: width 0.4s ease; }
.mana-text, .energy-text { color: var(--txt-dim); font-size: 7px !important; text-align: right; font-weight: 600; }
.energy-fill { height: 100%; background: var(--warning); border-radius: 2px; transition: width 0.4s ease; }
.member-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.action-btn {
  width: 28px; height: 28px;
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.4);
  border-radius: 6px;
  color: var(--danger-light);
  font-size: 11px !important;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}
.action-btn:hover {
  background: rgba(231, 76, 60, 0.3);
  border-color: var(--danger-light);
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.3);
}
.group-actions {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--panel-inner);
  margin-top: 10px;
}
.group-btn {
  flex: 1;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10px !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
}
.leave-btn {
  background: linear-gradient(180deg, rgba(192,57,43,0.15), rgba(139,26,26,0.08));
  color: var(--danger-light);
  border-color: var(--danger);
}
.leave-btn:hover {
  background: linear-gradient(180deg, rgba(192,57,43,0.3), rgba(139,26,26,0.15));
  box-shadow: 0 0 15px rgba(231, 76, 60, 0.3);
  transform: translateY(-1px);
}
.group-btn:active { transform: translateY(0); }

/* ═══════════ УВЕДОМЛЕНИЯ ═══════════ */
.global-notification-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  pointer-events: none;
}
.global-notification {
  background: linear-gradient(180deg, #1e1a14 0%, #12100a 100%);
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  padding: 14px 18px;
  min-width: 280px;
  max-width: 380px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
}
.global-notification.warning .notification-message { color: red; font-size: 12px; line-height: 1.4; }
.global-notification.show { transform: translateX(0); }
.global-notification.hide { transform: translateX(100%); }
.global-notification::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--gold);
}
.global-notification.group::before { background: #3498db; }
.global-notification.private::before { background: #e74c3c; }
.global-notification.success::before { background: #2ecc71; }
.global-notification.warning::before { background: #f39c12; }
.global-notification.error::before { background: #e74c3c; }
.notification-title {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--gold-bright);
  font-size: 13px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.04em;
}
.notification-message { color: var(--txt-main); font-size: 12px; line-height: 1.4; }
.notification-close {
  position: absolute;
  top: 8px; right: 10px;
  background: none;
  border: none;
  color: var(--txt-dim);
  cursor: pointer;
  font-size: 14px;
}
.notification-close:hover { color: var(--gold-bright); }

/* ═══════════ ФОРМЫ ═══════════ */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(10,5,3,0.85), rgba(0,0,0,0.95));
  z-index: 900;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: overlayFade 0.25s ease;
}
.overlay.visible { display: flex; }
@keyframes overlayFade { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: 88vh;
  overflow-y: auto;
  scrollbar-width: none;
  background:
    radial-gradient(ellipse at top, rgba(225,183,108,0.08), transparent 60%),
    linear-gradient(180deg, #1e1a14 0%, #12100a 100%);
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  padding: 22px 20px 18px;
  box-shadow: 0 0 40px rgba(225,183,108,0.25), 0 20px 60px rgba(0,0,0,0.9);
  animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-card::-webkit-scrollbar { display: none; }
.modal-card::before,
.modal-card::after {
  content: '';
  position: absolute;
  width: 34px; height: 34px;
  border: 2px solid rgba(225,183,108,0.5);
  pointer-events: none;
  z-index: 10;
}
.modal-card::before {
  top: 6px; left: 6px;
  border-right: none; border-bottom: none;
  border-top-left-radius: 8px;
}
.modal-card::after {
  bottom: 6px; right: 6px;
  border-left: none; border-top: none;
  border-bottom-right-radius: 8px;
}
@keyframes modalPop {
  from { transform: scale(0.9) translateY(10px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border-bright);
  color: var(--gold);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}
.modal-close:hover {
  background: rgba(168,85,85,0.35);
  border-color: #a85555;
  color: #ff6b6b;
  transform: rotate(90deg);
}
.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: #f5d28a;
  font-family: 'Forum', 'Philosopher', serif;
  letter-spacing: 0.04em;
  text-align: center;
  margin-bottom: 16px;
  text-shadow: 0 0 10px rgba(225,183,108,0.4);
}
.modal-body {
  font-size: 12.5px;
  color: #d8cfbc;
  line-height: 1.55;
}

/* ═══════════ MONSTER ═══════════ */
.monster-item {
  position: relative;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px;
  padding: 6px 10px !important;
  border-radius: 7px !important;
  background: linear-gradient(135deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 100%) !important;
  border: 1px solid rgba(0,0,0,0.5) !important;
  border-left: 3px solid #e74c3c !important;
  transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1) !important;
  min-height: 48px !important;
  cursor: pointer !important;
  overflow: hidden !important;
  color: #e74c3c !important;
  flex-shrink: 0;
}
.monster-item::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, currentColor, transparent 65%);
  opacity: 0.07; pointer-events: none;
}
.monster-item:hover {
  border-left-color: #ff8a8a !important;
  transform: translateX(3px);
  box-shadow: 0 0 12px rgba(231,76,60,0.25) !important;
}
.monster-item.monster-dead {
  background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 100%) !important;
  border-left-color: #6e6558 !important;
  color: #8b7a58 !important;
  opacity: 0.65;
}
.monster-item .left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.monster-avatar {
  width: 42px !important;
  height: 42px !important;
  border-radius: 7px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid currentColor !important;
  flex-shrink: 0 !important;
  background: rgba(0,0,0,0.5) !important;
  overflow: hidden !important;
  position: relative !important;
  z-index: 1 !important;
  filter: none !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08) !important;
}
.monster-avatar-dead {
  border-color: #6e6558 !important;
  background: rgba(0,0,0,0.65) !important;
  filter: none !important;
}
.monster-icon {
  width: 30px !important;
  height: 30px !important;
  object-fit: contain !important;
  display: block !important;
}
.monster-dead .monster-icon { filter: grayscale(100%) brightness(0.5) !important; }
.monster-name {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #f5d28a !important;
  flex: 1 !important;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.monster-dead .monster-name { color: var(--txt-mid) !important; }
.monster-level-badge {
  padding: 2px 7px !important;
  border-radius: 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--gold-bright) !important;
  background: linear-gradient(180deg, rgba(60,45,20,0.85) 0%, rgba(30,20,8,0.85) 100%) !important;
  border: 1px solid rgba(225,183,108,0.4) !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}
.monster-item.monster-dead .monster-level-badge {
  background: rgba(0,0,0,0.5) !important;
  color: var(--txt-mid) !important;
  border-color: #6e6558 !important;
}

/* ═══════════ LIST-ITEM ═══════════ */
.list-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  background: linear-gradient(135deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 100%);
  border-radius: 7px;
  border: 1px solid rgba(0,0,0,0.5);
  border-left: 3px solid currentColor;
  overflow: hidden;
  min-height: 48px;
  flex-shrink: 0;
  color: var(--gold);
  transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s ease;
  cursor: pointer;
}
.list-item::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, currentColor, transparent 65%);
  opacity: 0.07;
  pointer-events: none;
}
.list-item:hover {
  transform: translateX(3px);
  box-shadow: 0 0 12px rgba(225,183,108,0.18);
}
.list-item .left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.icon-circle {
  width: 42px; height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(0,0,0,0.5);
  border: 1px solid currentColor;
  color: inherit;
  font-size: 20px !important;
  filter: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.icon-circle img { width: 28px; height: 28px; object-fit: contain; }
.list-item-title {
  color: #f5d28a;
  font-size: 11px !important;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 1;
}
.list-item-subtitle {
  color: var(--txt-mid);
  font-size: 9.5px !important;
  letter-spacing: 0.04em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 1;
}
.lvl-badge {
  position: relative;
  z-index: 1;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 9px !important;
  font-weight: 700;
  color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(60,45,20,0.85) 0%, rgba(30,20,8,0.85) 100%);
  border: 1px solid rgba(225,183,108,0.4);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}
.list-item[data-type="npc"] { color: #7cc47c; border-left-color: #7cc47c; }
.list-item[data-type="npc"] .list-item-title { color: #a0e0a0; }
.list-item[data-type="npc"] .list-item-subtitle { color: #8ac88a; }
.list-item[data-type="object"] { color: #6ac8ff; border-left-color: #6ac8ff; }
.list-item[data-type="object"] .list-item-title { color: #a8e0ff; }
.list-item[data-type="object"] .list-item-subtitle { color: #8ac8e8; }
.list-item[data-type="monster"] { color: #e74c3c; border-left-color: #e74c3c; }
.list-item[data-type="monster"] .list-item-title { color: #ff8a8a; }
.list-item[data-type="monster"] .list-item-subtitle { color: #e09090; }
.list-item[data-type="player"] { color: #c888e8; border-left-color: #c888e8; }
.list-item[data-type="player"] .list-item-title { color: #dca8ff; }
.list-item[data-type="player"] .list-item-subtitle { color: #b090d0; }
.list-item[data-type="corpse"] {
  color: #8b7a58;
  border-left-color: #6e6558;
  border-color: rgba(80,70,55,0.5);
  opacity: 0.65;
}
.list-item[data-type="corpse"] .list-item-title { color: #b8aa8c; }
.list-item[data-type="corpse"] .list-item-subtitle { color: #8b7a58; }
.list-item[data-type="corpse"] .icon-circle {
  background: rgba(0,0,0,0.65);
  border-color: #6e6558;
  color: #8b7a58;
  filter: none;
}
.list-item[data-type="item"] { color: var(--gold); border-left-color: var(--gold); }
.list-item[data-type="item"] .list-item-title { color: var(--gold-bright); }
.list-item[data-type="item"] .list-item-subtitle { color: var(--txt-mid); }
.list-item[data-type="location"] { color: var(--gold); border-left-color: var(--gold); }
.list-item[data-type="location"] .list-item-title { color: var(--gold-bright); }
.list-item[data-type="location"] .list-item-subtitle { color: var(--txt-mid); }

.location-list-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: linear-gradient(135deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 100%);
  border-radius: 7px;
  border: 1px solid rgba(0,0,0,0.5);
  border-left: 3px solid var(--gold);
  overflow: hidden;
  min-height: 48px;
  flex-shrink: 0;
  color: var(--gold);
  transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s ease;
  cursor: pointer;
}
.location-list-item::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, currentColor, transparent 65%);
  opacity: 0.07;
  pointer-events: none;
}
.location-list-item:hover {
  transform: translateX(3px);
  box-shadow: 0 0 12px rgba(225,183,108,0.25);
}
.location-list-item.current {
  border-left-color: var(--gold-bright);
  color: var(--gold);
  background: linear-gradient(135deg, rgba(225,183,108,0.1) 0%, rgba(0,0,0,0.2) 100%);
  box-shadow: 0 0 10px rgba(225,183,108,0.2);
}
.location-list-thumb {
  width: 42px; height: 42px;
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(0,0,0,0.5);
  border: 1px solid currentColor;
  filter: none;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.location-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.location-list-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.location-list-name {
  color: var(--gold-bright);
  font-size: 11px !important;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}
.location-list-level {
  color: var(--txt-mid);
  font-size: 9.5px !important;
  letter-spacing: 0.04em;
  margin-top: 1px;
  line-height: 1.15;
}
.location-list-arrow {
  color: inherit;
  font-size: 14px;
  width: 26px;
  height: 26px;
  text-align: center;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: none;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* ═══════════ АДАПТИВ ═══════════ */
@media (max-width: 767px) {
  .panel-block { padding: 7px 8px; }
  .cave-empty-slot { height: 74px; min-height: 74px; }
  .cave-title { font-size: 12px; left: 10px; bottom: 7px; }
  .cave-lvl-badge { font-size: 8.5px; padding: 3px 8px; }
  .cave-lvl-badge i { font-size: 7px; }
  .entity-cell { padding: 5px 8px; gap: 8px; min-height: 42px; border-radius: 6px; }
  .entity-cell .ec-icon { width: 36px; height: 36px; font-size: 17px; border-radius: 6px; }
  .entity-cell .ec-icon i { font-size: 17px; }
  .entity-cell .ec-icon img { width: 24px; height: 24px; }
  .entity-cell .ec-name { font-size: 12px; }
  .entity-cell .ec-desc { font-size: 10px; }
  .entity-cell .ec-arrow { width: 22px; height: 22px; font-size: 12px; }
  .elem-switch-btn { padding: 4px 8px; font-size: 10px; }
  .hero-portrait { width: 62px; height: 62px; }
  .hero-portrait .level-badge {
    width: 18px !important;
    height: 18px !important;
    font-size: 10px !important;
    bottom: 0 !important;
    right: 0 !important;
  }
  .hero-name { font-size: 13px; }
  .hero-class-tag { font-size: 9px; padding: 2px 6px; }
  .hero-clan { font-size: 9px; padding: 2px 6px; }
  .hero-menu-btn { width: 36px; height: 36px; font-size: 14px; }
  .stat-icon { width: 16px; height: 16px; min-width: 16px; border-radius: 8px 0 0 8px; }
  .stat-icon i { font-size: 8px; }
  .bar { height: 16px; }
  .bar-value { font-size: 8px; }
  .bar > i { border-radius: 0 7px 7px 0; }
  .global-notification-container { top: 10px; right: 10px; max-width: calc(100% - 20px); gap: 8px; }
  .global-notification { min-width: 240px; max-width: calc(100% - 20px); padding: 12px 16px; }
  .notification-title { font-size: 12px; }
  .notification-message { font-size: 11px; }
  .empty-group-container { min-height: 250px; padding: 15px; }
  .empty-group-icon { width: 70px; height: 70px; font-size: 30px; margin-bottom: 20px; }
  .empty-group-text { font-size: 14px; margin-bottom: 25px; max-width: 220px; }
  .empty-group-button { padding: 14px 25px; font-size: 16px; max-width: 220px; gap: 10px; }
  .empty-group-button i { font-size: 20px; }
  .member-card { padding: 8px 10px; gap: 8px; }
  .member-avatar { width: 30px !important; height: 30px !important; font-size: 12px !important; }
  .member-name { font-size: 11px !important; }
  .member-level { font-size: 10px !important; padding: 1px 4px; }
  .member-class { font-size: 9px !important; }
  .member-health { width: 60px; }
  .health-bar { height: 4px; }
  .health-text { font-size: 8px !important; }
  .mana-bar, .energy-bar { height: 3px; }
  .mana-text, .energy-text { font-size: 6px !important; }
  .action-btn { width: 24px !important; height: 24px !important; font-size: 10px !important; }
  .section-title { padding: 6px 10px; font-size: 10px !important; }
  .section-title i { font-size: 9px !important; }
  .group-actions { padding: 8px 0; gap: 6px; }
  .group-btn { padding: 7px 10px; font-size: 9px !important; }
  .curtain-body { padding: 8px; }
  .curtain-header { padding: 10px; font-size: 12px !important; }
  .control-label { font-size: 9px !important; }
  .control-label i { font-size: 10px !important; }
  .dropdown { padding: 4px 8px; font-size: 9px !important; }
  .loot-display { padding: 4px 8px; font-size: 9px !important; }
  .loot-info { padding: 8px 10px; margin-bottom: 8px; border-radius: 8px; }
  .control-item { gap: 8px; }
  .monster-item { padding: 5px 8px !important; min-height: 42px !important; }
  .monster-avatar { width: 36px !important; height: 36px !important; border-radius: 6px !important; }
  .monster-icon { width: 24px !important; height: 24px !important; }
  .monster-name { font-size: 14px !important; }
  .monster-level-badge { padding: 1px 6px !important; font-size: 12px !important; }
  .list-item { padding: 5px 8px; min-height: 42px; gap: 8px; border-radius: 6px; }
  .list-item-title { font-size: 10px !important; }
  .list-item-subtitle { font-size: 8.5px !important; }
  .icon-circle { width: 36px !important; height: 36px !important; border-radius: 6px; font-size: 17px !important; }
  .icon-circle img { width: 24px; height: 24px; }
  .lvl-badge { padding: 1px 6px; font-size: 8.5px !important; }
  .location-list-item { padding: 5px 8px; min-height: 42px; gap: 8px; border-radius: 6px; }
  .location-list-thumb { width: 36px; height: 36px; border-radius: 6px; }
  .location-list-name { font-size: 10px !important; }
  .location-list-level { font-size: 10px !important; }
  .location-list-arrow { width: 22px; height: 22px; font-size: 12px; }
}

@media (max-width: 380px) {
  .panel-block { padding: 6px 8px; }
  .hero-portrait { width: 54px; height: 54px; }
  .hero-portrait .level-badge {
    width: 16px !important;
    height: 16px !important;
    font-size: 9px !important;
  }
  .hero-name { font-size: 12px; }
  .hero-class-tag { font-size: 9px; padding: 2px 5px; }
  .hero-clan { font-size: 9px; padding: 2px 6px; }
  .hero-menu-btn { width: 32px; height: 32px; font-size: 13px; }
  .stat-icon { width: 14px; height: 14px; min-width: 14px; }
  .stat-icon i { font-size: 6px; }
  .bar { height: 15px; }
  .bar-value { font-size: 9px; }
  .cave-empty-slot { height: 68px; min-height: 68px; }
  .cave-title { font-size: 11px; left: 9px; bottom: 6px; }
  .cave-lvl-badge { font-size: 8px; padding: 2px 7px; top: 5px; right: 5px; }
  .cave-lvl-badge i { font-size: 7px; }
  .elem-switch-btn { padding: 3px 8px; font-size: 8.5px; }
  .entity-cell { padding: 4px 6px; gap: 6px; min-height: 38px; }
  .entity-cell .ec-icon { width: 32px; height: 32px; font-size: 15px; }
  .entity-cell .ec-icon i { font-size: 15px; }
  .entity-cell .ec-icon img { width: 22px; height: 22px; }
  .entity-cell .ec-name { font-size: 9.5px; }
  .entity-cell .ec-desc { font-size: 8px; }
  .entity-cell .ec-arrow { width: 20px; height: 20px; font-size: 11px; }
  .monster-name { font-size: 12px !important; }
  .monster-level-badge { font-size: 10px !important; padding: 1px 5px !important; }
  .list-item { padding: 4px 6px; min-height: 38px; gap: 6px; }
  .list-item-title { font-size: 9.5px !important; }
  .list-item-subtitle { font-size: 8px !important; }
  .icon-circle { width: 32px !important; height: 32px !important; font-size: 15px !important; }
  .icon-circle img { width: 22px; height: 22px; }
  .lvl-badge { font-size: 8px !important; padding: 1px 5px; }
  .location-list-item { padding: 4px 6px; min-height: 38px; gap: 6px; }
  .location-list-thumb { width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* ═══════════ ГРУППА НА ГЛАВНОМ ЭКРАНЕ (плашка на картинке локации) ═══════════ */
.party-strip {
  position: absolute; top: 6px; left: 6px; z-index: 5;
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 2px 6px 2px 3px; border-radius: 15px; cursor: pointer;
  background: linear-gradient(180deg, rgba(20,14,8,0.82), rgba(10,6,3,0.88));
  border: 1px solid rgba(225,183,108,0.45);
  box-shadow: 0 2px 6px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,235,170,0.12);
  font: inherit; color: inherit;
  transition: border-color 150ms, box-shadow 150ms;
}
.party-strip:hover { border-color: var(--gold-bright); box-shadow: 0 2px 6px rgba(0,0,0,0.6), 0 0 10px rgba(225,183,108,0.35); }
.party-count {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 11px;
  font: 800 11px/1 'Courier New', monospace; color: var(--gold-bright);
  background: rgba(225,183,108,0.14); border: 1px solid rgba(225,183,108,0.35);
}
.party-count i { font-size: 10px; }
.party-ava {
  position: relative; width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 10px; color: var(--txt-mid);
  background: radial-gradient(circle at 35% 28%, #4f3f20, #120d06 72%) center/cover;
  border: 1.5px solid #5ac46a; box-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.party-ava img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; border-radius: 50%; object-fit: cover; object-position: center top; }
.party-ava.off { border-color: #6b6152; filter: grayscale(0.8) brightness(0.75); }
.party-crown { position: absolute; top: -7px; left: 50%; transform: translateX(-50%); font-size: 8px; color: var(--gold-bright); filter: drop-shadow(0 1px 1px #000); }
.party-lvl {
  position: absolute; right: -5px; bottom: -4px; min-width: 13px; height: 12px; padding: 0 2px; border-radius: 6px;
  font: 800 8px/12px 'Courier New', monospace; text-align: center; color: #1a1008;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold)); border: 1px solid #1a1008;
}

/* ═══════════ ГРУППА v2: шторка, карточки отряда, окна подтверждения ═══════════ */
.curtain { width: 300px; max-width: 88%; background: linear-gradient(180deg, #272c3b 0%, #1c202c 42%, #141720 100%); border-right: 1px solid #363c52; }
.curtain-header { background: linear-gradient(180deg, rgba(40,32,18,.92), rgba(20,15,8,.96)); border-bottom: 1px solid rgba(225,183,108,.25); font-size: 13px !important; letter-spacing: .18em; }
.curtain-body { padding: 10px; display: flex; flex-direction: column; gap: 10px; }

.gp-sec { position: relative; padding: 9px 10px 10px; border-radius: 11px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(0,0,0,.18)); border: 1px solid rgba(255,255,255,.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 10px rgba(0,0,0,.35); }
.gp-sec::before { content: ''; position: absolute; left: 12px; right: 12px; top: -1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(225,183,108,.7), transparent); }
.gp-sec-title { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-family: var(--font-display, 'Forum', serif); font-size: 11px !important; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #f6dca0; text-shadow: 0 1px 2px rgba(0,0,0,.9); }
.gp-sec-title > i { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 9px !important; color: #ffe9b0;
  background: radial-gradient(circle at 35% 28%, #6e5628, #1a1008 78%); border: 1px solid var(--gold); box-shadow: inset 0 1px 0 rgba(255,235,170,.45), 0 0 8px rgba(225,183,108,.3); }
.gp-sec-title > span { flex: 1; display: flex; align-items: center; gap: 8px; }
.gp-sec-title > span::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(225,183,108,.6), transparent); }
.gp-sec-title > b { font: 800 11px/1 'Courier New', monospace; color: var(--gold-bright); letter-spacing: 0; padding: 3px 7px; border-radius: 10px; background: rgba(0,0,0,.4); border: 1px solid rgba(225,183,108,.25); }

.gp-seg { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,.25)); border: 1px solid rgba(225,183,108,.2); box-shadow: inset 0 2px 5px rgba(0,0,0,.6); }
.gp-seg button { flex: 1; height: 28px; border: 0; border-radius: 7px; background: none; cursor: pointer; font: 700 11px/1 var(--font-body, 'Inter', sans-serif) !important; color: var(--txt-dim); transition: color .15s, background .15s; }
.gp-seg button:hover { color: var(--txt-mid); }
.gp-seg button.on { color: #1a1008; background: linear-gradient(180deg, var(--gold-bright), var(--gold)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 3px rgba(0,0,0,.5); }
.gp-loot-ro { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 14px; font-size: 12px !important; font-weight: 700; color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(255,215,130,.18), rgba(120,85,20,.22)); border: 1px solid rgba(225,183,108,.5); }
.gp-hint { margin-top: 6px; font-size: 10.5px !important; color: var(--txt-dim); }

.gp-list { display: flex; flex-direction: column; gap: 6px; }
.gp-card { position: relative; display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 10px;
  background: linear-gradient(180deg, #2b3550, #1b2238); border: 1px solid rgba(110,160,235,.3);
  box-shadow: 0 3px 6px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.12); }
.gp-card.leader { border-color: rgba(225,183,108,.6); background: linear-gradient(180deg, #3a3220, #1e190f); }
.gp-card.me { box-shadow: 0 3px 6px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.12), 0 0 0 1px rgba(255,216,138,.25); }
.gp-card.off { opacity: .7; }
.gp-card.free { background: linear-gradient(180deg, #0b0f19, #161d2e); border: 1px dashed rgba(138,184,255,.22); box-shadow: inset 0 3px 7px rgba(0,0,0,.8); }
.gp-ava { position: relative; flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; overflow: visible;
  background: linear-gradient(180deg, #3c5c94, #182a4c); border: 1px solid rgba(150,190,255,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 2px 4px rgba(0,0,0,.6); color: var(--blue-soft, #a8e0ff); font-size: 16px !important; }
.gp-card.leader .gp-ava { border-color: var(--gold); background: linear-gradient(180deg, #6e5628, #2a1d0a); }
.gp-card.free .gp-ava { background: rgba(0,0,0,.3); border-color: rgba(138,184,255,.2); color: #4d5a78; font-size: 13px !important; }
.gp-ava img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center top; border-radius: 9px; }
.gp-dot { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%; background: #4ecb71; border: 2px solid #141720; box-shadow: 0 0 6px rgba(78,203,113,.7); }
.gp-card.off .gp-dot { background: #6b7185; box-shadow: none; }
.gp-crown { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: 11px !important; color: var(--gold-bright); filter: drop-shadow(0 1px 2px #000); }
.gp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gp-name { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.gp-name b { font-size: 13px !important; color: #f1ead6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-card.leader .gp-name b { color: var(--gold-bright); }
.gp-name em { flex: none; font-style: normal; font-size: 9px !important; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--txt-dim); }
.gp-sub { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.gp-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 9px; font-size: 9.5px !important; font-weight: 700; color: var(--blue-soft, #a8e0ff);
  background: rgba(77,171,247,.15); border: 1px solid rgba(110,160,235,.35); }
.gp-tag.bad { color: #ffb3a6; background: rgba(231,76,60,.15); border-color: rgba(255,85,68,.45); }
.gp-tag.warn { color: #ffd38a; background: rgba(243,156,18,.15); border-color: rgba(243,156,18,.45); }
.gp-cls { font-size: 10.5px !important; color: var(--txt-mid); }
.gp-free { font-size: 11px !important; color: #6b7185; font-style: italic; }
.gp-bar { position: relative; height: 11px; border-radius: 6px; overflow: hidden; background: linear-gradient(180deg, #03050a, #0b101c); border: 1px solid rgba(0,0,0,.6); box-shadow: inset 0 1px 3px rgba(0,0,0,.8); }
.gp-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; transition: width .4s; }
.gp-bar.hp i { background: linear-gradient(180deg, #ff6b5a, #b3261a); }
.gp-bar.mp i { background: linear-gradient(180deg, #6aa8ff, #2257b8); }
.gp-bar span { position: relative; display: block; text-align: center; font: 800 8.5px/11px 'Courier New', monospace !important; color: #fff; text-shadow: 0 1px 2px #000; }
.gp-kick { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; font-size: 11px !important; color: #fff0ea;
  background: linear-gradient(180deg, #e74c3c, #c0392b 55%, #8b1a1a); border: 1.5px solid; border-color: #f08a7e #b33325 #5e1010 #b33325; box-shadow: 0 2px 0 #4a0e0e, inset 0 1px 0 rgba(255,255,255,.25); transition: transform .1s, filter .15s; }
.gp-kick:hover { filter: brightness(1.12); }
.gp-kick:active { transform: translateY(2px); box-shadow: none; }

.gp-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.gp-btn { --edge: #000; position: relative; height: 42px; padding: 0 16px; border-radius: 11px; display: flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; overflow: hidden;
  font-family: var(--font-display, 'Forum', serif) !important; font-size: 13px !important; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; border: 1px solid; text-shadow: 0 1px 3px rgba(0,0,0,.75);
  box-shadow: 0 4px 0 var(--edge), 0 8px 12px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.3), inset 0 -3px 5px rgba(0,0,0,.28); transition: transform .1s, box-shadow .1s, filter .2s; }
.gp-btn::before { content: ''; position: absolute; left: 1px; right: 1px; top: 1px; height: 50%; border-radius: 10px 10px 50% 50% / 10px 10px 14px 14px; background: linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,.03)); pointer-events: none; }
.gp-btn > * { position: relative; }
.gp-btn:hover { filter: brightness(1.1); }
.gp-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge), inset 0 2px 6px rgba(0,0,0,.35); }
.gp-btn.gold { --edge: #3a2a08; background: linear-gradient(180deg, #3a3120, #1c170d); border-color: #e4b968 #8b6914 #5a430c #8b6914; color: var(--gold-bright); }
.gp-btn.red { --edge: #4a120b; background: linear-gradient(180deg, #e2644a, #ad2f1f 55%, #7b1c13); border-color: #f6a283 #b83c2a #5a150e #b83c2a; }
.gp-btn.ghost { --edge: #0a1428; background: linear-gradient(180deg, #4a73b8, #253c66 55%, #182a4c); border-color: #a8c8ff #3d5f9c #13213d #3d5f9c; }

.gp-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px 8px; }
.gp-empty-ic { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-size: 28px !important; color: var(--gold-bright);
  background: radial-gradient(circle at 35% 28%, #6e5628, #1a1008 78%); border: 2px solid var(--gold); box-shadow: inset 0 1px 0 rgba(255,235,170,.4), 0 0 22px rgba(225,183,108,.3); }
.gp-empty-title { font-family: var(--font-display, 'Forum', serif); font-size: 18px !important; color: var(--gold-bright); text-shadow: 0 2px 3px rgba(0,0,0,.8); }
.gp-empty-text { font-size: 12px !important; line-height: 1.5; color: var(--txt-mid); max-width: 230px; }
.gp-empty .gp-btn { width: 100%; max-width: 240px; margin-top: 6px; }
.gp-empty-note { margin-top: 6px; font-size: 10.5px !important; color: var(--txt-dim); max-width: 240px; line-height: 1.45; }

/* окно подтверждения (общее) */
.gm-overlay { position: fixed; inset: 0; z-index: 20000; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(5,3,2,.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s; }
.gm-overlay.show { opacity: 1; }
.gm-sheet { width: min(360px, 100%); padding: 18px 16px 16px; border-radius: 16px; text-align: center;
  background: linear-gradient(180deg, #2a3150, #161a2c); border: 2px solid var(--gold-deep, #8b6914);
  box-shadow: 0 14px 40px rgba(0,0,0,.7), 0 0 40px rgba(225,183,108,.18), inset 0 1px 0 rgba(255,255,255,.14);
  transform: scale(.9); transition: transform .22s cubic-bezier(.2,1.3,.4,1); }
.gm-overlay.show .gm-sheet { transform: none; }
.gm-sheet.danger { border-color: #8b1a1a; box-shadow: 0 14px 40px rgba(0,0,0,.7), 0 0 40px rgba(231,76,60,.22), inset 0 1px 0 rgba(255,255,255,.14); }
.gm-top { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gm-ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 22px !important; color: #ffe9b0;
  background: radial-gradient(circle at 35% 28%, #6e5628, #1a1008 78%); border: 2px solid var(--gold); box-shadow: inset 0 1px 0 rgba(255,235,170,.45), 0 0 18px rgba(225,183,108,.35); }
.gm-sheet.danger .gm-ic { color: #ffd2c9; background: radial-gradient(circle at 35% 28%, #7a2418, #240a07 78%); border-color: #e74c3c; box-shadow: inset 0 1px 0 rgba(255,200,190,.35), 0 0 18px rgba(231,76,60,.4); }
.gm-title { font-family: var(--font-display, 'Forum', serif); font-size: 20px !important; letter-spacing: .04em; color: var(--gold-bright); text-shadow: 0 0 12px rgba(255,200,120,.3), 0 2px 3px rgba(0,0,0,.85); }
.gm-text { margin-top: 10px; font-size: 13px !important; line-height: 1.55; color: var(--txt-mid); }
.gm-text b { color: #f6dca0; }
.gm-warn { margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; border-radius: 9px; font-size: 11.5px !important; color: #ffb3a6;
  background: rgba(231,76,60,.1); border: 1px solid rgba(255,85,68,.3); }
.gm-actions { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* всплывашки группы */
.gp-toasts { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 20001; display: flex; flex-direction: column; gap: 6px; width: min(360px, calc(100% - 24px)); pointer-events: none; }
.gp-toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; font-size: 12px !important; color: #e1e4ea;
  background: linear-gradient(180deg, #1e1a14, #12100a); border: 1px solid #5a4328; box-shadow: 0 10px 30px rgba(0,0,0,.6);
  transform: translateY(-14px); opacity: 0; transition: transform .3s cubic-bezier(.2,1.2,.4,1), opacity .25s; }
.gp-toast.show { transform: none; opacity: 1; }
.gp-toast > i { font-size: 16px !important; color: var(--gold-bright); }
.gp-toast.ok > i { color: #4ecb71; } .gp-toast.bad > i { color: #ff6b5a; } .gp-toast.warn > i { color: #f39c12; }
.gp-toast div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gp-toast b { color: #f6dca0; font-size: 12.5px !important; }
.gp-toast span { color: var(--txt-mid); font-size: 11.5px !important; }

/* ★ телефоны до 430: 7 фильтров «Объектов» не влезали рядом с заголовком (обрезались после «Трупы») —
   переносим их строкой под заголовок, на всю ширину, без прокрутки */
@media (max-width: 430px) {
  #objectsPanelTitle { flex-wrap: wrap; row-gap: 6px; }
  #objectsPanelTitle #objectsFilter { flex: 1 0 100%; margin-left: 0; overflow: visible; }
  #objectsFilter::after { display: none; }
  #objectsFilter .elem-switch-btn { flex: 1 1 auto; padding: 5px 2px; letter-spacing: 0; font-size: 9.5px; }
}
@media (max-width: 370px) {
  #objectsFilter .elem-switch-btn { padding: 5px 1px; font-size: 8.5px; }
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ★ 30.10 экран загрузки: рунное кольцо (крутится, руны горят), медальон с живым пламенем */
@property --ldA { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.loading-overlay { background: radial-gradient(ellipse at 50% 42%, #1a120c 0%, var(--bg-dark, #07050a) 62%); }
.ld-sigil { position: relative; width: 148px; height: 148px; margin: 0 auto 18px; }
.ld-glow { position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(circle, transparent 30%, rgba(255,90,20,.16) 40%, rgba(200,30,10,.07) 52%, transparent 68%); animation: ldGlow 2.6s ease-in-out infinite; }
.ld-spin { position: absolute; inset: 0; animation: ldSpin 14s linear infinite; }
.ld-ring, .ld-runes { position: absolute; inset: 0; width: 100%; height: 100%; }
.ld-ring { filter: none; }
.ld-runes { mix-blend-mode: screen; filter: none; animation: ldRunes 3.1s infinite; }
.ld-sweep { filter: brightness(1.6); animation: ldSweep 2.4s linear infinite;
  -webkit-mask-image: conic-gradient(from var(--ldA), transparent 0 72%, #000 92%, transparent 100%); mask-image: conic-gradient(from var(--ldA), transparent 0 72%, #000 92%, transparent 100%); }
.ld-core { position: absolute; left: 50%; top: 50%; width: 123.6px; height: 123.6px; transform: translate(-50%, -50%); }
.ld-flame { transform-origin: 50% 25%; animation: ldFlame 1.3s ease-in-out infinite; }
.ld-flame2 { mix-blend-mode: screen; opacity: .55; filter: blur(1.5px) brightness(1.3); animation: ldFlame2 .9s ease-in-out infinite; }
.ld-dots::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: ldDots 1.5s steps(4) infinite; }
.ld-hint { max-width: 280px; margin: 10px auto 0; padding: 0 16px; font-family: 'Philosopher', Georgia, serif; font-size: 13px; line-height: 1.45; font-style: italic; color: #a8977a; text-align: center; min-height: 2.9em; opacity: 0; transition: opacity .35s; }
.ld-hint.on { opacity: 1; }
@keyframes ldSpin { to { transform: rotate(360deg); } }
@keyframes ldSweep { to { --ldA: -360deg; } }
@keyframes ldRunes { 0%,100% { opacity: .8; } 12% { opacity: 1; } 20% { opacity: .65; } 34% { opacity: .95; } 55% { opacity: .75; } 70% { opacity: 1; } 85% { opacity: .7; } }
@keyframes ldFlame {
  0%,100% { transform: translate(-50%,-50%) scale(1,1) skewX(0deg); filter: brightness(1); }
  20% { transform: translate(-50%,-50%) scale(.97,1.07) skewX(-3deg); filter: brightness(1.12); }
  45% { transform: translate(-50%,-50%) scale(1.03,.94) skewX(2deg); filter: brightness(.95); }
  70% { transform: translate(-50%,-50%) scale(.98,1.1) skewX(3.5deg); filter: brightness(1.18); }
  85% { transform: translate(-50%,-50%) scale(1.02,.97) skewX(-1.5deg); }
}
@keyframes ldFlame2 {
  0%,100% { transform: translate(-50%,-50%) scale(1,1.04) skewX(2deg); opacity: .45; }
  50% { transform: translate(-50%,-50%) scale(1.04,1.14) skewX(-3deg); opacity: .7; }
}
@keyframes ldGlow { 0%,100% { opacity: .7; } 50% { opacity: 1; } }
@keyframes ldDots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
@media (prefers-reduced-motion: reduce) { .ld-spin, .ld-glow, .ld-runes, .ld-flame { animation: none; } }
