:root {
  color-scheme: light;
  --ink: #202b35;
  --muted: #596873;
  --accent: #176b68;
  --accent-dark: #0e4d4b;
  --paper: #f3f6f5;
  --line: #d7e0df;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
a { color: var(--accent-dark); }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem max(1.25rem, calc((100vw - 1100px) / 2)); background: #fff; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); font-weight: 750; text-decoration: none; }
.brand span { color: var(--muted); font-weight: 450; margin-left: .35rem; }
.site-nav { display: flex; align-items: center; gap: .45rem; flex-shrink: 0; }
.site-nav a { padding: .5rem .75rem; border-radius: .45rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a:focus-visible { background: #e8efee; }
main { width: min(1100px, calc(100% - 2rem)); margin: 2rem auto 4rem; }
.hero { padding: clamp(1.5rem, 5vw, 3.5rem); background: #e2eeeb; border-radius: 1rem; margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; max-width: 800px; margin: .25rem 0 1rem; }
.hero p { max-width: 760px; }
.hero.compact { padding: 1.5rem 2rem; }
.hero.compact h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.eyebrow { color: var(--accent-dark); font-size: .82rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .4rem; }
.members { margin-top: 1.5rem; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1.25rem; }
.leaderboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 1.25rem; }
.board-card { margin: 0; }
.board-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.board-links .button { margin: 0; }
.card { background: white; border: 1px solid var(--line); border-radius: .9rem; padding: 1.4rem; margin: 1.25rem 0; }
.card h2 { margin-top: 0; }
.card form { display: grid; gap: .55rem; margin-top: 1.1rem; }
label { font-weight: 650; }
select, input:not([type=radio]) { width: 100%; padding: .7rem .75rem; border: 1px solid #9cacaa; border-radius: .45rem; color: var(--ink); background: white; font: inherit; margin-bottom: .45rem; }
button, .button { display: inline-block; border: 0; border-radius: .5rem; padding: .72rem 1rem; margin-top: .5rem; background: var(--accent); color: white; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: var(--accent-dark); color: white; }
.button-secondary { background: #e8efee; color: var(--ink); border: 1px solid var(--line); }
.button-secondary:hover { color: white; }
.note { margin-top: 1.5rem; }
.game-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.game-heading h1 { margin: 0; }
.game-heading form { margin: 0; }
.progress { height: .45rem; overflow: hidden; background: #d9e3e1; border-radius: 1rem; margin: .8rem 0 1.5rem; }
.progress span { display: block; height: 100%; background: var(--accent); }
.class-banner { display: grid; gap: .2rem; padding: .9rem 1.1rem; border-left: 4px solid var(--accent); border-radius: .35rem; background: #e6efed; margin: 1rem 0; }
.class-banner span, .class-banner small { color: var(--muted); }
.class-banner.inline { display: block; }
.image-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.image-choice { display: block; padding: .65rem; background: white; border: 1px solid var(--line); border-radius: .7rem; cursor: pointer; }
.image-choice img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #eef0ef; border-radius: .35rem; }
.choice-row { display: flex; align-items: center; gap: .5rem; padding: .5rem .2rem 0; }
.single-image { width: min(100%, 440px); background: white; padding: .5rem; border: 1px solid var(--line); border-radius: .7rem; }
.single-image img { display: block; width: 100%; }
.class-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: .55rem; margin: 1rem 0; }
.class-options label { display: flex; align-items: flex-start; gap: .5rem; padding: .65rem; border: 1px solid var(--line); border-radius: .45rem; background: white; }
.class-options input { margin-top: .35rem; }
.revealed .generated-answer { outline: 4px solid #2a9274; }
.revealed figcaption { padding: .45rem .2rem 0; font-weight: 700; }
.feedback-class { display: flex; align-items: flex-start; gap: 1.25rem; margin: 1rem 0 1.5rem; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: white; }
.feedback-class img { width: min(38%, 320px); border-radius: .4rem; }
.feedback-class h2 { margin: .25rem 0; }
.good { color: #176b52; }
.miss { color: #96533d; }
.score-big { font-size: 1.35rem; font-weight: 750; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .65rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead { background: #edf3f2; }
th { font-weight: 700; }
td details div { white-space: nowrap; }
.quitters { border-top: 5px solid #d6a66f; }
.publish-form { max-width: 450px; margin-bottom: 1rem; }
.notice { padding: .75rem 1rem; border-radius: .4rem; background: #e8efee; }
.notice.error { background: #fae7e2; color: #782f21; }
footer { padding: 1.2rem; text-align: center; color: var(--muted); background: white; border-top: 1px solid var(--line); }
footer p { margin: .25rem; }

@media (max-width: 620px) {
  .game-heading { align-items: flex-start; flex-direction: column; }
  .image-pair { gap: .55rem; }
  .image-choice { padding: .35rem; }
  .feedback-class { flex-direction: column; }
  .feedback-class img { width: 100%; max-width: 360px; }
  .brand span { display: block; margin-left: 0; font-size: .85rem; }
  .site-header { padding: .75rem 1rem; }
  .site-nav { gap: .15rem; }
  .site-nav a { padding: .45rem .5rem; font-size: .92rem; }
}

@media (max-width: 360px) {
  .site-header { gap: .4rem; }
  .brand { font-size: .92rem; }
  .brand span { font-size: .76rem; }
  .site-nav a { padding: .4rem; font-size: .85rem; }
}
