.cheat-console-overlay {
  z-index: 100100;
  padding: 12px;
  box-sizing: border-box;
}

#cheat-console .cheat-console-dialog {
  width: min(480px, calc(100vw - 24px));
  min-width: 0;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  border-radius: 8px;
  color: #1f2937;
  font-size: 14px;
  letter-spacing: 0;
}

.cheat-console-dialog .dialog-header {
  flex-shrink: 0;
  padding: 12px 16px;
  gap: 12px;
}

.cheat-console-dialog .dialog-header h3 {
  margin: 0;
  font-size: 16px;
}

.cheat-console-dialog .cheat-close {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.cheat-console-dialog .cheat-console-body {
  padding: 16px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.cheat-backup-advice {
  margin: 0 0 16px;
  padding-left: 10px;
  border-left: 3px solid #d97706;
  color: #6b4b16;
  font-size: 12px;
  line-height: 1.65;
}

.cheat-command-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.cheat-command-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 8px;
}

.cheat-command-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 16px;
}

.cheat-console-dialog .btn,
.cheat-command-input {
  min-height: 42px;
}

.cheat-execute {
  white-space: nowrap;
}

.cheat-result {
  margin: 14px 0;
  min-height: 46px;
  padding: 10px 12px;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cheat-result[data-kind="success"] {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.cheat-result[data-kind="error"] {
  color: #991b1b;
  border-color: #fecaca;
  background: #fff5f5;
}

.cheat-confirmation {
  margin-top: 12px;
  border-left: 3px solid #dc2626;
  padding: 0 0 0 12px;
}

.cheat-confirmation[hidden],
.cheat-backup-advice[hidden] {
  display: none;
}

.cheat-confirmation p {
  margin: 0 0 8px;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.6;
}

.cheat-confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cheat-console-dialog .cheat-danger {
  color: #fff;
  background: #b91c1c;
  border-color: #b91c1c;
}

.cheat-console-dialog .cheat-danger:hover {
  background: #991b1b;
}

.cheat-command-list {
  border-top: 1px solid #e5e7eb;
  padding-top: 8px;
}

.cheat-command-list summary {
  min-height: 40px;
  box-sizing: border-box;
  padding: 10px 0;
  cursor: pointer;
  color: #374151;
  font-size: 13px;
}

.cheat-command-definitions {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 6px 0 4px;
  font-size: 12px;
  line-height: 1.6;
}

.cheat-command-definitions dt,
.cheat-command-definitions dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cheat-command-definitions dt {
  font-weight: 600;
  color: #0f766e;
}

.cheat-command-definitions dd {
  color: #4b5563;
}

.cheat-console-dialog :focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: 2px;
}

body.airline-cheats-open .fault-alert-window,
body.airline-cheats-open .feedback-entry {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 390px) {
  .cheat-console-dialog .dialog-header,
  .cheat-console-dialog .cheat-console-body {
    padding: 12px;
  }

  .cheat-command-definitions {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 8px;
  }
}
