/* ===== Raids Modal ===== */

#raids-modal .modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 0 4px;
}

.raids-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
}

.raid-card {
  background: linear-gradient(135deg, rgba(60, 42, 12, 0.85), rgba(40, 28, 8, 0.85));
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.15), inset 0 0 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.raid-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.25), inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.raid-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.raid-card-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe680, #f5c542);
  color: #2a1a05;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.raid-card-name {
  flex: 1;
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.4), 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.raid-card-meta {
  display: flex;
  gap: 14px;
  font-size: 0.78rem;
  color: #c0a878;
  margin-bottom: 8px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.raid-card-lore {
  font-size: 0.76rem;
  color: #b0a080;
  line-height: 1.4;
  margin-bottom: 10px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.raid-card-bonus {
  text-align: right;
  font-size: 0.8rem;
  color: #e8d8b0;
  margin-bottom: 10px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.raid-card-bonus b {
  color: #ffd700;
}

.raid-start-btn {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.22), rgba(255, 215, 0, 0.08));
  border: 1px solid rgba(255, 215, 0, 0.5);
  color: #ffd700;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
  transition: all 0.2s ease;
}

.raid-start-btn:hover {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.35), rgba(255, 215, 0, 0.15));
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.4);
}

/* ── Активный / завершённый рейд ── */
.raid-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px 4px 16px;
}

.raid-active-title {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffd700;
  text-align: center;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5), 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.raid-timer {
  font-family: 'Cinzel', serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: #7fc8ff;
  text-shadow: 0 0 10px rgba(120, 200, 255, 0.4);
}

.raid-timer.finished {
  color: #9fd9b0;
  text-shadow: 0 0 10px rgba(80, 200, 120, 0.4);
}

.raid-reward-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, rgba(60, 42, 12, 0.9), rgba(40, 28, 8, 0.9));
  border: 1.5px solid rgba(255, 215, 0, 0.6);
  border-radius: 12px;
  padding: 14px 28px;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.25), inset 0 0 12px rgba(0, 0, 0, 0.5);
}

.raid-reward-label {
  font-size: 0.78rem;
  color: #c0a878;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.raid-reward-value {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  line-height: 1.2;
  margin-top: 4px;
}



.raid-reward-bonus {
  font-size: 0.72rem;
  color: #9fd9b0;
  margin-top: 4px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.raid-bonus-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  border-radius: 10px;
  padding: 10px 22px;
}

.raid-bonus-value {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.raid-bonus-label {
  font-size: 0.72rem;
  color: #c0a878;
}

/* ── Карточки героев в активном/завершённом рейде (как в маркете) ── */
.raid-hero-row {
  width: 100%;
  margin: 8px 0;
  /* убираем overflow-x: auto */
}

.raid-mini-heroes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
}

.raid-mini-hero {
  width: 100%;
  min-width: 0; /* важно, чтобы grid позволял сжимать */
  /* остальные стили без изменений */
}

/* Уменьшаем содержимое, чтобы 5 карточек влезали */
.raid-mini-hero .raid-hero-card-name { font-size: 0.62rem; }
.raid-mini-hero .raid-hero-card-role { font-size: 0.54rem; }
.raid-mini-hero .raid-hero-card-passive { font-size: 0.48rem; padding: 1px 3px; }
.raid-mini-hero .raid-hero-card-passive .passive-name { max-width: 60%; }
.raid-mini-hero .raid-hero-stat span:first-child { font-size: 0.44rem; }
.raid-mini-hero .raid-hero-stat span:last-child { font-size: 0.5rem; }
.raid-mini-hero .raid-hero-card-power { font-size: 0.52rem; padding: 2px 4px; }
.raid-mini-hero .raid-hero-card-power strong { font-size: 0.58rem; }

/* На совсем узких экранах чуть ужимаем gap */
@media (max-width: 380px) {
  .raid-mini-heroes { gap: 4px; }
  .raid-mini-hero { padding: 4px; }
}

.raid-total-power {
  font-size: 0.85rem;
  color: #e8d8b0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.raid-synergy-label {
  text-align: center;
  font-size: 0.82rem;
  color: #c9b888;
  margin-top: -6px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.raid-claim-btn {
  width: 100%;
  max-width: 280px;
  padding: 14px 22px;
  border: 1px solid rgba(255, 215, 0, 0.6);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.28), rgba(184, 134, 11, 0.18));
  color: #ffd700;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.3);
  transition: all 0.2s ease;
}

.raid-claim-btn:hover {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.42), rgba(184, 134, 11, 0.32));
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.5);
  transform: translateY(-1px);
}

.raid-claim-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.15);
}

.raid-cancel-btn {
  margin-top: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 120, 120, 0.5);
  border-radius: 8px;
  background: rgba(80, 20, 20, 0.6);
  color: #ff8585;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.raid-cancel-btn:hover {
  background: rgba(120, 30, 30, 0.7);
  box-shadow: 0 0 10px rgba(255, 100, 100, 0.3);
}

