@font-face {
  font-family: "Manteca";
  src: url("fonts/ed-manteca-black.woff2") format("woff2");
  font-display: swap;
}
/* Colors pulled from the Santa logo: banner red, glitter gold, beard cream, coat brown. */
:root {
  color-scheme: light;
  --bg: #f8f1e6;
  --card: #fffaf2;
  --line: #ead9c0;
  --ink: #3b281d;
  --muted: #8c745f;
  --red: #b4432f;
  --red-2: #c9644a;
  --red-deep: #8f3322;
  --gold: #dcad6e;
  --gold-2: #ecd3a6;
  --gold-deep: #b98a4c;
  --cream: #f4dfc1;
  --radius: 18px;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --bl: "Manteca", Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--red); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; }
p, li { text-wrap: pretty; }
.bl { font-family: var(--bl); font-weight: 400; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px 72px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(248, 241, 230, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .in { max-width: 720px; min-height: 56px; margin: 0 auto; padding: 6px 16px; display: flex; align-items: center; gap: 10px; }
.top .mark img { width: 58px; }
.top nav { margin-left: auto; display: flex; gap: 2px; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 99px; white-space: nowrap; }
.top nav a.on { color: #fff; background: var(--red); }

/* ---------- footer badge ---------- */
.foot { text-align: center; padding: 10px 16px 56px; }
.foot img { width: 150px; margin: 0 auto; }
.foot.big { padding-top: 24px; }
.foot.big img { width: min(290px, 72vw); }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 26px 0 6px; }
.hero .logo { width: min(230px, 62vw); margin: 0 auto 14px; }
.hero h1 { font-family: var(--bl); font-weight: 400; font-size: 60px; line-height: 1; color: var(--red); }
.hero p { margin: 8px auto 0; max-width: 30em; color: var(--muted); }
.hero .btn { margin-top: 18px; }
.btn { display: inline-block; border: 0; border-radius: 99px; padding: 12px 22px; cursor: pointer; background: var(--red); color: #fff; font: 700 15px var(--sans); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
.btn.small { padding: 7px 14px; font-size: 13px; }

/* ---------- presents ---------- */
.gifts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 12px; margin-top: 26px; }
.tile { text-decoration: none; color: inherit; display: block; -webkit-tap-highlight-color: transparent; }
.gift { position: relative; aspect-ratio: 1 / 1; }
.cap { text-align: center; font-size: 13px; font-weight: 700; margin-top: 8px; color: var(--muted); }
.cap .pill { display: inline-block; padding: 3px 11px; border-radius: 99px; }
.tile.today .cap .pill { background: var(--red); color: #fff; }
.tile.ready .cap .pill { background: var(--gold-2); color: var(--ink); }
.tile.opened .cap .pill.you { background: var(--ink); color: var(--gold-2); }
.tile.opened .cap .pill.todo { box-shadow: inset 0 0 0 1.5px var(--red); color: var(--red); }

/* wrapping: lid + two halves of paper + ribbon + bow + gift tag */
.wrapping { position: absolute; inset: 0; }
.wrapping > * { position: absolute; }
.paper { top: 34%; bottom: 0; width: 44%; background-color: var(--p); }
.paper.l { left: 6%; border-radius: 6px 0 0 8px; }
.paper.r { right: 6%; border-radius: 0 6px 8px 0; }
.lid { top: 20%; height: 17%; left: 2%; right: 2%; border-radius: 6px; background-color: var(--p); box-shadow: 0 3px 0 rgba(0, 0, 0, .12); }
.ribbon { top: 34%; bottom: 0; left: 50%; width: 15%; transform: translateX(-50%); background: var(--r); }
.lid .ribbon { position: absolute; top: 0; bottom: 0; }
.bow { top: 2%; left: 50%; width: 52%; transform: translateX(-50%); }
.bow path { fill: var(--r); }
.bow .knot { fill: var(--r2); }
.gtag {
  top: 60%; left: 50%; transform: translate(-50%, -50%); min-width: 40%; padding: 5px 6px 4px; border-radius: 8px;
  background: var(--card); text-align: center; box-shadow: 0 2px 6px rgba(59, 40, 29, .18);
}
.gtag .n { display: block; font-family: var(--bl); font-size: 32px; line-height: 1; color: var(--red); }
.gtag .d { display: block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 1px; }
/* three papers that cycle: red with gold ribbon, gold with red ribbon, cream stripes with red ribbon */
.v0 { --p: var(--red); --r: var(--gold); --r2: var(--gold-deep); }
.v0 .paper, .v0 .lid { background-image: radial-gradient(rgba(236, 211, 166, .35) 1.5px, transparent 1.6px); background-size: 12px 12px; }
.v1 { --p: var(--gold); --r: var(--red); --r2: var(--red-deep); }
.v2 { --p: var(--cream); --r: var(--red-2); --r2: var(--red); }
.v2 .paper, .v2 .lid { background-image: repeating-linear-gradient(135deg, transparent 0 9px, rgba(180, 67, 47, .18) 9px 12px); }
.tile.today .gift { filter: drop-shadow(0 8px 16px rgba(180, 67, 47, .35)); }
a.tile:active .gift { transform: scale(.97); }

/* what's inside once it's unwrapped */
.inside {
  position: absolute; inset: 20% 4% 0; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; padding: 10px; visibility: hidden;
}
.inside img { max-width: 82%; max-height: 82%; object-fit: contain; }
.inside .nm { margin-top: 8px; font-weight: 800; font-size: 14px; line-height: 1.2; text-align: center; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.inside .tag { position: absolute; top: 5px; left: 8px; font-family: var(--bl); font-size: 18px; color: var(--red); }
.tile.opened .inside { visibility: visible; }
.tile.opened .wrapping { display: none; }

/* the unwrap */
.tile.unwrapping .inside { visibility: visible; animation: rise .45s .5s both ease-out; }
.tile.unwrapping .bow { animation: pop .35s forwards ease-in; }
.tile.unwrapping .gtag { animation: drop .3s .1s forwards ease-in; }
.tile.unwrapping .lid { animation: lid .5s .12s forwards cubic-bezier(.5, 0, .75, 0); }
.tile.unwrapping .wrapping > .ribbon { animation: snap .3s .25s forwards ease-in; }
.tile.unwrapping .paper.l { animation: tearL .5s .38s forwards ease-in; }
.tile.unwrapping .paper.r { animation: tearR .5s .38s forwards ease-in; }
@keyframes pop { to { transform: translate(-50%, -40%) scale(1.35) rotate(-12deg); opacity: 0; } }
@keyframes drop { to { transform: translate(-50%, 10%) scale(.6) rotate(14deg); opacity: 0; } }
@keyframes lid { to { transform: translate(-30%, -140%) rotate(-28deg); opacity: 0; } }
@keyframes snap { to { transform: translateX(-50%) scaleY(0); opacity: 0; } }
@keyframes tearL { to { transform: translate(-70%, 12%) rotate(-16deg); opacity: 0; } }
@keyframes tearR { to { transform: translate(70%, 12%) rotate(16deg); opacity: 0; } }
@keyframes rise { from { transform: scale(.88); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nudge { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
.tile.locked:hover .gift { animation: nudge .4s ease-in-out; }
@media (prefers-reduced-motion: reduce) {
  .tile.unwrapping * { animation: none !important; }
  .tile.locked:hover .gift { animation: none; }
}
.tip { text-align: center; font-size: 13px; color: var(--muted); margin-top: 30px; }

/* ---------- peek popup ---------- */
dialog.sheet {
  width: min(560px, calc(100% - 24px)); max-height: 86vh; padding: 0; border: 0; border-radius: 22px;
  background: var(--bg); color: var(--ink); box-shadow: 0 20px 60px rgba(59, 40, 29, .35); overflow: auto;
}
dialog.sheet::backdrop { background: rgba(59, 40, 29, .45); }
dialog.sheet .x { position: absolute; top: 12px; right: 12px; margin: 0; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 22px; line-height: 1; color: var(--ink); cursor: pointer; z-index: 2; }
.sheet-body { padding: 22px 20px 26px; }
.minigift { width: 130px; margin: 6px auto 4px; }
.peek-h { font-size: 42px; color: var(--red); text-align: center; margin-top: 4px; }
.beerhead.peeked { padding-top: 0; }
.beerhead.peeked .lab { width: 132px; height: 132px; }
.beerhead.peeked .lab img { max-width: 112px; max-height: 112px; }
.beerhead.peeked h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.peektext { margin-top: 14px; }
.peektext h3 { font-size: 15px; margin: 18px 0 6px; }
@media (max-width: 520px) {
  dialog.sheet { margin: auto auto 0; width: 100%; max-width: 100%; border-radius: 22px 22px 0 0; max-height: 88vh; }
}

/* ---------- no peeking ---------- */
.peekgift { width: 210px; margin: 34px auto 10px; }
.peekgift .gtag .n { font-size: 60px; }
.peekgift .gtag .d { font-size: 12px; }

/* ---------- beer page ---------- */
.doorbar { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 6px; font-size: 14px; font-weight: 600; }
.doorbar a { text-decoration: none; }
.doorbar .arrows { display: flex; gap: 8px; }
.doorbar .arrows a, .doorbar .arrows span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 18px; }
.doorbar .arrows span { opacity: .35; }
.beerhead { text-align: center; padding: 10px 0 4px; }
.beerhead .lab { width: 168px; height: 168px; margin: 0 auto 16px; border-radius: 24px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.beerhead .lab img { max-width: 140px; max-height: 140px; object-fit: contain; }
.beerhead .lab .n { font-family: var(--bl); font-size: 80px; color: var(--red); }
.beerhead h1 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.beerhead .brew { color: var(--muted); margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.chips span { font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 18px 0; }
.panel h2 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.panel.notice { background: var(--gold-2); border-color: var(--gold); text-align: center; font-weight: 600; }

.scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 5px; }
.scale button { height: 46px; padding: 0; border-radius: 11px; cursor: pointer; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 700 16px var(--sans); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.scale button:hover { border-color: var(--gold); }
.scale button.on { background: var(--red); border-color: var(--red); color: #fff; }
.ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
input.note { width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 15px var(--sans); }
input.note::placeholder { color: var(--muted); }
.status { font-size: 13px; font-weight: 600; color: var(--red); min-height: 18px; margin-top: 8px; }
.status.err { color: var(--red-deep); }

/* poll bars, like Josh's Discord poll */
.pollhead { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pollhead h2 { margin: 0; }
.pollhead .avg { margin-left: auto; text-align: right; font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.pollhead .avg small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 3px; }
.bars { display: grid; gap: 5px; }
.bar { position: relative; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--bg); overflow: hidden; font-size: 14px; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--gold-2); }
.bar.top i { background: var(--gold); }
.bar b, .bar span { position: relative; }
.bar b { width: 20px; }
.bar span { margin-left: auto; color: var(--muted); font-weight: 600; }
.bar.top span { color: var(--ink); }
.bar.picked { box-shadow: inset 0 0 0 2px var(--red); }
.bar.picked span::after { content: " ✓"; color: var(--red); }
.who { list-style: none; margin: 14px 0 0; padding: 0; }
.who li { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.who li .s { margin-left: auto; font-weight: 800; color: var(--red); }
.who li .nt { display: block; color: var(--muted); font-size: 13px; font-style: italic; }
.who li.me { font-weight: 700; }
details.whobox summary { cursor: pointer; color: var(--red); font-weight: 600; font-size: 14px; margin-top: 14px; }
.facts { list-style: none; padding: 0; margin: 0; }
.facts li { padding: 12px 0; border-top: 1px solid var(--line); }
.facts li:first-child { border-top: 0; padding-top: 0; }

/* ---------- pint glass ---------- */
.pint { display: block; flex: none; overflow: visible; }
.pint .glass { fill: rgba(255, 255, 255, .6); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.pint .shine { stroke: #fff; stroke-width: 2; stroke-linecap: round; opacity: .85; }
.pint .lace { fill: none; stroke: #f6ead2; stroke-width: 1.4; stroke-linecap: round; }
.glasskey { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin: 0 0 12px; }

/* ---------- results / history / hall ---------- */
.section-title { font-family: var(--bl); font-weight: 400; font-size: 38px; color: var(--red); margin: 38px 0 4px; }
.lede { margin: 2px 0 12px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.yearpick { display: flex; gap: 6px; margin: 18px 0 0; overflow-x: auto; scrollbar-width: none; }
.yearpick::-webkit-scrollbar { display: none; }
.yearpick a { flex: none; text-decoration: none; padding: 6px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14px; }
.yearpick a.on { background: var(--red); border-color: var(--red); color: #fff; }

.champ { text-align: center; padding: 26px 16px; background: var(--card); border: 2px solid var(--gold); }
.champ .duo { display: flex; align-items: flex-end; justify-content: center; gap: 22px; margin: 16px 0 12px; }
.champ .lab { width: 120px; height: 120px; border-radius: 20px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.champ .lab img { max-width: 100px; max-height: 100px; }
.champ .lab .n { font-family: var(--bl); font-size: 56px; color: var(--red); }
.champ h2 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.champ .score { margin-top: 6px; color: var(--muted); }
.champ .score b { color: var(--ink); }

.rank { list-style: none; padding: 0; margin: 0; }
.rank li { display: grid; grid-template-columns: 26px 46px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.rank li:first-child { border-top: 0; padding-top: 2px; }
.rank .n { font-family: var(--bl); font-size: 24px; color: var(--red); text-align: center; }
.rank.years li { grid-template-columns: 46px 46px 1fr auto auto; }
.rank.years .n { font-size: 19px; }
.rank .lab { width: 46px; height: 46px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.rank .lab img { max-width: 38px; max-height: 38px; }
.rank .lab .n { font-size: 20px; }
.rank .nm { font-weight: 700; line-height: 1.25; min-width: 0; }
.rank .nm a { color: inherit; text-decoration: none; }
.rank .nm small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; margin-top: 1px; }
.rank .av { font-weight: 800; font-size: 19px; text-align: right; line-height: 1.1; min-width: 34px; }
.rank .av.you { color: var(--red); }
.rank.lineup .n { font-size: 22px; }
.rank .av small { display: block; font-weight: 600; font-size: 11px; color: var(--muted); }

.awards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.award { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.award h3 { font-family: var(--bl); font-weight: 400; font-size: 24px; color: var(--red); }
.award .who { font-weight: 800; margin-top: 8px; line-height: 1.3; }
.award p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.vs { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.vs .side { flex: 1; }
.vs .side.r { text-align: right; }
.vs b { font-size: 24px; display: block; font-weight: 800; color: var(--muted); }
.vs .win b { color: var(--red); }
.vs .mid { color: var(--muted); font-size: 13px; }
.heatwrap { overflow-x: auto; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
table.heat { border-collapse: separate; border-spacing: 2px; font-size: 12px; padding: 6px; }
table.heat th { font-weight: 600; }
table.heat th.p { writing-mode: vertical-rl; transform: rotate(180deg); padding: 6px 2px; height: 120px; text-align: left; white-space: nowrap; color: var(--muted); }
table.heat th.p.me { color: var(--red); }
table.heat th.b { text-align: right; padding: 0 10px 0 4px; white-space: nowrap; position: sticky; left: 0; background: var(--card); }
table.heat td { width: 28px; min-width: 28px; height: 28px; text-align: center; font-weight: 700; border-radius: 6px; }
table.heat td.me { box-shadow: inset 0 0 0 2px var(--ink); }
.mine { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mine div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.mine span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.mine b { display: block; line-height: 1.3; margin-top: 2px; }
table.hist { width: 100%; border-collapse: collapse; font-size: 15px; }
table.hist td { padding: 10px 4px; border-top: 1px solid var(--line); vertical-align: top; }
table.hist tr:first-child td { border-top: 0; }
table.hist td.d { width: 26px; color: var(--muted); font-size: 13px; padding-top: 12px; }
table.hist td.s { width: 44px; text-align: right; font-weight: 800; font-size: 18px; color: var(--red); }
table.hist td.g { width: 56px; text-align: right; color: var(--muted); font-size: 13px; padding-top: 12px; }
table.hist a { color: inherit; text-decoration: none; font-weight: 600; }
table.hist .nt { display: block; font-size: 13px; color: var(--muted); font-style: italic; }

/* ---------- admin ---------- */
.admin table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin td, .admin th { padding: 9px 6px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin input[type=text], .admin input[type=date], .admin input[type=datetime-local], .admin textarea, .admin select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: 15px var(--sans); background: #fff; color: var(--ink); }
.admin textarea { min-height: 160px; }
.admin label { display: block; font-weight: 700; font-size: 13px; margin: 14px 0 5px; }
.admin .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin .link { font-family: ui-monospace, Menlo, monospace; font-size: 12px; word-break: break-all; color: var(--muted); }
.flash { background: var(--gold-2); border: 1px solid var(--gold); padding: 10px 14px; border-radius: 12px; margin: 14px 0; }
.grid-mini { overflow-x: auto; }
.grid-mini table td { text-align: center; padding: 4px; }
.grid-mini td.y { color: var(--red); font-weight: 800; }
.grid-mini td.n { color: var(--line); }

@media (min-width: 640px) {
  .gifts { grid-template-columns: repeat(4, 1fr); gap: 26px 20px; }
  .hero h1 { font-size: 76px; }
}
@media (max-width: 520px) {
  .awards { grid-template-columns: 1fr; }
  .scale { gap: 3px; }
  .scale button { height: 44px; font-size: 15px; border-radius: 9px; }
  .admin .row2 { grid-template-columns: 1fr; }
  .top nav a { padding: 7px 10px; font-size: 13px; }
  .rank li { gap: 9px; }
  .gtag .n { font-size: 28px; }
  /* fit all 12 presents on one phone screen */
  .hero { padding-top: 14px; }
  .hero h1 { font-size: 52px; }
  .hero p { margin-top: 4px; }
  .gifts { margin-top: 14px; gap: 10px 12px; }
  .cap { margin-top: 5px; }
}
