/* ==========================================================================
   ДРІМОПОЛІЯ v3.2 — ДИЗАЙН МОДАЛЬНОГО ВІКНА РІШЕНЬ (DECISION MODAL)
   Високий контраст, зручний вибір, чіткі кнопки А / Б / В, WCAG AA
   ========================================================================== */

/* 1. Повний оверлей на весь екран */
.game-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(5, 10, 20, 0.88) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 99999 !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  animation: modalOverlayFadeIn 0.2s ease-out !important;
}

.game-modal-overlay.show {
  display: flex !important;
}

@keyframes modalOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalCardPopIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 2. Картка модального вікна (непрозора, солідна) */
.decision-modal-card {
  background: #0f172a !important; /* Насичений темно-синій солід */
  color: #f8fafc !important;
  border: 2px solid #3b82f6 !important;
  border-radius: 18px !important;
  max-width: 680px !important;
  width: 100% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  padding: 28px !important;
  box-sizing: border-box !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(59, 130, 246, 0.3) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
  animation: modalCardPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* 3. Шапка картки */
.modal-card-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  border-bottom: 1px solid #1e293b !important;
  padding-bottom: 12px !important;
}

.modal-card-sector {
  display: inline-block !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  margin-bottom: 6px !important;
}

.modal-card-title {
  font-size: 22px !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 0 !important;
  line-height: 1.25 !important;
}

/* 4. Блок опису ситуації */
.modal-card-situation {
  background: #1e293b !important;
  border-left: 4px solid #3b82f6 !important;
  border-radius: 0 10px 10px 0 !important;
  padding: 16px 18px !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  color: #f1f5f9 !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.modal-prompt-label {
  font-size: 12px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  color: #94a3b8 !important;
  margin-top: 4px !important;
}

/* 5. Список інтерактивних карток-варіантів (A / B / C) */
.modal-answers-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin-top: 2px !important;
}

.decision-option-item {
  background: #1e293b !important;
  border: 2px solid #334155 !important;
  border-radius: 12px !important;
  padding: 16px 18px !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  user-select: none !important;
  box-sizing: border-box !important;
}

.decision-option-item:hover:not(.disabled) {
  border-color: #60a5fa !important;
  background: #283548 !important;
  transform: translateX(4px) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

.decision-option-item:hover:not(.disabled) .opt-label {
  background: #2563eb !important;
  color: #ffffff !important;
}

.decision-option-item.selected {
  border-color: #3b82f6 !important;
  background: rgba(59, 130, 246, 0.18) !important;
  box-shadow: 0 0 0 2px #3b82f6, 0 8px 24px rgba(37, 99, 235, 0.3) !important;
  transform: translateX(4px) !important;
}

.decision-option-item.selected .opt-label {
  background: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6) !important;
}

/* Стан після відповіді */
.decision-option-item.correct {
  border-color: #22c55e !important;
  background: rgba(34, 197, 94, 0.18) !important;
  cursor: default !important;
}

.decision-option-item.correct .opt-label {
  background: #22c55e !important;
  color: #ffffff !important;
}

.decision-option-item.incorrect {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.18) !important;
  cursor: default !important;
}

.decision-option-item.incorrect .opt-label {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.decision-option-item.neutral {
  opacity: 0.45 !important;
  cursor: default !important;
  border-color: #1e293b !important;
}

/* Бейдж літери (A / B / C) */
.opt-label {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  background: #334155 !important;
  color: #f8fafc !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
}

/* Текст варіанта */
.opt-text {
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
  color: #f8fafc !important;
  flex: 1 !important;
}

/* 6. Блок зворотного зв'язку (Feedback Box) */
.modal-feedback-box {
  background: #1e293b;
  border-radius: 12px;
  padding: 18px;
  font-size: 14px;
  line-height: 1.55;
  display: none;
  flex-direction: column;
  gap: 10px;
  animation: modalOverlayFadeIn 0.25s ease-out;
}

.modal-feedback-box[style*="display: block"],
.modal-feedback-box[style*="display: flex"],
.modal-feedback-box.show {
  display: flex !important;
}

.modal-feedback-box[style*="display: none"]:not(.show) {
  display: none !important;
}

.modal-feedback-box.feedback-success {
  border: 2px solid #22c55e !important;
  background: rgba(34, 197, 94, 0.12) !important;
}

.modal-feedback-box.feedback-warning {
  border: 2px solid #f59e0b !important;
  background: rgba(245, 158, 11, 0.12) !important;
}

.feedback-title {
  font-weight: 900 !important;
  font-size: 16px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  color: #ffffff !important;
}

.feedback-title .deltas {
  font-size: 13px !important;
  background: rgba(0, 0, 0, 0.3) !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  color: #ffd000 !important;
}

.feedback-desc {
  color: #e2e8f0 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.feedback-learning {
  background: rgba(255, 255, 255, 0.06) !important;
  padding: 10px 14px !important;
  border-left: 4px solid #f59e0b !important;
  border-radius: 0 6px 6px 0 !important;
  font-size: 13px !important;
  color: #fde68a !important;
  line-height: 1.45 !important;
}

.feedback-facilitator {
  background: rgba(59, 130, 246, 0.12) !important;
  padding: 10px 14px !important;
  border: 1px dashed #3b82f6 !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  color: #bfdbfe !important;
  line-height: 1.45 !important;
}

.feedback-facilitator a {
  color: #60a5fa !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
}

/* 7. Кнопки дій у модальному вікні */
.modal-actions-bar {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  margin-top: 8px !important;
  padding-top: 12px !important;
  border-top: 1px solid #1e293b !important;
}

.btn-modal-submit {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 14px 28px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  display: flex;
  align-items: center !important;
  gap: 10px !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4) !important;
  transition: all 0.2s ease !important;
}