/* ── Выбор героев ── */
.raid-hero-select {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.raid-select-title {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  color: #ffd700;
  text-align: center;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

.raid-select-subtitle {
  text-align: center;
  font-size: 0.85rem;
  color: #c0a878;
  margin-bottom: 10px;
}

.raid-heroes-grid {
  flex: 1;
  min-height: 0;
  max-height: 55vh;        /* убираем жёсткое ограничение 46vh */
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding-right: 4px;
  padding-bottom: 10px;
  align-content: start;
}



.raid-hero-card {
  position: relative;
  background: linear-gradient(135deg, rgba(60, 42, 12, 0.9), rgba(30, 20, 6, 0.95));
  border: 2px solid rgba(255, 215, 0, 0.35);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.raid-hero-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.2);
}

.raid-hero-card.selected {
  border-color: rgba(255, 215, 0, 0.95) !important;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.45), inset 0 0 12px rgba(255, 215, 0, 0.1);
  background: linear-gradient(135deg, rgba(90, 65, 18, 0.95), rgba(50, 35, 8, 0.98));
}

.raid-hero-card.selected::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffd700;
  color: #2a1a05;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

/* Редкость бордера */
.raid-hero-card.rarity-Common { border-color: #808080; }
.raid-hero-card.rarity-Rare { border-color: #4169E1; }
.raid-hero-card.rarity-Epic { border-color: #9370DB; }
.raid-hero-card.rarity-Legendary { border-color: #FFD700; }

.raid-hero-card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.raid-hero-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image-placeholder {
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.raid-hero-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.raid-hero-card-name {
  font-family: 'Cinzel', serif;
  font-size: 0.76rem;
  color: #ffd700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.raid-hero-card-role {
  font-size: 0.65rem;
  color: #c0a878;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.raid-hero-card-passive {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.62rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  padding: 2px 5px;
  color: #d4c4a0;
}

.raid-hero-card-passive .passive-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.raid-hero-card-passive .passive-bonus {
  color: #9fd9b0;
  font-weight: 700;
}

.raid-hero-card-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  margin-top: 2px;
}

.raid-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  padding: 2px 1px;
}

.raid-hero-stat span:first-child {
  font-size: 0.55rem;
  color: #a09070;
}

.raid-hero-stat span:last-child {
  font-size: 0.62rem;
  color: #e8d8b0;
  font-weight: 600;
}

.raid-hero-card-power {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 0.65rem;
  color: #c0a878;
}

.raid-hero-card-power strong {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  color: #ffd700;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

.raid-select-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.raid-back-btn,
.raid-confirm-btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid rgba(255, 215, 0, 0.5);
}

.raid-back-btn {
  background: rgba(0, 0, 0, 0.45);
  color: #c0a878;
}

.raid-confirm-btn {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.25), rgba(255, 215, 0, 0.1));
  color: #ffd700;
}

.raid-confirm-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Плавающая кнопка рейдов (под кнопкой заданий) ── */
.raids-btn {
  position: fixed;
  top: calc(var(--top-panel-h, 80px) + 64px + 8px + 64px + 8px);
  right: 10px;
  width: 64px;
  height: 64px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 99;
  display: none;
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.show-ui .raids-btn {
  display: block;
}

.raids-btn.raids-hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.raids-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.6))
          drop-shadow(0 0 6px rgba(147, 112, 219, 0.5));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.raids-btn:hover img {
  transform: scale(1.08);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7))
          drop-shadow(0 0 12px rgba(147, 112, 219, 0.8));
}

.raids-btn:active img {
  transform: scale(0.95);
}

@media (max-width: 480px) {
  .raids-btn {
    width: 54px;
    height: 54px;
    right: 8px;
    top: calc(var(--top-panel-h, 80px) + 54px + 6px + 54px + 6px);
  }
}

.raid-preview-box {
  background: linear-gradient(135deg, rgba(60, 42, 12, 0.9), rgba(40, 28, 8, 0.9));
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0;
  color: #c0a878;
  font-size: 0.82rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.raid-preview-placeholder {
  text-align: center;
  color: #a09070;
}

.raid-preview-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.raid-preview-line b {
  color: #ffd700;
}

.raid-preview-total {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 215, 0, 0.25);
  color: #e8d8b0;
  font-size: 0.92rem;
}

.raid-preview-total strong {
  color: #ffd700;
  font-size: 1rem;
}

.raid-preview-power {
  margin-top: 6px;
  font-size: 0.74rem;
  color: #aef0c8;
}

.raid-card-reward {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
  font-size: 0.78rem;
  color: #d4c59a;
}

.raid-card-reward b {
  color: #ffd700;
}

/* ─────────────────────────────────────────────
   Макет модалки рейдов — без скролла всего окна
   ───────────────────────────────────────────── */

