/* Crowned: plum ink and award-gold. Bodoni Moda for headlines, Cinzel for the
   engraved plaque labels, Public Sans for everything people read or tap. */
:root {
  --bg: #F6F4FA;
  --surface: #FFFFFF;
  --sunken: #EFEBF6;
  --ink: #1D1630;
  --muted: #5F5775;
  --rule: #DCD5EA;
  --gold: #946509;
  --gold-soft: #F4E8C8;
  --velvet: #5B2A86;
  --velvet-ink: #FFFFFF;
  --velvet-soft: #EEE6F7;
  --good: #1F7A4D;
  --good-soft: #DDF1E6;
  --bad: #A3322A;
  --bad-soft: #F7E0DD;
  --display: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --engraved: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #140F22; --surface: #1D1631; --sunken: #181229; --ink: #EEEAF7; --muted: #A99FC2; --rule: #322A4C;
    --gold: #E2B24A; --gold-soft: #3A2E14; --velvet: #C39BEB; --velvet-ink: #1A1029; --velvet-soft: #281E3E;
    --good: #5CC48E; --good-soft: #15321F; --bad: #F08A80; --bad-soft: #3A1A18;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #140F22; --surface: #1D1631; --sunken: #181229; --ink: #EEEAF7; --muted: #A99FC2; --rule: #322A4C;
  --gold: #E2B24A; --gold-soft: #3A2E14; --velvet: #C39BEB; --velvet-ink: #1A1029; --velvet-soft: #281E3E;
  --good: #5CC48E; --good-soft: #15321F; --bad: #F08A80; --bad-soft: #3A1A18;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--velvet); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding-block: 20px 72px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.page.narrow { max-width: 640px; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); min-width: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 12px); }
.spread { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

/* Header */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 8px 28px; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 26px; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.wordmark svg { width: 26px; height: 20px; color: var(--gold); }

/* Type */
.eyebrow { font-family: var(--engraved); font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.display { font-family: var(--display); font-weight: 600; line-height: 1.05; letter-spacing: -.01em; }
h1.display { font-size: clamp(36px, 7vw, 60px); }
h2.display { font-size: clamp(26px, 4vw, 34px); }
h3 { font-size: 17px; font-weight: 600; }
.lede { font-size: 19px; color: var(--muted); max-width: 46ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* Buttons and inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--rule); border-radius: 8px;
  background: var(--surface); color: var(--ink);
  font: 600 15px/1.2 var(--body); text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--velvet); border-color: var(--velvet); color: var(--velvet-ink); }
.btn-primary:hover { border-color: var(--velvet); filter: brightness(1.08); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--velvet); padding-inline: 8px; }
.btn-quiet:hover { border-color: transparent; text-decoration: underline; }
.btn-big { min-height: 52px; font-size: 17px; padding-inline: 24px; }
.btn-block { width: 100%; }

label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
input[type=text], input[type=search], textarea, select {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--rule); border-radius: 8px;
  background: var(--surface); color: var(--ink);
  font: 400 16px/1.4 var(--body);
}
textarea { resize: vertical; min-height: 96px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
.hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }

/* Panels: used on the organizer dashboard, where sections are separate tools */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--sunken); color: var(--muted); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--gold-soft); color: var(--gold); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.velvet { background: var(--velvet-soft); color: var(--velvet); }

/* Lists with actions */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); min-width: 0; }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.icon-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; flex: none; }
.icon-btn:hover { border-color: var(--rule); color: var(--bad); }
.empty { color: var(--muted); font-size: 14px; padding: 6px 0; }

/* Toast */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  max-width: min(520px, calc(100% - 32px));
  background: var(--ink); color: var(--bg);
  padding: 12px 16px; border-radius: 8px; font-size: 15px; font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,.25); z-index: 50;
}
.toast.error { background: var(--bad); color: #fff; }

/* Plaque: the certificate-style double rule used for award moments */
.plaque {
  background: var(--surface); border: 1px solid var(--gold);
  outline: 1px solid var(--gold); outline-offset: -8px;
  padding: 28px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0;
}
.plaque .award { font-family: var(--display); font-style: italic; font-size: 21px; line-height: 1.25; }
.plaque .winner { font-family: var(--engraved); font-weight: 600; font-size: 26px; letter-spacing: .06em; color: var(--gold); overflow-wrap: anywhere; }
.plaque .meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.plaque .reason { font-size: 15px; font-style: italic; }
.plaque .blurb { font-size: 15px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 10px; max-width: 42ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
