* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: #1f1f1f;
  background: linear-gradient(165deg, #fff8ef 0%, #f7e8d4 45%, #f0dcc4 100%);
  min-height: 100vh;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.hero {
  text-align: center;
  padding: 20px 0 28px;
}

.hero-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.pig-mark {
  width: 100px;
  height: auto;
  max-height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(109, 47, 0, 0.2));
}

.hero-titles {
  text-align: left;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  color: #6d2f00;
  letter-spacing: 0.02em;
}

.lead {
  margin: 8px 0 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #4a2810;
}

.sub {
  margin: 0 auto;
  max-width: 640px;
  line-height: 1.55;
  font-size: 1rem;
  color: #3d3429;
}

.summary-stack {
  margin: 32px 0;
}

.summary {
  margin: 0;
  background: #fffefb;
  border-radius: 16px;
  padding: 24px 22px 28px;
  box-shadow: 0 8px 32px rgba(109, 47, 0, 0.08);
  border: 1px solid rgba(109, 47, 0, 0.12);
  text-align: center;
}

.summary-thanks {
  margin: 0 auto 16px;
  max-width: 38rem;
  color: #5c4d3d;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.summary h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  color: #6d2f00;
  text-align: center;
}

.summary-lead {
  margin: 0 auto 10px;
  max-width: 42rem;
  color: #3d3429;
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 600;
  text-align: center;
}

.summary-sub {
  margin: 0 auto 20px;
  max-width: 36rem;
  color: #5c4d3d;
  font-size: 0.98rem;
  text-align: center;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 860px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: linear-gradient(145deg, #fff9f0, #ffe8d4);
  border-radius: 12px;
  padding: 18px 16px;
  border: 1px solid rgba(109, 47, 0, 0.15);
  text-align: center;
}

.stat-card-highlight {
  background: linear-gradient(145deg, #fff9f0, #ffe8d4);
  border-color: rgba(109, 47, 0, 0.15);
}

.stat-value {
  display: block;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  color: #6d2f00;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b5d4d;
  font-family: system-ui, sans-serif;
}

.stat-hint {
  margin: 10px 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #75665a;
  font-family: system-ui, sans-serif;
  text-align: center;
}

.gallery-wrap {
  margin: 32px 0;
  text-align: center;
}

.gallery-wrap h2 {
  color: #6d2f00;
  text-align: center;
}

.gallery-wrap h2 + h2 {
  margin-top: 1.75rem;
}

.gallery-note {
  margin: 0 auto 12px;
  max-width: 36rem;
  color: #505050;
  font-size: 0.95rem;
  text-align: center;
}

.winner-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.winner-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
}

.winner-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.winner-card h3 {
  margin: 10px 8px 4px;
  font-size: 1rem;
  color: #6d2f00;
}

.winner-card p {
  margin: 0 10px 12px;
  font-size: 0.9rem;
  color: #5a4c3b;
}

/* Submission gallery: 4 columns × 6 rows for 24 items (no ragged half-rows). */
#gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 auto;
  max-width: 920px;
}

#gallery img {
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  object-fit: cover;
  border-radius: 10px;
  background: #ececec;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

@media (max-width: 700px) {
  #gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
  }
}

.gallery-error {
  color: #8b2942;
  font-size: 0.95rem;
}

.gallery-error code {
  font-size: 0.85em;
}

.footer {
  margin: 40px 0 12px;
  text-align: center;
  font-size: 0.95rem;
}

a {
  color: #6d2f00;
}
