:root {
  --ink: #21191c;
  --muted: #62595b;
  --paper: #fffef9;
  --canvas: #21191c;
  --line: #d8cdbd;
  --coral: #cc3221;
  --coral-dark: #8f2118;
  --coral-soft: #f8c1a5;
  --gold: #cc9521;
  --gold-soft: #f2d699;
  --anis: #cbe84f;
  --anis-dark: #789321;
  --silver-soft: #dce7ee;
  --bronze-soft: #f1bda5;
  --shadow: 0 30px 78px rgba(0, 0, 0, .34);
  --shadow-soft: 0 14px 34px rgba(33, 25, 28, .14);
}

* { box-sizing: border-box; }
html { color-scheme: light; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 3%, rgba(204, 50, 33, .34), transparent 31rem),
    radial-gradient(circle at 96% 72%, rgba(203, 232, 79, .15), transparent 29rem),
    linear-gradient(145deg, #2d2022 0%, #21191c 52%, #181315 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button { font: inherit; }

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

.hero {
  position: relative;
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
}

.hero::after {
  display: block;
  width: 58px;
  height: 4px;
  margin: 22px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--gold) 58%, var(--anis));
  box-shadow: 0 4px 15px rgba(204, 149, 33, .3);
  content: "";
}

.eyebrow {
  margin: 0 0 11px;
  color: var(--anis);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .17em;
}

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

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 7vw, 4.25rem);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -.035em;
}

.hero h1 { color: #fffdf8; text-shadow: 0 5px 24px rgba(0, 0, 0, .28); }

.intro {
  max-width: 580px;
  margin: 17px auto 0;
  color: #ddd2cb;
  font-size: 1.03rem;
}

.panel {
  padding: clamp(26px, 5.5vw, 54px);
  border: 1px solid rgba(242, 214, 153, .78);
  border-radius: 32px;
  background: rgba(255, 254, 249, .99);
  box-shadow: var(--shadow);
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.progress-header p { margin: 0; }

#progress-percent {
  min-width: 48px;
  padding: 4px 9px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), #a96f0b);
  box-shadow: 0 5px 13px rgba(154, 105, 13, .24);
  text-align: center;
  letter-spacing: 0;
}

.progress-track {
  height: 11px;
  margin: 13px 0 39px;
  overflow: hidden;
  border: 1px solid #d5bd88;
  border-radius: 999px;
  background: #eadfc4;
  box-shadow: inset 0 2px 4px rgba(86, 47, 47, .1);
}

.progress-bar {
  height: 100%;
  width: 16.666%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a66a08, var(--gold) 62%, var(--anis));
  box-shadow: 0 0 18px rgba(204, 149, 33, .38);
  transition: width .32s ease;
}

.question { animation: appear .28s ease both; }

.question h2 {
  max-width: 760px;
  margin: 0 0 29px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 4.3vw, 2.35rem);
  font-weight: 500;
  line-height: 1.23;
  letter-spacing: -.015em;
}