#raids-modal .fantasy-modal {
  display: flex;
  flex-direction: column;
  max-height: 92vh;
}

#raids-modal .fantasy-modal-content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─────────────────────────────────────────────
   Экран выбора героев
   ───────────────────────────────────────────── *

/* Окно расчёта награды — статично над кнопками */
.raid-preview-box {
  flex-shrink: 0;
  margin-bottom: 8px;
  max-height: none; /* если было ограничение — убираем */
}

/* Кнопки — всегда внизу */
.raid-select-actions {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
}

.raid-select-actions button {
  flex: 1;
  min-height: 44px;
}

/* ─────────────────────────────────────────────
   Кастомное окно подтверждения
   ───────────────────────────────────────────── */

.raid-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  animation: raidConfirmFadeIn 0.2s ease;
}

.raid-confirm-overlay.hiding {
  animation: raidConfirmFadeOut 0.2s ease forwards;
}

.raid-confirm-box {
  width: min(320px, 82%);
  max-width: 340px;
  background: linear-gradient(180deg, #2f200f 0%, #1a1209 100%);
  border: 2px solid rgba(255, 215, 0, 0.7);
  border-radius: 14px;
  padding: 22px 18px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.85);
  color: #f5e6c8;
  text-align: center;
}

.raid-confirm-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffd700;
  margin-bottom: 10px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.raid-confirm-message {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 20px;
}

.raid-confirm-actions {
  display: flex;
  gap: 10px;
}

.raid-confirm-btn {
  flex: 1;
  padding: 11px 8px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}

.raid-confirm-btn:active {
  transform: scale(0.97);
}

.raid-confirm-yes {
  background: linear-gradient(180deg, #4a7c1f, #2e5212);
  color: #fff;
}

.raid-confirm-no {
  background: linear-gradient(180deg, #5c261f, #39140f);
  color: #f5e6c8;
}

@keyframes raidConfirmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes raidConfirmFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ─────────────────────────────────────────────
   Кнопка помощи вверху списка рейдов
   ───────────────────────────────────────────── */

.raid-help-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 8px 6px 12px;
  background: transparent;
}

.raid-help-top-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffd700;
  background: linear-gradient(180deg, rgba(67, 50, 22, 0.95), rgba(38, 28, 12, 0.95));
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}

.raid-help-top-btn span {
  font-size: 1.05rem;
}

.raid-help-top-btn:active {
  transform: scale(0.98);
}

/* ─────────────────────────────────────────────
   Модальное окно помощи
   ───────────────────────────────────────────── */

.raid-help-overlay {
  position: fixed;
  inset: 0;
  z-index: 200000;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: raidHelpFadeIn 0.25s ease;
}

.raid-help-overlay.hiding {
  animation: raidHelpFadeOut 0.2s ease forwards;
}

.raid-help-box {
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #2b1f0d 0%, #161007 100%);
  border-top: 2px solid rgba(255, 215, 0, 0.65);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 35px rgba(0, 0, 0, 0.85);
  color: #f5e6c8;
}

.raid-help-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.raid-help-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffd700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}

.raid-help-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f5e6c8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 8px;
  cursor: pointer;
}

.raid-help-close svg {
  width: 18px;
  height: 18px;
}

.raid-help-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 18px;
  -webkit-overflow-scrolling: touch;
}

.raid-help-content section {
  margin-bottom: 18px;
}

.raid-help-content h3 {
  font-size: 0.98rem;
  font-weight: 800;
  color: #ffd700;
  margin: 0 0 8px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.raid-help-content p,
.raid-help-content li {
  font-size: 0.86rem;
  line-height: 1.45;
  color: #f0e2c0;
}

.raid-help-content ol,
.raid-help-content ul {
  margin: 0;
  padding-left: 18px;
}

.raid-help-content li {
  margin-bottom: 5px;
}

.raid-help-note {
  margin-top: 10px;
  color: #ffaeae;
  font-weight: 600;
}

.raid-help-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.raid-help-table th,
.raid-help-table td {
  padding: 8px 6px;
  text-align: left;
  font-size: 0.83rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.raid-help-table th {
  color: #ffd700;
  font-weight: 700;
  background: rgba(255, 215, 0, 0.08);
}

.raid-help-table td b {
  color: #90ee90;
}

.raid-help-footer {
  flex-shrink: 0;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.raid-help-ok {
  width: 100%;
  padding: 13px;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #4a7c1f, #2e5212);
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  border-radius: 12px;
  cursor: pointer;
  transition: filter 0.15s;
}

.raid-help-ok:active {
  filter: brightness(0.9);
}

@keyframes raidHelpFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes raidHelpFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Адаптация для десктопа — окно по центру */
@media (min-width: 500px) {
  .raid-help-overlay {
    align-items: center;
    padding: 20px;
  }

  .raid-help-box {
    border-radius: 18px;
    max-height: 85vh;
  }
}