
:root {
  color-scheme: dark;
  font: 100%/1.5 system-ui, sans-serif;
  color: #f1f6f5;
  background: #101719;
  --panel: #172326;
  --line: #354a4e;
  --muted: #b2c4c6;
  --accent: #bbea9c;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.masthead { background: #131e20; border-bottom: 1px solid var(--line); }
.masthead-inner {
  max-width: 72rem;
  margin: auto;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}
.brand { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; font-weight: 700; }
.brand > span:last-child { color: var(--muted); font-weight: 500; }
.brand-mark { width: 0.75rem; height: 0.75rem; border: 2px solid var(--accent); border-radius: 0.22rem; }
main { max-width: 72rem; margin: auto; padding: clamp(1rem, 4vw, 2.5rem); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 4vw, 2rem); }
.panel + .panel { margin-top: 1rem; }
.signin { max-width: 32rem; margin: clamp(0rem, 5vw, 3rem) auto 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.6rem, 5vw, 2rem); line-height: 1.15; }
h2 { font-size: 1.125rem; line-height: 1.3; }
h3 { font-size: 1rem; }
.intro { color: var(--muted); margin: 0.55rem 0 1.25rem; }
.intro:empty { display: none; }
.notice { max-width: 32rem; margin: 0 auto 1.25rem; color: var(--muted); }
.notice:empty { display: none; }
.notice[data-error] { color: #ffc0a9; }
.intro[data-error] { color: #ffc0a9; }
form { display: grid; gap: 0.7rem; margin-top: 1.6rem; padding-top: 1.45rem; border-top: 1px solid var(--line); }
label { color: var(--muted); font-size: 0.9rem; }
button, input, select { min-height: 2.75rem; max-width: 100%; font: inherit; border-radius: 0.55rem; }
input, select { background: #101719; color: inherit; border: 1px solid var(--line); padding: 0.55rem 0.65rem; width: 100%; }
button { padding: 0.55rem 0.85rem; border: 1px solid transparent; font-weight: 700; color: #152511; background: var(--accent); cursor: pointer; }
button.secondary { border-color: var(--line); color: inherit; background: #202e31; }
button:disabled { opacity: 0.62; cursor: wait; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.account-details { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); margin: 1.5rem 0 0; }
dt { color: var(--muted); font-size: 0.9rem; }
dd { margin: 0.25rem 0 0; overflow-wrap: anywhere; }
.roles { display: flex; gap: 0.35rem; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.roles li { border: 1px solid var(--line); padding: 0.15rem 0.55rem; border-radius: 0.45rem; font-size: 0.9rem; }
.events { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.events li { display: grid; gap: 0.25rem; grid-template-columns: minmax(0, 1fr) max-content; padding: 0.65rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.events small, .events time { color: var(--muted); font-size: 0.85rem; }
.events small { grid-column: 1 / -1; }
.section-heading { display: flex; gap: 0.8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.tournament-fields { min-width: 0; margin: 0; border: 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.tournament-fields > div { min-width: 0; }
.tournament-fields label { display: block; margin-bottom: 0.25rem; }
.tournament-fields .title-field { grid-column: 1 / -1; }
#publish-tournament .intro { margin: 0; font-size: 0.9rem; }
#publish-button { justify-self: start; }
@media (max-width: 28rem) { .events li { grid-template-columns: minmax(0, 1fr); } }
@media (forced-colors: active) { button, button.secondary, input, select { border: 1px solid ButtonText; } }