.btn-modal-submit.hidden,
.btn-modal-submit[style*="display: none"] {
  display: none !important;
}

.btn-modal-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6) !important;
}

.btn-modal-submit:disabled {
  background: #334155 !important;
  color: #64748b !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-modal-continue {
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 14px 28px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4) !important;
  transition: all 0.2s ease !important;
}

.btn-modal-continue:hover {
  background: linear-gradient(135deg, #15803d, #166534) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(22, 163, 74, 0.6) !important;
}

/* ==================== МАСКОТ: МІСТЕР ДРІМОПОЛІС ==================== */
.mascot-feedback-container {
  display: flex !important;
  gap: 16px !important;
  align-items: flex-start !important;
}

.mascot-avatar-box {
  width: 80px !important;
  height: 104px !important;
  flex-shrink: 0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
  background: #0f172a !important;
  position: relative !important;
}

.mascot-avatar-box.success {
  border-color: #22c55e !important;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.4) !important;
}

.mascot-avatar-box.warning {
  border-color: #f59e0b !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4) !important;
}

.mascot-avatar-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: top center !important;
  display: block !important;
}

/* LAPEL BADGE OVERLAY (Official Logo Pin on Character's Left Lapel) */
.mentor-avatar-frame {
  position: relative !important;
}

.mascot-lapel-badge,
.mascot-avatar-box::after,
.mascot-victory-preview::after {
  content: '' !important;
  position: absolute !important;
  top: 50% !important;
  right: 22% !important;
  width: 15% !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  background-image: url('/assets/logo_developer_icon.png') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  border: 1px solid #fbbf24 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.75), 0 0 4px rgba(251, 191, 36, 0.5) !important;
  z-index: 10 !important;
  pointer-events: none !important;
}

.mascot-feedback-body {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.mascot-victory-preview {
  width: 140px !important;
  height: 180px !important;
  margin: 0 auto 12px !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  border: 3px solid #f59e0b !important;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4) !important;
}

.mascot-sidebar-guide {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95)) !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
  border-radius: 12px !important;
  padding: 12px !important;
  display: flex !important;
  gap: 12px !important;
  align-items: center !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

.mascot-sidebar-thumb {
  width: 52px !important;
  height: 64px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  border: 1.5px solid #3b82f6 !important;
  flex-shrink: 0 !important;
}

/* ==================== ВІДЖЕТ ІНВЕНТАРЮ ТА МОДАЛКА РИНКУ v3.2.0 ==================== */
.btn-sm-market {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 4px 10px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4) !important;
  transition: all 0.2s ease !important;
}

.btn-sm-market:hover {
  background: linear-gradient(135deg, #0369a1, #075985) !important;
  transform: scale(1.04) !important;
}

.triad-progress-bar {
  display: flex !important;
  gap: 6px !important;
  margin: 6px 0 !important;
  flex-wrap: wrap !important;
}

.triad-badge {
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  background: rgba(148, 163, 184, 0.15) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
}

.triad-badge.ready {
  background: rgba(34, 197, 94, 0.18) !important;
  color: #4ade80 !important;
  border-color: rgba(34, 197, 94, 0.4) !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.2) !important;
}