.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.answer {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 106px;
  padding: 19px 20px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 20px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 18px rgba(72, 45, 48, .08);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.answer:nth-child(1) { grid-column: 1; grid-row: 1; border-color: #d85a3e; background: linear-gradient(135deg, #f3a083, #ffd3b5); }
.answer:nth-child(2) { grid-column: 1; grid-row: 2; border-color: #91ad24; background: linear-gradient(135deg, #cbe84f, #e4f59d); }
.answer:nth-child(3) { grid-column: 2; grid-row: 1; border-color: #cc9521; background: linear-gradient(135deg, #f2d699, #ffe9b7); }
.answer:nth-child(4) { grid-column: 2; grid-row: 2; border-color: #5f9b83; background: linear-gradient(135deg, #a9d9c5, #d5ede3); }

.answer::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, .48), transparent 42%);
  pointer-events: none;
  content: "";
}

.answer:hover {
  border-color: var(--ink);
  filter: saturate(1.08);
  box-shadow: var(--shadow-soft);
  transform: translateY(-3px);
}

.answer:focus-visible,
.button:focus-visible {
  outline: 3px solid rgba(203, 232, 79, .55);
  outline-offset: 3px;
}

.answer.selected {
  border-color: var(--coral);
  filter: saturate(1.18);
  box-shadow: 0 0 0 3px rgba(204, 50, 33, .28), 0 15px 32px rgba(33, 25, 28, .22);
  transform: translateY(-2px) scale(1.01);
}

.answer.selected::before {
  position: absolute;
  z-index: 3;
  top: 9px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: #fff;
  background: var(--coral);
  box-shadow: 0 4px 10px rgba(92, 23, 17, .28);
  font-size: .8rem;
  font-weight: 900;
  content: "✓";
}

.answer-letter {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  margin-right: 12px;
  border: 1px solid rgba(91, 57, 63, .22);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, .82);
  font-size: .73rem;
  font-weight: 900;
}

.answer.selected .answer-letter {
  border-color: var(--coral);
  color: #fff;
  background: var(--coral);
}

.answer-icon {
  position: relative;
  z-index: 1;
  flex: 0 0 43px;
  font-size: 1.65rem;
  filter: saturate(1.05);
}

.answer-text {
  position: relative;
  z-index: 1;
  font-size: .98rem;
  font-weight: 680;
  line-height: 1.42;
}

.quiz-actions {
  display: flex;
  margin-top: 28px;
}

.button {
  min-height: 48px;
  padding: 11px 21px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.button:hover { transform: translateY(-2px); }

.button-secondary {
  border: 1px solid var(--gold);
  color: #684808;
  background: #fff7dd;
  box-shadow: 0 7px 17px rgba(114, 78, 10, .12);
}

.button-secondary:hover {
  border-color: var(--anis-dark);
  color: var(--ink);
  background: var(--anis);
  box-shadow: 0 10px 22px rgba(108, 126, 27, .2);
}

.button-secondary:disabled {
  opacity: .38;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.button-primary {
  border: 1px solid var(--coral);
  color: #fff;
  background: linear-gradient(135deg, #e04832, var(--coral));
  box-shadow: 0 12px 26px rgba(127, 31, 22, .32);
}

.button-primary:hover {
  border-color: #7e1c13;
  background: linear-gradient(135deg, var(--coral), #8f2118);
  box-shadow: 0 13px 28px rgba(127, 31, 22, .34);
}

.results {
  text-align: center;
  animation: appear .38s ease both;
}

.results-heading {
  max-width: 720px;
  margin: 0 auto;
}

.results-heading .eyebrow { color: #cc3221; }

.results-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.95rem, 5vw, 2.9rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.02em;
}

.profile-title {
  display: inline-block;
  margin: 25px 0 9px;
  padding: 8px 15px;
  border: 1px solid #9ab62d;
  border-radius: 999px;
  color: var(--ink);
  background: #e1f47f;
  box-shadow: 0 6px 15px rgba(91, 110, 20, .13);
  font-size: 1rem;
  font-weight: 800;
}

.profile-explanation {
  max-width: 650px;
  margin: 0 auto;
  color: var(--muted);
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  gap: 16px;
  margin: 40px 0 27px;
}

.result-card {
  position: relative;
  min-height: 206px;
  padding: 29px 18px 23px;
  overflow: hidden;
  border: 2px solid #91aebe;
  border-radius: 22px;
  background: linear-gradient(145deg, #cbdde8, #f2f7fa 80%);
  box-shadow: 0 13px 30px rgba(65, 91, 105, .15);
}

.result-card::before {
  position: absolute;
  top: 0;
  left: 22%;
  width: 56%;
  height: 3px;
  border-radius: 0 0 99px 99px;
  background: #708f9f;
  content: "";
}

.result-card:nth-child(3) {
  border-color: #b77b18;
  background: linear-gradient(145deg, #d9a54e, #f7dfab 80%);
  box-shadow: 0 13px 30px rgba(122, 77, 12, .18);
}

.result-card:nth-child(3)::before { background: #8e5a0a; }

.result-card.winner {
  border-color: var(--gold);
  background: linear-gradient(145deg, #efc65c, #fff0b9 82%);
  box-shadow: 0 20px 44px rgba(161, 111, 16, .28);
  transform: translateY(-10px);
}

.result-card.winner::before {
  left: 16%;
  width: 68%;
  height: 4px;
  background: linear-gradient(90deg, #edc354, #9f6808, #edc354);
}

.medal {
  display: block;
  margin-bottom: 11px;
  font-size: 1.8rem;
  filter: saturate(.78);
}

.result-card h3 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 600;
}

.score {
  margin: 0;
  color: var(--ink);
  font-size: 1.65rem;
  font-weight: 850;
  letter-spacing: -.02em;
}

.winner .score { color: #704704; }

.score-label {
  display: block;
  max-width: 125px;
  margin: 5px auto 0;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.3;
  text-transform: uppercase;
}

.ranking-button { margin-bottom: 23px; }

.full-ranking {
  max-width: 590px;
  margin: 0 auto 28px;
  overflow: hidden;
  border: 1px solid #d8c493;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.ranking-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  padding: 12px 17px;
  background: rgba(255, 253, 249, .94);
}

.ranking-row:nth-child(even) { background: #f7f2e6; }
.ranking-row:first-child { background: #f6dfa7; }
.ranking-row + .ranking-row { border-top: 1px solid #e7dcc2; }
.ranking-position { color: #948986; }
.ranking-name { font-weight: 720; }
.ranking-score { color: var(--ink); font-weight: 850; }

.disclaimer {
  max-width: 670px;
  margin: 4px auto 28px;
  padding: 13px 18px;
  border: 1px solid #e2d2a9;
  border-radius: 14px;
  color: var(--muted);
  background: #fff9e7;
  font-size: .82rem;
}

.heels-card {
  display: flex;
  max-width: 700px;
  gap: 15px;
  align-items: flex-start;
  margin: 0 auto;
  padding: 18px 20px;
  border: 1px solid var(--gold);
  border-left: 5px solid var(--coral);
  border-radius: 14px;
  background: linear-gradient(135deg, #fffdf7, #f7e6b8);
  box-shadow: 0 10px 24px rgba(86, 58, 8, .14);
  text-align: left;
}

.heels-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #a9c632;
  background: var(--anis);
  box-shadow: 0 5px 12px rgba(91, 110, 20, .16);
  font-size: 1.15rem;
  filter: saturate(1);
}

.heels-card h3 {
  margin: 0 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.03rem;
  font-weight: 600;
}

.heels-card p {
  margin: 0;
  color: var(--muted);
  font-size: .87rem;
  line-height: 1.5;
}

.restart-button { margin-top: 29px; }

footer {
  padding: 27px 12px 0;
  color: #cfc2bb;
  text-align: center;
  font-size: .75rem;
}

[hidden] { display: none !important; }

@keyframes appear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .app-shell { width: min(100% - 20px, 940px); padding-top: 34px; }
  .hero { margin-bottom: 25px; }
  .hero::after { margin-top: 18px; }
  .panel { padding: 24px 18px 27px; border-radius: 24px; }
  .progress-track { margin-bottom: 29px; }
  .answers { grid-template-columns: 1fr; gap: 11px; }
  .answer:nth-child(n) { grid-column: 1; grid-row: auto; }
  .answer { min-height: 82px; padding: 15px 14px; border-radius: 17px; }
  .answer-letter { flex-basis: 28px; width: 28px; height: 28px; margin-right: 9px; }
  .answer-icon { flex-basis: 37px; font-size: 1.48rem; }
  .answer-text { font-size: .93rem; }
  .podium { grid-template-columns: 1fr; gap: 12px; margin-top: 32px; }
  .result-card { min-height: 0; padding: 21px 16px; }
  .result-card.winner { transform: none; }
  .medal { margin-bottom: 6px; }
  .profile-title { border-radius: 16px; }
  .heels-card { gap: 11px; padding: 16px; }
}

@media (max-width: 420px) {
  h1 { font-size: 2.25rem; }
  .progress-header { font-size: .7rem; }
  .quiz-actions .button { width: 100%; }
  .heels-card { flex-direction: column; }
  .ranking-row { grid-template-columns: 30px 1fr auto; padding-inline: 12px; }
}

@media (hover: none) {
  .answer:hover, .button:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
