:root {
  --ink: #17212b;
  --muted: #51606f;
  --sky: #a8dcff;
  --grass: #2fa85a;
  --leaf: #75c66d;
  --gold: #ffbd2d;
  --paper: #fffdf4;
  --line: #d8e5ef;
  --shadow: 0 22px 50px rgba(33, 82, 42, .16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 12% 12%, rgba(255,189,45,.38), transparent 24%),
    radial-gradient(circle at 88% 8%, rgba(117,198,109,.32), transparent 26%),
    linear-gradient(135deg, #e7f6ff, #f8fff0 58%, #fff3c9);
}

.market-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 26px;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
}

.brand,
nav a {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand { font-size: 22px; }
nav { display: flex; flex-wrap: wrap; gap: 14px; }

.market-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 44px;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.dino-card,
.scoreboard article,
.market-board,
.team-log {
  background: rgba(255,255,255,.88);
  border: 3px solid rgba(255,255,255,.75);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero-copy { padding: 34px; }

.eyebrow {
  margin: 0 0 8px;
  color: #237945;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1;
}

h1 { font-size: clamp(2.6rem, 7vw, 5rem); max-width: 720px; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); }

p,
li {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  padding: 13px 18px;
}

button:disabled {
  cursor: not-allowed;
  opacity: .62;
}

.primary {
  background: var(--ink);
  color: white;
  box-shadow: 0 9px 0 rgba(23,33,43,.16);
}

.secondary {
  background: white;
  color: var(--ink);
  border: 2px solid rgba(23,33,43,.12);
}

.dino-card {
  margin: 0;
  min-height: 390px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
  background: #b7e1ff;
}

.dino-card img {
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
  object-position: center 62%;
  display: block;
}

.dino-card figcaption {
  padding: 14px 18px;
  background: rgba(255,253,244,.92);
  color: #1d5b35;
  font-size: 16px;
  font-weight: 900;
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0;
}

.scoreboard article {
  padding: 18px;
  text-align: center;
}

.scoreboard span {
  display: block;
  font-size: 36px;
  font-weight: 900;
}

.scoreboard small {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.market-board,
.team-log {
  padding: 24px;
  margin-top: 18px;
}

.round-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.round-panel p:not(.eyebrow) {
  max-width: 460px;
  margin: 0;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.choice-card {
  display: grid;
  gap: 14px;
  min-height: 315px;
  padding: 18px;
  background: var(--paper);
  border: 3px solid transparent;
  border-radius: 18px;
  text-align: left;
}

.choice-card:hover { border-color: var(--gold); }

.choice-card h3 {
  margin: 0;
  font-size: 24px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stats-row span,
.tag {
  border-radius: 12px;
  padding: 8px;
  background: #eef8fb;
  color: #1c5d78;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.tag {
  display: inline-flex;
  width: fit-content;
  background: #fff0b6;
  color: #7a5200;
}

.choice-card p {
  margin: 0;
  font-size: 16px;
}

.choice-card button {
  align-self: end;
  width: 100%;
}

.feedback {
  margin-top: 16px;
  padding: 16px;
  border-left: 8px solid var(--grass);
  border-radius: 16px;
  background: #f0fff6;
  color: #1d5b35;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.team-log {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
}

#receiptList {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 920px) {
  .hero,
  .choice-grid,
  .team-log {
    grid-template-columns: 1fr;
  }

  .scoreboard {
    grid-template-columns: repeat(2, 1fr);
  }

  .round-panel {
    display: block;
  }
}

@media (max-width: 560px) {
  .market-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .market-shell {
    width: min(100% - 16px, 1120px);
    padding-top: 10px;
  }

  .hero-copy,
  .market-board,
  .team-log {
    padding: 18px;
  }

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