.sidebar-inv-pill {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  color: #f1f5f9 !important;
  margin-bottom: 4px !important;
}

.sidebar-inv-pill.locked {
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.1) !important;
}

.sidebar-inv-pill .pill-title {
  flex: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Модальне вікно ринку */
.v32-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.9) !important;
  backdrop-filter: blur(8px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 100000 !important;
  padding: 20px !important;
  box-sizing: border-box !important;
}

.v32-market-card {
  background: #0f172a !important;
  border: 2px solid #0284c7 !important;
  border-radius: 16px !important;
  max-width: 640px !important;
  width: 100% !important;
  max-height: 85vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 24px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(2, 132, 199, 0.3) !important;
}

.v32-modal-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 1px solid #1e293b !important;
  padding-bottom: 12px !important;
}

.v32-close-x {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 28px !important;
  cursor: pointer !important;
}

.v32-close-x:hover { color: #ffffff !important; }

.v32-market-triad-bar {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 16px 0 !important;
  padding: 12px !important;
  background: #1e293b !important;
  border-radius: 10px !important;
}

.triad-complete-pill {
  background: linear-gradient(135deg, #22c55e, #15803d) !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  margin-left: auto !important;
}

.v32-inventory-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  max-height: 50vh !important;
  overflow-y: auto !important;
  margin-bottom: 16px !important;
}

.v32-inv-item {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
}

.v32-inv-item.locked {
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.08) !important;
}

.v32-inv-type-pill {
  font-size: 10px !important;
  font-weight: 800 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  margin-right: 8px !important;
}

.badge-soc { background: rgba(59, 130, 246, 0.2) !important; color: #60a5fa !important; }
.badge-eco { background: rgba(34, 197, 94, 0.2) !important; color: #4ade80 !important; }
.badge-fin { background: rgba(245, 158, 11, 0.2) !important; color: #fbbf24 !important; }

.v32-inv-title {
  font-size: 13px !important;
  color: #f8fafc !important;
}

.v32-locked-badge {
  font-size: 11px !important;
  color: #f59e0b !important;
  font-weight: 700 !important;
}

.v32-exchange-box {
  display: flex !important;
  gap: 6px !important;
  align-items: center !important;
}

.v32-market-select {
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid #334155 !important;
  border-radius: 6px !important;
  padding: 6px 8px !important;
  font-size: 11px !important;
}

.v32-market-action-btn {
  border: none !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.v32-market-action-btn.exchange {
  background: #2563eb !important;
  color: #ffffff !important;
}

.v32-market-action-btn.exchange:hover {
  background: #1d4ed8 !important;
}

.v32-market-action-btn.sell {
  background: #16a34a !important;
  color: #ffffff !important;
}

.v32-market-action-btn.sell:hover {
  background: #15803d !important;
}

.v32-empty-inv {
  text-align: center !important;
  color: #94a3b8 !important;
  padding: 30px !important;
  font-size: 13px !important;
}

.v32-primary-btn {
  background: #0284c7 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 10px 20px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  margin-left: auto !important;
  display: block !important;
}

/* P2P Market Tabs & Public Board Grid */
.v32-market-tabs-header {
  display: flex !important;
  gap: 8px !important;
  margin: 12px 0 4px 0 !important;
  border-bottom: 1px solid #1e293b !important;
  padding-bottom: 8px !important;
}

.v32-tab-btn {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  padding: 8px 14px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.v32-tab-btn:hover {
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

.v32-tab-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4) !important;
}

.v32-public-lots-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 12px !important;
  margin-top: 12px !important;
  max-height: 52vh !important;
  overflow-y: auto !important;
}

.v32-lot-card-item {
  background: #1e293b !important;
  border: 1.5px solid #334155 !important;
  border-radius: 12px !important;
  padding: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  transition: all 0.2s ease !important;
}

.v32-lot-card-item:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

.v32-lot-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.v32-lot-seller {
  font-size: 11px !important;
  color: #94a3b8 !important;
  font-weight: 700 !important;
}

.v32-lot-title {
  font-size: 14px !important;
  color: #ffffff !important;
  line-height: 1.3 !important;
}

.v32-lot-price {
  font-size: 12px !important;
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.1) !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(251, 191, 36, 0.2) !important;
}

.v32-market-action-btn.bank-sell {
  background: linear-gradient(135deg, #eab308, #ca8a04) !important;
  color: #0f172a !important;
}

.v32-market-action-btn.p2p-sell {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
}

.v32-market-action-btn.buy {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #ffffff !important;
  width: 100% !important;
}

.v32-market-action-btn.cancel {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  width: 100% !important;
}

/* Стан порожнього слота, коли картка у гравця (Taken State) */
.board-tile-v2.tile-taken,
.board-tile.tile-taken {
  background: rgba(15, 23, 42, 0.03) !important;
  border: 1.5px dashed #94A3B8 !important;
  box-shadow: none !important;
  opacity: 0.55 !important;
  position: relative !important;
}

/* Ховаємо центральні елементи */
.board-tile-v2.tile-taken .tile-asset-img,
.board-tile-v2.tile-taken .tile-asset-body,
.board-tile-v2.tile-taken .tile-bottom-bar,
.board-tile-v2.tile-taken .tile-top-pill,
.board-tile.tile-taken .tile-icon-container,
.board-tile.tile-taken .tile-title,
.board-tile.tile-taken .tile-badge,
.board-tile.tile-taken .tile-top-pill {
  display: none !important;
}

/* Блок заглушки */
.tile-empty-placeholder {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
  width: 100% !important;
  gap: 2px !important;
}

.empty-label {
  font-size: 7px !important;
  font-weight: 900 !important;
  color: #64748B !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
}

.tile-owner-badge {
  background: #0F172A !important;
  color: #FFD000 !important;
  font-size: 7px !important;
  font-weight: 800 !important;
  padding: 1px 4px !important;
  border-radius: 3px !important;
  max-width: 85% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Danger Theme Modal for Event Traps (Червоні Пастки v3.2.0) */
.trap-modal-wrapper.danger-theme {
  background: linear-gradient(145deg, #18090c 0%, #0f172a 100%) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 10px 40px rgba(239, 68, 68, 0.35) !important;
}

.trap-header {
  border-bottom: 1px solid rgba(239, 68, 68, 0.2) !important;
  padding-bottom: 12px !important;
}

.trap-header-content {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.trap-warning-icon {
  font-size: 32px !important;
  animation: trapPulse 1.5s infinite alternate ease-in-out;
}

@keyframes trapPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.6)); }
  100% { transform: scale(1.15); filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.9)); }
}

