.game-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  background: rgba(5, 3, 12, 0.76);
  backdrop-filter: blur(3px);
}

.game-dialog-panel {
  width: min(100%, 480px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 24px;
  color: #e8d9ad;
  background: linear-gradient(145deg, #201432, #100b1b);
  border: 2px solid #d4af37;
  border-radius: 12px;
  box-shadow: 0 16px 64px #000b, inset 0 0 24px #d4af370a;
  font-family: 'Crimson Text', Georgia, serif;
}

.game-dialog-header { display: flex; align-items: flex-start; gap: 16px; }
.game-dialog-header h2 {
  flex: 1;
  margin: 0;
  color: #e2c04b;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.35rem;
}
.game-dialog-close {
  padding: 0 8px;
  min-width: 36px;
  min-height: 36px;
  background: #2f2144;
  border: 1px solid #a187bd;
  border-radius: 6px;
  color: #e8d9ad;
  font-size: 1.5rem;
  cursor: pointer;
}
#game-dialog-message {
  margin: 20px 0 24px;
  font-size: 1.15rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.game-dialog-input label { display: block; margin-bottom: 8px; color: #e2c04b; }
.game-dialog-input select {
  width: 100%;
  padding: 10px;
  margin-bottom: 24px;
  background: #120c20;
  color: #e8d9ad;
  border: 1px solid #a187bd;
  border-radius: 6px;
  font: inherit;
  font-size: 1.05rem;
}
.game-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.game-dialog-actions button { width: auto; min-width: 110px; min-height: 42px; margin: 0; padding: 9px 20px; cursor: pointer; }
.game-dialog-actions [hidden] { display: none; }
.game-dialog-hint { margin: 16px 0 0; color: #a899b2; font-size: 0.85rem; text-align: right; }
.game-dialog-panel :focus-visible { outline: 2px solid #f4d76e; outline-offset: 3px; }
.game-dialog-open #item-tooltip { display: none !important; }

@media (max-width: 480px) {
  .game-dialog-overlay { padding: 12px; }
  .game-dialog-panel { padding: 20px; max-height: calc(100dvh - 24px); }
}
