:root {
  --bg: #fff8e6;
  --panel: #ffffff;
  --panel-strong: #fff0bd;
  --text: #1d2535;
  --muted: #667085;
  --line: #eadfca;
  --accent: #ff7a1a;
  --accent-dark: #cc4f00;
  --blue: #246bfe;
  --green: #0f9f6e;
  --success: #16835f;
  --danger: #b94040;
  --warning: #f0b43c;
  --shadow: 0 22px 60px rgba(137, 82, 8, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 122, 26, 0.22), transparent 31rem),
    radial-gradient(circle at bottom right, rgba(36, 107, 254, 0.16), transparent 34rem),
    linear-gradient(135deg, #fff8e6 0%, #ecf8ff 100%);
}

button {
  font: inherit;
}

.app-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.start-panel,
.quiz-panel,
.results-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(219, 228, 240, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.start-panel {
  display: grid;
  min-height: calc(100vh - 80px);
  padding: clamp(28px, 6vw, 64px);
  place-items: center;
  text-align: center;
}

.hero-art {
  display: grid;
  width: min(360px, 78vw);
  aspect-ratio: 1.5;
  margin-bottom: 26px;
  place-items: center;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.92), transparent 22%),
    linear-gradient(135deg, #cfeeff 0%, #fff1bd 54%, #dfffe8 100%);
  border: 1px solid #d7e6ef;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(62, 82, 111, 0.16);
}

.hero-emoji {
  font-size: clamp(72px, 16vw, 128px);
  line-height: 1;
  filter: drop-shadow(0 16px 20px rgba(54, 69, 93, 0.22));
}

.start-text {
  max-width: 620px;
  margin: 18px 0 28px;
  color: var(--muted);
  font-size: clamp(18px, 3vw, 22px);
  line-height: 1.45;
}

.start-actions {
  display: grid;
  width: min(680px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: center;
  gap: 12px;
}

.module-button {
  min-height: 108px;
  padding: 18px;
  text-align: left;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(62, 82, 111, 0.1);
}

.module-button-primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.module-button span,
.module-button small {
  display: block;
}

.module-button span {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 900;
}

.module-button small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.module-button-primary small {
  color: #fff2e8;
}

.module-button:hover,
.module-button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  background: var(--accent);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(255, 122, 26, 0.3);
}

.small-brand {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  font-size: 15px;
}

.home-link {
  border: 0;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.home-link:hover,
.home-link:focus-visible {
  background: var(--accent-dark);
  outline: none;
}

.small-label {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1;
}

h2 {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.08;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.quiz-panel,
.results-panel {
  padding: clamp(20px, 4vw, 34px);
}

.quiz-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--accent-dark);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.progress-wrap {
  width: 100%;
}

.score-pills {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.score-pill {
  display: inline-grid;
  min-width: 46px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
}

.score-correct {
  color: #086342;
  background: #c8f6df;
  border: 1px solid #91e4bd;
}

.score-wrong {
  color: #8b2c15;
  background: #ffd8ca;
  border: 1px solid #ffaf99;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  background: #e7edf7;
  border-radius: 999px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--blue), var(--green));
  transition: width 220ms ease;
}

.question-card {
  padding: clamp(22px, 5vw, 44px);
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.scene-card {
  position: relative;
  display: grid;
  min-height: 150px;
  margin-top: 22px;
  overflow: hidden;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 46%),
    linear-gradient(135deg, #d9f0ff 0%, #fff2c7 52%, #e7ffe9 100%);
  border: 1px solid #d7e6ef;
  border-radius: 8px;
}

.scene-card::before,
.scene-card::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  opacity: 0.8;
}

.scene-card::before {
  width: 140px;
  height: 44px;
  left: 9%;
  top: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 270px 24px 0 rgba(255, 255, 255, 0.58);
}

.scene-card::after {
  width: 120%;
  height: 54px;
  left: -10%;
  bottom: -22px;
  background: rgba(24, 159, 110, 0.2);
}

.scene-emoji {
  position: relative;
  z-index: 1;
  font-size: clamp(48px, 10vw, 82px);
  line-height: 1;
  filter: drop-shadow(0 12px 18px rgba(54, 69, 93, 0.22));
}

.fun-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  color: #57420d;
  background: #fff3c8;
  border: 1px dashed #e8bd43;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.45;
}

.answers {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.answer-button {
  width: 100%;
  min-height: 58px;
  padding: 14px 16px;
  text-align: left;
  color: var(--text);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.answer-button:hover,
.answer-button:focus-visible {
  border-color: rgba(47, 111, 237, 0.65);
  outline: none;
}

.answer-button.selected {
  border-color: var(--accent);
  background: #fff1df;
}

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

.answer-button:disabled:not(.selected) {
  color: var(--muted);
  background: #f4f7fb;
}

.answer-letter {
  display: inline-grid;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  background: var(--accent);
  border-radius: 8px;
}

.quiz-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  min-height: 56px;
}

.primary-button,
.secondary-button {
  display: inline-grid;
  min-width: 150px;
  min-height: 48px;
  padding: 0 22px;
  place-items: center;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
}

.primary-button {
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--accent-dark);
  outline: none;
}

.primary-button:disabled {
  color: #fff7ed;
  background: #c9ced8;
  border-color: #c9ced8;
  cursor: not-allowed;
}

.secondary-button {
  color: var(--accent-dark);
  background: #fff;
  border: 1px solid var(--line);
}

.secondary-button:disabled {
  color: #9ba7b8;
  cursor: not-allowed;
  background: #eef2f7;
}

.results-hero {
  padding: clamp(22px, 5vw, 44px);
  background: linear-gradient(135deg, #fff0bd 0%, #eaf3ff 100%);
  border: 1px solid #d5e2f7;
  border-radius: 8px;
}

.results-hero p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.review-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.review-item {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--danger);
  border-radius: 8px;
}

.review-item.correct {
  border-left-color: var(--success);
}

.review-status {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.review-status.good {
  color: var(--success);
}

.review-status.bad {
  color: var(--danger);
}

.review-item p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.review-item strong {
  color: var(--text);
}

.hidden {
  display: none;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 980px);
    padding: 10px 0;
  }

  .brand-row {
    align-items: flex-start;
  }

  .brand-mark {
    width: 54px;
    height: 54px;
    font-size: 18px;
  }

  .quiz-actions {
    flex-direction: column-reverse;
  }

  .quiz-header {
    align-items: flex-start;
  }

  .score-pills {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .start-actions {
    grid-template-columns: 1fr;
  }
}
