*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 400 16px/1.5 var(--f-body);
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 0% 0%, var(--glow-b), transparent 70%),
    radial-gradient(800px 700px at 100% 100%, var(--glow-a), transparent 70%),
    var(--paper);
  /* One screen, always: the page itself never scrolls. */
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows: var(--top-h) minmax(0, 1fr) var(--rail-h);
  grid-template-columns: minmax(0, 1fr);
  -webkit-font-smoothing: antialiased;
}
/* Faint printer's marks tile, fading out from the bottom-right corner. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--ink);
  opacity: .07;
  -webkit-mask: url(/pattern.svg) 0 0 / 120px 120px repeat, radial-gradient(70% 80% at 100% 100%, #000 10%, transparent 75%);
  -webkit-mask-composite: source-in;
  mask: url(/pattern.svg) 0 0 / 120px 120px repeat, radial-gradient(70% 80% at 100% 100%, #000 10%, transparent 75%);
  mask-composite: intersect;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .35; }
h1, h2, h3 { font-family: var(--f-head); margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mono { font-family: var(--f-mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 90; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: var(--r); }
.skip:focus { top: 10px; }
kbd { font: 600 11px var(--f-mono); border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 3px; padding: 0 5px; color: var(--ink-3); }

/* Crop marks: eight hairlines just outside the four corners of any .crop sheet. */
.crop { position: relative; }
.crop::before {
  content: '';
  position: absolute;
  inset: -11px;
  pointer-events: none;
  --m: linear-gradient(var(--mark), var(--mark));
  background:
    var(--m) left 0 top 11px / 7px 1px no-repeat, var(--m) left 11px top 0 / 1px 7px no-repeat,
    var(--m) right 0 top 11px / 7px 1px no-repeat, var(--m) right 11px top 0 / 1px 7px no-repeat,
    var(--m) left 0 bottom 11px / 7px 1px no-repeat, var(--m) left 11px bottom 0 / 1px 7px no-repeat,
    var(--m) right 0 bottom 11px / 7px 1px no-repeat, var(--m) right 11px bottom 0 / 1px 7px no-repeat;
}

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 1.5px solid var(--ink); border-radius: var(--r); background: transparent; font-weight: 650; text-decoration: none; transition: background .15s, color .15s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-brand:hover { background: var(--ink); border-color: var(--ink); }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--rule); border-radius: 50%; background: var(--card); transition: border-color .15s, background .15s; }
.icon-btn:not(:disabled):hover { border-color: var(--ink); }
.link-btn { border: 0; background: none; padding: 0; color: var(--brand); text-decoration: underline; }
.field { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--card); }
.field:focus { outline: none; border-color: var(--ink); }
textarea.field { resize: vertical; line-height: 1.5; }
.lbl { display: block; margin: 14px 0 5px; font: 600 12px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.check { display: flex; gap: 8px; align-items: center; margin: 12px 0; }
.alert { padding: 10px 12px; border-left: 3px solid var(--brand); background: var(--sheet); margin: 12px 0; }

.toast { background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r); font: 600 13px var(--f-mono); animation: fade .25s ease; }
#toasts { position: fixed; left: 50%; bottom: calc(var(--rail-h) + 14px); transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; }

@keyframes fade { from { opacity: 0; } }
@keyframes turn-f { from { opacity: 0; transform: translateX(40px); } }
@keyframes turn-b { from { opacity: 0; transform: translateX(-40px); } }
#stage.turn-fwd > * { animation: turn-f .42s var(--ease) both; }
#stage.turn-back > * { animation: turn-b .42s var(--ease) both; }
#stage.turn-none > * { animation: fade .3s ease both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Staff pages are ordinary scrolling documents. */
body.staff { height: auto; min-height: 100dvh; overflow: auto; grid-template-rows: var(--top-h) auto 0; }
body.staff #rail { display: none; }
body.staff #stage { overflow: visible; padding-bottom: 60px; }
