/* Public "golden ticket" theme: projector screen, reveal and participant pages. Always dark. */
:root {
  --night: #080b14; --night-2: #0f1424; --panel: rgba(255, 255, 255, .045); --panel-line: rgba(232, 199, 106, .22);
  --ink: #f6f1e4; --muted: #9ea6b8; --gold: #e3bd5b; --gold-hi: #fbe7a6; --gold-lo: #a7801f;
  --green: #2fd36b; --amber: #ffb020; --red: #ff4d4d;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --nums: lining-nums tabular-nums;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 700px at 15% -10%, #1d2440 0%, transparent 60%),
              radial-gradient(900px 600px at 110% 110%, #2a2110 0%, transparent 55%), var(--night);
  color: var(--ink); font: 16px/1.45 var(--sans); min-height: 100vh;
}
[hidden] { display: none !important; }
.gold-text {
  background: linear-gradient(120deg, var(--gold-hi) 0%, var(--gold) 40%, var(--gold-lo) 70%, var(--gold-hi) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: .75em; color: var(--gold); font-weight: 600; }
.muted { color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--panel-line); border-radius: 22px; backdrop-filter: blur(4px); }
.placeholder-logo {
  border: 1.5px dashed var(--panel-line); color: var(--muted); border-radius: 10px; padding: .5em 1em;
  letter-spacing: .18em; font-size: .8em; text-transform: uppercase;
}
.sponsor-name { font-family: var(--serif); font-size: 1.4em; color: var(--ink); }
.prize-placeholder {
  background: linear-gradient(140deg, #2b2410 0%, #13182a 55%, #0c101d 100%);
  display: grid; place-items: center; color: rgba(251, 231, 166, .35); font-size: 1.1em; letter-spacing: .2em; text-transform: uppercase;
}

/* ===== projector screen ===== */
.screen { height: 100vh; overflow: hidden; padding: 3.2vh 3.2vw; display: grid; grid-template-rows: auto 1fr; gap: 3vh; font-size: clamp(12px, 1.25vw, 28px); }
.screen-top { display: flex; align-items: center; justify-content: space-between; }
.screen-top .sponsor { display: flex; align-items: center; gap: 1em; }
.screen-top .sponsor img { height: 7vh; max-width: 22vw; object-fit: contain; }
.screen-top .sponsor small { color: var(--muted); letter-spacing: .2em; text-transform: uppercase; font-size: .7em; }
.screen-top .event { font-family: var(--serif); font-size: 1.6em; letter-spacing: .04em; }
.screen-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.4vw; min-height: 0; }

.prize { position: relative; overflow: hidden; border-radius: 26px; border: 1px solid var(--panel-line); min-height: 0; }
.prize img, .prize .prize-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prize .caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 8vh 2.2vw 3.2vh;
  background: linear-gradient(transparent, rgba(5, 7, 13, .92) 55%);
}
.prize .caption h1 { font-family: var(--serif); font-size: 3.1em; line-height: 1.05; margin: .2em 0 0; }
.prize .caption p { margin: .4em 0 0; color: var(--muted); font-size: 1.05em; }

