@font-face { font-family: "Michroma"; src: url(/static/fonts/michroma-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(/static/fonts/barlow-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(/static/fonts/barlow-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(/static/fonts/barlow-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(/static/fonts/barlow-condensed-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(/static/fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; }
/* Layout: the night-sky stage leads; a control console and the roster of portraits sit beneath it. Single dark look by design. */
:root {
  color-scheme: dark;
  --night: #05080f;
  --panel: #0c1422;
  --panel-2: #111c2e;
  --line: #22324b;
  --ink: #dbe7f5;
  --muted: #8296b1;
  --holo: #8fdcec;
  --gold: #d9b86a;
  --gold-ink: #1a1305;
  --danger: #ff9d8a;
  --display: "Michroma", "Eurostile Extended", "Arial Black", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --label: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
}
[hidden] { display: none !important; }
html { background: var(--night); }
body { background: var(--night); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; }
.page {
  max-width: 1080px; margin: 0 auto; padding-block: 28px 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 24px;
}
header { display: flex; flex-direction: column; gap: 6px; }
h1 { font-family: var(--display); font-weight: 400; font-size: clamp(1.25rem, 3.4vw, 1.9rem); letter-spacing: .08em; text-transform: uppercase; margin: 0; text-wrap: balance; }
header p { margin: 0; color: var(--muted); max-width: 62ch; }
h2 { font-family: var(--label); font-weight: 600; font-size: .95rem; letter-spacing: .2em; text-transform: uppercase; color: var(--holo); margin: 0; }

.stage { position: relative; background: #000; aspect-ratio: 16 / 9; max-width: 100%; border: 1px solid var(--line); overflow: hidden; }
.stage canvas { display: block; width: 100%; height: 100%; }
.stage:fullscreen { aspect-ratio: auto; border: 0; width: 100vw; height: 100vh; }
.stage-tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 8px; }
.stage-play {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  background: rgba(5, 8, 15, .55); border-color: var(--holo); color: var(--holo);
  padding: 14px 26px; font-size: 1.05rem; letter-spacing: .2em; backdrop-filter: blur(2px);
}
.stage-play:hover { background: rgba(20, 40, 60, .7); }
.stage-play:disabled { opacity: .7; }
.stage:fullscreen .stage-play { font-size: 1.3rem; padding: 18px 34px; }
.stage:fullscreen.playing { cursor: none; }
.stage:fullscreen.playing .stage-tools { opacity: 0; transition: opacity .4s; }
.stage:fullscreen.playing:hover .stage-tools, .stage:fullscreen .stage-tools:focus-within { opacity: 1; }
#caption { position: absolute; left: 12px; bottom: 8px; margin: 0; font-family: var(--label); letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; color: var(--muted); }
@media (max-width: 640px) { .stage { aspect-ratio: 4 / 5; } }

button, .btn {
  font: 600 .95rem var(--label); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); background: var(--panel-2); border: 1px solid var(--line);
  padding: 10px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
button:hover, .btn:hover { border-color: var(--holo); }
button:focus-visible, .btn:focus-within, input:focus-visible, select:focus-visible { outline: 2px solid var(--holo); outline-offset: 2px; }
button.primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); padding: 13px 24px; font-size: 1.05rem; }
button.primary:hover { filter: brightness(1.1); }
button.ghost { background: rgba(5, 8, 15, .6); padding: 6px 10px; font-size: .78rem; }
button.small { padding: 6px 9px; font-size: .8rem; }
button:disabled { opacity: .35; cursor: default; }
.btn input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.btn { position: relative; }

.console { background: var(--panel); border: 1px solid var(--line); padding: 16px; display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span, .field > label { font: 500 .78rem var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
select, input[type=text] { font: 400 1rem var(--body); color: var(--ink); background: var(--night); border: 1px solid var(--line); padding: 9px 10px; min-width: 0; max-width: 100%; }
input[type=range] { accent-color: var(--holo); width: 170px; max-width: 100%; }
.note { margin: 0; color: var(--muted); font-size: .9rem; flex-basis: 100%; }
.note.warn { color: var(--danger); }

.roster { display: flex; flex-direction: column; gap: 14px; }
.roster-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.roster-actions { display: flex; flex-wrap: wrap; gap: 10px; }
#list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
#list li { display: grid; grid-template-columns: 84px 1fr; gap: 12px; background: var(--panel); border: 1px solid var(--line); padding: 10px; min-width: 0; }
#list img { width: 84px; height: 84px; object-fit: cover; display: block; filter: grayscale(.35); }
.card-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-row .spacer { flex: 1; }
.tag { font: 500 .72rem var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.empty { color: var(--muted); border: 1px dashed var(--line); padding: 22px; margin: 0; }

#camPanel { background: var(--panel); border: 1px solid var(--line); padding: 14px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
#camVideo { width: 220px; max-width: 100%; aspect-ratio: 1; object-fit: cover; background: #000; transform: scaleX(-1); }
.cam-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1 1 200px; }
.cam-side p { margin: 0; color: var(--muted); }

/* pages around the stage: sign-in, ceremony list, consent */
.page.narrow { max-width: 560px; }
.bar { flex-direction: row; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.bar > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 280px; }
a { color: var(--holo); }
a.btn { text-decoration: none; }
.stack { flex-direction: column; align-items: stretch; gap: 12px; }
.stack p { margin: 0; }
.stack .card-row input[type=text] { flex: 1 1 220px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cards li { background: var(--panel); border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card-title { font-family: var(--display); font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.card-title:hover { color: var(--holo); }
.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.roster-actions input[type=text] { flex: 1 1 200px; }

/* thumbnail doubles as the add/change-photo control */
.thumb { position: relative; display: block; width: 84px; height: 84px; cursor: pointer; }
.thumb input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.thumb-cap { position: absolute; inset: auto 0 0 0; padding: 3px 2px; text-align: center; font: 600 .68rem var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); background: rgba(5, 8, 15, .78); opacity: 0; transition: opacity .15s; }
.thumb:hover .thumb-cap, .thumb:focus-within .thumb-cap, .thumb.no-photo .thumb-cap { opacity: 1; }
.thumb:focus-within { outline: 2px solid var(--holo); outline-offset: 2px; }
@media (hover: none) { .thumb-cap { opacity: 1; } }
