:root {
  --black: #050505;
  --panel: #0e0c09;
  --ivory: #f6eedb;
  --muted: #c9bc9c;
  --gold: #d9b45a;
  --gold-deep: #9c7a2b;
  --gold-grad: linear-gradient(115deg, #a47824 0%, #e2c168 22%, #fbeeb8 40%, #c9a04a 58%, #f1d886 78%, #a47824 100%);
  --ok: #3f9d63;
  --bad: #c2543f;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--black); color: var(--ivory); }
body {
  font: 19px/1.6 "Cormorant Garamond", Georgia, serif;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(217, 180, 90, .14), transparent 70%),
    repeating-linear-gradient(45deg, rgba(217, 180, 90, .025) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(-45deg, rgba(217, 180, 90, .025) 0 1px, transparent 1px 28px),
    var(--black);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); }
img { max-width: 100%; }

.gold { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.caps { font-family: Cinzel, "Trajan Pro", Georgia, serif; letter-spacing: .22em; text-transform: uppercase; }
.script { font-family: "Pinyon Script", cursive; font-weight: 400; }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; max-width: 1080px; margin: 0 auto; padding: 18px 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 44px; height: 44px; }
.brand span { font-size: 15px; }
.pill { font: 600 13px Cinzel, Georgia, serif; letter-spacing: .18em; text-transform: uppercase; color: var(--black); background: var(--gold-grad); padding: 10px 16px; border-radius: 999px; text-decoration: none; }

/* hero */
.hero { position: relative; overflow: hidden; text-align: center; padding: 8px 16px 56px; }
.hero .crest { width: min(300px, 70vw); height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 0 24px rgba(217, 180, 90, .25)); }
.presents { margin: 28px 0 0; font-size: 14px; color: var(--muted); }
.hero h1 { margin: 4px 0 0; line-height: 1; font-weight: 400; }
.hero h1 .script { display: block; font-size: clamp(64px, 14vw, 128px); padding: 0 .1em .05em; }
.hero h1 .year { display: block; font: 600 clamp(22px, 4.6vw, 34px) Cinzel, Georgia, serif; letter-spacing: .6em; margin: 6px 0 0 .6em; }
.rule { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 26px auto; max-width: 420px; }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.rule::after { background: linear-gradient(90deg, var(--gold), transparent); }
.rule i { width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }
.when { font-size: clamp(18px, 3.4vw, 22px); color: var(--ivory); margin: 0; }
.when b { font-weight: 600; }
.hero .glasses { width: min(420px, 88vw); display: block; margin: 30px auto 8px; }
.cta { display: inline-block; margin-top: 18px; font: 600 15px Cinzel, Georgia, serif; letter-spacing: .2em; text-transform: uppercase; color: var(--black); text-decoration: none; background: var(--gold-grad); background-size: 200% 100%; padding: 16px 30px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(251, 238, 184, .4) inset, 0 8px 30px rgba(217, 180, 90, .25); transition: background-position .6s; }
.cta:hover { background-position: 100% 0; }

/* rising bubbles */
.bubbles span { position: absolute; bottom: -20px; width: 6px; height: 6px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff6d6, rgba(217, 180, 90, .5)); opacity: 0; animation: rise 11s linear infinite; }
.bubbles span:nth-child(1) { left: 8%; animation-delay: 0s; }
.bubbles span:nth-child(2) { left: 18%; width: 4px; height: 4px; animation-delay: 3s; }
.bubbles span:nth-child(3) { left: 30%; animation-delay: 6s; }
.bubbles span:nth-child(4) { left: 70%; width: 5px; height: 5px; animation-delay: 1.5s; }
.bubbles span:nth-child(5) { left: 82%; animation-delay: 4.5s; }
.bubbles span:nth-child(6) { left: 92%; width: 4px; height: 4px; animation-delay: 7.5s; }
.bubbles span:nth-child(7) { left: 55%; width: 3px; height: 3px; animation-delay: 9s; }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translateY(-900px) translateX(20px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bubbles { display: none; } html { scroll-behavior: auto; } }

/* sections */
.section { max-width: 760px; margin: 0 auto; padding: 48px 16px; }
.section h2 { text-align: center; font-weight: 400; margin: 0 0 8px; }
.section h2 .script { font-size: clamp(46px, 9vw, 64px); display: block; line-height: 1.1; }
.section h2 .caps { font-size: 13px; color: var(--muted); display: block; }
.lede { text-align: center; font-size: 22px; font-style: italic; color: var(--ivory); max-width: 600px; margin: 18px auto 0; }

