:root {
  color-scheme: light;
  --paper: #f5e7cb;
  --ivory: #fff4da;
  --ink: #142e23;
  --green: #0a291e;
  --wine: #922323;
  --dim: #4b5545;
  --stroke: #d6b576;
  --gold: #f5cb69;
  --serif: Georgia, "Times New Roman", serif;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--green);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; }
main { min-height: 65vh; background: var(--paper); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #b86723; outline-offset: 4px; }
.wrap { width: calc(100% - 72px); max-width: 1440px; margin-inline: auto; }

.top { position: relative; z-index: 2; color: var(--ivory); background: radial-gradient(ellipse at 28% 0%,#174c36,transparent 73%), #08271b; border-bottom: 2px solid #cda253; }
.mast { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 71px; }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--ivory); font: 700 clamp(1.55rem,3.1vw,2.8rem)/1 var(--serif); letter-spacing: -.045em; white-space: nowrap; }
.holly { position: relative; display: inline-block; flex: none; width: 37px; height: 34px; }
.holly::before,.holly::after { content: ""; position: absolute; top: 2px; width: 21px; height: 25px; background: linear-gradient(106deg,#213f21,#79934d 47%,#2d552d 54%,#436c37); clip-path: polygon(51% 0,66% 20%,86% 18%,82% 38%,100% 45%,83% 58%,89% 74%,66% 72%,50% 100%,35% 72%,12% 74%,19% 57%,0 46%,20% 37%,15% 18%,35% 21%); }
.holly::before { left: 1px; transform: rotate(-40deg); }
.holly::after { right: 0; transform: rotate(43deg); }
.holly i { position: absolute; z-index: 1; top: 21px; left: 15px; width: 7px; height: 7px; border-radius: 100%; background: #d33b32; box-shadow: -4px 5px #a62224,4px 5px #a62224; }
.mast-nav { display: flex; align-items: center; gap: clamp(10px,3vw,37px); }
.nav-help,.add-button { color: var(--ivory); background: transparent; font: 700 clamp(.95rem,1.75vw,1.43rem)/1 var(--serif); }
.nav-help { border: 0; padding: 8px 0; white-space: nowrap; }
.nav-help:hover { color: var(--gold); }
.add-button { border: 1.5px solid var(--ivory); border-radius: 8px; padding: 8px 15px; white-space: nowrap; }
.add-button span:first-child { margin-right: 5px; }
.add-button:hover:not(:disabled) { color: var(--gold); border-color: var(--gold); background: #ffedb514; }
.add-button:disabled { opacity: .75; }

.hero { position: relative; isolation: isolate; overflow: clip; display: grid; align-items: center; min-height: clamp(420px, 30vw, 540px); color: var(--ivory); background: #0b3023; }
.hero-image,.hero-shade,.snow { position: absolute; inset: 0; pointer-events: none; }
.hero-image { width: 100%; height: 100%; object-fit: cover; object-position: 58% 52%; }
.hero-shade { background: linear-gradient(90deg,#062416b2 0%,#092e22ae 26%,#082d2235 51%,transparent 70%); }
.hero-content { position: relative; padding: 32px 0 49px clamp(0px,5.5vw,85px); }
.kicker { font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); margin: 0 0 11px; }
.hero h1 { font: 700 clamp(4.25rem,6.45vw,7.35rem)/.87 var(--serif); letter-spacing: -.065em; margin: 0; text-shadow: 0 4px 24px #09281b8c; }
.hero-location { display: block; margin-top: .25em; color: var(--gold); font-size: .49em; line-height: 1; letter-spacing: -.038em; }
.hero-ornament { display: flex; align-items: center; justify-content: center; gap: 9px; max-width: 278px; color: var(--gold); font-size: 1.74rem; line-height: 1; margin: 17px 0 5px; }
.hero-ornament::before,.hero-ornament::after { content: ""; height: 1px; flex: 1; background: currentColor; }
.hero-description { font: 400 clamp(1.35rem,2.15vw,2.03rem)/1.2 var(--serif); margin: 6px 0 19px; }
.hero-link { display: inline-block; padding: 11px 25px 13px; color: #142e20; background: linear-gradient(#ffda7a,#edb743); border: 1px solid #ffdf8d; border-radius: 11px; box-shadow: 0 5px 15px #06190e62; text-decoration: none; font: 700 clamp(1.35rem,2.15vw,2.01rem)/1.12 var(--serif); }
.hero-link:hover { background: #ffdc82; }

.snow { z-index: 1; }
.snow i { position: absolute; top: -9px; left: var(--x); width: var(--size); height: var(--size); border-radius: 50%; opacity: var(--alpha); background: #fff9e8; box-shadow: 0 0 5px #fff9e8a8; animation: snowfall var(--time) var(--delay) linear infinite; }
.snow.paused i { animation-play-state: paused; }
@keyframes snowfall { from { transform: translate3d(0,-12px,0); } to { transform: translate3d(var(--drift),560px,0); } }
.snow-toggle { position: absolute; z-index: 2; right: 13px; bottom: 12px; display: grid; place-items: center; width: 37px; height: 37px; padding: 0; border: 1px solid #f6e5c094; border-radius: 50%; color: var(--ivory); background: #10291ace; font-size: 1.06rem; }
.snow-toggle:hover { background: #244b36; }

.parchment { position: relative; padding: 25px 0 34px; background: radial-gradient(ellipse at 50% 30%,#fff5df 0%,#f1dfbb 100%); scroll-margin-top: 8px; }
.parchment::before { content: ""; position: absolute; inset: -6px 0 auto; height: 11px; background: radial-gradient(circle at 7px 8px,#f3e4c4 6px,transparent 7px) repeat-x; background-size: 21px 12px; pointer-events: none; }
.contest-content { position: relative; }
.contest-heading { display: flex; align-items: center; gap: clamp(11px,2.3vw,31px); text-align: center; }
.contest-heading h2 { font: 700 clamp(2.2rem,4.35vw,4.35rem)/1.02 var(--serif); margin: 0; letter-spacing: -.053em; }
.heading-ornament { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 32px; }
.heading-ornament:last-child { flex-direction: row-reverse; }
.heading-ornament::before { content: ""; display: block; width: 100%; min-width: 8px; height: 1px; background: linear-gradient(90deg,#bd8b30,#dfb65c); }
.heading-ornament .holly { transform: scale(.92); }
.contest-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.contest-tab { border: 1px solid #c5a263; border-radius: 999px; padding: 7px 12px; background: #fff5df; color: var(--ink); font-weight: 700; font-size: .9rem; }
.contest-tab span { margin-right: 3px; color: var(--wine); }
.contest-tab:hover { border-color: var(--green); }
.contest-tab[aria-pressed=true] { border-color: var(--green); background: var(--green); color: var(--ivory); }
.contest-tab[aria-pressed=true] span { color: var(--gold); }
.section-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px; margin: 12px 0; }
.section-head h2,.report h2,.gallery-head h2 { font: 600 clamp(1.7rem,3vw,2.3rem)/1.08 var(--serif); letter-spacing: -.036em; margin: 0; }
.muted { color: var(--dim); line-height: 1.5; }
.section-head p { margin: 0; font-size: .89rem; }
.contest-time { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.status { border-radius: 999px; padding: 4px 8px; background: #e5ebd8; color: #255238; font-size: .82rem; font-weight: 730; }
.status[data-state=closed],.status[data-state=scheduled] { background: #efdec4; color: #694321; }
.countdown { color: var(--dim); font-size: .83rem; font-variant-numeric: tabular-nums; }

.entries { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(10px,1.55vw,23px); }
.card { position: relative; min-width: 0; overflow: hidden; display: flex; flex-direction: column; background: #fff3db; border: 1px solid #a87628; padding: 3px; border-radius: 16px; box-shadow: inset 0 0 0 1px #e3c686,0 4px 10px #432b1814; animation: arrive .36s both var(--card-delay); }
@keyframes arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.card:has(input:checked) { border-color: #356039; box-shadow: 0 0 0 2px #356039; }
.card-picture { position: relative; overflow: hidden; aspect-ratio: 1.74; border-radius: 12px 12px 2px 2px; background: #234333; }
.card-picture img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s; }
.card:hover img { transform: scale(1.045); }
.preview-button { position: absolute; right: 8px; top: 8px; border: 1px solid #fff2cf91; border-radius: 999px; background: #132d23ed; color: var(--ivory); padding: 5px 8px; font-size: .76rem; font-weight: 700; }
.preview-button:hover { background: #25513c; }
.card-body { position: relative; flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 13px 13px; }
.card-title { display: block; overflow-wrap: anywhere; font: 700 clamp(1.16rem,2vw,1.74rem)/1.1 var(--serif); letter-spacing: -.035em; }
.card-note { display: block; overflow-wrap: anywhere; color: var(--dim); font-size: .82rem; line-height: 1.35; margin-top: 5px; }
.card-radio { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); border: 0; }
.card-radio:focus-visible + .card-vote { outline: 3px solid #b86723; outline-offset: 3px; }
.card-vote,.primary { border: 0; border-radius: 10px; color: #fff5de; background: linear-gradient(#ad3633,#7b1017); padding: 9px 14px; font-weight: 750; }
.card-vote { flex: none; cursor: pointer; font: 700 clamp(1rem,1.6vw,1.36rem)/1.05 var(--serif); }
.card-vote:hover,.primary:hover:not(:disabled) { background: #69151a; }
.card-radio:checked + .card-vote { background: #1b482f; }
.primary:disabled { background: #e5dac2; color: #65594b; }
.empty-entries { grid-column: 1/-1; border: 1px dashed #b78c45; border-radius: 13px; padding: 22px 17px 24px; text-align: center; background: #fff3dbb0; }
.empty-entries p { margin: 0 0 11px; }
.empty-title { font: 700 1.5rem/1.15 var(--serif); }

.vote-bar { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-top: 17px; padding: 13px 15px; border: 1px solid var(--stroke); border-radius: 12px; background: #fff4dc; }
.vote-bar p { margin: 3px 0 0; }
.vote-label { font-weight: 750; }
#confetti { position: absolute; z-index: 3; pointer-events: none; inset: 0; }
#confetti i { position: absolute; left: 80%; top: 45%; width: 7px; height: 12px; background: var(--color); opacity: 0; animation: celebrate .76s var(--wait) forwards; }
@keyframes celebrate { from { transform: translate(0,0); opacity: .95; } 65% { opacity: .95; } to { transform: translate(var(--dx),var(--dy)) rotate(var(--spin)); opacity: 0; } }
.quiet-button,.icon-button { border: 1px solid var(--stroke); background: var(--ivory); color: var(--green); border-radius: 8px; padding: 8px 12px; font-weight: 650; }
.quiet-button:hover,.icon-button:hover { background: #ead8b5; }

.notice { margin: 10px 0 15px; padding: 11px 14px; background: #e6eee2; border-radius: 10px; line-height: 1.45; }
.notice.error { background: #f8e7e5; color: #792a37; }
.report { margin-top: 16px; padding: 17px; background: var(--ivory); border: 1px solid var(--stroke); border-radius: 14px; }
.report.example { background: #f0ebdf; }
.report p { margin: 8px 0; }
.report h3 { margin: 14px 0 0; font-size: 1rem; }
.report table { width: 100%; border-collapse: collapse; margin-top: 10px; text-align: left; }
.report th,.report td { padding: 8px 7px; border-bottom: 1px solid var(--stroke); }
.report th:last-child,.report td:last-child { text-align: right; }
.report tr:last-child td { border-bottom: 0; }
.admin-form { display: flex; align-items: end; flex-wrap: wrap; gap: 11px; }
.admin-form label, .submission-form label { display: grid; gap: 5px; font-weight: 650; }
.admin-form input,.submission-form input,.submission-form textarea { width: 100%; padding: 10px; background: #fff; border: 1px solid var(--stroke); border-radius: 8px; }
.pending-items { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,235px),1fr)); gap: 12px; }
.pending-card { background: white; border: 1px solid var(--stroke); border-radius: 11px; padding: 11px; }
.pending-card img { display: block; width: 100%; aspect-ratio: 1.7; object-fit: cover; border-radius: 7px; background: #f0ebdf; }
.pending-card h3,.pending-card p { overflow-wrap: anywhere; }
.pending-actions { display: flex; flex-wrap: wrap; gap: 7px; }

dialog { width: min(92vw, 650px); max-height: 88dvh; padding: 17px; border: 1px solid #d6cab7; border-radius: 18px; color: var(--ink); background: var(--ivory); box-shadow: 0 21px 90px #081c1899; }
dialog[open] { animation: reveal .2s ease-out; }
dialog::backdrop { background: #102b26b8; }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 11px; }
.icon-button { flex: none; font-size: 1.4rem; padding: 3px 10px; }
.gallery-figure { margin: 0; }
.gallery-figure img { display: block; width: 100%; height: min(47dvh,460px); object-fit: contain; border-radius: 10px; background: #1e3228; }
.gallery-figure figcaption { padding: 8px 0; color: var(--dim); }
.gallery-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.gallery-actions .quiet-button { font-size: 1.18rem; min-width: 39px; padding: 5px 9px; }
.gallery-actions .primary { margin-left: auto; }
#gallery-position { color: var(--dim); font-size: .89rem; min-width: 44px; text-align: center; }
.submission-form { display: grid; gap: 10px; }
.submission-form p { margin: 0; }
.submission-form label span { display: inline; font-size: .85em; font-weight: 400; }
.submission-form .primary { justify-self: start; }
#upload-preview { width: 100%; max-height: 160px; object-fit: contain; background: #efe9dd; border-radius: 7px; }

.dashboard { min-height: 65vh; padding-block: 18px 30px; }
.dashboard h1 { font: 700 clamp(2.6rem,6vw,4.4rem)/1 var(--serif); letter-spacing: -.045em; }
.how-list { padding-left: 1.5em; line-height: 1.6; }
.how-list li + li { margin-top: .5em; }
.footer { border-top: 1px solid #b88e46; background: #092c1f; color: #ffebc6; padding-block: 18px 22px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px 20px; font-size: .9rem; }
.footer details { max-width: 610px; }
.footer summary { cursor: pointer; font-weight: 650; }
.footer p { margin: 7px 0; line-height: 1.45; }
.footer-admin { padding: 0; border: 0; background: none; color: inherit; text-decoration: underline; text-underline-offset: 4px; }

@media(max-width: 760px) {
  .wrap { width: calc(100% - 30px); }
  .mast { min-height: 59px; }
  .brand { font-size: clamp(1.26rem,4.5vw,2rem); gap: 6px; }
  .brand .holly { width: 29px; transform: scale(.76); margin-left: -3px; }
  .nav-help { min-height: 37px; max-width: min-content; white-space: normal; }
  .add-button { padding: 7px 8px; min-height: 37px; }
  .hero { min-height: 375px; }
  .hero-image { object-position: 64% 55%; }
  .hero-shade { background: linear-gradient(90deg,#052719eb,#08291d8c 65%,#0b302321); }
  .hero-content { padding: 31px 0 43px; }
  .hero h1 { font-size: clamp(3.5rem,11vw,5.6rem); }
  .hero-ornament { max-width: 185px; }
  .hero-description { max-width: 230px; }
  .parchment { padding-top: 20px; }
  .heading-ornament { gap: 2px; min-width: 21px; }
  .heading-ornament .holly { margin-inline: -5px; transform: scale(.67); }
  .entries { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card-body { padding: 9px; align-items: start; flex-direction: column; }
  .card-vote { align-self: flex-end; }
  .vote-bar:has(.primary:not(:disabled)) { position: sticky; bottom: 8px; box-shadow: 0 4px 16px #142d2527; z-index: 2; }
}

@media(max-width: 420px) {
  .mast { flex-wrap: wrap; padding-block: 8px; }
  .mast-nav { gap: 10px; }
  .nav-help { max-width: none; white-space: nowrap; }
  .heading-ornament::before { display: none; }
  .entries { grid-template-columns: 1fr; }
  .card-body { flex-direction: row; align-items: center; }
  .card-vote { align-self: center; }
  #vote-submit { flex: none; font-size: .87rem; }
}

@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *:not(.snow i),*::before,*::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
