:root {
  --ink: #16181d;
  --ink-soft: #565b66;
  --paper: #ffffff;
  --paper-soft: #f3f4f6;
  --line: #e2e4e9;
  --accent: #d4202f;
  --accent-ink: #ffffff;
  --ok: #157f3d;
  --bad: #b42318;
  --shade: rgba(10, 11, 14, .62);
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: #1c1e24;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}
button, input, select { font: inherit; }
a { color: inherit; }

/* The show's background sits behind everything, fixed, so the photos scroll over it. */
.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background-color: var(--page, #16181d);
  background-image: radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 70%);
  background-size: cover; background-position: center;
}
.backdrop.pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.55)); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 16px; }
.card {
  background: var(--paper); border-radius: var(--radius); padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.top { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0 14px; }
.logo { display: block; max-width: min(260px, 70vw); max-height: 96px; object-fit: contain; }
.top .brand { margin: 0; }
.welcome { margin: 10px 0 0; font-size: 16px; color: var(--ink); }
.brand { color: var(--on-page, #fff); font-weight: 700; letter-spacing: .02em; font-size: 15px; opacity: .92; margin: 4px 2px 14px; }
h1 { font-size: 24px; line-height: 1.2; margin: 0 0 4px; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-weight: 650; text-decoration: none;
}
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: var(--paper-soft); color: var(--ink); }
.btn.quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--bad); }
.btn.block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* --- enter your code --- */
.entry { max-width: 440px; margin: 4vh auto 0; }
.entry label { display: block; font-weight: 600; margin: 18px 0 6px; }
.code-input {
  width: 100%; height: 56px; border: 2px solid var(--line); border-radius: 12px; padding: 0 14px;
  font-size: 22px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
}
.code-input:focus { outline: none; border-color: var(--ink); }
.entry .btn { margin-top: 14px; }
.msg { margin-top: 12px; font-size: 15px; min-height: 1.4em; }
.msg.bad { color: var(--bad); }

/* --- the gallery --- */
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; justify-content: space-between; margin-bottom: 14px; }
.head .code { font-weight: 700; letter-spacing: .06em; }
.head .actions { display: flex; gap: 10px; flex-wrap: wrap; width: 100%; }
.head .actions .btn { flex: 1 1 auto; }
@media (min-width: 720px) {
  .head .actions { width: auto; }
  .head .actions .btn { flex: none; }
}

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; } }
.tile {
  position: relative; display: block; padding: 0; border: 0; cursor: pointer; overflow: hidden;
  border-radius: 10px; background: rgba(255,255,255,.12); aspect-ratio: 4 / 5;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .dl {
  position: absolute; right: 6px; bottom: 6px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; text-decoration: none;
}
.tile .dl svg { width: 20px; height: 20px; }
.empty { color: var(--on-page, #fff); text-align: center; padding: 40px 10px; }
.foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
#footer { margin-top: 4px; }
#footer:empty { display: none; }
.foot { color: var(--on-page, #fff); opacity: .8; text-align: center; font-size: 13px; padding: 28px 0 10px; }

/* --- full-screen viewer --- */
.viewer { position: fixed; inset: 0; z-index: 10; background: #000; display: none; flex-direction: column; }
.viewer.open { display: flex; }
.viewer .bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; color: #fff; }
.viewer .stage { flex: 1; position: relative; display: grid; place-items: center; overflow: hidden; touch-action: pan-y; }
.viewer .stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.viewer .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.14); color: #fff; display: none; place-items: center; cursor: pointer; }
.viewer .nav svg { width: 24px; height: 24px; }
.viewer .prev { left: 12px; } .viewer .next { right: 12px; }
@media (hover: hover) { .viewer .nav { display: grid; } }
.viewer .bottom { padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
.iconbtn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.iconbtn svg { width: 22px; height: 22px; }

.purchase { margin-top: 14px; }
