:root {
  color-scheme: dark;
  --bg: #101914;
  --panel: #18251d;
  --paper: #f5eee1;
  --muted: #c3ccbd;
  --gold: #eed29b;
  --rule: #a7b3a43a;
  --ink: #1c2118;
  --radius: 22px;
  font: 16px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--paper);
  background: radial-gradient(ellipse at 75% 9%, #31412a 0, transparent 37rem), var(--bg);
}
:focus-visible { outline: 2px solid #fff0c4; outline-offset: 4px; }
a { color: inherit; text-underline-offset: .24em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .58; }
p, h1, h2, h3 { margin: 0; }
.frame { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: absolute; left: 20px; top: -80px; background: var(--panel); padding: 10px 20px; z-index: 20; }
.skip:focus { top: 10px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 82px; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; gap: 11px; align-items: center; min-height: 44px; text-decoration: none; font-size: .96rem; font-weight: 730; letter-spacing: .16em; }
.brand img { display: block; border-radius: 50%; }
.rules-link { display: inline-flex; min-height: 44px; gap: 8px; align-items: center; color: var(--muted); font-size: .88rem; text-decoration: none; }
.rules-link:hover { color: var(--gold); }
.hero { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); align-items: center; gap: 56px; padding-block: 34px 68px; }
.eyebrow { color: var(--gold); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; }
.eyebrow span { margin-right: 7px; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.032em; line-height: .96; }
h1 { margin: 20px 0 25px; font-size: 7rem; }
h1 em, h2 em { color: var(--gold); font-weight: inherit; }
.hero-lead { max-width: 29rem; color: var(--muted); font-size: 1.12rem; line-height: 1.64; }
.button {
  background: var(--gold); color: var(--ink); border: 1px solid transparent; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 50px;
  padding: 11px 20px; text-decoration: none; font-weight: 720; line-height: 1.3;
}
.button:hover { background: #ffe4ad; }
.button span { font-size: 1.22em; }
.hero .button { margin-top: 24px; }
.dates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; color: var(--muted); font-size: .82rem; }
.tree-card { position: relative; overflow: hidden; background: #101a14; border: 1px solid #9fa58a50; border-radius: var(--radius); box-shadow: 0 20px 55px #0005; }
.tree-head, .tree-footer { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px; }
.tree-head { border-bottom: 1px solid var(--rule); min-height: 57px; padding-block: 6px; }
.tree-head h2 { display: inline-flex; align-items: center; gap: 8px; font: 700 .88rem/1.35 "Inter", -apple-system, sans-serif; letter-spacing: 0; white-space: nowrap; }
.tree-head p { color: var(--muted); font-size: .81rem; text-align: right; }
.tree-head strong { color: var(--gold); margin-left: 4px; }
.tree-toolbar { display: flex; align-items: center; gap: 10px; }
.motion-control {
  display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0;
  background: #e5e3d80c; border: 1px solid var(--rule); border-radius: 50%; color: var(--gold);
}
.motion-control:hover { background: #e5e3d81d; }
.motion-symbol { width: 10px; height: 12px; border-inline: 3px solid currentColor; }
.motion-paused .motion-symbol { width: 0; height: 0; border: 0; border-block: 6px solid transparent; border-left: 9px solid currentColor; margin-left: 2px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #b2d49a; box-shadow: 0 0 12px #a5e67486; }
.canopy { position: relative; width: 100%; aspect-ratio: 1; background: #0c140e; }
.tree-art { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.tree-motion { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tree-footer { min-height: 61px; border-top: 1px solid var(--rule); }
.tree-footer p { color: var(--muted); font-size: .82rem; }
.tree-footer nav { display: flex; flex: none; align-items: center; gap: 7px; font-size: .8rem; color: var(--gold); }
.tree-footer button, .close {
  color: var(--paper); min-width: 44px; min-height: 44px; background: #ffffff09;
  border: 1px solid var(--rule); border-radius: 8px;
}
.ornaments { position: absolute; inset: 0; }
.ornament {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  width: 44px; height: 44px; display: grid; place-items: center; padding: 2px;
  background: transparent; border: 1px solid transparent; border-radius: 50%;
  transition: background-color .18s, filter .18s;
}
.ornament:hover, .ornament.highlighted { z-index: 2; background: #f9d68956; border-color: var(--gold); filter: drop-shadow(0 0 10px #fbc75b); }
.ornament.winner { border: 2px solid var(--gold); box-shadow: 0 0 18px #ffcd72b8; }
.ornament.arrived { animation: arrive 1.35s cubic-bezier(.15,.65,.25,1) both; z-index: 3; }
.ornament.arrived::before {
  content: ""; pointer-events: none; position: absolute; inset: -2px; border-radius: 50%;
  border: 1px solid #fff3bb; box-shadow: 0 0 13px #fbc75b70;
  animation: ornament-halo 1.35s ease-out both;
}
.motion-paused .ornament.arrived, .motion-paused .ornament.arrived::before { animation: none; }
@keyframes arrive {
  0% { opacity: 0; transform: translate(-50%, -105%) scale(.6) rotate(-13deg); }
  31% { opacity: 1; background: #fff0bc75; transform: translate(-50%, -48%) scale(1.17) rotate(8deg); }
  63% { transform: translate(-50%, -50%) scale(.97) rotate(-3deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes ornament-halo {
  0% { opacity: 0; transform: scale(.35); }
  26% { opacity: .8; }
  100% { opacity: 0; transform: scale(2.15); }
}
.metal {
  position: relative; display: inline-block; flex: none; width: 25px; height: 25px;
  border: 1px solid #fff3c8b3; box-shadow: inset 0 0 2px #fff9, 0 3px 6px #000a;
  background: linear-gradient(132deg, #f8edc8 2%, #a67d43 38%, #e4c797 65%, #805832 100%);
}
.metal::after { content: ""; position: absolute; left: calc(50% - 2px); top: 3px; width: 4px; height: 4px; border-radius: 50%; background: #39342a; box-shadow: 0 1px 1px #fff4; }
.metal.round { border-radius: 50%; }
.metal.tag { width: 20px; height: 28px; border-radius: 6px; background: linear-gradient(142deg, #efeee5, #83918b 43%, #dfe5dd 69%, #757b78); }
.metal.bar { width: 15px; height: 29px; border-radius: 4px; transform: rotate(12deg); background: linear-gradient(135deg, #ead8aa, #a1603d 38%, #e5ba90 68%, #70432b); }
.participation { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; align-items: start; padding-block: 45px 66px; border-top: 1px solid var(--rule); }
.participation h2 { font-size: 3.65rem; margin-block: 15px 20px; line-height: 1.02; }
.participation-copy > p:not(.eyebrow) { color: var(--muted); max-width: 25rem; }
.prizes { display: grid; gap: 0; max-width: 25rem; margin-top: 27px; }
.prizes div { padding: 10px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.prizes dt { color: var(--gold); font-size: .86rem; font-weight: 700; }
.prizes dd { margin: 0; color: var(--muted); font-size: .91rem; }
.form-card { background: #1d2b22; border: 1px solid var(--rule); border-radius: var(--radius); padding: 25px; min-width: 0; }
fieldset { padding: 0; margin: 0 0 20px; border: 0; min-width: 0; }
legend, label.field { display: block; color: var(--paper); font-size: .9rem; font-weight: 650; margin-bottom: 8px; }
.ornament-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice { position: relative; display: block; min-width: 0; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice-body { display: grid; grid-template-rows: 30px auto; place-items: center; gap: 5px; background: #131f18; padding: 10px 4px; min-height: 74px; text-align: center; color: var(--muted); border: 1px solid var(--rule); border-radius: 9px; font-size: .76rem; line-height: 1.25; }
.choice input:checked + .choice-body { border-color: var(--gold); color: var(--paper); background: #403923; }
.choice input:focus-visible + .choice-body { outline: 2px solid #fff0c4; outline-offset: 3px; }
input:not([type="checkbox"], [type="radio"]), select, textarea {
  width: 100%; min-width: 0; color: var(--paper); background: #121e17;
  border: 1px solid #768473; border-radius: 9px; min-height: 47px; padding: 10px 12px;
}
textarea { display: block; resize: vertical; }
input::placeholder, textarea::placeholder { color: #b5c3b4; opacity: 1; }
.count { font-size: .75rem; color: var(--muted); margin: 4px 0 13px; text-align: right; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 12px; margin-bottom: 15px; }
.check { display: flex; align-items: start; gap: 9px; padding: 6px 0; min-height: 44px; color: var(--muted); font-size: .85rem; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); margin: 2px 0 0; flex: 0 0 18px; }
.check a { color: var(--paper); }
.submit { width: 100%; margin-top: 9px; }
.form-error { margin-top: 9px; color: #ffcab5; overflow-wrap: anywhere; }
.confirmation-star { font-size: 2rem; color: var(--gold); }
.confirmation h3, .dialog-inner h2 { font-size: 2.45rem; line-height: 1.05; margin: 8px 0 15px; }
.confirmation p:not(.confirmation-star), .dialog-inner p { color: var(--muted); }
.confirmation-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }
.secondary { background: transparent; color: var(--gold); border-color: #bba27391; }
.secondary:hover { color: var(--paper); background: #63563044; }
.share-input, .form-status:not(:empty) { margin-top: 10px; }
.aftermath { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; border-top: 1px solid var(--rule); padding-block: 35px 45px; }
.aftermath h2 { margin-bottom: 15px; font-size: 2.25rem; line-height: 1.1; }
.aftermath p, .aftermath ol { color: var(--muted); }
#winner-list li { margin-bottom: 8px; }
details { border-bottom: 1px solid var(--rule); padding: 6px 0; }
summary { min-height: 44px; padding-block: 9px; cursor: pointer; font-weight: 650; }
details p { margin: 0 0 12px; font-size: .91rem; }
.site-footer { display: flex; flex-wrap: wrap; gap: 16px 27px; align-items: center; padding-block: 18px 26px; border-top: 1px solid var(--rule); color: var(--muted); font-size: .83rem; }
.site-footer > a:last-child { margin-left: auto; }
dialog { width: min(440px, calc(100% - 28px)); color: var(--paper); background: #1f2c23; border: 1px solid #8a9b82; padding: 0; border-radius: 18px; }
dialog::backdrop { background: #07100dc7; }
.dialog-inner { position: relative; padding: 24px; }
.close { position: absolute; top: 12px; right: 12px; font-size: 1.5rem; }
.dialog-inner .ornament-prize { color: var(--gold); font-weight: 700; margin-bottom: 9px; }
#ornament-text { overflow-wrap: anywhere; }
.dialog-inner .button { margin-top: 15px; }

@media (max-width: 1150px) {
  h1 { font-size: 6rem; }
  .hero, .participation, .aftermath { gap: 38px; }
}
@media (max-width: 930px) {
  .frame { width: calc(100% - 60px); }
  h1 { font-size: 5.3rem; }
  .hero { gap: 26px; }
  .participation h2 { font-size: 3.1rem; }
  .wide { display: none; }
}
@media (max-width: 720px) {
  .frame { width: min(540px, calc(100% - 36px)); }
  .site-header { min-height: 65px; }
  .hero, .participation, .aftermath { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero { padding-block: 23px 34px; }
  h1 { font-size: 4.65rem; margin: 10px 0 16px; }
  h1 br { display: none; }
  .hero-lead { font-size: .99rem; }
  .hero .button { margin-top: 16px; }
  .dates { margin-top: 11px; }
  .participation { padding-block: 23px 30px; }
  .participation h2 { margin: 10px 0 12px; }
  .prizes { margin: 15px 0 0; }
  .aftermath { padding-block: 23px 34px; }
}
@media (max-width: 420px) {
  h1 { font-size: 3.7rem; }
  .participation h2 { font-size: 2.25rem; overflow-wrap: anywhere; }
  .form-card { padding: 15px; }
  .contact-grid { grid-template-columns: 1fr; }
  .tree-head, .tree-footer { padding-inline: 12px; }
  .tree-toolbar { gap: 7px; }
  .site-header .brand { letter-spacing: .11em; gap: 7px; font-size: .86rem; }
  .rules-link { font-size: .81rem; }
  .ornament { width: 33px; height: 33px; }
  .ornament .metal { scale: .88; }
  .tree-footer nav { gap: 4px; }
  .tree-footer nav button { min-width: 33px; }
  .site-footer > a:last-child { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