.trap-tag {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  display: inline-block !important;
  margin-bottom: 4px !important;
}

.trap-title {
  color: #fca5a5 !important;
  margin: 0 !important;
}

.trap-situation-card {
  background: rgba(239, 68, 68, 0.08) !important;
  border-left: 3px solid #ef4444 !important;
  padding: 12px 14px !important;
  border-radius: 6px !important;
  margin-bottom: 14px !important;
  color: #f1f5f9 !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
}

.trap-prompt-label {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #cbd5e1 !important;
  margin-bottom: 10px !important;
}

.trap-option-item {
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  transition: all 0.2s ease !important;
}

.trap-option-item:hover {
  border-color: rgba(239, 68, 68, 0.6) !important;
  background: rgba(239, 68, 68, 0.12) !important;
}

.trap-option-item.selected {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.2) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3) !important;
}

/* Fix Trap Modal Button Overflow & Flex Column Layout */
.trap-options-grid,
.modal-actions,
.trap-actions-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.trap-btn-action,
.modal-actions button {
  width: 100% !important;
  white-space: normal !important;
  box-sizing: border-box !important;
}

.trap-opt-label {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.trap-submit-btn {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4) !important;
}

.trap-submit-btn:disabled {
  background: #334155 !important;
  box-shadow: none !important;
  color: #64748b !important;
}

/* Market Ticker Sidebar Widget (Відкриті лоти ринку v3.2.0) */
.market-lots-panel {
  background: #1E293B !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  margin-top: 10px !important;
}

.market-lot-mini-card {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  background: #0F172A !important;
  border: 1px solid #475569 !important;
  border-radius: 6px !important;
  padding: 6px 8px !important;
  margin-top: 6px !important;
}

.lot-mini-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  max-width: 68% !important;
}

.lot-card-title {
  font-size: 9px !important;
  font-weight: 800 !important;
  color: #F8FAFC !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.lot-seller {
  font-size: 7.5px !important;
  color: #94A3B8 !important;
}

.lot-mini-action {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 3px !important;
}

.lot-price-tag {
  font-size: 9px !important;
  font-weight: 900 !important;
  color: #FFD000 !important;
}

.btn-lot-buy {
  background: #16A34A !important;
  color: #FFFFFF !important;
  font-size: 8px !important;
  font-weight: 800 !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  cursor: pointer !important;
}

