.contest-page {
  --contest-ink: #0f172a;
  --contest-muted: #64748b;
  --contest-green: #0f766e;
  --contest-soft: #ecfdf5;
  background: #f8fafc;
  min-height: 100vh;
  color: var(--contest-ink);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.contest-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #0f3d36;
  padding-top: env(safe-area-inset-top, 0);
}
.contest-top__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 3.25rem;
  gap: 0.75rem;
}
.contest-brand {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
}
.contest-top__nav {
  display: flex;
  gap: 0.35rem;
}
.contest-top__nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.contest-top__nav a:active {
  background: rgba(255, 255, 255, 0.22);
}

.contest-main {
  padding: 1.25rem 1rem 2.5rem;
}

.contest-hero {
  background: linear-gradient(145deg, #0f3d36, #14786c);
  color: #fff;
  border-radius: 1.25rem;
  padding: 1.5rem 1.15rem;
  margin-bottom: 1rem;
}
.contest-hero h1 {
  font-weight: 800;
  font-size: clamp(1.45rem, 5.5vw, 2.1rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  color: #fff;
}
.contest-hero__text {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}
.contest-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  opacity: 0.9;
  margin-bottom: 0.4rem;
}
.contest-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.contest-actions .btn {
  width: 100%;
  border-radius: 0.85rem;
  padding: 0.7rem 1rem;
  font-weight: 700;
}

.contest-prizes {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.contest-prize {
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.contest-prize__label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--contest-green);
  background: var(--contest-soft);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.4rem;
}
.contest-prize p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #334155;
}

.contest-rules {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}
.contest-rules summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.contest-rules summary::-webkit-details-marker { display: none; }
.contest-rules summary::after {
  content: " +";
  color: var(--contest-green);
}
.contest-rules[open] summary::after { content: " −"; }
.contest-rules pre {
  white-space: pre-wrap;
  font-family: inherit;
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #475569;
}

.contest-gallery-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.contest-gallery-head h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0;
}
.contest-count {
  background: #e2e8f0;
  color: #334155;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
}

.contest-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.contest-card.is-highlight {
  outline: 3px solid #20c997;
}
.contest-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e2e8f0;
}
.contest-card__body {
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}
.contest-card__body h3 {
  font-size: 1.05rem;
  margin: 0;
}
.contest-card__addr {
  margin: 0;
  color: var(--contest-muted);
  font-size: 0.88rem;
}
.contest-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.65rem;
}
.contest-votes {
  font-size: 0.88rem;
  color: var(--contest-muted);
  line-height: 1.3;
}
.contest-votes .dot {
  margin: 0 0.15rem;
}
.contest-card__meta .btn {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-weight: 700;
}

.contest-form .form-label {
  font-weight: 600;
}
.contest-form .btn {
  border-radius: 0.85rem;
  padding: 0.7rem 1rem;
  font-weight: 700;
}

.contest-foot {
  text-align: center;
  color: var(--contest-muted);
  padding: 1rem 1rem 1.5rem;
  font-size: 0.85rem;
}

.contest-scheda {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.15rem;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.contest-scheda__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #e2e8f0;
}
.contest-scheda__body {
  padding: 1.1rem 1.1rem 1.35rem;
}
.contest-scheda__body h1 {
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 800;
  margin: 0 0 0.25rem;
}
.contest-share-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  padding: 0.85rem;
}
.contest-share-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.contest-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 0.75rem;
  padding: 0.65rem 0.5rem;
  border: 0;
  color: #fff;
  cursor: pointer;
}
.contest-share-btn--wa { background: #25d366; }
.contest-share-btn--fb { background: #1877f2; }
.contest-share-btn--ig { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); }
.contest-share-btn--copy { background: #0f766e; }
@media (min-width: 480px) {
  .contest-share-btns { grid-template-columns: repeat(4, 1fr); }
}
.contest-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.contest-card__link:hover h3 {
  color: #0f766e;
}
.contest-card__share {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f766e;
  text-decoration: none;
}
@media (min-width: 768px) {
  .contest-main {
    padding-top: 1.75rem;
    padding-bottom: 3rem;
  }
  .contest-hero {
    padding: 2rem 2rem 1.75rem;
  }
  .contest-actions {
    flex-direction: row;
    justify-content: center;
  }
  .contest-actions .btn {
    width: auto;
    min-width: 11rem;
  }
  .contest-prizes {
    grid-template-columns: 1fr 1fr;
  }
  .contest-brand::after {
    content: " Colle Pizzuto";
    font-weight: 700;
  }
  .contest-scheda__img {
    aspect-ratio: 16 / 10;
  }
}
