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

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

button {
  font: inherit;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.42)),
    url("https://images.unsplash.com/photo-1518005020951-eccb494ad742?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
}

.quiz-panel {
  width: min(100%, 680px);
  padding: 28px;
  border: 1px solid rgba(30, 41, 48, 0.16);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.94);
  box-shadow: 0 24px 80px rgba(20, 31, 39, 0.22);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0;
  color: #6b5b3f;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

#restart-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #c9b98f;
  border-radius: 6px;
  background: #fff8e8;
  color: #473a21;
  cursor: pointer;
}

#restart-button:hover {
  background: #f7edcf;
}

.name-form {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.name-form[hidden] {
  display: none;
}

.name-form label {
  color: #53636b;
  font-size: 0.92rem;
  font-weight: 700;
}

.name-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.name-row input {
  min-width: 0;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #d7d0c2;
  border-radius: 6px;
  background: #ffffff;
  color: #1e2930;
  font: inherit;
}

.name-row button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid #3f7c78;
  border-radius: 6px;
  background: #3f7c78;
  color: #ffffff;
  cursor: pointer;
}

.name-row button:hover {
  background: #346965;
}

h1 {
  min-height: 116px;
  margin: 0 0 26px;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.15;
}

.answers {
  display: grid;
  gap: 12px;
}

.answer-button {
  width: 100%;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid #d7d0c2;
  border-radius: 8px;
  background: #ffffff;
  color: #1e2930;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.answer-button:hover {
  border-color: #3f7c78;
  background: #f2fbf9;
  transform: translateY(-1px);
}

.answer-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.status {
  min-height: 24px;
  margin: 18px 0 0;
  color: #53636b;
}

.status.error {
  color: #9f2d2d;
}

.status.success {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1f7a45;
  font-weight: 700;
}

.checkmark {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #1f9d55;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1;
}

@media (max-width: 520px) {
  .app-shell {
    padding: 14px;
  }

  .quiz-panel {
    padding: 20px;
  }

  h1 {
    min-height: 132px;
  }

  .name-row {
    grid-template-columns: 1fr;
  }
}