.btn-lot-cancel {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  font-size: 8px !important;
  font-weight: 800 !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  cursor: pointer !important;
}

.lot-badge {
  font-size: 7px !important;
  font-weight: 800 !important;
  padding: 1px 4px !important;
  border-radius: 3px !important;
  width: fit-content !important;
  text-transform: uppercase !important;
}

.lot-badge.social {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
}

.lot-badge.eco {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
}

.lot-badge.finance {
  background: rgba(234, 179, 8, 0.2) !important;
  color: #facc15 !important;
  border: 1px solid rgba(234, 179, 8, 0.4) !important;
}

/* Банер премії Голови громади за повне коло (Lap Pass Bonus v3.2.0) */
.lap-bonus-toast {
  position: fixed !important;
  top: 24px !important;
  right: 24px !important;
  background: #0F172A !important;
  border: 2px solid #FFD000 !important;
  border-radius: 12px !important;
  padding: 12px 18px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
  z-index: 9999 !important;
  animation: slideInRight 0.3s ease-out !important;
}

.toast-rewards {
  display: flex !important;
  gap: 8px !important;
  margin-top: 4px !important;
}

.reward-pill.exp {
  background: #0284C7 !important;
  color: #FFFFFF !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
}

.reward-pill.budget {
  background: #16A34A !important;
  color: #FFFFFF !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Контейнер 3D фішки Теки ПІП на дошці (PIP Dossier Token v3.2.0) */
.player-pip-token {
  position: absolute !important;
  width: 38px !important;
  height: 38px !important;
  z-index: 100 !important;
  pointer-events: none !important;
  transition: top 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), 
              left 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* 3D Тека ПІП */
.pip-folder-body {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  background: #0284C7; /* Колір команди за замовчуванням */
  border-radius: 4px 8px 6px 6px !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: rotate(-6deg) !important;
  animation: floatToken 2s ease-in-out infinite alternate !important;
}

.folder-tab {
  position: absolute !important;
  top: -6px !important;
  left: 4px !important;
  background: inherit !important;
  color: #FFFFFF !important;
  font-size: 6.5px !important;
  font-weight: 900 !important;
  padding: 1px 4px !important;
  border-radius: 3px 3px 0 0 !important;
  letter-spacing: 0.5px !important;
}

.folder-papers {
  position: absolute !important;
  top: -3px !important;
  right: 4px !important;
  width: 24px !important;
  height: 10px !important;
  background: #FFFFFF !important;
  border-radius: 2px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

.folder-cover {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 1px !important;
}

.folder-emblem { font-size: 11px !important; }

.folder-label {
  font-size: 6.5px !important;
  font-weight: 900 !important;
  color: #FFD000 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
}

.token-shadow {
  position: absolute !important;
  bottom: -6px !important;
  left: 10% !important;
  width: 80% !important;
  height: 6px !important;
  background: rgba(0, 0, 0, 0.25) !important;
  border-radius: 50% !important;
  filter: blur(2px) !important;
}

/* Левітування */
@keyframes floatToken {
  0% { transform: translateY(0px) rotate(-6deg); }
  100% { transform: translateY(-4px) rotate(-3deg); }
}

/* Стрибок при кроці */
.token-hopping {
  animation: hopStep 0.28s ease-in-out !important;
}

@keyframes hopStep {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-16px) scale(1.15); }
  100% { transform: translateY(0) scale(1); }
}

/* Ефект фізичного стрибка у повітря під час кроку (Step-by-Step Hop Engine v3.2.0) */
.player-pip-token.is-hopping .pip-folder-body {
  transform: translateY(-22px) scale(1.25) rotate(-12deg) !important;
  box-shadow: 0 16px 24px rgba(0, 0, 0, 0.45) !important;
  transition: transform 0.1s ease-out !important;
}

.player-pip-token.is-hopping .token-shadow {
  transform: scale(0.6) !important;
  opacity: 0.2 !important;
  transition: all 0.1s ease-out !important;
}

/* Підсвічування тайла, на який наступає фішка */
.board-tile-v2.tile-step-highlight,
.board-tile.tile-step-highlight {
  filter: brightness(1.25) !important;
  box-shadow: inset 0 0 12px rgba(255, 208, 0, 0.6) !important;
  transition: all 0.15s ease !important;
}

/* Блокування кліків по полю поки фішка в русі */
body.token-moving {
  pointer-events: none !important;
  cursor: wait !important;
}

