.game-settings-modal {
  width: min(420px, calc(100vw - 32px));
  max-height: min(80vh, 720px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  background: oklch(16% 0.02 260 / 96%);
  color: var(--text);
  box-shadow: 0 24px 64px oklch(8% 0.03 260 / 55%);
}

.game-settings-modal::backdrop {
  background: oklch(8% 0.02 260 / 62%);
  backdrop-filter: blur(4px);
}

.game-settings-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  border-bottom: 1px solid var(--glass-line);
}

.game-settings-modal__title {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.game-settings-modal__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 16px 18px;
  overflow: auto;
  max-height: min(68vh, 600px);
}

.game-settings-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-settings-modal__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-transform: uppercase;
}

.game-settings-modal__select {
  width: 100%;
}

.game-settings-modal__check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.game-settings-modal__check input {
  flex-shrink: 0;
}

.game-settings-modal__range-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-settings-modal__range {
  flex: 1;
  min-width: 0;
  accent-color: var(--game-nav-highlight, var(--site-accent, oklch(72% 0.14 88)));
}

.game-settings-modal__range-value {
  flex: 0 0 2.5rem;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--muted);
}

.notation-toast-host {
  position: fixed;
  z-index: 30;
  box-sizing: border-box;
  pointer-events: none;
  overflow: visible;
}

.notation-toast-host[hidden] {
  display: none !important;
}

.notation-toast {
  position: absolute;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  max-width: min(88%, 320px);
  padding: 6px 10px;
  border-radius: 8px;
  background: oklch(14% 0.02 260 / 78%);
  border: 1px solid var(--glass-line);
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: clamp(11px, 2.2vw, 14px);
  line-height: 1.3;
  text-align: center;
  color: var(--text);
  text-shadow: 0 1px 8px oklch(8% 0.03 260 / 80%);
  word-break: break-word;
  animation: notation-toast-in-out 2.5s ease forwards;
}

@keyframes notation-toast-in-out {
  0% {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  12% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .notation-toast {
    animation: notation-toast-fade 1.4s ease forwards;
  }

  @keyframes notation-toast-fade {
    0% {
      opacity: 0;
    }
    15% {
      opacity: 1;
    }
    75% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }
}
