:root {
    color-scheme: dark;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #f5f7fc;
    background: #10243a;
    --muted: #b8c9dc;
    --accent: #ff6d9d;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
body { background: radial-gradient(ellipse at top right, #2c5372, transparent 65%), #10243a; }
a { color: #ffc4da; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: white; }
button, input, textarea, select { font: inherit; }
button, .button {
    display: inline-block; background: var(--accent); color: #251023; border: 1px solid transparent;
    padding: 12px 18px; border-radius: 9px; font-weight: 650; cursor: pointer; text-decoration: none;
}
button:hover, .button:hover { background: #ff94b8; color: #251023; }
button:disabled { opacity: .6; cursor: default; }
.secondary { background: #ffffff0a; color: #f5f7fc; border-color: #ffffff33; }
.danger { background: #ff80951a; color: #ffb5c5; border-color: #ff809540; padding: 7px 12px; }
:focus-visible { outline: 3px solid #b6deff; outline-offset: 4px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 25px 5vw; gap: 20px; }
.brand { color: white; font-size: 25px; font-weight: 750; text-decoration: none; letter-spacing: -1px; }
.brand span { font-weight: 300; }
nav { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
main { width: min(1320px, 90%); margin: 25px auto 70px; flex: 1; }
h1 { font-size: clamp(30px, 4vw, 54px); line-height: 1.12; letter-spacing: -1.5px; margin: 12px 0 22px; }
h2 { font-size: 23px; margin-top: 0; } h3 { font-size: 23px; }
p { color: var(--muted); line-height: 1.7; }
.eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: 11px; font-weight: 700; color: #ffadca; }
.panel { background: #ffffff08; border: 1px solid #ffffff20; padding: 28px; border-radius: 18px; margin-bottom: 24px; }
.narrow { max-width: 600px; margin: 7vh auto; }
.hero { padding: 50px 0; }
.hero p { max-width: 480px; }
label { display: grid; gap: 8px; margin: 18px 0; color: #dce8f4; font-size: 14px; }
input, textarea, select {
    width: 100%; padding: 12px; border: 1px solid #ffffff30; border-radius: 8px; background: #0a1b2c; color: white;
}
textarea { min-height: 85px; resize: vertical; }
.check { display: flex; align-items: center; gap: 12px; }.check input { width: 18px; height: 18px; }
small { display: block; color: var(--muted); line-height: 1.6; margin: 10px 0; }
.admin-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: start; }
.gallery-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gallery-link { display: block; text-decoration: none; color: white; overflow-wrap: anywhere; }
.gallery-link h3 { margin-bottom: 8px; }.gallery-link span:last-child { font-size: 13px; color: #ffd5e4; }
.count { color: var(--muted); font-weight: 400; }.page-heading { display: flex; justify-content: space-between; }
.page-heading { align-items: center; gap: 20px; margin-bottom: 35px; }
.list-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; gap: 15px; }
.list-row { border-bottom: 1px solid #ffffff15; overflow-wrap: anywhere; }
.list-row > :first-child { min-width: 0; }.list-row form { flex-shrink: 0; }
.gallery-heading { text-align: center; max-width: 1000px; margin: 20px auto 45px; }
.gallery-nav { justify-content: center; margin-top: 25px; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.media-open { padding: 0; display: block; width: 100%; background: #172d43; overflow: hidden; border-radius: 12px; }
.media-open img, .media-open video { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.media-open img, .media-open video { transition: transform .25s; }.media-open:hover img { transform: scale(1.04); }
.media-card > p { overflow-wrap: anywhere; font-size: 12px; margin: 8px 0; }
.media-card form button { width: 100%; font-size: 12px; }
.notice { background: #ffffff0c; padding: 20px; border-radius: 12px; }.error { color: #ffb6c9; }
.multiline { white-space: pre-line; }.empty { text-align: center; padding: 50px; }
dialog { width: min(1200px, 96vw); background: #0a1726; border: 1px solid #ffffff33; border-radius: 16px; color: white; }
dialog::backdrop { background: #000c; }dialog img, dialog video { max-width: 100%; max-height: 68vh; margin: auto; }
dialog img:not([hidden]), dialog video:not([hidden]) { display: block; }
#close-lightbox { float: right; }.lightbox-controls { display: flex; justify-content: center; gap: 18px; margin-top: 18px; }
.credential { padding: 18px; background: #071522; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
code { display: block; overflow-wrap: anywhere; margin-top: 18px; }.legal { overflow-wrap: anywhere; }
.legal h1 { font-size: 36px; }.legal h2 { margin-top: 35px; }.legal li { line-height: 1.7; }
details { padding: 16px 0; border-bottom: 1px solid #ffffff20; }summary { cursor: pointer; }
footer { text-align: center; padding: 25px; background: #07152270; color: var(--muted); font-size: 12px; }
footer a { margin-left: 18px; }
[hidden] { display: none !important; }
@media (max-width: 950px) { .admin-grid { grid-template-columns: 1fr; }.gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) {
    .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .gallery-list { grid-template-columns: 1fr; }.panel { padding: 20px; }.page-heading { flex-wrap: wrap; }
    .topbar { padding: 18px 5vw; }.topbar nav { gap: 10px; }.topbar button { padding: 8px; font-size: 12px; }
    .gallery-nav .button { width: 100%; }.lightbox-controls { gap: 8px; }.lightbox-controls a { font-size: 12px; }
    .list-row { flex-wrap: wrap; }footer a { display: inline-block; margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.guest-page { max-width: 1120px; margin: 0 auto; }
.guest-heading { text-align: center; max-width: 720px; margin: 15px auto 40px; }
.guest-heading > a { font-size: 13px; }.guest-heading .eyebrow { margin-top: 36px; }
.guest-heading h1 { font-size: clamp(36px, 5vw, 62px); }
.guest-heading strong { color: #f5f7fc; }
.guest-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 26px; }
.section-title, .selection-heading, .progress-label { display: flex; justify-content: space-between; gap: 12px; }
.section-title { align-items: center; }.section-title h2 { margin: 0; }.upload-step { color: #ffadca; font-size: 13px; }
.guest-dropzone {
    position: relative; padding: 27px 18px; text-align: center; border: 2px dashed #ff9ac16b;
    border-radius: 14px; background: #ff8cb00a; cursor: pointer; justify-items: center; gap: 6px;
}
.guest-dropzone:hover, .guest-dropzone.drag-over { border-color: #ffb0d0; background: #ff8cb01a; }
.guest-dropzone:focus-within { outline: 3px solid #b6deff; outline-offset: 3px; }
.upload-symbol { font-size: 34px; color: #ffb4d2; line-height: 1; }
.guest-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.guest-dropzone > span:last-of-type { color: var(--muted); font-size: 12px; }
.selection-heading { font-size: 12px; align-items: center; color: var(--muted); margin-top: 24px; }
.text-button { background: none; color: #ffc4da; padding: 5px; border: none; font-size: 12px; }
.text-button:hover { background: #ffffff10; color: white; }
.guest-file-list { padding: 0; list-style: none; max-height: 330px; overflow-y: auto; margin: 8px 0 18px; }
.guest-file { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #ffffff18; }
.guest-file-preview, .guest-file-icon { width: 48px; height: 48px; border-radius: 7px; flex-shrink: 0; }
.guest-file-preview { object-fit: cover; }.guest-file-icon { display: grid; place-items: center; background: #ffffff10; }
.guest-file-details { flex: 1; min-width: 0; }.guest-file-details strong { font-size: 12px; overflow-wrap: anywhere; }
.guest-file-details small { font-size: 11px; margin: 5px 0 0; }.file-state { width: 20px; text-align: center; }
.guest-file-success .file-state { color: #a7e5c0; }.guest-file-error small, .guest-file-error .file-state { color: #ffb6c9; }
.guest-file-duplicate .file-state { color: #f3d5a1; }.guest-submit { width: 100%; }
.progress-label { color: #dce8f4; font-size: 12px; margin-top: 20px; }
progress { appearance: none; width: 100%; height: 9px; border: none; border-radius: 10px; margin-top: 12px; }
progress::-webkit-progress-bar { background: #091b30; border-radius: 10px; }
progress::-webkit-progress-value { background: #ff8eb5; border-radius: 10px; transition: width .15s; }
progress::-moz-progress-bar { background: #ff8eb5; border-radius: 10px; }.muted { color: var(--muted); font-size: 12px; }
#guest-result { margin-bottom: 0; }#guest-result:empty { display: none; }
.guest-scores { list-style: none; padding: 0; margin: 22px 0 0; }
.score-entry { display: flex; align-items: center; gap: 10px; padding: 14px 8px; border-bottom: 1px solid #ffffff18; }
.score-entry strong { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.score-entry > span:last-child { font-size: 11px; color: var(--muted); white-space: nowrap; }
.score-rank { color: var(--muted); width: 16px; font-size: 12px; }.score-self { background: #ff8eb510; border-radius: 8px; }
.score-up { animation: score-rise .7s; }.guest-help { padding: 0 15px; }.guest-help h3 { font-size: 16px; }
.guest-help p { font-size: 13px; }.guest-credit { margin: 0 0 12px; font-size: 11px; }
.guest-celebration { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 10; }
.guest-celebration span { position: absolute; left: 50%; top: -20px; width: 10px; height: 18px; background: #ff91bb; }
.guest-celebration span { animation: confetti-fall 2.3s ease-in both; }
.guest-celebration span:nth-child(4n + 1) { background: #a9d8f5; border-radius: 50%; }
.guest-celebration span:nth-child(4n + 2) { background: #f3d5a1; }
.guest-celebration span:nth-child(4n + 3) { background: #a7e5c0; }
.guest-celebration span:nth-child(2n) { animation-delay: .15s; }
.guest-celebration span:nth-child(8n + 1) { left: 5%; }.guest-celebration span:nth-child(8n + 2) { left: 18%; }
.guest-celebration span:nth-child(8n + 3) { left: 30%; }.guest-celebration span:nth-child(8n + 4) { left: 43%; }
.guest-celebration span:nth-child(8n + 5) { left: 57%; }.guest-celebration span:nth-child(8n + 6) { left: 70%; }
.guest-celebration span:nth-child(8n + 7) { left: 82%; }.guest-celebration span:nth-child(8n) { left: 95%; }
@keyframes confetti-fall { to { transform: translateY(100vh) rotate(700deg); opacity: 0; } }
@keyframes score-rise { from { background: #ffb0d040; } }
@media (max-width: 800px) { .guest-layout { grid-template-columns: 1fr; }.guest-heading { margin-bottom: 30px; } }
@media (max-width: 400px) { .section-title { display: block; }.upload-step { display: none; } }
@media (prefers-reduced-motion: reduce) { .guest-celebration { display: none; }.score-up { animation: none; } }
