/* Photographers event — the page is a phone camera. */
:root {
  --ink: #0a0a0a;
  --panel: #1a1a1b;
  --panel-2: #242426;
  --line: rgba(255, 255, 255, .14);
  --text: #f4f4f1;
  --muted: #a9a9a4;
  --focus: #ffd60a;
  --focus-ink: #141100;
  --rec: #ff453a;
  --ok: #30d158;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Readex Pro", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --controls-h: 132px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font: 400 16px/1.65 var(--sans);
  padding-bottom: calc(var(--controls-h) + var(--safe-b));
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--focus); color: var(--focus-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
svg { width: 1em; height: 1em; }
html { scrollbar-color: #3a3a3c var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; background: var(--focus); color: var(--focus-ink); padding: 8px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Viewfinder ---------- */
.vf {
  position: relative; min-height: 100svh; overflow: hidden; isolation: isolate;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: max(14px, env(safe-area-inset-top)) 18px calc(var(--controls-h) + var(--safe-b) + 8px);
}
.vf__frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.vf__frame--empty {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    #111112;
}
.vf::before { /* legibility scrim at top and bottom only */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.72), rgba(0,0,0,0) 22%),
    linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.25) 38%, rgba(0,0,0,0) 60%);
}
.vf__grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to right, transparent calc(33.333% - .5px), rgba(255,255,255,.22) calc(33.333% - .5px), rgba(255,255,255,.22) calc(33.333% + .5px), transparent calc(33.333% + .5px), transparent calc(66.666% - .5px), rgba(255,255,255,.22) calc(66.666% - .5px), rgba(255,255,255,.22) calc(66.666% + .5px), transparent calc(66.666% + .5px)),
    linear-gradient(to bottom, transparent calc(33.333% - .5px), rgba(255,255,255,.22) calc(33.333% - .5px), rgba(255,255,255,.22) calc(33.333% + .5px), transparent calc(33.333% + .5px), transparent calc(66.666% - .5px), rgba(255,255,255,.22) calc(66.666% - .5px), rgba(255,255,255,.22) calc(66.666% + .5px), transparent calc(66.666% + .5px));
}

.vf__status { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.vf__back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); padding: 8px 2px; min-height: 44px; }
.vf__back svg { font-size: 18px; }
.vf__live { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; max-width: 52%; line-height: 1.4; background: rgba(0,0,0,.45); padding: 5px 11px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.vf__live.is-counting { font-family: var(--mono); }
.vf__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: rec 1.6s steps(2, jump-none) infinite; }
@keyframes rec { 50% { opacity: .25; } }
.vf__chip { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 12px; color: var(--focus); border: 1px solid currentColor; border-radius: 999px; padding: 3px 9px 3px 7px; }
.vf__chip svg { font-size: 13px; }