/* the Georgian frame: double gold hairline with corner diamonds */
.frame { position: relative; border: 1px solid rgba(217, 180, 90, .55); outline: 1px solid rgba(217, 180, 90, .25); outline-offset: 6px; padding: 28px 22px; margin: 34px 6px 0; background: linear-gradient(180deg, rgba(217, 180, 90, .05), rgba(0, 0, 0, 0)), var(--panel); }
.frame::before, .frame::after { content: ""; position: absolute; width: 11px; height: 11px; background: var(--gold); transform: rotate(45deg); top: -6px; left: calc(50% - 5.5px); box-shadow: 0 0 12px rgba(217, 180, 90, .6); }
.frame::after { top: auto; bottom: -6px; }

.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px 28px; margin: 0; }
.details div { text-align: center; }
.details dt { font: 600 12px Cinzel, Georgia, serif; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.details dd { margin: 0; font-size: 21px; }

/* ticket form */
form.buy label { display: block; font: 600 12px Cinzel, Georgia, serif; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
form.buy input, form.buy select { width: 100%; font: 19px "Cormorant Garamond", Georgia, serif; color: var(--ivory); background: #070604; border: 1px solid rgba(217, 180, 90, .35); border-radius: 2px; padding: 11px 12px; }
form.buy input:focus, form.buy select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.names-head { margin-top: 22px; padding-top: 10px; border-top: 1px solid rgba(217, 180, 90, .2); }
.total { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(217, 180, 90, .25); }
.total strong { font: 600 30px Cinzel, Georgia, serif; }
button { font: 600 14px Cinzel, Georgia, serif; letter-spacing: .2em; text-transform: uppercase; color: var(--black); background: var(--gold-grad); background-size: 200% 100%; border: 0; border-radius: 2px; padding: 15px 24px; cursor: pointer; transition: background-position .6s; }
button:hover { background-position: 100% 0; }
button[disabled] { opacity: .5; cursor: default; }
.err { color: #ffb4a3; margin: 12px 0 0; min-height: 1.4em; font-size: 17px; }
.small { font-size: 16px; color: var(--muted); }
.notice { text-align: center; }
.notice .script { font-size: 48px; display: block; }

footer { text-align: center; padding: 40px 16px 56px; border-top: 1px solid rgba(217, 180, 90, .15); margin-top: 40px; }
footer img { width: 64px; height: 64px; }
.legal { font-size: 14px; color: #8f8570; max-width: 560px; margin: 12px auto 0; }

/* pages rendered by the Worker */
.wrap { max-width: 640px; margin: 0 auto; padding: 8px 16px 64px; }
.page-head { text-align: center; }
.page-head img { width: 120px; height: auto; }
.page-head h1 { margin: 6px 0 0; font-weight: 400; line-height: 1.05; }
.page-head h1 .script { font-size: 56px; display: block; }
.page-head h1 .year { font: 600 18px Cinzel, Georgia, serif; letter-spacing: .5em; display: block; margin-left: .5em; }
.page-head .when { font-size: 18px; color: var(--muted); margin-top: 10px; }
.ticket { background: var(--ivory); color: #16120a; padding: 26px 20px; text-align: center; margin: 28px 6px 16px; position: relative; border: 1px solid var(--gold); outline: 1px solid rgba(217, 180, 90, .5); outline-offset: 6px; }
.ticket .caps { font-size: 11px; color: var(--gold-deep); }
.ticket .name { font: 400 44px "Pinyon Script", cursive; line-height: 1.2; }
.ticket .qr svg { width: 100%; max-width: 280px; height: auto; display: block; margin: 10px auto; }
.code { font-family: ui-monospace, Menlo, monospace; letter-spacing: .1em; }
.bad { color: var(--bad); font-weight: 600; }
.note { color: var(--ok); font-weight: 600; }
.tlist { padding-left: 20px; }
.tlist li { margin: 8px 0; }
video { width: 100%; border: 1px solid rgba(217, 180, 90, .4); background: #000; margin-top: 16px; }
.res { margin: 16px 0; padding: 20px; font-size: 22px; text-align: center; border: 1px solid rgba(217, 180, 90, .4); background: var(--panel); }
.res.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.res.bad { background: var(--bad); color: #fff; border-color: var(--bad); }
.row { display: flex; gap: 8px; }
.row input { flex: 1; font: 18px "Cormorant Garamond", Georgia, serif; color: var(--ivory); background: #070604; border: 1px solid rgba(217, 180, 90, .35); padding: 10px 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 16px 0; }
.stats div { background: var(--panel); border: 1px solid rgba(217, 180, 90, .25); padding: 12px; font-size: 16px; }
.stats b { display: block; font: 600 24px Cinzel, Georgia, serif; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font: 14px system-ui, sans-serif; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid rgba(217, 180, 90, .2); white-space: nowrap; }
th { color: var(--gold); }