/* Пульсуючий золотий контур навколо тайла, який чекає на клік (v3.2.0) */
.board-tile-v2.tile-ready-to-click,
.board-tile.tile-ready-to-click {
  cursor: pointer !important;
  animation: waitingClickPulse 1s infinite alternate !important;
  z-index: 60 !important;
  overflow: visible !important;
}

@keyframes waitingClickPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 208, 0, 0.7);
    border-color: #FFD000 !important;
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 18px 4px rgba(255, 208, 0, 0.95);
    border-color: #F59E0B !important;
    transform: scale(1.04);
  }
}

/* Purged "Клікни, щоб відкрити" indicator button */
.board-tile-v2.tile-ready-to-click::after,
.board-tile.tile-ready-to-click::after,
.board-cell-unit.tile-ready-to-click::after,
.board-tile-v2.tile-ready-to-click::before,
.board-tile.tile-ready-to-click::before,
.board-cell-unit.tile-ready-to-click::before {
  display: none !important;
  content: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Фішка: плавний рух у межах одного кроку (Step-by-Step Traversal Engine v3.2.0) */
.player-pip-token {
  position: absolute !important;
  grid-row: 1 !important;
  grid-column: 1 !important;
  width: 38px !important;
  height: 38px !important;
  z-index: 300 !important;
  pointer-events: none !important;
  transition: left 0.16s cubic-bezier(0.25, 1, 0.5, 1), 
              top 0.16s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* Стрибок під час кроку */
.player-pip-token.token-hopping .pip-folder-body {
  transform: translateY(-20px) scale(1.2) rotate(-8deg) !important;
  box-shadow: 0 14px 20px rgba(0, 0, 0, 0.45) !important;
}

/* Короткий імпульс на клітинці під час кроку */
.board-tile-v2.tile-stepped,
.board-tile.tile-stepped {
  box-shadow: inset 0 0 10px rgba(255, 208, 0, 0.8) !important;
}

/* Блокування дій під час руху */
body.board-locked-moving,
body.token-moving {
  pointer-events: none !important;
}

/* 🏛️ МІР Модальне вікно (Постанова № 527) */
.mir-modal-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  max-width: 540px;
  width: 100%;
  padding: 24px;
  color: #f8fafc;
}

.mir-header {
  text-align: center;
  margin-bottom: 18px;
}

.mir-badge {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.mir-header h3 {
  font-size: 18px;
  font-weight: 900;
  margin: 8px 0 4px 0;
  color: #f8fafc;
}

.mir-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

.mir-scoring-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.score-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.score-card.danger {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

.sc-label {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: 4px;
}

.sc-val {
  font-size: 16px;
  font-weight: 900;
  color: #10b981;
}

.score-card.danger .sc-val {
  color: #ef4444;
}

.mir-exp-allocator {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.alloc-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.alloc-labels strong {
  color: #3b82f6;
}

.mir-exp-allocator input[type="range"] {
  width: 100%;
  accent-color: #3b82f6;
  cursor: pointer;
}

.alloc-hint {
  font-size: 10px;
  color: #64748b;
  margin-top: 6px;
  text-align: right;
}

.mir-verdict-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #f8fafc;
}

.verdict-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
}

.verdict-tag.p1 {
  background: #10b981;
  color: #064e3b;
}

.verdict-tag.p2 {
  background: #0284c7;
  color: #0c4a6e;
}

.verdict-tag.rejected {
  background: #ef4444;
  color: #450a0a;
}

.mir-ai-response-box {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
  text-align: left;
}

.ai-avatar {
  font-size: 12px;
  color: #60a5fa;
  margin-bottom: 6px;
}

.ai-text {
  font-size: 13px;
  color: #f1f5f9;
  line-height: 1.5;
  margin: 0;
}

.mir-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-secondary {
  background: #334155;
  color: #f8fafc;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #475569;
}

.btn-primary-glow {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary-glow:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

/* 3-Етапний Visual Pipeline Stepper (МІР v3.2.0) */
.mir-pipeline-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 16px;
  background: rgba(15, 23, 42, 0.6);
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pipeline-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 4px;
  border-radius: 8px;
  position: relative;
}

.pipeline-step.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.pipeline-step.passed {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.step-num {
  font-size: 9px;
  font-weight: 900;
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.step-name {
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
}

.step-desc {
  font-size: 9px;
  color: #94a3b8;
  margin-top: 2px;
}

.pipeline-arrow {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

/* Червоний штамп повернення на доопрацювання */
.mir-modal-card.is-rejected {
  position: relative;
}

.mir-red-stamp {
  position: absolute;
  top: 40px;
  right: 30px;
  border: 4px solid #ef4444;
  color: #ef4444;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 8px;
  transform: rotate(-12deg);
  letter-spacing: 1px;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
  pointer-events: none;
  z-index: 10;
  background: rgba(15, 23, 42, 0.85);
  animation: stampPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes stampPop {
  0% { transform: scale(3) rotate(-25deg); opacity: 0; }
  100% { transform: scale(1) rotate(-12deg); opacity: 1; }
}

/* Зелений штамп схвалення МІР / ЄПП */
.mir-modal-card.is-approved {
  position: relative;
}

.mir-green-stamp {
  position: absolute;
  top: 40px;
  right: 30px;
  border: 4px solid #10b981;
  color: #10b981;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 8px;
  transform: rotate(-8deg);
  letter-spacing: 1px;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  pointer-events: none;
  z-index: 10;
  background: rgba(15, 23, 42, 0.88);
  animation: stampPopGreen 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes stampPopGreen {
  0% { transform: scale(3.5) rotate(-22deg); opacity: 0; }
  100% { transform: scale(1) rotate(-8deg); opacity: 1; }
}

/* 🏆 Фінальне Модальне Вікно Перемоги та Таблиця ГРБК (v3.2.0) */
.victory-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.victory-modal-card {
  background: #1E293B;
  border: 2px solid #F59E0B;
  border-radius: 16px;
  max-width: 780px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 25px 50px -12px rgba(245, 158, 11, 0.35);
  color: #F8FAFC;
  text-align: center;
}

.victory-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.victory-header h2 {
  font-size: 20px;
  font-weight: 900;
  margin: 10px 0 6px 0;
  color: #f8fafc;
}

.victory-subtitle {
  font-size: 12px;
  color: #cbd5e1;
  margin: 0 0 16px 0;
}

.winner-project-passport {
  background: #0F172A;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 18px 0;
  text-align: left;
}

.passport-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.passport-header .p-id {
  color: #64748b;
}

.passport-header .p-status {
  color: #10B981;
}

.p-name {
  font-size: 16px;
  font-weight: 900;
  color: #38bdf8;
  margin: 0 0 12px 0;
}

.passport-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.pm-box {
  background: #1E293B;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  text-align: center;
}

.pm-box .pm-label {
  display: block;
  font-size: 10px;
  color: #94A3B8;
  margin-bottom: 2px;
}

.pm-box .pm-val {
  font-size: 15px;
  color: #FBBF24;
  font-weight: 900;
}

.final-leaderboard-section h4 {
  font-size: 13px;
  font-weight: 800;
  color: #94a3b8;
  text-align: left;
  margin: 16px 0 8px 0;
}

.leaderboard-table-container {
  background: #0F172A;
  border: 1px solid #334155;
  border-radius: 10px;
  overflow: hidden;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.leaderboard-table th {
  background: #1e293b;
  padding: 10px;
  color: #94A3B8;
  border-bottom: 1px solid #334155;
  font-weight: 700;
}

.leaderboard-table td {
  padding: 10px;
  border-bottom: 1px solid #334155;
  color: #cbd5e1;
}

.leaderboard-table tr.winner-row {
  background: rgba(245, 158, 11, 0.08);
  font-weight: 800;
}

.leaderboard-table tr.winner-row td {
  color: #fbbf24;
}

/* ⏱️ Табло в хедері (60 хв) */
.session-clock-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0F172A;
  border: 1px solid #334155;
  padding: 6px 14px;
  border-radius: 8px;
  margin-left: 16px;
}

.session-clock-container .clock-label {
  font-size: 11px;
  color: #94A3B8;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.session-clock-container .clock-digits {
  font-size: 16px;
  font-family: 'Courier New', monospace;
  color: #F59E0B;
  font-weight: 900;
}

/* ⏳ Шкала таймера 20 секунд у картці */
.turn-timer-bar-wrapper {
  position: relative;
  width: 100%;
  height: 8px;
  background: #334155;
  border-radius: 4px;
  margin: 12px 0 16px 0;
  overflow: visible;
}

.turn-timer-bar {
  height: 100%;
  width: 100%;
  background: #10B981;
  border-radius: 4px;
  transition: width 1s linear, background-color 0.3s ease;
}

.turn-timer-bar.danger-zone {
  background: #EF4444 !important;
  animation: pulseTimer 0.5s infinite alternate;
}

.turn-timer-text {
  position: absolute;
  right: 0;
  top: -18px;
  font-size: 11px;
  font-weight: 800;
  color: #60a5fa;
}

@keyframes pulseTimer {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

/* 🚨 Механіка пастки № 28 «Аудиторський компроміс» (v3.2.0) */
.trap-choice-modal {
  background: #1E293B;
  border: 2px solid #EF4444;
  border-radius: 16px;
  max-width: 580px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(239, 68, 68, 0.4);
  color: #F8FAFC;
  text-align: left;
}

.trap-alert-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.trap-alert-header .trap-icon {
  font-size: 32px;
}

.trap-alert-header h3 {
  font-size: 18px;
  font-weight: 900;
  color: #EF4444;
  margin: 0;
}

.trap-description {
  font-size: 13px;
  color: #CBD5E1;
  line-height: 1.5;
  margin: 0 0 20px 0;
  background: rgba(15, 23, 42, 0.6);
  padding: 12px;
  border-radius: 8px;
  border-left: 3px solid #EF4444;
}

.trap-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.trap-btn-action {
  background: #0F172A;
  border: 2px solid #3B82F6;
  border-radius: 12px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #F8FAFC;
}

.trap-btn-action:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: #60A5FA;
  transform: translateY(-2px);
}

.trap-btn-action.danger {
  border-color: #F59E0B;
}

.trap-btn-action.danger:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: #FBBF24;
}

.trap-btn-action .opt-title {
  font-size: 13px;
  font-weight: 800;
  color: #38BDF8;
  margin-bottom: 6px;
}

.trap-btn-action.danger .opt-title {
  color: #FBBF24;
}

.trap-btn-action .opt-cost {
  font-size: 12px;
  color: #F8FAFC;
  margin-bottom: 6px;
}

.trap-btn-action .opt-desc {
  font-size: 10px;
  color: #94A3B8;
  line-height: 1.35;
}

/* ==========================================================================
   VICTORY FINALE OVERLAY (SHORT 4-6s FINALE)
   ========================================================================== */
.victory-finale-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(5, 10, 20, 0.92) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 100000 !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  opacity: 0;
  transition: opacity 0.3s ease-out !important;
}

.victory-finale-overlay.show {
  display: flex !important;
  opacity: 1 !important;
}

.victory-finale-panel {
  background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 100%) !important;
  color: #f8fafc !important;
  border: 2px solid #fbbf24 !important;
  border-radius: 20px !important;
  max-width: 520px !important;
  width: 100% !important;
  padding: 32px 28px !important;
  box-sizing: border-box !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(251, 191, 36, 0.35) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.victory-finale-overlay.show .victory-finale-panel {
  transform: scale(1) !important;
}

.vf-badge {
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 1.2px !important;
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.12) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  padding: 4px 12px !important;
  border-radius: 12px !important;
  margin-bottom: 12px !important;
  text-transform: uppercase !important;
}

.vf-header {
  font-size: 26px !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 0 0 6px 0 !important;
  line-height: 1.2 !important;
}

.vf-subtitle {
  font-size: 15px !important;
  color: #94a3b8 !important;
  margin: 0 0 16px 0 !important;
}

.vf-gold-divider {
  width: 0%;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, #fbbf24, transparent) !important;
  margin-bottom: 20px !important;
  animation: goldLineDraw 0.6s ease-out forwards !important;
  animation-delay: 0.2s !important;
}

@keyframes goldLineDraw {
  to { width: 100%; }
}

.vf-checklist {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
  margin-bottom: 24px !important;
}

.vf-check-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1px solid rgba(51, 65, 85, 0.8) !important;
  padding: 10px 16px !important;
  border-radius: 10px !important;
  opacity: 0;
  transform: translateY(8px);
  animation: checkItemFadeIn 0.35s ease-out forwards !important;
}

.victory-finale-overlay.show .vf-check-item.item-1 { animation-delay: 0.25s !important; }
.victory-finale-overlay.show .vf-check-item.item-2 { animation-delay: 0.40s !important; }
.victory-finale-overlay.show .vf-check-item.item-3 { animation-delay: 0.55s !important; }

@keyframes checkItemFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.vf-icon {
  font-weight: 900 !important;
  color: #10b981 !important;
  font-size: 16px !important;
}

.vf-text {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #f1f5f9 !important;
  text-align: left !important;
}

.vf-btn-next {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  border: none !important;
  padding: 12px 36px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.vf-btn-next:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6) !important;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .victory-finale-overlay,
  .victory-finale-panel,
  .vf-gold-divider,
  .vf-check-item {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    width: 100% !important;
  }
}