.vf__subject { align-self: center; justify-self: center; text-align: center; max-width: min(46rem, 100%); display: grid; justify-items: center; gap: 22px; padding-block: 24px; }
.focus {
  --c: var(--focus); --l: 26px; --w: 2px;
  position: relative; padding: 26px 30px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l);
  background-repeat: no-repeat;
  animation: af 1.1s var(--ease) both;
}
@keyframes af {
  0% { transform: scale(1.22); opacity: 0; }
  45% { transform: scale(1); opacity: 1; --c: #fff; }
  60% { --c: var(--focus); }
  70% { opacity: .35; }
  80% { opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.vf__title {
  margin: 0; font-weight: 700; font-size: clamp(2.4rem, 9vw, 5.2rem); line-height: 1.12; letter-spacing: -.01em;
  text-wrap: balance; text-shadow: 0 2px 24px rgba(0,0,0,.45);
}
.vf__intro { margin: 0; font-size: clamp(1rem, 2.6vw, 1.15rem); color: #e8e8e4; text-wrap: pretty; text-shadow: 0 1px 12px rgba(0,0,0,.6); max-width: 30rem; }

.vf__readout { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-family: var(--mono); font-size: 12.5px; color: #d9d9d4; font-variant-numeric: tabular-nums; padding-bottom: 8px; }
.ro--strong { color: var(--focus); font-family: var(--sans); font-weight: 500; }

/* ---------- Persistent controls ---------- */
.controls {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 20;
  padding: 8px 18px calc(10px + var(--safe-b));
  background: rgba(10,10,10,.9);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
}
.modes { list-style: none; margin: 0 auto 6px; padding: 0; display: flex; justify-content: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.modes a {
  display: block; padding: 8px 10px; text-decoration: none; font-size: 13px; font-weight: 500;
  letter-spacing: .02em; color: #cfcfca; white-space: nowrap; border-radius: 6px; transition: color .2s;
}
.modes a[aria-current="true"] { color: var(--focus); }
.modes a:hover { color: var(--text); }
.controls__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; max-width: 30rem; margin: 0 auto; }
.roll-thumb { justify-self: start; width: 46px; height: 46px; border-radius: 8px; overflow: hidden; border: 1.5px solid rgba(255,255,255,.75); background: var(--panel); }
.roll-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mine { justify-self: end; display: grid; justify-items: center; gap: 1px; min-width: 52px; min-height: 48px; padding: 4px; text-decoration: none; font-size: 11.5px; color: #e6e6e1; }
.mine svg { font-size: 24px; }
.mine.is-done { color: var(--focus); }

.shutter { position: relative; width: 70px; height: 70px; border: 0; padding: 0; background: none; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px; }
.shutter__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.shutter__ring circle { fill: none; stroke: #fff; stroke-width: 5; stroke-dasharray: 289.03; stroke-dashoffset: 0; transition: stroke .2s; }
.shutter__core { width: 56px; height: 56px; border-radius: 50%; background: #fff; transition: transform .18s var(--ease), background .2s; }
.shutter:hover .shutter__core { background: #ececec; }
.shutter:active .shutter__core { transform: scale(.86); }
.shutter__label { position: absolute; top: calc(100% + 3px); white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--focus); }
.shutter:disabled .shutter__core { background: #555; }
.shutter:disabled .shutter__label { color: var(--muted); }
.shutter.is-done .shutter__core { background: var(--focus); }

/* ---------- Sections ---------- */
main { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(64px, 12vw, 120px); padding: clamp(56px, 10vw, 96px) 18px 40px; max-width: 1180px; margin: 0 auto; }
.sec-title { margin: 0 0 22px; font-size: clamp(1.5rem, 4.5vw, 2.1rem); font-weight: 600; letter-spacing: -.005em; line-height: 1.25; }

/* Stages as a video scrubber */
.scrub { --n: 5; list-style: none; margin: 0; padding: 30px 0 0; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 0; }
.scrub::before { content: ""; position: absolute; top: 9px; inset-inline: 0; height: 3px; border-radius: 3px; background: repeating-linear-gradient(to left, #3a3a3c 0 2px, transparent 2px 9px); }
.scrub::after { content: ""; position: absolute; top: 9px; inset-inline-start: 0; height: 3px; border-radius: 3px; background: var(--focus); width: calc((var(--stage) + .5) / var(--n) * 100%); }
.scrub li { position: relative; padding-inline-end: 18px; display: grid; gap: 4px; color: var(--muted); }
.scrub li::before { content: ""; position: absolute; top: -26px; inset-inline-start: 0; width: 2px; height: 18px; background: #3a3a3c; }
.scrub li.is-past::before { background: var(--focus); }
.scrub li.is-now::before { width: 4px; height: 26px; top: -30px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 3px rgba(0,0,0,.6); }
.scrub__t { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.scrub strong { font-size: 1.15rem; font-weight: 600; color: var(--text); }
.scrub li.is-now strong { color: var(--focus); }
.scrub span:last-child { font-size: .93rem; line-height: 1.6; }

/* Camera roll */
.roll__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 14px; }
.roll__head .sec-title { margin: 0; }
.roll__count { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.roll__hint { margin: 0 0 16px; color: var(--muted); font-size: .95rem; }
.roll__hint strong { color: var(--focus); font-weight: 500; }
.seg { margin-inline-start: auto; display: inline-flex; background: var(--panel); border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 7px; font-size: 13.5px; color: #cfcfca; min-height: 36px; }
.seg button[aria-selected="true"] { background: #3a3a3c; color: var(--text); }

.grid { list-style: none; margin: 0 -18px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.grid li { position: relative; aspect-ratio: 1; background: var(--panel); overflow: hidden; }
.grid button[data-i] { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.grid button[data-i]:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .4s; opacity: 0; }
.grid img.is-loaded { opacity: 1; }
.grid li:hover img { transform: scale(1.04); }
.grid__no { position: absolute; bottom: 5px; inset-inline-start: 6px; font: 500 11px var(--mono); color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.8); pointer-events: none; }
.grid__votes { position: absolute; bottom: 5px; inset-inline-end: 6px; font: 500 11px var(--mono); color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.8); pointer-events: none; }
.grid__mine { position: absolute; top: 6px; inset-inline-end: 6px; color: var(--focus); font-size: 20px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); pointer-events: none; }
.grid .skel { background: linear-gradient(100deg, var(--panel) 40%, #232325 50%, var(--panel) 60%) 0 0 / 300% 100%; animation: skel 1.4s linear infinite; }
@keyframes skel { to { background-position: -150% 0; } }

.roll__empty { display: grid; justify-items: center; text-align: center; gap: 18px; padding: 48px 12px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); }
.roll__empty strong { display: block; color: var(--text); font-size: 1.1rem; font-weight: 500; margin-bottom: 2px; }
.roll__empty p { margin: 0; }
.roll__empty-frame { position: relative; width: 74px; height: 56px; }
.roll__empty-frame i { position: absolute; width: 14px; height: 14px; border: 2px solid var(--focus); }
.roll__empty-frame i:nth-child(1) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.roll__empty-frame i:nth-child(2) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.roll__empty-frame i:nth-child(3) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.roll__empty-frame i:nth-child(4) { bottom: 0; left: 0; border-right: 0; border-top: 0; }

/* Billing: rank carried by size alone */
.billing__list { list-style: none; margin: 0; padding: 0; text-align: center; line-height: 1.08; }
.billing__list li { font-weight: 700; letter-spacing: -.01em; padding: .12em 0; }
.billing__list li small { font: 500 .32em var(--mono); color: var(--muted); vertical-align: middle; margin-inline-start: .5em; letter-spacing: 0; }
.billing__list .cut { font: 500 12px var(--mono); color: var(--focus); display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.billing__list .cut::before, .billing__list .cut::after { content: ""; flex: 1; height: 1px; background: var(--focus); opacity: .6; }

/* Prize */
.prize { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 5vw, 48px); align-items: center; background: var(--panel); border-radius: 22px; padding: clamp(24px, 5vw, 48px); }
.burst { width: clamp(108px, 22vw, 180px); aspect-ratio: 1; border-radius: 50%; background: var(--focus); color: var(--focus-ink); display: grid; place-items: center; font: 700 clamp(3rem, 10vw, 5.4rem)/1 var(--sans); font-variant-numeric: tabular-nums; }
.prize__title { margin: 0; font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 700; line-height: 1.2; }
.prize__text { margin: 6px 0 10px; font-size: clamp(1.05rem, 2.6vw, 1.25rem); color: var(--focus); }
.prize__note { margin: 0; color: var(--muted); font-size: .95rem; max-width: 38rem; }

/* Rules as a settings list */
.settings-list { list-style: none; margin: 0; padding: 0; background: var(--panel); border-radius: 14px; overflow: hidden; max-width: 46rem; }
.settings-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; min-height: 56px; }
.settings-list li + li { border-top: 1px solid var(--line); }
.toggle { flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--ok); position: relative; }
.toggle::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.3); }
.rules__small { color: var(--muted); font-size: .92rem; margin: 14px 4px 0; max-width: 46rem; }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px 18px 36px; max-width: 1180px; margin: 0 auto; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.foot a { color: var(--text); text-underline-offset: 4px; }

/* ---------- Sheets & dialogs ---------- */
dialog { color: var(--text); border: 0; padding: 0; }
dialog::backdrop { background: rgba(0,0,0,.7); }
.sheet {
  width: min(560px, 100%); max-width: 100%; max-height: 100%; margin: auto auto 0; background: #121213;
  border-radius: 22px 22px 0 0; padding-bottom: var(--safe-b);
}
.sheet[open] { animation: sheet-in .45s var(--ease); }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
.sheet__body, .sheet__done { padding: 18px 20px 22px; display: grid; gap: 16px; }
.sheet__bar { display: flex; align-items: center; justify-content: space-between; }
.sheet__bar h2 { margin: 0; font-size: 1.25rem; font-weight: 600; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; font-size: 20px; }
.icon-btn:hover { background: rgba(255,255,255,.14); }
.icon-btn--flip svg { transform: scaleX(-1); }

.pick { position: relative; display: grid; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #050505; cursor: pointer; }
.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pick:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.pick__empty { display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; padding: 24px; color: var(--muted); font-size: .92rem; }
.pick__empty strong { color: var(--text); font-size: 1.1rem; font-weight: 500; }
.pick__corners { position: relative; width: 60px; height: 46px; margin-bottom: 8px; }
.pick__corners i { position: absolute; width: 13px; height: 13px; border: 2px solid var(--focus); }
.pick__corners i:nth-child(1) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.pick__corners i:nth-child(2) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.pick__corners i:nth-child(3) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.pick__corners i:nth-child(4) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.pick__preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.pick.has-file .pick__empty { visibility: hidden; }

.exif-check { margin: -4px 0 0; display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; padding: 10px 12px; border-radius: 10px; background: var(--panel); }
.exif-check svg { flex: none; font-size: 18px; margin-top: 2px; }
.exif-check.is-ok { color: #d8f5df; }
.exif-check.is-ok svg { color: var(--ok); }
.exif-check.is-warn { color: #ffe9a3; }
.exif-check.is-warn svg { color: var(--focus); }
.exif-check code { font-family: var(--mono); font-size: .85em; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; font-size: .88rem; color: #cfcfca; }
.field--wide { grid-column: 1 / -1; }
.field em { font-style: normal; color: var(--muted); }
.field input, .vote__phone input {
  width: 100%; min-height: 48px; border-radius: 11px; border: 1px solid transparent; background: var(--panel-2);
  color: var(--text); padding: 10px 14px; font: 400 16px var(--sans); caret-color: var(--focus);
}
.field input[dir="ltr"], .vote__phone input { font-family: var(--mono); text-align: right; }
.field input::placeholder, .vote__phone input::placeholder { color: #8e8e89; }
.field input:focus, .vote__phone input:focus { outline: none; border-color: var(--focus); }
.field input[aria-invalid="true"] { border-color: var(--rec); }

.pledge { display: flex; gap: 12px; align-items: flex-start; font-size: .93rem; color: #dcdcd7; cursor: pointer; }
.pledge input { appearance: none; flex: none; width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid #6b6b67; margin: 1px 0 0; display: grid; place-items: center; cursor: pointer; }
.pledge input:checked { background: var(--focus); border-color: var(--focus); }
.pledge input:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--focus-ink); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }

.form-error { margin: 0; color: #ffb4ae; font-size: .93rem; background: rgba(255,69,58,.12); padding: 10px 12px; border-radius: 10px; }

.cta {
  position: relative; overflow: hidden; min-height: 54px; border: 0; border-radius: 999px; background: var(--focus); color: var(--focus-ink);
  font-weight: 600; font-size: 1.05rem; display: grid; place-items: center; transition: transform .15s var(--ease), filter .2s;
}
.cta:hover { filter: brightness(1.06); }
.cta:active { transform: scale(.98); }
.cta:disabled { filter: saturate(.3) brightness(.7); }
.cta__fill { position: absolute; inset: 0; inset-inline-end: auto; width: 0; background: rgba(0,0,0,.18); transition: width .2s linear; }
.cta__text { position: relative; }
.cta--ghost { background: var(--panel-2); color: var(--text); }

.sheet__done { text-align: center; justify-items: center; padding-block: 34px 26px; }
.sheet__done h2 { margin: 0; font-size: 1.5rem; }
.sheet__done p { margin: 0; color: #d4d4cf; }
.sheet__done .cta { width: 100%; }
.done-mark { width: 74px; height: 74px; border-radius: 50%; background: var(--focus); color: var(--focus-ink); display: grid; place-items: center; font-size: 36px; }
.done-exif { font-family: var(--mono); font-size: 12.5px; color: var(--focus) !important; }

/* Viewer */
.viewer { width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; background: #000; display: none; grid-template-rows: auto 1fr auto; }
.viewer[open] { display: grid; animation: fade .3s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.viewer::backdrop { background: #000; }
.viewer__top { display: flex; align-items: center; justify-content: space-between; padding: max(10px, env(safe-area-inset-top)) 14px 10px; }
.viewer__no { font: 500 13px var(--mono); color: var(--muted); }
.viewer__nav { display: flex; gap: 8px; }
.viewer__fig { margin: 0 8px; min-height: 0; position: relative; }
.viewer__fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.viewer__info { padding: 14px 18px calc(16px + var(--safe-b)); display: grid; gap: 12px; max-width: 760px; width: 100%; margin: 0 auto; }
.viewer__meta { display: grid; gap: 2px; }
.viewer__name { margin: 0; font-weight: 500; font-size: 1.05rem; }
.viewer__exif { margin: 0; font: 400 12.5px/1.6 var(--mono); color: var(--focus); display: flex; flex-wrap: wrap; gap: 2px 12px; }
.viewer__exif .muted { color: var(--muted); }
.vote { display: flex; gap: 10px; }
.vote__phone { flex: 1; }
.vote__btn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--focus); color: var(--focus-ink); font-weight: 600; }
.vote__btn svg { font-size: 20px; }
.vote__btn:disabled { background: var(--panel-2); color: var(--muted); }
.vote.is-voted .vote__btn { background: transparent; color: var(--focus); border: 1.5px solid var(--focus); }
.vote.is-locked .vote__phone { display: none; }

.flash { position: fixed; inset: 0; background: #fff; pointer-events: none; opacity: 0; z-index: 100; }
.flash.is-on { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }

/* ---------- Wider screens: controls move to the side like a landscape camera ---------- */
@media (min-width: 720px) {
  .grid { margin: 0; grid-template-columns: repeat(4, 1fr); border-radius: 6px; overflow: hidden; }
  .fields { gap: 14px; }
}
@media (min-width: 980px) {
  :root { --controls-h: 0px; }
  body { padding-inline-end: 112px; }
  .controls {
    inset-inline: auto 0; inset-block: 0; width: 112px; padding: 24px 10px;
    display: grid; grid-template-rows: 1fr auto; align-items: center;
  }
  .controls__row { grid-template-columns: 1fr; grid-template-rows: 1fr auto 1fr; justify-items: center; height: 100%; max-height: 560px; align-self: center; gap: 22px; }
  .controls__row .roll-thumb { justify-self: center; align-self: end; order: 3; }
  .controls__row .mine { justify-self: center; align-self: start; order: 1; }
  .controls__row .shutter { order: 2; width: 80px; height: 80px; margin: 0 0 18px; }
  .shutter__core { width: 64px; height: 64px; }
  .modes { position: absolute; top: 24px; inset-inline: 0; flex-direction: column; align-items: center; gap: 2px; }
  .modes a { font-size: 12.5px; padding: 6px 8px; }
  .vf { padding-bottom: 32px; padding-inline: 36px; }
  .grid { grid-template-columns: repeat(5, 1fr); }
  .sheet { margin: auto; border-radius: 22px; }
  .scrub li { padding-inline-end: 28px; }
}

@media (max-width: 719px) {
  .scrub { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -18px; padding-inline: 18px; scrollbar-width: none; }
  .scrub::before, .scrub::after { inset-inline-start: 18px; }
  .scrub::after { width: calc((var(--stage) + .5) * 72%); }
  .scrub::before { width: calc(5 * 72%); }
  .scrub li { scroll-snap-align: start; }
  .prize { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .fields { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Vote straight from the gallery ---------- */
.grid__vote {
  position: absolute; top: 6px; inset-inline-end: 6px; z-index: 1;
  display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 11px 0 9px;
  border: 0; border-radius: 999px; background: rgba(10,10,10,.62); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 12.5px; font-weight: 600; transition: background .2s, color .2s, transform .15s var(--ease);
}
.grid__vote svg { font-size: 16px; }
.grid__vote:hover, .grid__vote:focus-visible { background: var(--focus); color: var(--focus-ink); }
.grid__vote:active { transform: scale(.94); }
@media (max-width: 420px) { .grid__vote span { display: none; } .grid__vote { padding: 0; width: 36px; justify-content: center; } }

.quick .sheet__body { gap: 14px; }
.quick__row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; }
.quick__thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--panel); }
.quick h2 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.quick__who { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.quick__note { margin: 0; color: #d4d4cf; font-size: .92rem; }

.toast {
  position: fixed; inset-inline: 16px; bottom: calc(var(--controls-h) + var(--safe-b) + 12px); z-index: 60;
  margin: 0 auto; max-width: 420px; padding: 12px 16px; border-radius: 12px;
  background: var(--focus); color: var(--focus-ink); font-weight: 500; text-align: center;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.6);
  opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .35s var(--ease); pointer-events: none;
}
.toast.is-on { opacity: 1; transform: none; }

.vf__logo { max-height: 34px; width: auto; }
