:root {
  color-scheme: light;
  --wall: #e6e6e3;
  --signal: #f2c200;
  --ink: #1c1a17;
  --paper: #fff;
  --muted: #5d5a54;
  --rule: #d4d2cc;
  --display: "DIN Condensed", "Bahnschrift", "Arial Narrow", "Helvetica Neue", sans-serif;
  font: 16px/1.6 "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--wall);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
p, h1, h2, dl, dd { margin: 0; }
a { color: var(--ink); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
code { font: .9em "SF Mono", ui-monospace, Menlo, Consolas, monospace; }

.site { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; max-width: 74rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 3rem); }
.site-header, .site-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; flex-wrap: wrap; }
.site-header { min-height: 4.5rem; }
.site-footer { margin-top: auto; min-height: 4rem; padding-block: 1rem; color: var(--muted); font-size: .875rem; }
.site-footer a { color: inherit; }
.brand { font: 700 1.6rem/1 var(--display); font-stretch: condensed; letter-spacing: .01em; text-decoration: none; }
.header-tools { display: flex; align-items: center; gap: 1.25rem; font-size: .875rem; color: var(--muted); }
.text-button { min-height: 2.75rem; padding: 0; border: 0; background: none; color: var(--ink); }
.text-button:hover { text-decoration: underline; }

/* Home: the poster */
.poster {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 24.5rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  margin-block: clamp(.5rem, 3vh, 2rem) clamp(2rem, 6vh, 4rem);
  padding: clamp(2rem, 4.5vw, 3.75rem);
  background: var(--signal);
  border-radius: 4px;
}
.poster-art { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.poster-art h1 { display: flex; flex: 1; flex-direction: column; }
.display {
  display: block;
  margin-bottom: 2.5rem;
  font: 700 clamp(7rem, 17vw, 15.5rem)/.8 var(--display);
  font-stretch: condensed;
  letter-spacing: -.01em;
  margin-left: -.04em;
}
.poster-title { display: block; margin-top: auto; padding-top: 1rem; border-top: 6px solid var(--ink); font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800; line-height: 1.25; }
.poster-note { max-width: 22em; font-size: 1.0625rem; font-weight: 500; }

.card { min-width: 0; align-self: center; padding: clamp(1.5rem, 3vw, 2.25rem); background: var(--paper); border: 2px solid var(--ink); border-radius: 4px; }
.card h1, .card h2 { font-size: 1.6rem; font-weight: 800; line-height: 1.25; }
.intro { margin-top: .35rem; margin-bottom: 1.5rem; color: var(--muted); font-size: .9375rem; }

.identity { margin-block: 1.25rem 1.5rem; border-top: 2px solid var(--ink); }
.identity div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .65rem; border-bottom: 1px solid var(--rule); }
.identity dt { color: var(--muted); }
.identity dd { font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: right; }
.admin { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: .9375rem; font-weight: 600; }

/* Forms */
.stack { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-size: .9375rem; font-weight: 700; }
.field input:not([type=file]), .field select { width: 100%; min-height: 3rem; padding: .6rem .8rem; border: 1.5px solid #8f8b83; border-radius: 3px; color: var(--ink); background: var(--paper); }
.field input:not([type=file]):focus-visible, .field select:focus-visible { outline-offset: 0; border-color: var(--ink); }
.field-help { color: var(--muted); font-size: .875rem; }
.password-field { position: relative; }
.password-field input { padding-inline-end: 3.25rem; }
.password-toggle { position: absolute; inset: 2px 2px 2px auto; width: 3rem; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); }
.password-toggle:hover { color: var(--ink); }
.eye { position: relative; width: 1.2rem; height: .8rem; border: 1.6px solid currentColor; border-radius: 75% 25%; transform: rotate(35deg); }
.eye::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: .32rem; height: .32rem; border-radius: 50%; background: currentColor; transform: translate(-50%, -50%); }
.password-toggle[aria-pressed="true"] .eye::before { content: ""; position: absolute; top: 42%; left: -.2rem; right: -.2rem; height: 1.6px; background: currentColor; }

