body.no-moves-open {
  overflow: hidden;
}

#no-moves-modal {
  position: fixed;
  inset: 0;
  z-index: 1000007;
  display: none;
  font-family: 'Baloo 2', system-ui, sans-serif;
  color: #ffffff;
  font-size: 16px;
}

#no-moves-modal.is-visible {
  display: block;
}

#no-moves-modal .no-moves__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

#no-moves-modal .no-moves__shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(18px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right))
    calc(18px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
  box-sizing: border-box;
  pointer-events: none;
}

#no-moves-modal .no-moves__dialog {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  max-width: 420px;
  min-width: 320px;
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(255, 176, 210, 0.16), rgba(255, 255, 255, 0) 55%),
    rgba(18, 6, 41, 0.96);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  pointer-events: auto;
  overflow: hidden;
  transform: translateY(10px) scale(0.96);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

#no-moves-modal.is-visible .no-moves__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#no-moves-modal.is-closing .no-moves__dialog {
  opacity: 0;
  transform: translateY(8px) scale(0.97);
}

.no-moves__header {
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  text-align: center;
}

.no-moves__header h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0.4px;
  color: #ffe6f4;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.no-moves__body {
  padding: 16px 18px 20px;
}

.no-moves__panel {
  background: rgba(6, 2, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.no-moves__text {
  margin: 0;
  font-size: 15px;
  color: rgba(244, 220, 255, 0.9);
  text-align: center;
}

.no-moves__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.no-moves__action {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.no-moves__btn {
  border: none;
  border-radius: 18px;
  padding: 12px 16px;
  min-height: 48px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
  font-family: 'Baloo 2', system-ui, sans-serif;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, background 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.no-moves__btn:active {
  transform: scale(0.97);
}

.no-moves__btn.primary {
  color: #2b0d35;
  background: linear-gradient(135deg, #ffd0a6, #ff9ccf);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.no-moves__btn.secondary {
  color: #12333a;
  background: linear-gradient(135deg, #8fe2ff, #b0ffd9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.no-moves__btn.ghost {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.no-moves__btn:disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.no-moves__helper {
  min-height: 16px;
  font-size: 12px;
  color: rgba(244, 220, 255, 0.7);
  text-align: center;
  letter-spacing: 0.2px;
}

.no-moves__helper.is-warning {
  color: rgba(255, 221, 171, 0.95);
}

@media (prefers-reduced-motion: reduce) {
  #no-moves-modal .no-moves__dialog {
    transition: none;
    transform: none;
  }

  #no-moves-modal.is-visible .no-moves__dialog {
    transform: none;
  }
}
