/*
 * Paddock: design system of the public pages (giveaways first, then instant draws, quizzes, photo contests).
 * Same visual language as the public leaderboard (leaderboard_public.css): dark panels, condensed uppercase titles,
 * orange accent, dashed separators, staggered entrance. Used with app/Views/layouts/public.php.
 *
 * Never mix with style.css / giveaway.css (back-office and legacy public sheets): their global rules clash.
 * A campaign can override --pub-accent without touching the components.
 */
@font-face { font-family: 'acumin-pro'; src: url('../fonts/AcuminProCondensed.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'acumin-pro-bold'; src: url('../fonts/AcuminProCondensedBold.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'rawline'; src: url('../fonts/rawline-400.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'rawline'; src: url('../fonts/rawline-500.woff') format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'rawline'; src: url('../fonts/rawline-600.woff') format('woff'); font-weight: 600; font-display: swap; }
:root {
    --pub-accent: #f93822;
    --pub-ok: #3dff6e;
    --pub-gold: #f5b82e;
    --pub-text: #ffffff;
    --pub-soft: rgba(255, 255, 255, .8);
    --pub-muted: rgba(255, 255, 255, .5);
    --pub-faint: rgba(255, 255, 255, .3);
    --pub-panel: rgba(10, 10, 10, .8);
    --pub-line: rgba(255, 255, 255, .1);
    --pub-field: rgba(255, 255, 255, .055);
    --pub-field-focus: rgba(255, 255, 255, .09);

    --pub-display: acumin-pro-bold, acumin-pro, "Arial Narrow", sans-serif;
    --pub-condensed: acumin-pro, "Arial Narrow", sans-serif;
    --pub-body: rawline, system-ui, sans-serif;
    --pub-ease: cubic-bezier(.2, .8, .2, 1);

    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body.pub-body {
    margin: 0;
    min-height: 100vh;
    color: var(--pub-text);
    font: 500 15px/1.5 var(--pub-body);
    background: #000 linear-gradient(349deg, #000 0%, #2e2e2e 100%) center / cover no-repeat fixed;
    -webkit-font-smoothing: antialiased;
}

/* Campaign background video, behind everything */
.pub-video { position: fixed; inset: 0; width: 100vw; height: 100vh; object-fit: cover; z-index: -2; }
/* Keeps text readable on any background picture or video */
.pub-body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .15) 45%, rgba(0, 0, 0, .6) 100%);
}

.pub-screen {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 40px max(16px, 3.5vw) 28px;
}

.pub-body :focus-visible { outline: 2px solid var(--pub-text); outline-offset: 2px; }

/* ---------- Header: logo above the title, the title takes the whole width ---------- */
.pub-header { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.pub-logo { height: auto; max-width: min(100%, 60vw); max-height: 120px; object-fit: contain; object-position: left center; }

.pub-title {
    margin: 0;
    font-family: var(--pub-display);
    font-weight: normal;
    font-size: 72px;
    line-height: .9;
    text-transform: uppercase;
    color: var(--pub-accent);
    text-shadow: 0 0 24px rgba(249, 56, 34, .35);
    text-wrap: balance;
    overflow-wrap: anywhere;
}
/* Long names ("Tentez votre chance pour le GP d'Australie") get smaller instead of filling the screen */
.pub-title.is-long { font-size: 60px; }
.pub-title.is-very-long { font-size: 48px; }

/* ---------- Body ---------- */
.pub-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pub-countries { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; border: 1px solid var(--pub-line); background: rgba(0, 0, 0, .55); }
.pub-countries-label { font: 600 10.5px/1 var(--pub-body); letter-spacing: .15em; text-transform: uppercase; color: var(--pub-muted); }
.pub-flags { display: flex; flex-wrap: wrap; gap: 7px; }
.pub-flag { height: 20px; width: auto; display: block; }

.pub-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 36px; align-items: start; }
.pub-main.is-single { grid-template-columns: minmax(0, 520px); }

/* Prize showcase: one prize at a time, like the leaderboard pages */
.pub-showcase {
    position: relative;
    aspect-ratio: 16 / 10;
    max-width: 100%;
    background: var(--pub-panel);
    border: 1px solid var(--pub-line);
    overflow: hidden;
}
/* Faint checkered flag fading in from the right */
.pub-showcase::before {
    content: ""; position: absolute; inset: 0; opacity: .08; pointer-events: none;
    background: conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0) right top / 28px 28px;
    -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000);
    mask-image: linear-gradient(90deg, transparent 35%, #000);
}
.pub-slide {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden;
    transition: opacity .5s ease, visibility 0s linear .5s;
}
.pub-slide.is-on { opacity: 1; visibility: visible; transition: opacity .5s ease; }
.pub-slide-img {
    position: absolute; right: 4%; top: 6%; width: 62%; height: 74%;
    object-fit: contain;
    filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .55));
}
.pub-slide.is-on .pub-slide-img { animation: pub-rise .8s var(--pub-ease) both; }
.pub-slide-meta {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 60px 26px 24px;
    background: linear-gradient(0deg, rgba(0, 0, 0, .85), transparent);
    display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
}
.pub-slide-name {
    font: 48px/.9 var(--pub-display);
    text-transform: uppercase;
    overflow-wrap: anywhere;
    max-width: 100%;
    text-wrap: balance;
}
/* Quantity under the name; uneven padding on purpose: Acumin sits low, this centres the digits in the box */
.pub-qty { flex: none; font: 24px/1 var(--pub-display); color: #000; background: var(--pub-gold); padding: .035em .45em .245em; }
/* Top of the showcase: number of prizes + one dot per prize */
.pub-showcase-bar { position: absolute; top: 16px; left: 22px; right: 22px; z-index: 1; display: flex; align-items: center; gap: 18px; }
.pub-count { font: 600 10.5px/1 var(--pub-body); letter-spacing: .15em; text-transform: uppercase; color: var(--pub-muted); display: flex; align-items: baseline; gap: 8px; }
.pub-count b { font: 24px/1 var(--pub-display); letter-spacing: 0; color: var(--pub-text); font-weight: normal; font-variant-numeric: tabular-nums; }
.pub-dots { display: flex; gap: 6px; }
.pub-dots button { width: 22px; height: 14px; padding: 0; border: 0; cursor: pointer; background: none; display: flex; align-items: center; }
.pub-dots button::before { content: ""; width: 100%; height: 3px; background: rgba(255, 255, 255, .25); transition: background .3s; }
.pub-dots button[aria-current="true"]::before { background: var(--pub-text); }

/* ---------- Panel + form ---------- */
.pub-panel { background: var(--pub-panel); border: 1px solid var(--pub-line); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pub-panel-head { padding: 22px 26px 18px; border-bottom: 1px dashed var(--pub-line); display: flex; flex-direction: column; gap: 6px; }
.pub-panel-head:last-child, .pub-panel-head:has(+ [hidden]:last-child) { border-bottom: 0; }
.pub-panel-title { margin: 0; font: 30px/.95 var(--pub-display); font-weight: normal; text-transform: uppercase; text-wrap: balance; }
.pub-panel-sub { margin: 0; font-size: 13.5px; color: var(--pub-muted); }

.pub-form { padding: 20px 26px 24px; display: flex; flex-direction: column; gap: 15px; }
.pub-field { display: flex; flex-direction: column; gap: 7px; }
.pub-label { font: 600 10.5px/1.3 var(--pub-body); letter-spacing: .15em; text-transform: uppercase; color: var(--pub-muted); }

.pub-input {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 46px; padding: 0 13px;
    border: 0; border-bottom: 2px solid rgba(255, 255, 255, .2); border-radius: 0;
    background: var(--pub-field);
    color: var(--pub-text);
    font: 500 15px var(--pub-body);
    transition: border-color .2s, background .2s;
}
.pub-input::placeholder { color: var(--pub-faint); }
.pub-input:focus { outline: none; border-bottom-color: var(--pub-accent); background: var(--pub-field-focus); }
.pub-input.is-valid { border-bottom-color: var(--pub-ok); }
.pub-input.is-invalid { border-bottom-color: var(--pub-accent); }
select.pub-input {
    padding-right: 36px; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--pub-muted) 50%), linear-gradient(-45deg, transparent 50%, var(--pub-muted) 50%);
    background-position: calc(100% - 19px) 20px, calc(100% - 13px) 20px;
    background-size: 6px 6px;
    background-repeat: no-repeat;
}
select.pub-input:invalid { color: var(--pub-faint); }
select.pub-input option { background: #111; color: var(--pub-text); }

.pub-checks { display: flex; flex-direction: column; }
.pub-check { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; padding: 7px 0; cursor: pointer; font-size: 13.5px; line-height: 1.45; color: var(--pub-soft); }
.pub-check input {
    -webkit-appearance: none; appearance: none; margin: 0;
    width: 20px; height: 20px; border: 2px solid rgba(255, 255, 255, .35); border-radius: 0;
    display: grid; place-items: center; cursor: pointer; background: transparent;
    transition: background .15s, border-color .15s;
}
.pub-check input::after { content: ""; width: 10px; height: 6px; border: solid #000; border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); opacity: 0; }
.pub-check input:checked { background: var(--pub-ok); border-color: var(--pub-ok); }
.pub-check input:checked::after { opacity: 1; }
.pub-check a { color: var(--pub-text); text-decoration: underline; text-decoration-color: var(--pub-accent); text-underline-offset: 3px; }

.pub-btn {
    margin-top: 6px; height: 56px; width: 100%; border: 0; cursor: pointer;
    background: var(--pub-accent); color: #000;
    font: 24px/1 var(--pub-display); text-transform: uppercase; letter-spacing: .03em;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 22px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
    position: relative; isolation: isolate;
    transition: filter .2s;
}
/* Hover / keyboard focus: a slanted white band sweeps the button from left to right */
.pub-btn::before {
    content: ""; position: absolute; z-index: -1;
    top: 0; bottom: 0; left: -24px; right: -24px;
    background: var(--pub-text);
    transform: translateX(-102%) skewX(-20deg);
    transition: transform .45s var(--pub-ease);
}
.pub-btn:hover:not([disabled])::before, .pub-btn:focus-visible::before { transform: translateX(0) skewX(-20deg); }
/* Acumin sits low in its line box: lift the label and the arrow so they are centred in the button */
.pub-btn > span { position: relative; top: -.08em; }
.pub-btn-arrow { transition: transform .25s var(--pub-ease); }
.pub-btn:hover:not([disabled]) .pub-btn-arrow, .pub-btn:focus-visible .pub-btn-arrow { transform: translateX(5px); }
.pub-btn[disabled] { cursor: progress; filter: saturate(.55) brightness(.85); }
.pub-btn[disabled] .pub-btn-arrow { animation: pub-blink .6s ease-in-out infinite alternate; transform: none; }

/* Under the button: completion of the form, then the time the registration takes */
.pub-meter { display: flex; align-items: center; gap: 12px; font: 500 10.5px/1 var(--pub-body); letter-spacing: .15em; text-transform: uppercase; color: var(--pub-muted); font-variant-numeric: tabular-nums; }
.pub-meter-track { flex: 1; height: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pub-meter-bar { height: 100%; width: 100%; background: var(--pub-accent); transform-origin: left center; transform: scaleX(0); transition: transform .4s var(--pub-ease), background .3s; }
.pub-meter.is-full .pub-meter-bar { background: var(--pub-ok); }
.pub-meter.is-waiting .pub-meter-bar { background: var(--pub-text); transition: transform 1s linear; }
.pub-meter.is-late .pub-meter-bar { animation: pub-blink .8s ease-in-out infinite alternate; }

.pub-note { margin: -4px 0 0; display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: var(--pub-muted); }
.pub-note svg { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.pub-note.is-waiting { color: var(--pub-text); }

.pub-alert { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 12px; background: rgba(249, 56, 34, .14); font-size: 13.5px; line-height: 1.4; }
.pub-alert-icon { display: grid; place-items: center; width: 26px; height: 26px; background: var(--pub-accent); color: #000; font: 20px/1 var(--pub-display); padding-top: 3px; }

/* Success */
.pub-done { padding: 28px 26px 26px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.pub-done-check { width: 44px; height: 44px; background: var(--pub-ok); display: grid; place-items: center; }
.pub-done-check::after { content: ""; width: 20px; height: 11px; border: solid #000; border-width: 0 0 4px 4px; transform: translateY(-3px) rotate(-45deg); }
.pub-done-title { margin: 0; font: 54px/.88 var(--pub-display); font-weight: normal; text-transform: uppercase; text-wrap: balance; overflow-wrap: anywhere; }
.pub-done-text { margin: 0; color: var(--pub-soft); font-size: 14.5px; max-width: 42ch; }

/* ---------- Scratch ticket (instantdraw/ticket) ---------- */
.pub-ticket {
    position: relative; overflow: hidden;
    display: grid; place-items: center;
    padding: 36px 24px;
    background: var(--pub-panel); border: 1px solid var(--pub-line);
}
.pub-rays {
    position: absolute; top: 50%; left: 50%; width: 160%; max-width: none; height: auto;
    translate: -50% -50%;
    opacity: .12; pointer-events: none;
    animation: pub-spin 40s linear infinite;
    transition: opacity 1s ease;
}
.pub-ticket.is-won .pub-rays { opacity: .55; }
.pub-ticket.is-won .pub-scratch { animation: pub-win .9s var(--pub-ease); }
.pub-scratch { position: relative; display: inline-block; font-size: 0; max-width: 100%; z-index: 1; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .6)); }
.pub-scratch img { display: block; width: 100%; max-width: 640px; height: auto; -webkit-user-select: none; user-select: none; }
.pub-scratch canvas {
    position: absolute; inset: 0; width: 100%; height: 100%;
    cursor: pointer; touch-action: none; will-change: transform; transform: translateZ(0);
    transition: opacity .5s ease-out, height 0s linear .5s;
}
.pub-scratch.is-revealed canvas { opacity: 0; height: 0; }

.pub-won { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pub-won-label { font: 600 10.5px/1 var(--pub-body); letter-spacing: .15em; text-transform: uppercase; color: var(--pub-muted); }
.pub-won-name { font: 36px/.95 var(--pub-display); text-transform: uppercase; color: var(--pub-gold); overflow-wrap: anywhere; }
.pub-muted { color: var(--pub-muted); }

/* ---------- Photo contests ---------- */
.pub-hint { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--pub-muted); }

/* Photo field */
.pub-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    min-height: 132px; padding: 18px; text-align: center; cursor: pointer;
    border: 1px dashed rgba(255, 255, 255, .28); background: var(--pub-field);
    font-size: 13.5px; color: var(--pub-soft);
    transition: border-color .2s, background .2s;
}
.pub-drop:hover, .pub-drop:focus-visible, .pub-drop.is-over { border-color: var(--pub-accent); background: var(--pub-field-focus); }
.pub-drop.is-filled { border-style: solid; border-color: var(--pub-ok); }
.pub-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pub-drop-icon { width: 30px; height: 30px; color: var(--pub-muted); }
.pub-drop.is-filled .pub-drop-icon { display: none; }
.pub-drop-preview { display: block; max-width: 100%; max-height: 180px; object-fit: contain; }
.pub-drop-text { overflow-wrap: anywhere; }

/* About the contest: description + its three phases */
.pub-about { display: flex; flex-direction: column; }
.pub-about-text { margin: 0; padding: 20px 26px; font-size: 14.5px; line-height: 1.6; color: var(--pub-soft); white-space: pre-line; border-bottom: 1px dashed var(--pub-line); }
.pub-phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pub-phase { padding: 16px 18px 15px 26px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pub-phase + .pub-phase { border-left: 1px dashed var(--pub-line); padding-left: 18px; }
.pub-phase-label { font: 600 10.5px/1.3 var(--pub-body); letter-spacing: .15em; text-transform: uppercase; color: var(--pub-muted); }
.pub-phase-date { font: 24px/1 var(--pub-display); text-transform: uppercase; font-variant-numeric: tabular-nums; }
.pub-phase.is-past .pub-phase-date { color: var(--pub-muted); }
.pub-phase.is-now .pub-phase-date { color: var(--pub-accent); }
/* Uneven padding on purpose: Acumin sits low, this centres the capitals in the box (as .pub-qty) */
.pub-phase-now { align-self: flex-start; font: 18px/1 var(--pub-display); text-transform: uppercase; color: #000; background: var(--pub-accent); padding: .09em .45em .19em; }
.pub-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 26px 22px; border-top: 1px dashed var(--pub-line); }
.pub-actions .pub-btn { width: auto; margin: 0; flex: 1 1 200px; }

/* Secondary button: outlined, same sweep */
.pub-btn.is-ghost { overflow: hidden; background: transparent; color: var(--pub-text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); clip-path: none; }
.pub-btn.is-ghost::before { background: var(--pub-text); }
.pub-btn.is-ghost:hover:not([disabled]), .pub-btn.is-ghost:focus-visible { color: #000; }
.pub-btn.is-small { overflow: hidden; height: 44px; font-size: 19px; padding: 0 16px; clip-path: none; }

/* Section heading of a page part (gallery, results) */
.pub-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.pub-section-title { margin: 0; font: 34px/.95 var(--pub-display); font-weight: normal; text-transform: uppercase; }
.pub-section-sub { margin: 0; font-size: 13.5px; color: var(--pub-muted); }

/* Gallery */
/* Photos are game screenshots: 16:9 everywhere */
.pub-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.pub-photo { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--pub-panel); border: 1px solid var(--pub-line); }
.pub-photo-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in; background: none; }
.pub-photo-open img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--pub-ease); }
.pub-photo:hover .pub-photo-open img { transform: scale(1.04); }
.pub-photo-bar {
    position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 6px; padding: 30px 8px 8px;
    background: linear-gradient(0deg, rgba(0, 0, 0, .8), transparent); pointer-events: none;
}
.pub-photo-bar > * { pointer-events: auto; }
.pub-photo-name { flex: 1; min-width: 0; font: 17px/1 var(--pub-display); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: 2px; }
.pub-icon-btn {
    flex: none; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .55); color: var(--pub-text);
    transition: background .15s, color .15s, border-color .15s;
}
.pub-icon-btn svg { width: 18px; height: 18px; }
.pub-icon-btn:hover { border-color: var(--pub-text); }
/* Vote button of a photo: "VOTE", then "✓ VOTED" once chosen (click again to remove the vote) */
.pub-vote-btn {
    flex: none; min-width: 6.5em; height: 38px; padding: 0 14px; border: 0; cursor: pointer; text-align: center;
    background: var(--pub-accent); color: #000;
    font: 20px/1 var(--pub-display); text-transform: uppercase; letter-spacing: .03em;
    padding-bottom: .12em; /* Acumin sits low: centres the capitals */
    transition: background .15s, color .15s;
}
.pub-vote-btn:hover { background: var(--pub-text); }
.pub-vote-btn.is-on { background: var(--pub-text); color: #000; }
.pub-vote-btn[disabled] { cursor: default; opacity: .6; }
.pub-photo.is-voted { border-color: var(--pub-accent); box-shadow: 0 0 0 2px var(--pub-accent); }
.pub-votes { flex: none; display: flex; align-items: center; gap: 5px; font: 19px/1 var(--pub-display); font-variant-numeric: tabular-nums; padding-top: 2px; }
.pub-votes svg { width: 15px; height: 15px; color: var(--pub-accent); margin-top: -2px; }
.pub-rank { position: absolute; top: 0; left: 0; z-index: 1; font: 20px/1 var(--pub-display); background: rgba(0, 0, 0, .7); padding: 7px 9px 4px; font-variant-numeric: tabular-nums; }
.pub-photo.is-p1 .pub-rank { background: var(--pub-gold); color: #000; }

/* Shared photo (?shared=) */
.pub-featured { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.pub-featured .pub-photo { aspect-ratio: 16 / 9; }
.pub-featured .pub-photo-open img { object-fit: contain; background: #000; }

/* Lightbox */
.pub-lightbox { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: rgba(0, 0, 0, .94); }
.pub-lightbox[hidden] { display: none; }
/* The whole photo is always visible: it fits the space left above the buttons (letterboxed when needed) */
.pub-lightbox-img { flex: 1; min-height: 0; position: relative; }
.pub-lightbox-img img { position: absolute; top: 64px; left: 16px; width: calc(100% - 32px); height: calc(100% - 76px); object-fit: contain; }
.pub-lightbox-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 12px 16px 22px; }
.pub-lightbox-bar .pub-btn { width: auto; margin: 0; }
/* Above the photo area (later in the page), so that it gets the hover and the pointer cursor */
.pub-lightbox-close { position: absolute; top: 14px; right: 14px; z-index: 2; }

/* My votes: bar fixed at the bottom of the vote page */
.pub-tray {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 12px max(16px, 3.5vw); background: rgba(8, 8, 8, .94); border-top: 1px solid var(--pub-line);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    transform: translateY(0); transition: transform .35s var(--pub-ease);
}
.pub-tray-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1 1 220px; }
.pub-tray-title { font: 22px/1 var(--pub-display); text-transform: uppercase; padding-top: 2px; }
.pub-tray-hint { font-size: 12.5px; color: var(--pub-muted); }
.pub-slots { display: flex; gap: 8px; }
.pub-slot { position: relative; width: 52px; height: 52px; border: 1px dashed rgba(255, 255, 255, .3); background: center / cover no-repeat; }
.pub-slot.is-filled { border: 1px solid var(--pub-accent); }
.pub-slot button { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; cursor: pointer; background: var(--pub-text); color: #000; font: 700 14px/1 var(--pub-body); }
.pub-tray .pub-btn { width: auto; margin: 0; flex: 0 1 260px; }
/* No vote chosen yet (or votes already sent): nothing to send */
.pub-tray .pub-btn[disabled] { background: #2c2c2c; color: rgba(255, 255, 255, .4); filter: none; cursor: not-allowed; }
.pub-tray.is-shake { animation: pub-shake .45s ease; }
body.has-tray { padding-bottom: 96px; }

/* Side panel holding the vote form */
.pub-drawer { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: flex-end; background: rgba(0, 0, 0, .6); }
.pub-drawer[hidden] { display: none; }
.pub-drawer-body { width: min(480px, 100%); height: 100%; overflow-y: auto; background: #0b0b0b; border-left: 1px solid var(--pub-line); display: flex; flex-direction: column; animation: pub-slide-in .35s var(--pub-ease); }
.pub-drawer-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px dashed var(--pub-line); }
.pub-drawer-top .pub-slots { flex: 1; }
.pub-drawer .pub-panel { border: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* Toast */
.pub-toast {
    position: fixed; top: 18px; left: 50%; z-index: 60; transform: translate(-50%, calc(-100% - 30px)); visibility: hidden;
    max-width: calc(100% - 32px); padding: 12px 18px; background: var(--pub-text); color: #000; font-weight: 600; font-size: 14px;
    transition: transform .35s var(--pub-ease), visibility 0s linear .35s;
}
.pub-toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .35s var(--pub-ease); }

/* Results */
.pub-winner { position: relative; overflow: hidden; background: #000; border: 1px solid var(--pub-line); }
.pub-winner .pub-photo-open { aspect-ratio: 16 / 9; cursor: zoom-in; }
.pub-winner .pub-photo-open img { object-fit: cover; }
.pub-winner-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 24px 22px; background: linear-gradient(0deg, rgba(0, 0, 0, .9), transparent); display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; pointer-events: none; }
.pub-winner-label { font: 18px/1 var(--pub-display); text-transform: uppercase; color: #000; background: var(--pub-gold); padding: .22em .5em .12em; align-self: flex-start; }
.pub-winner-name { display: block; margin-top: 10px; font: 56px/.9 var(--pub-display); text-transform: uppercase; overflow-wrap: anywhere; }
.pub-winner .pub-votes { font-size: 28px; }
.pub-winner .pub-votes svg { width: 22px; height: 22px; }
.pub-partner { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px 26px 22px; border-top: 1px dashed var(--pub-line); }
.pub-partner .pub-photo { aspect-ratio: 16 / 9; }
.pub-partner-logo { max-width: 150px; max-height: 50px; object-fit: contain; display: block; margin-bottom: 8px; }
.pub-partner-text { margin: 0; font-size: 13.5px; color: var(--pub-soft); }
.pub-partner-name { display: block; margin-top: 6px; font: 28px/.95 var(--pub-display); text-transform: uppercase; overflow-wrap: anywhere; }

a.pub-btn { text-decoration: none; }
.pub-done-extra { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.pub-done-extra:empty { display: none; }
.pub-done .pub-btn { width: auto; margin: 0; }
.pub-winner.pub-photo { aspect-ratio: auto; }

/* ---------- Quiz ---------- */
.pub-subtitle { margin: -6px 0 0; max-width: 70ch; font-size: 16px; line-height: 1.5; color: var(--pub-soft); }

.pub-chip { display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 9px 14px 8px; border: 1px solid var(--pub-line); background: rgba(0, 0, 0, .55); text-transform: uppercase; min-width: 0; }
.pub-chip-label { font: 600 10.5px/1.2 var(--pub-body); letter-spacing: .15em; color: var(--pub-muted); }
.pub-chip-value { font: 24px/1 var(--pub-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; padding-top: 2px; }

/* Progress: question counter + one segment per question */
.pub-progress { display: flex; align-items: center; gap: 16px; }
.pub-progress .pub-chip { flex: none; }
.pub-segs { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.pub-segs span { height: 4px; background: rgba(255, 255, 255, .12); }
.pub-segs span.is-done { background: var(--pub-accent); }
.pub-segs span.is-now { background: var(--pub-text); }

/* Question: picture on the left, question and answers on the right */
.pub-quiz { display: flex; flex-direction: column; gap: 22px; }
/* Picture and answers share the same height: the answers fill it, or the picture grows (cropped) when they are taller */
.pub-quiz-q { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 30px; align-items: stretch; }
.pub-quiz-q.no-hero { grid-template-columns: minmax(0, 760px); }
.pub-quiz-hero { position: relative; margin: 0; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; background: var(--pub-panel); border: 1px solid var(--pub-line); }
.pub-quiz-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pub-quiz-hero figcaption { position: absolute; right: 0; bottom: 0; padding: 5px 9px; font-size: 11px; color: var(--pub-muted); background: rgba(0, 0, 0, .6); }
.pub-quiz-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pub-question { margin: 0; font: 36px/.98 var(--pub-display); font-weight: normal; text-transform: uppercase; text-wrap: balance; overflow-wrap: anywhere; }
.pub-answers { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pub-answer {
    position: relative; overflow: hidden; isolation: isolate; cursor: pointer; text-align: left;
    display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 3px 14px; align-items: center;
    flex: 1 1 auto; align-content: center;
    padding: 12px 16px; border: 1px solid var(--pub-line); background: var(--pub-panel); color: var(--pub-text); font: inherit;
    transition: color .25s, opacity .35s, transform .35s var(--pub-ease), background .2s;
}
.pub-answer::before { content: ""; position: absolute; top: 0; bottom: 0; left: -24px; right: -24px; z-index: -1; background: var(--pub-text); transform: translateX(-102%) skewX(-18deg); transition: transform .45s var(--pub-ease); }
.pub-answer:hover::before, .pub-answer:focus-visible::before { transform: translateX(0) skewX(-18deg); }
.pub-answer:hover, .pub-answer:focus-visible { color: #000; }
.pub-key { grid-row: span 2; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid currentColor; font: 22px/1 var(--pub-display); padding-bottom: 3px; }
.pub-answer-label { font: 23px/1 var(--pub-display); text-transform: uppercase; padding-top: 3px; overflow-wrap: anywhere; }
.pub-answer-desc { font-size: 13px; line-height: 1.4; color: var(--pub-soft); transition: color .25s; }
.pub-answer:hover .pub-answer-desc, .pub-answer:focus-visible .pub-answer-desc { color: rgba(0, 0, 0, .7); }
.pub-answer-label:only-child, .pub-key + .pub-answer-label:last-child { grid-row: span 2; }
.pub-answer.is-picked { background: var(--pub-accent); border-color: var(--pub-accent); color: #000; }
.pub-answer.is-picked::before { transform: translateX(-102%) skewX(-18deg); }
.pub-answer.is-picked .pub-answer-desc { color: rgba(0, 0, 0, .75); }
.pub-answers.is-done .pub-answer:not(.is-picked) { opacity: .15; transform: scale(.97); pointer-events: none; }
.pub-answers.is-done .pub-answer.is-picked { pointer-events: none; }
.pub-quiz-tip { margin: 0; font: 600 10.5px/1.3 var(--pub-body); letter-spacing: .15em; text-transform: uppercase; color: var(--pub-muted); }

/* Results */
.pub-res { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 30px; align-items: start; }
.pub-res.is-single { grid-template-columns: minmax(0, 560px); }
.pub-res-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pub-me { border: 1px solid var(--pub-line); background: var(--pub-panel); overflow: hidden; }
.pub-me-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.pub-me-body { padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.pub-gold-tag { font: 17px/1 var(--pub-display); text-transform: uppercase; color: #000; background: var(--pub-gold); padding: .09em .5em .19em; }
.pub-me-name { margin: 0; font: 58px/.88 var(--pub-display); font-weight: normal; text-transform: uppercase; overflow-wrap: anywhere; text-wrap: balance; }
.pub-me-text { margin: 0; color: var(--pub-soft); max-width: 62ch; white-space: pre-line; }
.pub-stat { padding: 20px 26px 6px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.pub-stat-value { font: 72px/.85 var(--pub-display); color: var(--pub-gold); font-variant-numeric: tabular-nums; }
.pub-stat-text { color: var(--pub-soft); font-size: 14px; max-width: 24ch; }
.pub-stat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 26px 22px; }
.pub-stat-chips .pub-chip { flex: 1 1 150px; }

/* Every profile: leaderboard rows (share of the community once unlocked) */
.pub-prows { display: flex; flex-direction: column; gap: 5px; }
.pub-prow { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr) 5.5em; align-items: stretch; min-height: 58px; background: rgba(10, 10, 10, .8); overflow: hidden; }
.pub-prow:nth-child(even) { background: rgba(26, 26, 26, .8); }
.pub-prow > * { position: relative; z-index: 1; }
.pub-prow-img { display: block; width: 100%; height: 100%; min-height: 58px; object-fit: cover; background: rgba(255, 255, 255, .06); }
.pub-prow-main { padding: 9px 14px; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; border-left: 1px dashed var(--pub-line); }
.pub-prow-name { font: 22px/1 var(--pub-display); text-transform: uppercase; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 2px; }
.pub-prow-text { font-size: 12.5px; line-height: 1.4; color: var(--pub-muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
/* Unlocked: a click opens the row with a larger picture and the whole description */
.pub-prow[data-expand] { cursor: pointer; transition: grid-template-columns .35s var(--pub-ease), background .2s; }
.pub-prow[data-expand]:hover { background: rgba(40, 40, 40, .85); }
.pub-prow-chevron { width: 9px; height: 9px; margin-left: 2px; border: solid var(--pub-muted); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-2px, -2px); transition: transform .25s; }
.pub-prow.is-open { grid-template-columns: 360px minmax(0, 1fr) 5.5em; }
.pub-prow.is-open .pub-prow-img { aspect-ratio: 16 / 9; height: auto; min-height: 100%; }
.pub-prow.is-open .pub-prow-main { padding: 18px 22px; gap: 10px; }
.pub-prow.is-open .pub-prow-name { font-size: 32px; }
.pub-prow.is-open .pub-prow-text { -webkit-line-clamp: unset; display: block; font-size: 14.5px; line-height: 1.55; color: var(--pub-soft); white-space: pre-line; }
.pub-prow.is-open .pub-prow-chevron { transform: rotate(-135deg) translate(-2px, -2px); }
.pub-prow-pct { padding: 0 14px; display: flex; align-items: center; justify-content: flex-end; border-left: 1px dashed var(--pub-line); font: 24px/1 var(--pub-display); font-variant-numeric: tabular-nums; }
.pub-prow-bar { position: absolute; left: 0; top: 0; bottom: 0; z-index: 0; width: var(--w, 0); background: linear-gradient(90deg, rgba(249, 56, 34, 0), rgba(249, 56, 34, .22)); animation: pub-grow .9s var(--pub-ease) both; animation-delay: var(--d, 0ms); }
.pub-prow.is-me { box-shadow: inset 0 0 0 1px var(--pub-gold); }
.pub-prow.is-me .pub-prow-bar { background: linear-gradient(90deg, rgba(245, 184, 46, 0), rgba(245, 184, 46, .3)); }
.pub-prows.is-locked .pub-prow-img { filter: blur(6px) saturate(.4); }
.pub-prows.is-locked .pub-prow-text, .pub-prows.is-locked .pub-prow-pct { color: var(--pub-faint); }
.pub-you { flex: none; font: 14px/1 var(--pub-display); color: #000; background: var(--pub-gold); padding: .09em .4em .19em; }

/* Answers vs. the community */
.pub-cmp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-cmp-chips .pub-chip { flex: 1 1 240px; }
.pub-cmp { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.pub-cq { border: 1px solid var(--pub-line); background: var(--pub-panel); padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pub-cq-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 2px; }
.pub-cq-num { flex: none; font: 600 10.5px/1 var(--pub-body); letter-spacing: .15em; color: var(--pub-muted); }
.pub-cq-q { margin: 0; font: 21px/1 var(--pub-display); font-weight: normal; text-transform: uppercase; overflow-wrap: anywhere; }
.pub-ca { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 3.4em; align-items: center; min-height: 34px; background: rgba(255, 255, 255, .04); overflow: hidden; }
.pub-ca-bar { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w, 0); background: rgba(255, 255, 255, .1); animation: pub-grow .9s var(--pub-ease) both; animation-delay: var(--d, 0ms); }
.pub-ca.is-me .pub-ca-bar { background: rgba(249, 56, 34, .45); }
.pub-ca-label { position: relative; padding: 6px 10px; font-size: 13px; line-height: 1.3; display: flex; gap: 8px; align-items: center; min-width: 0; }
.pub-ca-pct { position: relative; text-align: right; padding: 2px 10px 0 0; font: 18px/1 var(--pub-display); font-variant-numeric: tabular-nums; }
.pub-ca.is-top .pub-ca-pct { color: var(--pub-gold); }
.pub-cq.is-more { display: none; }
.pub-cmp.is-open .pub-cq.is-more { display: flex; }
.pub-quiz > .pub-btn { width: auto; margin: 0; align-self: flex-start; }
.pub-restart { margin: 0; text-align: center; font-size: 13.5px; color: var(--pub-muted); }
.pub-restart a { color: var(--pub-text); text-decoration-color: var(--pub-accent); text-underline-offset: 3px; }

/* Giveaway results: one row per winner */
.pub-winners { list-style: none; margin: 0; padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.pub-winner-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 8px 12px 8px 8px; background: rgba(255, 255, 255, .04); }
.pub-winner-row:nth-child(even) { background: rgba(255, 255, 255, .07); }
.pub-winner-img { width: 76px; height: 56px; object-fit: contain; display: block; }
.pub-winner-who { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pub-winner-nick { font: 26px/1 var(--pub-display); text-transform: uppercase; overflow-wrap: anywhere; padding-top: 2px; }
.pub-winner-prize { font-size: 13px; color: var(--pub-muted); }
.pub-winner-badge { font: 15px/1 var(--pub-display); text-transform: uppercase; color: #000; background: var(--pub-gold); padding: .09em .45em .19em; }

/* Gaming preferences: steps of tiles to tick */
.pub-prefs #preferences_form { display: flex; flex-direction: column; gap: 22px; scroll-margin-top: 16px; }
.pub-step { display: flex; flex-direction: column; gap: 18px; }
.pub-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pub-pick { position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; cursor: pointer;
    border: 1px solid var(--pub-line); background: var(--pub-panel); transition: border-color .2s, transform .2s var(--pub-ease); }
.pub-pick:hover { border-color: rgba(255, 255, 255, .45); transform: translateY(-2px); }
.pub-pick input { position: absolute; opacity: 0; pointer-events: none; }
.pub-pick:focus-within { outline: 2px solid var(--pub-text); outline-offset: 2px; }
.pub-pick.is-art { aspect-ratio: 2 / 3; }
.pub-pick.is-square { aspect-ratio: 1; }
.pub-pick.is-flat { min-height: 64px; justify-content: center; }
.pub-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pub-pick.is-square img { object-fit: contain; padding: 12px; }
.pub-pick-name { position: relative; padding: 26px 10px 10px; font: 19px/1 var(--pub-display); text-transform: uppercase; overflow-wrap: anywhere; }
.pub-pick:not(.is-flat) .pub-pick-name { background: linear-gradient(0deg, rgba(0, 0, 0, .9), transparent); }
.pub-pick.is-flat .pub-pick-name { padding: 12px 14px 10px; }
.pub-pick.is-on { border-color: var(--pub-accent); box-shadow: 0 0 0 2px var(--pub-accent); }
.pub-pick.is-on::after { content: ""; position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; background: var(--pub-accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3C/svg%3E") center / 16px no-repeat; }
.pub-pick.is-out, .pub-pick-group.is-out { display: none; }
.pub-pick-groups { display: flex; flex-direction: column; gap: 22px; }
.pub-pick-group { display: flex; flex-direction: column; gap: 10px; }
.pub-pick-group-title { margin: 0; font: 600 10.5px/1 var(--pub-body); letter-spacing: .15em; text-transform: uppercase; color: var(--pub-muted); padding-bottom: 8px; border-bottom: 1px dashed var(--pub-line); }
.pub-show-all { width: auto; margin: 0; align-self: flex-start; }
.pub-search { max-width: 420px; }
/* Back / next, kept in view at the bottom */
.pub-stepbar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; justify-content: flex-end; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(0deg, rgba(0, 0, 0, .9) 60%, transparent); }
.pub-stepbar .pub-btn { width: auto; margin: 0; flex: 0 1 260px; }

/* Stream Control (giveaway/end_delegate_v2): sized for a stream capture */
.pub-stream .pub-title { font-size: 84px; }
.pub-stream .pub-subtitle { font-size: 20px; }
.pub-stream-stats { display: flex; gap: 14px; flex-wrap: wrap; align-items: stretch; }
.pub-stream-count .pub-chip-value { font-size: 64px; color: var(--pub-accent); }
.pub-stream-stats .pub-countries { flex: 1 1 300px; }
.pub-chip-value.is-bump { animation: pub-bump .6s var(--pub-ease); }
.pub-stream .pub-winner-nick { font-size: 40px; }
.pub-stream .pub-winner-img { width: 110px; height: 80px; }
.pub-stream .pub-winner-row { grid-template-columns: 110px minmax(0, 1fr) auto; }
.pub-actions-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pub-actions-row .pub-btn, .pub-form > .pub-btn.is-small { width: auto; margin: 0; }

/* Stream Control, drawn: teaser of the draw, then the reveal */
body.is-teasing { overflow: hidden; }
body.is-teasing .pub-reveal-target, body.is-teasing .pub-bravo { visibility: hidden; }
.pub-tease { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; overflow: hidden; background: rgba(0, 0, 0, .92); }
.pub-tease::before { content: ""; position: absolute; left: 50%; top: 50%; width: 220vmax; height: 220vmax; translate: -50% -50%; opacity: .18;
    background: repeating-conic-gradient(from 0deg, var(--pub-accent) 0deg 6deg, transparent 6deg 18deg); animation: pub-spin 30s linear infinite; }
.pub-tease-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 0 16px; text-align: center; width: min(1100px, 100%); }
.pub-tease-kicker { font: 600 14px/1 var(--pub-body); letter-spacing: .35em; text-transform: uppercase; color: var(--pub-muted); }
.pub-tease-title { font: clamp(48px, 9vw, 120px)/.9 var(--pub-display); text-transform: uppercase; color: var(--pub-accent); text-shadow: 0 0 40px rgba(249, 56, 34, .5); }
.pub-tease-count { font: clamp(28px, 4vw, 48px)/1 var(--pub-display); text-transform: uppercase; color: var(--pub-soft); }
.pub-tease-count span { color: var(--pub-text); font-variant-numeric: tabular-nums; }
.pub-tease-scramble { font: clamp(54px, 11vw, 150px)/1 var(--pub-display); text-transform: uppercase; letter-spacing: .04em; font-variant-numeric: tabular-nums; min-height: 1em; }
.pub-tease-countdown { font: clamp(140px, 30vw, 360px)/.85 var(--pub-display); color: var(--pub-text); }
.pub-tease-countdown.is-pop { animation: pub-pop .9s var(--pub-ease) both; }
.pub-tease-bar { width: min(700px, 90%); height: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.pub-tease-bar span { display: block; height: 100%; background: var(--pub-accent); transform: scaleX(0); transform-origin: left center; }
.pub-tease-skip { position: absolute; right: 24px; bottom: 24px; width: auto; margin: 0; }
.pub-flash { position: fixed; inset: 0; z-index: 80; pointer-events: none; background: #fff; opacity: 0; }
.pub-flash.is-on { animation: pub-flash .9s ease-out both; }
.pub-bravo { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pub-bravo-big { font: clamp(70px, 12vw, 160px)/.85 var(--pub-display); text-transform: uppercase; color: var(--pub-gold); text-shadow: 0 0 50px rgba(245, 184, 46, .45); }
.pub-bravo-sub { font: clamp(26px, 4vw, 44px)/1 var(--pub-display); text-transform: uppercase; }
.pub-bravo.is-on .pub-bravo-big { animation: pub-pop 1s var(--pub-ease) both; }
.pub-bravo.is-on .pub-bravo-sub { animation: pub-wipe .6s var(--pub-ease) .35s both; }
body.is-revealed .pub-reveal-target .pub-winner-badge { animation: pub-pop .6s var(--pub-ease) both; animation-delay: inherit; }
.pub-replay { width: auto; margin: 0; align-self: flex-start; }

/* Leaderboard manage page */
.pub-time { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pub-manage-rows { list-style: none; margin: 0; padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 5px; }
.pub-manage-row { display: grid; grid-template-columns: 3em minmax(0, 1fr) auto 38px; align-items: center; gap: 12px; min-height: 52px; padding: 6px 8px 6px 0; background: rgba(255, 255, 255, .04); }
.pub-manage-row:nth-child(even) { background: rgba(255, 255, 255, .07); }
.pub-manage-row.is-ttb { box-shadow: inset 3px 0 0 #fff200; }
.pub-manage-rank { text-align: center; font: 22px/1 var(--pub-display); color: var(--pub-muted); font-variant-numeric: tabular-nums; }
.pub-manage-row:nth-child(1) .pub-manage-rank { color: var(--pub-gold); }
.pub-manage-who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pub-manage-name { font: 21px/1 var(--pub-display); text-transform: uppercase; overflow-wrap: anywhere; padding-top: 2px; }
.pub-manage-phone { font-size: 12.5px; color: var(--pub-muted); }
.pub-manage-score { font: 24px/1 var(--pub-display); font-variant-numeric: tabular-nums; }
.pub-remove { margin: 0; }
.pub-icon-btn.is-armed { background: var(--pub-accent); border-color: var(--pub-accent); color: #000; }

/* Error / status pages (errors/_paddock): small tag above the title */
.pub-status { font: 17px/1 var(--pub-display); text-transform: uppercase; color: #000; background: var(--pub-accent); padding: .09em .5em .19em; }

/* Honeypot: off-screen for people */
.pub-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.pub-footer { margin-top: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font: 500 10.5px/1 var(--pub-body); letter-spacing: .15em; text-transform: uppercase; color: var(--pub-muted); }
.pub-footer-line { flex: 1; min-width: 30px; height: 1px; background: var(--pub-line); }
.pub-footer a { color: inherit; text-underline-offset: 3px; }
.pub-footer a:hover { color: var(--pub-text); }

/* ---------- Entrance: the leaderboard's staggered wipe ---------- */
.pub-enter { animation: pub-wipe .55s var(--pub-ease) both; animation-delay: var(--d, 0ms); }

@keyframes pub-wipe {
    from { opacity: 0; transform: translateX(-18px); clip-path: inset(0 100% 0 0); }
    to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}
@keyframes pub-rise { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pub-blink { from { opacity: 1; } to { opacity: .35; } }
@keyframes pub-spin { to { rotate: 360deg; } }
@keyframes pub-grow { from { width: 0; } }
@keyframes pub-pop { 0% { opacity: 0; transform: scale(.4); } 60% { opacity: 1; transform: scale(1.12); } 100% { transform: none; } }
@keyframes pub-flash { 0% { opacity: .9; } 100% { opacity: 0; } }
@keyframes pub-bump { 0% { transform: scale(1); } 35% { transform: scale(1.25); color: #fff; } 100% { transform: none; } }
@keyframes pub-shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes pub-slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pub-win { 0% { transform: scale(1); } 25% { transform: scale(1.08) rotate(-3deg); } 100% { transform: none; } }

/* ---------- Tablets / phones ---------- */
@media (max-width: 1080px) {
    .pub-title { font-size: 62px; }
    .pub-title.is-long { font-size: 52px; }
    .pub-title.is-very-long { font-size: 42px; }
    .pub-main { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 24px; }
}

@media (max-width: 820px) {
    .pub-screen { padding: 22px 16px 22px; gap: 20px; }
    .pub-header { gap: 14px; }
    .pub-logo { max-height: 80px; }
    .pub-title { font-size: clamp(38px, 11vw, 60px); }
    .pub-title.is-long { font-size: clamp(32px, 8.6vw, 48px); }
    .pub-title.is-very-long { font-size: clamp(28px, 7.4vw, 40px); }
    .pub-main, .pub-main.is-single { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .pub-slide-name { font-size: clamp(30px, 8vw, 44px); }
    .pub-slide-meta { padding: 50px 16px 16px; }
    .pub-showcase-bar { left: 14px; right: 14px; top: 12px; }
    .pub-panel-head, .pub-form, .pub-done { padding-left: 16px; padding-right: 16px; }
    .pub-done-title { font-size: 44px; }
    .pub-phases { grid-template-columns: minmax(0, 1fr); }
    .pub-phase, .pub-phase + .pub-phase { padding: 12px 16px; border-left: 0; }
    .pub-phase + .pub-phase { border-top: 1px dashed var(--pub-line); }
    .pub-about-text, .pub-actions, .pub-partner { padding-left: 16px; padding-right: 16px; }
    .pub-gallery { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .pub-photo-name { font-size: 15px; }
    .pub-stream .pub-title { font-size: clamp(40px, 11vw, 60px); }
    .pub-stream-count .pub-chip-value { font-size: 44px; }
    .pub-stream .pub-winner-nick { font-size: 28px; }
    .pub-picks { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
    .pub-pick-name { font-size: 16px; }
    .pub-stepbar .pub-btn { flex: 1 1 0; }
    .pub-winners { padding: 12px; }
    .pub-winner-row { grid-template-columns: 56px minmax(0, 1fr); }
    .pub-winner-img { width: 56px; height: 44px; }
    .pub-winner-badge { display: none; }
    .pub-quiz-q, .pub-quiz-q.no-hero { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .pub-question { font-size: 28px; }
    .pub-answer { padding: 10px 12px; }
    .pub-quiz-tip { display: none; }
    .pub-progress { gap: 10px; }
    .pub-res, .pub-res.is-single { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .pub-me-body, .pub-stat, .pub-stat-chips { padding-left: 16px; padding-right: 16px; }
    .pub-me-name { font-size: 42px; }
    .pub-prow { grid-template-columns: 64px minmax(0, 1fr) 4.4em; }
    .pub-prow.is-open { grid-template-columns: minmax(0, 1fr) 4.4em; }
    .pub-prow.is-open .pub-prow-img { grid-column: 1 / -1; min-height: 0; }
    .pub-prow.is-open .pub-prow-main { padding: 14px 16px; }
    .pub-prow.is-open .pub-prow-name { font-size: 26px; }
    .pub-prow-name { font-size: 19px; }
    .pub-cmp { grid-template-columns: minmax(0, 1fr); }
    .pub-section-title { font-size: 28px; }
    .pub-tray { flex-wrap: nowrap; gap: 10px; padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
    .pub-tray-info { display: none; }
    .pub-tray .pub-slots { gap: 6px; }
    .pub-tray .pub-slot { width: 40px; height: 40px; }
    .pub-tray .pub-btn { flex: 1 1 auto; height: 46px; font-size: 19px; padding: 0 14px; }
    body.has-tray { padding-bottom: 80px; }
    .pub-winner-name { font-size: 40px; }
    .pub-partner { grid-template-columns: 130px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .pub-enter, .pub-slide.is-on .pub-slide-img, .pub-rays, .pub-ticket.is-won .pub-scratch, .pub-tray.is-shake, .pub-drawer-body, .pub-prow-bar, .pub-ca-bar { animation: none; }
    .pub-answer, .pub-answer::before, .pub-prow[data-expand], .pub-prow-chevron, .pub-pick { transition: none; }
    .pub-tease::before, .pub-tease-countdown.is-pop, .pub-flash.is-on, .pub-bravo.is-on .pub-bravo-big, .pub-bravo.is-on .pub-bravo-sub { animation: none; }
    .pub-slide, .pub-meter-bar, .pub-btn-arrow, .pub-btn::before { transition: none; }
    .pub-btn[disabled] .pub-btn-arrow, .pub-meter.is-late .pub-meter-bar { animation: none; }
}
