:root {
  --bg: #101713;
  --panel: #18241c;
  --panel-2: #203127;
  --text: #f4f1e8;
  --muted: #cfc8b8;
  --line: rgba(244, 241, 232, 0.16);
  --strong-line: rgba(244, 241, 232, 0.28);
  --accent: #f3d384;
  --danger: #f2aaa0;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(243, 211, 132, 0.13), transparent 34rem),
    linear-gradient(160deg, #101713 0%, #16241a 50%, #0c120f 100%);
  color: var(--text);
}

.app-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 20px 14px 40px;
}

.hero,
.card,
.round-section,
.notice {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(24, 36, 28, 0.94);
  box-shadow: var(--shadow);
}

.hero {
  padding: 24px 18px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.78rem;
}

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

h1 {
  margin-bottom: 8px;
  font-size: clamp(1.65rem, 7vw, 3.2rem);
  line-height: 1.02;
}

h2 {
  margin-bottom: 8px;
}

.venue-line,
.instructions,
.small-note {
  color: var(--muted);
}

.instructions {
  margin-bottom: 0;
}

.card,
.notice {
  padding: 16px;
  margin: 14px 0;
}

.notice-error {
  border-color: rgba(242, 170, 160, 0.55);
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.label {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-weight: 800;
}

.input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--strong-line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(244, 241, 232, 0.08);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.input:focus {
  border-color: var(--accent);
}

.big-input {
  min-height: 54px;
  font-size: 1.15rem;
}

.round-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 14px;
  position: sticky;
  top: 0;
  z-index: 3;
  background: linear-gradient(180deg, rgba(16, 23, 19, 0.98), rgba(16, 23, 19, 0.86));
  backdrop-filter: blur(6px);
}

.tab-button,
.button {
  border: 1px solid var(--strong-line);
  border-radius: 999px;
  padding: 11px 14px;
  min-height: 44px;
  background: rgba(244, 241, 232, 0.08);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.tab-button[aria-selected="true"] {
  background: var(--accent);
  color: #1a1608;
  border-color: var(--accent);
}

.round-section {
  display: none;
  padding: 16px;
  margin-bottom: 14px;
}

.round-section.active {
  display: block;
}

.round-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.round-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.answer-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}

.question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  border-radius: 999px;
  background: rgba(243, 211, 132, 0.16);
  color: var(--accent);
  font-weight: 900;
}

.bonus-box {
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed rgba(243, 211, 132, 0.5);
  border-radius: 18px;
  background: rgba(243, 211, 132, 0.08);
}

.bonus-box h3 {
  margin-bottom: 8px;
  color: var(--accent);
}

.score-grid {
  display: grid;
  gap: 10px;
}

.score-row {
  display: grid;
  grid-template-columns: 1fr 88px 88px;
  gap: 8px;
  align-items: center;
}

.score-row strong {
  min-width: 0;
}

.score-row input {
  text-align: center;
}

.footer-actions {
  display: flex;
  gap: 10px;
  position: sticky;
  bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 23, 19, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.button {
  flex: 1;
  background: var(--accent);
  color: #1a1608;
  border-color: var(--accent);
}

.button.secondary {
  width: 100%;
  margin-top: 12px;
}

.button.danger {
  background: rgba(242, 170, 160, 0.14);
  color: var(--danger);
  border-color: rgba(242, 170, 160, 0.42);
}

@media (min-width: 720px) {
  .app-shell {
    padding-top: 32px;
  }

  .hero,
  .card,
  .round-section {
    padding: 24px;
  }

  .answer-row {
    grid-template-columns: 54px 1fr;
  }
}