.side { display: grid; grid-template-rows: 1fr auto auto; gap: 2vh; min-height: 0; }
.side-top { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4vw; min-height: 0; }
.qr-card { padding: 1.2vw; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5em; text-align: center; }
.qr-card .qr { background: #fff; border-radius: 16px; padding: .5vw; width: 100%; max-width: 21vh; aspect-ratio: 1; box-shadow: 0 0 0 4px rgba(227, 189, 91, .35), 0 20px 60px rgba(0, 0, 0, .5); }
.qr-card .qr img { width: 100%; height: 100%; display: block; }
.qr-card b { font-size: 1.15em; }
.qr-card .url { font-size: .72em; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.status-card { padding: 1.2vw; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7em; text-align: center; }
.side-top > .panel { min-height: 0; overflow: hidden; }
.semaphore { display: flex; flex-direction: column; gap: 1.1vh; padding: 1.2vh 1vh; background: #05070c; border-radius: 999px; border: 1px solid #222838; box-shadow: inset 0 2px 10px rgba(0,0,0,.8); }
.lamp { width: 4.6vh; height: 4.6vh; border-radius: 50%; background: #1a1e29; box-shadow: inset 0 -4px 10px rgba(0,0,0,.6); transition: background .3s, box-shadow .3s; }
.semaphore[data-state=red] .lamp.red { background: var(--red); box-shadow: 0 0 24px var(--red), 0 0 60px rgba(255, 77, 77, .45); }
.semaphore[data-state=amber] .lamp.amber { background: var(--amber); box-shadow: 0 0 24px var(--amber), 0 0 60px rgba(255, 176, 32, .45); animation: blink 1s steps(2, start) infinite; }
.semaphore[data-state=green] .lamp.green { background: var(--green); box-shadow: 0 0 24px var(--green), 0 0 60px rgba(47, 211, 107, .45); }
@keyframes blink { to { opacity: .35; } }
.timer small { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .18em; font-size: .7em; }
.timer span { font-variant-numeric: tabular-nums; font-size: 2.6em; font-weight: 800; line-height: 1.05; }
.timer.urgent span { color: var(--amber); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.prizes-panel { padding: 2vh 1.6vw; }
.prizes-panel ol { list-style: none; margin: 1vh 0 0; padding: 0; display: grid; gap: .9vh; }
.prizes-panel li { display: grid; grid-template-columns: 2.4em 1fr auto; align-items: baseline; gap: .7em; font-size: 1.1em; }
.prizes-panel .qty { font-family: var(--serif); font-variant-numeric: var(--nums); font-size: 1.7em; line-height: 1; text-align: right; }
.prizes-panel .pname { font-weight: 600; }
.prizes-panel .pplace { color: var(--muted); font-size: .85em; font-variant-numeric: tabular-nums; }
.prizes-panel.many li { font-size: .95em; }
.prizes-panel.many .qty { font-size: 1.4em; }
.counter { padding: 1.6vh 2vw; display: flex; align-items: center; gap: 1.2em; }
.counter .ticket-icon { height: 3.6em; width: auto; transform: rotate(-6deg); filter: drop-shadow(0 0 14px rgba(227, 189, 91, .45)); }
.counter .num { font-family: var(--serif); font-size: 4.2em; line-height: 1; font-variant-numeric: var(--nums); }
.counter .num.bump { animation: bump .45s ease-out; }
@keyframes bump { 30% { transform: scale(1.12); } }
.counter .label { font-size: 1.15em; }
.counter .label small { display: block; color: var(--muted); font-size: .75em; letter-spacing: .12em; text-transform: uppercase; }

@media (max-aspect-ratio: 4/3) {
  .screen { height: auto; overflow: visible; font-size: clamp(12px, 2.4vw, 22px); }
  .screen-grid, .side-top { grid-template-columns: 1fr; }
  .prize { aspect-ratio: 16/10; }
}

/* ===== participant ===== */
.participant { font-size: 16px; }
.p-wrap { max-width: 480px; margin: 0 auto; padding: 14px 16px 48px; }
.p-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; min-height: 40px; }
.p-head img { max-height: 36px; max-width: 60%; object-fit: contain; }
.lang { font: inherit; font-size: .85rem; font-weight: 700; padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--panel-line); background: transparent; color: var(--ink); cursor: pointer; }
.p-prize { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--panel-line); margin-bottom: 22px; aspect-ratio: 16/9; }
.p-prize img, .p-prize .prize-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p-prize .caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(5, 7, 13, .9) 60%); }
.p-prize h1 { font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; margin: 4px 0 0; }
.participant h2 { font-family: var(--serif); font-size: 1.6rem; line-height: 1.15; margin: 0 0 .5rem; }
.participant form label { display: block; margin-bottom: 14px; }
.participant form label > span { display: block; font-weight: 600; margin-bottom: 4px; font-size: .95rem; }
.participant input:not([type=checkbox]) {
  width: 100%; font-size: 16px; padding: 13px 12px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: var(--ink);
}
.participant input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.participant input[aria-invalid] { border-color: var(--red); outline-color: var(--red); }
.participant form label.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
label.check span { font-weight: 400 !important; margin: 0 !important; }
label.check input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--gold); }
label.check:has(input[aria-invalid]) { color: var(--red); }
.privacy { margin: -6px 0 14px 32px; font-size: .82rem; color: var(--muted); }
.privacy summary { cursor: pointer; }
.privacy a { color: var(--gold); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.err { color: var(--red); font-weight: 600; }
.btn-gold {
  width: 100%; min-height: 56px; font: inherit; font-size: 1.1rem; font-weight: 800; letter-spacing: .04em; cursor: pointer;
  border: 0; border-radius: 14px; color: #1d1503;
  background: linear-gradient(120deg, var(--gold-hi), var(--gold) 45%, var(--gold-lo));
  box-shadow: 0 10px 30px rgba(227, 189, 91, .25);
}
.btn-gold:disabled { opacity: .6; }
.p-count { font-family: var(--serif); font-variant-numeric: var(--nums); font-size: 7rem; text-align: center; line-height: 1; margin: 18px 0; }
.p-closes { font-size: .9rem; color: var(--muted); margin: -4px 0 16px; font-variant-numeric: tabular-nums; }
.dots { display: flex; justify-content: center; gap: 8px; margin: 26px 0; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); animation: dot 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%, 100% { opacity: .2; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }
.center { text-align: center; }

/* golden ticket */
.ticket {
  position: relative; margin: 6px 0 24px; border-radius: 16px; color: #2a1d02; overflow: hidden;
  background: linear-gradient(125deg, #fff3c4 0%, #e9c463 35%, #c99a2e 60%, #f6dc8a 100%);
  box-shadow: 0 18px 50px rgba(227, 189, 91, .3); animation: ticketIn .7s cubic-bezier(.2, 1.4, .4, 1);
}
.ticket::before, .ticket::after { /* punched notches */
  content: ""; position: absolute; top: 62%; width: 26px; height: 26px; border-radius: 50%; background: var(--night); transform: translateY(-50%);
}
.ticket::before { left: -13px; } .ticket::after { right: -13px; }
.ticket-top { padding: 18px 20px 14px; border-bottom: 2px dashed rgba(42, 29, 2, .35); }
.ticket-top .eyebrow { color: #5b4105; }
.ticket-top h3 { font-family: var(--serif); font-size: 1.5rem; margin: 2px 0 0; }
.ticket-body { padding: 14px 20px 18px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.ticket-body small { display: block; text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; opacity: .7; }
.ticket-body .holder { font-weight: 700; font-size: 1.1rem; }
.ticket-body .code { font: 800 2rem/1 ui-monospace, Menlo, monospace; letter-spacing: .18em; }
.ticket .shine { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%); transform: translateX(-100%); animation: shine 2.8s 0.6s ease-in-out infinite; pointer-events: none; }
@keyframes ticketIn { from { transform: scale(.85) rotate(-3deg); opacity: 0; } }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
.note { background: var(--panel); border: 1px solid var(--panel-line); border-radius: 12px; padding: 12px 14px; white-space: pre-line; }

/* ===== index ===== */
.index-wrap { max-width: 520px; margin: 0 auto; padding: 48px 16px; text-align: center; }
.index-wrap a.raffle-link { display: block; padding: 16px; margin: 12px 0; text-decoration: none; color: var(--ink); font-size: 1.2rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== reveal ===== */
.reveal { overflow: hidden; }
#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 0; }
.rv { position: relative; z-index: 1; height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 3vh 4vw; font-size: clamp(12px, 1.3vw, 30px); }
.rv-top { display: flex; justify-content: space-between; align-items: center; }
.rv-top img { height: 6vh; max-width: 22vw; object-fit: contain; }
.rv-title { font-family: var(--serif); font-size: 1.6em; }
.rv-stage { display: grid; place-items: center; min-height: 0; text-align: center; }
.rv-step { width: 100%; animation: stepIn .6s cubic-bezier(.2, .9, .3, 1); }
@keyframes stepIn { from { opacity: 0; transform: translateY(24px); } }
.rv-foot { display: flex; align-items: center; gap: 1em; justify-content: center; opacity: .35; transition: opacity .3s; }
.rv-foot:hover { opacity: 1; }
.rv-foot button { font: inherit; background: transparent; color: var(--ink); border: 1px solid var(--panel-line); border-radius: 999px; width: 2.4em; height: 2.4em; cursor: pointer; }
.rv-dots { display: flex; gap: .5em; }
.rv-dots i { width: .55em; height: .55em; border-radius: 50%; background: rgba(255,255,255,.2); }
.rv-dots i.past { background: var(--gold-lo); }
.rv-dots i.on { background: var(--gold-hi); box-shadow: 0 0 10px var(--gold); }
.rv-hint { position: absolute; right: 4vw; font-size: .7em; color: var(--muted); }

.rv-big { font-family: var(--serif); font-variant-numeric: var(--nums); font-size: 7em; line-height: 1; margin: .1em 0; }
.chip { display: inline-block; padding: .35em .8em; margin: .25em; border-radius: 999px; background: var(--panel); border: 1px solid var(--panel-line); font-size: .95em; }
.chip small, .slot small, .rv-list small { color: var(--muted); font-size: .8em; margin-left: .2em; }
.rv-chips { max-width: 80vw; margin: 2.5vh auto 0; max-height: 46vh; overflow: hidden; }

.rv-place { display: grid; grid-template-columns: 1.1fr 1fr; gap: 4vw; align-items: center; text-align: left; }
.rv-card { padding: 5vh 3vw; border-radius: 28px; background: linear-gradient(150deg, rgba(227,189,91,.16), rgba(255,255,255,.03)); border: 1px solid var(--panel-line); animation: cardIn .8s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes cardIn { from { transform: scale(.7) rotateX(50deg); opacity: 0; } }
.rv-name { font-family: var(--serif); font-size: 4.4em; line-height: 1.05; margin: .15em 0 .1em; }
.rv-name.huge { font-size: 7.5em; }
.rv-phone { font-size: 1.6em; color: var(--muted); margin: 0; letter-spacing: .08em; }
.rv-time { font-size: 2em; font-weight: 800; font-variant-numeric: tabular-nums; margin: .4em 0 0; color: var(--gold-hi); }
.rv-podium { list-style: none; margin: 0; padding: 0; display: grid; gap: 1vh; }
.slot { display: grid; grid-template-columns: 3em 1fr auto; gap: 1em; align-items: baseline; padding: 1.4vh 1.4vw; border-radius: 14px; background: var(--panel); border: 1px solid transparent; font-size: 1.25em; }
.slot b { color: var(--gold); }
.slot .hidden-name { color: rgba(255,255,255,.25); letter-spacing: .4em; }
.slot em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--muted); }
.slot.current { border-color: var(--gold); background: rgba(227,189,91,.14); animation: slotIn .7s ease-out; }
@keyframes slotIn { from { background: rgba(227,189,91,.5); } }

.rv-winner .rv-prize { font-size: 1.5em; color: var(--muted); margin: .4em 0 0; }
.rv-winner .rv-name { animation: winnerIn 1.2s cubic-bezier(.2, 1.4, .4, 1); filter: drop-shadow(0 0 40px rgba(227,189,91,.35)); }
@keyframes winnerIn { from { transform: scale(.3); opacity: 0; letter-spacing: .4em; } }
body.is-winner { background: radial-gradient(900px 600px at 50% 45%, #3a2c0a 0%, transparent 65%), var(--night); }

.rv-headline { font-family: var(--serif); font-size: 4.5em; margin: .2em 0; }
.rv-sub { font-family: var(--serif); font-weight: 600; font-size: 2.1em; line-height: 1.25; margin: .2em 0 1.1em; }
.rv-sub .en, .rv-punch .en { display: block; font-family: var(--sans); font-weight: 400; font-size: .5em; letter-spacing: .04em; color: var(--muted); margin-top: .5em; }
.rv-times { max-width: 75vw; margin: 0 auto; }
.rv-times .chip { font-variant-numeric: tabular-nums; }
.rv-punch { font-family: var(--serif); font-weight: 700; font-size: 2.8em; line-height: 1.2; margin-top: 1.1em; animation: stepIn .6s 1.2s both; }

.rv-ranking { max-width: 85vw; margin: 0 auto; }
.rv-list { list-style: none; margin: 2vh 0 0; padding: 0; text-align: left; }
.rv-list.cols { columns: 2; column-gap: 3vw; }
.rv-list li { break-inside: avoid; display: grid; grid-template-columns: 2.5em 1fr auto; gap: 1em; padding: .7vh 1vw; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 1.15em; }
.rv-list li b { color: var(--muted); }
.rv-list li em { font-style: normal; font-variant-numeric: tabular-nums; }
.rv-list li.win { color: var(--gold-hi); font-weight: 700; }
.rv-list li.win b { color: var(--gold); }
.rv-empty { font-family: var(--serif); font-size: 1.6em; max-width: 60vw; margin: 2vh auto 0; line-height: 1.3; }
.rv-empty .en { display: block; font-family: var(--sans); font-size: .5em; color: var(--muted); margin-top: .6em; }
.participant p[data-i18n], .participant h2[data-i18n] { white-space: pre-line; }
.roller { display: inline-flex; }
.roller i {
  font-style: normal; display: inline-block; width: .64em; text-align: center;
  background: linear-gradient(120deg, var(--gold-hi) 0%, var(--gold) 45%, var(--gold-lo) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.roller i.flip { animation: roll .45s cubic-bezier(.2, .8, .3, 1); }
@keyframes roll { from { transform: translateY(-45%); opacity: 0; filter: blur(3px); } }
.raffle-link .link-ticket { height: 1.3em; vertical-align: -.3em; margin-right: .4em; }
.p-prizes { margin: -8px 0 22px; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--panel-line); }
.p-prizes ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.p-prizes li { display: grid; grid-template-columns: 2em 1fr auto; align-items: baseline; gap: 8px; }
.p-prizes .qty { font-family: var(--serif); font-variant-numeric: var(--nums); font-size: 1.35rem; text-align: right; line-height: 1; }
.p-prizes .pname { font-weight: 600; font-size: .95rem; }
.p-prizes .pplace { color: var(--muted); font-size: .8rem; }
.slot .prz { display: block; font-style: normal; font-size: .62em; letter-spacing: .06em; color: var(--gold); opacity: .85; margin-top: .15em; }
.rv-podium.compact { gap: .6vh; }
.rv-podium.compact .slot { font-size: .95em; padding: .8vh 1.1vw; }
.rv-podium.cols { display: block; columns: 2; column-gap: 1.2vw; }
.rv-podium.cols .slot { break-inside: avoid; margin-bottom: .6vh; }
.rv-won { font-size: 1.5em; margin: .6em 0 0; color: var(--gold-hi); font-weight: 600; }
.rv-list .lprz { color: var(--gold); opacity: .85; }
.rv-podium.cols .slot { font-size: .85em; }
.rv-podium.cols .slot .prz { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer[hidden] { display: none !important; }
.rv-draw { text-align: center; }
.rv-roll { font-family: var(--serif); font-size: 6em; line-height: 1.1; min-height: 1.2em; margin: .3em 0; white-space: nowrap; }
.rv-draw-btn {
  font: inherit; font-size: 1.4em; font-weight: 800; letter-spacing: .06em; cursor: pointer; border: 0; border-radius: 999px;
  padding: .7em 2.2em; color: #1d1503; background: linear-gradient(120deg, var(--gold-hi), var(--gold) 45%, var(--gold-lo));
  box-shadow: 0 12px 40px rgba(227, 189, 91, .3);
}
.rv-draw-btn:disabled { opacity: .45; cursor: default; }
.rv-draw-msg { color: var(--muted); margin-top: 1.4em; font-size: 1.1em; }