.primary, .secondary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 3.1rem; padding: .6rem 1.25rem; border: 2px solid var(--ink); border-radius: 3px; font-weight: 700; text-decoration: none; }
.primary { color: var(--signal); background: var(--ink); }
.primary:hover { background: #000; }
.primary:disabled { cursor: progress; opacity: .6; }
.secondary { color: var(--ink); background: var(--paper); }
.secondary:hover { background: var(--signal); }

.qr-start { margin-top: .75rem; }
.qr { display: block; margin: 0 auto 1.25rem; image-rendering: pixelated; }

.help { margin-top: 1rem; color: var(--muted); font-size: .875rem; }
.help a { white-space: nowrap; color: var(--ink); }
.notice, .pending { padding: .65rem .85rem; border-left: 4px solid; font-size: .9375rem; }
.notice { margin-bottom: 1.25rem; }
.notice.error { color: #8f1c1c; background: #fbe9e7; }
.notice.success { color: #1e5631; background: #e5f2e8; }
.pending { margin-bottom: 1rem; color: var(--ink); background: #fdf3c4; }

.demo-accounts { margin-top: 1.25rem; padding-top: .25rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .875rem; }
.demo-accounts summary { cursor: pointer; min-height: 2.75rem; display: flex; align-items: center; }
.demo-accounts dl { max-width: 16rem; padding-bottom: .25rem; }
.demo-accounts dl div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .15rem; }

/* Roster and error pages */
.narrow { width: 100%; max-width: 36rem; margin: clamp(1rem, 5vh, 3.5rem) auto clamp(2rem, 6vh, 4rem); }
.narrow .intro { margin-bottom: 1.75rem; }
.back-link { display: inline-flex; align-items: center; min-height: 2.75rem; margin-bottom: .5rem; font-size: .9375rem; }
.counts { display: grid; grid-template-columns: 1fr 1fr; margin-block: 1.25rem 1.75rem; background: var(--signal); }
.counts div { padding: .75rem 1rem .6rem; }
.counts div + div { border-left: 2px solid var(--ink); }
.counts dt { font-size: .875rem; font-weight: 600; }
.counts dd { font: 700 3.25rem/1 var(--display); font-stretch: condensed; font-variant-numeric: tabular-nums; }
.card h2 { margin-block: 1.75rem .85rem; font-size: 1.125rem; }
.card .counts { margin-block: 1.25rem 1rem; }
.roster-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); font-variant-numeric: tabular-nums; }
.roster-table th { padding: .5rem .25rem; color: var(--muted); font-size: .875rem; font-weight: 600; text-align: left; }
.roster-table td { padding: .2rem .25rem; border-top: 1px solid var(--rule); }
.roster-table td:last-child { text-align: right; white-space: nowrap; }
.roster-table form { display: inline; }
.tag { color: var(--muted); font-size: .875rem; }
.danger { color: #8f1c1c; font-weight: 700; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
input[type=file] { width: 100%; padding: .5rem; border: 1.5px dashed #8f8b83; border-radius: 3px; color: var(--muted); font-size: .9375rem; }
input[type=file]::file-selector-button { margin-right: .75rem; padding: .35rem .8rem; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; }
.confirm { display: flex; align-items: start; gap: .65rem; }
.confirm input { flex: none; width: 1.1rem; height: 1.1rem; margin: .3rem 0 0; accent-color: var(--ink); }
.confirm label { font-weight: 700; cursor: pointer; }
.confirm span { display: block; color: var(--muted); font-size: .875rem; font-weight: 400; }

@media (max-width: 52rem) {
  .poster { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; padding: 1.5rem 1.25rem 1.25rem; }
  .display { margin-bottom: 1.25rem; font-size: clamp(5rem, 30vw, 9rem); }
  .poster-title { padding-top: .75rem; border-top-width: 4px; font-size: 1.5rem; }
  .site-header { min-height: 3.75rem; }
}
