:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #eef2f7;
  color: #172033;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(21, 101, 192, 0.12), transparent 36%),
    linear-gradient(315deg, rgba(0, 137, 123, 0.12), transparent 34%),
    #eef2f7;
}

button {
  font: inherit;
}

.app-shell {
  width: min(100%, 1040px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 18px;
  display: flex;
  align-items: center;
}

.game-panel {
  width: 100%;
  padding: 28px;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(23, 32, 51, 0.14);
}

.header-row,
.actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #486078;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.score-box {
  min-width: 150px;
  padding: 12px 14px;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  background: #f8fafc;
  text-align: right;
}

.score-box span,
.score-box strong {
  display: block;
}

.score-box span {
  color: #486078;
  font-size: 0.9rem;
}

.score-box strong {
  margin-top: 4px;
  font-size: 1.1rem;
}

.card-area {
  min-height: 420px;
  margin: 28px 0;
}

.scenario-card {
  min-height: 420px;
  padding: 24px;
  border: 1px solid #cad5e3;
  border-radius: 8px;
  background: #ffffff;
}

.scenario-card h2 {
  margin: 0;
  font-size: 1.75rem;
}

.scenario {
  max-width: 760px;
  margin: 16px 0 22px;
  color: #34465c;
  font-size: 1.08rem;
  line-height: 1.55;
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.option-button,
.secondary {
  min-height: 48px;
  border: 1px solid #b8c6d8;
  border-radius: 8px;
  background: #f8fafc;
  color: #172033;
  cursor: pointer;
  font-weight: 700;
  text-align: left;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.option-button {
  padding: 14px 16px;
}

.secondary {
  padding: 12px 18px;
  text-align: center;
}

.option-button:hover:not(:disabled),
.secondary:hover {
  border-color: #1565c0;
  background: #eaf3ff;
  transform: translateY(-1px);
}

.option-button:focus-visible,
.secondary:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}

.option-button:disabled {
  cursor: default;
}

.option-button.correct {
  border-color: #0f7b45;
  background: #e8f7ee;
}

.option-button.incorrect {
  border-color: #b42318;
  background: #fff0ed;
}

.option-button.muted {
  color: #65758a;
}

.feedback {
  margin-top: 22px;
  padding: 16px;
  border-radius: 8px;
}

.feedback h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feedback p {
  margin: 0;
  line-height: 1.5;
}

.feedback.success {
  border: 1px solid #9fd7b8;
  background: #edf9f1;
}

.feedback.warning {
  border: 1px solid #ffc9bd;
  background: #fff4f1;
}

.complete-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.final-score {
  margin: 18px 0 8px;
  font-size: 2rem;
  font-weight: 800;
}

.actions-row {
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .app-shell {
    align-items: stretch;
    padding: 14px;
  }

  .game-panel {
    padding: 18px;
  }

  .header-row {
    align-items: stretch;
    flex-direction: column;
  }

  .score-box {
    text-align: left;
  }

  .card-area,
  .scenario-card {
    min-height: 0;
  }

  .options {
    grid-template-columns: 1fr;
  }

  .actions-row {
    align-items: stretch;
    flex-direction: column;
  }
}
