.important-btn-wrap {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom, 0));
  z-index: 1195;
}

.btn-important {
  border: 1px solid #c62828;
  background: #e53935;
  color: #fff;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  min-height: 34px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(229, 57, 53, 0.4);
}

.btn-important:active {
  background: #c62828;
}

#support-banner:not(.hidden) ~ .important-btn-wrap {
  bottom: calc(148px + env(safe-area-inset-bottom, 0));
}

@media (min-width: 641px) {
  #support-banner:not(.hidden) ~ .important-btn-wrap {
    bottom: calc(10px + env(safe-area-inset-bottom, 0));
  }
}

.important-modal {
  position: fixed;
  inset: 0;
  z-index: 1310;
  background: rgba(9, 12, 18, 0.86);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px;
}

.important-modal.hidden {
  display: none !important;
}

.important-modal-card {
  width: 100%;
  max-width: 560px;
  max-height: min(85vh, 780px);
  overflow: auto;
  background: #172131;
  border: 1px solid #2a3548;
  border-radius: 14px;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.important-modal-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: #e53935;
}

.important-modal-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text, #e8edf5);
}

.important-modal-text p {
  margin: 0 0 10px;
}

.important-modal-text p:last-child {
  margin-bottom: 0;
}

.important-modal-text strong {
  font-weight: 700;
  color: #f5a8a5;
}

.important-close-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.important-close-btn {
  border: 1px solid #355174;
  background: rgba(28, 40, 58, 0.95);
  color: var(--text, #e8edf5);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}

/* Mini App: fixed bar above safe area */
.miniapp-important-wrap {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom, 0));
  z-index: 900;
  pointer-events: none;
}

.miniapp-important-wrap .btn-important {
  pointer-events: auto;
}

.miniapp-important-wrap.hidden {
  display: none !important;
}
