:root {
  color-scheme: light;
  --ink: #201b1b;
  --muted: #625656;
  --line: #e6dada;
  --paper: #f8f5f4;
  --white: #fff;
  --accent: #a8131a;
  --deep: #21191b;
  --shadow: 0 10px 30px rgba(55, 23, 25, .055);
  color: var(--ink);
  background: var(--paper);
  font: 100%/1.5 'Inter', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
a { color: var(--accent); }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #bd252e; outline-offset: 4px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 3.35rem); line-height: 1.02; letter-spacing: -.055em; font-weight: 760; overflow-wrap: anywhere; }
h2 { font-size: 1.2rem; font-weight: 720; line-height: 1.25; letter-spacing: -.025em; overflow-wrap: anywhere; }
p + p { margin-top: .7rem; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 5; top: 1rem; left: 1rem; padding: .6rem; background: white; }
.brand { display: block; flex: none; color: inherit; }
.brand-logo { display: block; width: clamp(7.75rem, 18vw, 11rem); height: auto; }

.workspace { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; gap: 2.9rem; padding: 2rem 1.2rem; background: var(--deep); color: #fff7f7; }
.sidebar nav { display: grid; gap: .35rem; }
.sidebar nav a { display: flex; align-items: center; gap: .8rem; color: #f3dfdf; text-decoration: none; border-radius: .64rem; padding: .68rem .85rem; min-height: 44px; font-size: .92rem; }
.sidebar nav [aria-current], .sidebar nav a:hover { background: #4b272d; color: #fff; }
.sidebar nav [aria-current] { font-weight: 700; box-shadow: inset 3px 0 #ff9e9f; }
.sidebar nav svg { width: 1.2rem; height: 1.2rem; }
.sidebar-end { margin-top: auto; border-top: 1px solid #5e4145; padding: 1rem .75rem 0; display: grid; gap: .64rem; font-size: .88rem; }
.sidebar-end a, .plain { color: #f3dfdf; }
.plain { border: 0; background: none; padding: 0; text-decoration: underline; }
.sidebar :focus-visible { outline-color: #ff9e9f; }
.main { width: 100%; min-width: 0; }
.admin { max-width: 1500px; padding: clamp(1.5rem, 4.6vw, 4.25rem); padding-top: 1.65rem; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: .64rem 1rem; min-height: 44px; border: 1px solid transparent; border-radius: .55rem; text-decoration: none; font-weight: 680; line-height: 1.3; text-align: center; }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: #840e14; }
.button.secondary { background: #fff; border-color: #decbcc; color: #752328; }
.button.secondary:hover { background: #fbefef; }
.stat-grid, .discipline-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.stat-grid { margin-bottom: 1.5rem; }
.stat { min-height: 7rem; padding: 1.1rem 1.3rem; border: 1px solid var(--line); border-radius: .8rem; background: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: .5rem; }
.stat.review { background: #fcf0e4; border-color: #f0dec9; }
.stat.approved { background: #f7e5e6; border-color: #efccce; }
.stat span { color: #503a3b; font-weight: 650; font-size: .93rem; }
.stat strong { font-size: 2.3rem; font-weight: 750; letter-spacing: -.06em; line-height: 1; }
.panel { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: .85rem; padding: clamp(1rem, 2.25vw, 1.65rem); box-shadow: var(--shadow); }
.panel + .panel { margin-top: 1rem; }
.panel > h2 + p, .panel > h2 + ul { margin-top: .8rem; }
.panel > h2 + form { margin-top: 1rem; }
.compact { max-width: 46rem; }
.form { display: grid; gap: 1rem; }
.field-grid, .people-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.class-selection { min-width: 0; margin: 0; padding: .75rem; border: 1px solid var(--line); border-radius: .5rem; }
.class-selection legend { font-weight: 650; padding-inline: .25rem; }
.class-selection .panel { padding: .75rem; }
.class-selection .class-list { margin-bottom: 0; }
.class-selection .check span { overflow-wrap: anywhere; }
.people-grid { margin: 1rem 0; }
.people-grid .panel + .panel, .discipline-grid .panel + .panel, .form-layout .panel + .panel { margin-top: 0; }
.field { display: grid; min-width: 0; align-content: start; gap: .35rem; font-size: .91rem; color: #513f40; font-weight: 640; }
.field input, .field select, .search input, .read-only { min-height: 44px; width: 100%; min-width: 0; padding: .56rem .72rem; border: 1px solid #cdbec0; border-radius: .5rem; background: #fff; color: var(--ink); font-weight: 460; font-size: 1rem; }
.field select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, #70585a 50%), linear-gradient(135deg, #70585a 50%, transparent 50%); background-position: calc(100% - 16px) 54%, calc(100% - 11px) 54%; background-size: 5px 5px; background-repeat: no-repeat; }
.read-only { background: #f8f5f4; overflow-wrap: anywhere; }
.check { display: flex; gap: .55rem; align-items: start; font-weight: 550; }
.check input { accent-color: var(--accent); width: 1.12rem; height: 1.12rem; flex: none; margin-top: .19rem; }
.form-actions, .hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.form-actions { margin-top: .25rem; }
.hint { color: var(--muted); font-size: .89rem; margin-top: .38rem; }
.notice { padding: .75rem .9rem; margin-bottom: 1rem; border-radius: .55rem; border: 1px solid var(--line); background: #f7eeee; }
.notice.success { background: #f8e6e6; border-color: #efd0d0; }
.notice.error { background: #fff0ed; border-color: #dfaca4; color: #7f2920; }
.empty { padding: 2rem 1rem; border: 1px dashed #decfcf; border-radius: .55rem; text-align: center; color: var(--muted); }
.table-head, .detail-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.search { max-width: 16rem; }
.search input { font-size: .9rem; }
.table-scroll { overflow: auto; }
.plan-phase + .plan-phase { margin-top: 1.6rem; }
.plan-phase > h2, .rankings h2 { margin-bottom: .7rem; }
.draw-counts { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1rem 0; }
.draw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .9rem; margin: 1rem 0; }
.draw-grid.rankings { grid-template-columns: repeat(auto-fit, minmax(min(100%, 29rem), 1fr)); }
.draw-grid .panel { margin: 0; }
.draw-actions { display: flex; gap: .65rem; flex-wrap: wrap; align-items: baseline; }
.draw-release .form { margin-top: .5rem; }
.notice.warning { background: #fff4e4; border-color: #e8cda2; color: #66461d; }
.panel + .notice { margin-top: 1rem; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .9rem; }
th { font-weight: 700; color: #634d4e; background: #faf3f3; white-space: nowrap; }
th, td { padding: .75rem .75rem; border-bottom: 1px solid #ede2e2; }
.table-sort { display: inline-flex; align-items: center; gap: .45rem; padding: .2rem 0; border: 0; color: inherit; background: transparent; font-weight: inherit; text-align: start; }
.table-sort:hover { text-decoration: underline; }
.table-sort-indicator::after { content: '↕'; opacity: .65; }
th[aria-sort="ascending"] .table-sort-indicator::after { content: '↑'; opacity: 1; }
th[aria-sort="descending"] .table-sort-indicator::after { content: '↓'; opacity: 1; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fcf6f6; }
.row-link { font-weight: 680; text-decoration-thickness: 1px; text-underline-offset: .19em; }
.pill { display: inline-block; padding: .22rem .62rem; border-radius: 10rem; background: #f3eeee; color: #514143; font-weight: 670; font-size: .82rem; line-height: 1.45; }
.pill.approved { background: #f5dfe0; color: #791c23; }
.pill.review, .pill.partner, .pill.email { background: #f2efd7; color: #5b502a; }
.pill.rejected, .pill.withdrawn { background: #f6e7e5; color: #713c38; }
.facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: .3rem .65rem; }
.facts dt { color: var(--muted); font-size: .88rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
details { margin-top: 1rem; }
details summary { color: var(--accent); font-weight: 680; }
details form { margin-top: .75rem; }

.public { max-width: 1160px; margin: 0 auto; padding: clamp(1rem, 3vw, 2rem); padding-top: clamp(1.6rem, 4.25vw, 3.15rem); padding-bottom: 3rem; }
.hero { border-radius: 1.1rem; padding: clamp(1.5rem, 3.6vw, 3rem); background: var(--deep); color: #fff; }
.hero > .pill + p { margin-top: .65rem; }
.hero p { color: #dedede; }
.hero-actions { margin-top: 1.6rem; }
.public-classes > h2 { margin: 1.6rem 0 .85rem; font-size: 1.65rem; }
.class-list { padding: 0; list-style: none; margin: 0; }
.class-list li { border-top: 1px solid var(--line); padding: .52rem 0; }
.class-list li a { font-weight: 640; }
.class-list small { color: var(--muted); display: block; font-size: .82rem; }
.form-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.aside-panel { background: #eee; }
.aside-panel p { color: var(--ink); }

@media (max-width: 880px) {
  .workspace { grid-template-columns: 194px minmax(0, 1fr); }
  .sidebar { padding-inline: .75rem; }
  .admin { padding-inline: 1.25rem; }
  .form-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 660px) {
  .workspace { display: block; }
  .sidebar { padding: .85rem 1rem; gap: .85rem; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: .2rem; }
  .sidebar nav a { padding: .36rem .55rem; min-height: 36px; }
  .sidebar nav svg { width: 1rem; height: 1rem; }
  .sidebar-end { display: flex; gap: 1rem; padding: .55rem .2rem 0; }
  .admin { padding: 1.15rem 1rem 2rem; }
  .table-head { align-items: start; flex-wrap: wrap; }
  .search { width: 100%; max-width: none; }
  .discipline-grid, .people-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { gap: .42rem; }
  .stat { min-height: 6.1rem; padding: .64rem; }
  .stat span { font-size: .8rem; overflow-wrap: anywhere; }
  .stat strong { font-size: 1.76rem; }
  .field-grid { grid-template-columns: minmax(0, 1fr); }
}

.field-config { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr)); gap: 1rem; margin-top: 1rem; align-items: start; }
.field-config > .panel { margin: 0; }
.field-section { margin-top: 1rem; }
.field-section .search { display: block; margin: .65rem 0; }
.field-section .table-scroll td:first-child { white-space: nowrap; }
.compact .table-scroll + .form, .compact .empty + .form { margin-top: 1rem; }

.live-action { display: inline-block; margin: 0; }
.live-buttons { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .9rem; }
.live-table .table-scroll { margin-top: .7rem; }
.live-table .table-scroll td:first-child { white-space: nowrap; }

.hall-screen {
  --hall-muted: #d2d2d2;
  --hall-surface: #292929;
  --hall-line: #626262;
  background: #171717;
  color: #fff;
  min-height: 100vh;
}
.hall-screen :focus-visible { outline-color: #fff; }
.hall-header { background: #fff; color: #171717; border-bottom: 1px solid #d8d8d8; }
.hall-header :focus-visible,
:is(.hall-screen, .office-screen) .skip:focus-visible { outline-color: #171717; }
:is(.hall-screen, .office-screen) .skip { color: #171717; }
.hall-header .button.secondary,
.hall-screen .button.secondary { border-color: #bcbcbc; color: #171717; }
.hall-header .button.secondary:hover,
.hall-screen .button.secondary:hover { background: #eee; }
.hall-header .button.secondary[aria-current="page"] { border-color: #595959; background: #eee; }
.hall-main { width: min(100%, 1560px); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 4rem); }
.hall-header-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .8rem 1.25rem; padding: .75rem; }
.hall-header nav { display: flex; flex-wrap: wrap; justify-content: end; gap: .45rem; }
.hall-header-navigation { display: flex; align-items: start; gap: .45rem; }
.page-heading h1 { font-size: clamp(1.25rem, 2.4vw, 2.5rem); line-height: 1.12; }
.page-heading p { color: #595959; font-size: .85rem; margin-top: .25rem; }
@media (max-width: 1100px) {
  .hall-header-inner { grid-template-columns: auto minmax(0, 1fr); }
  .hall-header-navigation,
  .hall-header-inner > nav { grid-column: 1 / -1; }
  .hall-header nav { justify-content: start; }
}
.hall-main { padding-block: clamp(1.4rem, 3vw, 3rem); }
.hall-section { margin-top: clamp(1.3rem, 2.7vw, 2.3rem); }
.hall-section h2 { font-size: clamp(1.4rem, 2.75vw, 2.1rem); margin-bottom: .8rem; }
.hall-ranking h3 { margin: 1rem 0 .5rem; }
.hall-ranking-state { margin: 0 0 .65rem; color: var(--hall-muted); }
.hall-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
@media (max-width: 900px) {
  .hall-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
  .hall-grid { grid-template-columns: minmax(0, 1fr); }
}
.hall-court {
  --court-line: #aaa;
  --court-surface: #202020;
  min-width: 0;
  padding: .9rem;
  background: var(--hall-surface);
  border: 2px solid var(--hall-line);
  border-radius: .65rem;
}
.hall-court.called { --hall-muted: #454545; --court-line: #555; --court-surface: #e2e2e2; background: #fff; color: #171717; border-color: #fff; }
.hall-court.running { --court-line: #eee; --court-surface: #171717; border-color: #eee; }
.hall-court.closed { --court-line: #737373; border-style: dashed; }
.hall-court-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem .8rem; }
.hall-court h3 { font-size: clamp(1.2rem, 1.65vw, 1.55rem); margin: 0; overflow-wrap: anywhere; }
.hall-court-status {
  border: 1px solid currentColor;
  border-radius: .35rem;
  padding: .24rem .55rem;
  font-size: .83rem;
  font-weight: 750;
}
.hall-court.called .hall-court-status { background: #171717; color: #fff; }
.hall-court.running .hall-court-status { background: #fff; color: #171717; }
.hall-court.closed .hall-court-status { color: var(--hall-muted); border-style: dashed; }
.hall-court-lines {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  aspect-ratio: 134 / 61;
  margin-top: .7rem;
  border: 2px solid var(--court-line);
  background-color: var(--court-surface);
  background-image: linear-gradient(90deg, transparent 0 5%, var(--court-line) 5% calc(5% + 1px), transparent calc(5% + 1px) 95%, var(--court-line) 95% calc(95% + 1px), transparent calc(95% + 1px));
}
.hall-court-lines::before {
  content: '';
  position: absolute;
  inset: 8% 0;
  border-block: 1px solid var(--court-line);
  background:
    linear-gradient(90deg, transparent calc(50% - .5px), var(--court-line) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px)) left / 71% 100% no-repeat,
    linear-gradient(90deg, transparent calc(50% - .5px), var(--court-line) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px)) right / 71% 100% no-repeat,
    linear-gradient(var(--court-line), var(--court-line)) left center / 35.5% 1px no-repeat,
    linear-gradient(var(--court-line), var(--court-line)) right center / 35.5% 1px no-repeat;
}
.hall-court-net { position: absolute; inset: -5% 50% -5% auto; border-right: 2px dashed var(--court-line); }
.hall-court-team {
  position: relative;
  display: grid;
  justify-items: center;
  gap: .35rem;
  min-width: 0;
  padding: .8rem .5rem;
  text-align: center;
}
.hall-court-team .hall-person {
  max-width: 100%;
  padding: .28rem .4rem;
  border-radius: .3rem;
  background: var(--court-surface);
  font-size: clamp(.95rem, 1.35vw, 1.3rem);
}
.hall-pair { display: grid; gap: .35rem; }
.hall-side { display: grid; gap: .25rem; }
.hall-person { display: block; }
.hall-person-name { display: block; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.hall-person-club { display: block; color: var(--hall-muted); font-size: .75em; line-height: 1.3; overflow-wrap: anywhere; }
.hall-versus { color: var(--hall-muted); font-size: .8em; }
.hall-screen td .hall-pair { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: .65rem; }
.hall-screen td .hall-versus { align-self: center; }
.hall-screen td:last-child .hall-person + .hall-person { margin-top: .25rem; }
@media (max-width: 760px) {
  .hall-screen td .hall-pair { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
}
.hall-court-meta { color: var(--hall-muted); font-size: .9rem; margin-top: .65rem; }
.hall-screen .empty { color: var(--hall-muted); border-color: var(--hall-line); padding: .9rem 1rem; text-align: left; }
.hall-screen .table-scroll { background: var(--hall-surface); border: 1px solid var(--hall-line); border-radius: .65rem; }
.hall-screen table { font-size: clamp(1rem, 1.6vw, 1.23rem); }
.hall-screen th, .hall-screen td { border-color: var(--hall-line); }
.hall-screen th { color: #fff; background: #404040; }
.hall-screen tr:hover td { background: #333; }
.hall-screen td:nth-child(4) { white-space: nowrap; }
.hall-connection { color: #171717; background: #eee; padding: .6rem .9rem; border-radius: .5rem; }

.office-screen { display: flex; flex-direction: column; min-height: 100vh; }
.office-screen .workspace,
.public-screen {
  --ink: #171717;
  --muted: #595959;
  --line: #d8d8d8;
  --paper: #f4f4f4;
  --accent: #171717;
  --deep: #171717;
  --shadow: 0 8px 24px rgb(0 0 0 / 5%);
  background: var(--paper);
  color: var(--ink);
  accent-color: var(--accent);
}
.office-screen .workspace { flex: 1; min-height: 0; }
.public-screen { min-height: 100vh; }
.office-screen .sidebar { color: #fff; }
.office-screen .sidebar nav a,
.office-screen .sidebar-end a,
.office-screen .sidebar .plain { color: #f2f2f2; }
.office-screen .sidebar nav a:hover,
.office-screen .sidebar nav [aria-current] { background: #383838; color: #fff; }
.office-screen .sidebar nav [aria-current] { box-shadow: inset 3px 0 #fff; }
.office-screen .sidebar-end { border-color: #505050; }
.office-screen .sidebar :focus-visible { outline-color: #fff; }
:is(.office-screen .admin, .public-screen) :focus-visible { outline-color: var(--ink); }
:is(.office-screen .admin, .public-screen) .button.secondary { border-color: #bcbcbc; color: var(--ink); }
.office-screen .admin .button.secondary:hover,
.office-screen .admin tr:hover td { background: #f1f1f1; }
:is(.office-screen .admin, .public-screen) .button.primary:hover,
:is(.office-screen .admin, .public-screen) .button.danger:hover { background: #383838; }
:is(.office-screen .admin, .public-screen) .button.danger { background: var(--ink); }
:is(.office-screen .admin, .public-screen) .field,
.office-screen .admin .stat span,
.office-screen .admin .csv-error,
:is(.office-screen .admin, .public-screen) .delete-control summary { color: var(--ink); }
:is(.office-screen .admin, .public-screen) :is(.field input, .field select, .search input, .read-only) { border-color: #aaa; }
:is(.office-screen .admin, .public-screen) .field select {
  background-image: linear-gradient(45deg, transparent 50%, #595959 50%), linear-gradient(135deg, #595959 50%, transparent 50%);
}
.office-screen .search:has([data-search-target="live-games"]) { width: min(100%, 24rem); max-width: none; }
:is(.office-screen .admin, .public-screen) :is(th, .notice, .pill, .read-only, .stat.review, .stat.approved) { background: #eee; color: var(--ink); }
:is(.office-screen .admin, .public-screen) .pill.approved { background: var(--ink); color: #fff; }
:is(.office-screen .admin, .public-screen) :is(.pill.review, .pill.partner, .pill.email) { background: #fff; box-shadow: inset 0 0 0 1px #777; }
:is(.office-screen .admin, .public-screen) :is(th, td, .empty, .notice) { border-color: var(--line); }
:is(.office-screen .admin, .public-screen) :is(.notice.error, .notice.warning) { border-inline-start: .25rem solid #595959; }
.public-screen .hero .button.primary { background: #fff; color: var(--deep); }
.public-screen .hero .button.primary:hover { background: #e8e8e8; }
.public-screen .hero .button.secondary { background: transparent; border-color: #8e8e8e; color: #fff; }
.public-screen .hero .button.secondary:hover { background: #383838; }
.public-screen .hero :focus-visible { outline-color: #fff; }
.office-screen #live-games .table-scroll { margin-top: .75rem; }
.office-screen #live-games td:nth-child(5) { font-weight: 650; }
.live-controls, .live-day-filter { align-items: end; }
.live-day-filter { margin: 0; }
.hall-header-controls { flex: 0 0 auto; max-inline-size: 50%; }
.hall-header-controls .field { color: #171717; }
.hall-header-controls select {
  border-color: #aaa;
  color: #171717;
  background-image: linear-gradient(45deg, transparent 50%, #595959 50%), linear-gradient(135deg, #595959 50%, transparent 50%);
}

@media (max-width: 480px) {
  .hall-header .button { font-size: .88rem; }
}

.billing-totals .stat strong { font-size: clamp(1rem, 3.3vw, 2.1rem); overflow-wrap: anywhere; }
.billing-form-panel .form, .billing-ledger .table-scroll { margin-top: .9rem; }
.billing-ledger td:nth-child(3), .billing-ledger td:nth-child(5) { min-width: 6.25rem; }
.billing-void { margin-top: 0; min-width: 10rem; }
.billing-void .form { gap: .5rem; }

.result-card .form, .result-exception .form { margin-top: .9rem; }
.result-exception summary { padding-block: .25rem; }

.csv-upload .form { margin-top: .9rem; }
.csv-help p { margin-top: .55rem; }
.csv-confirm { margin-top: .9rem; }
.csv-error { color: #8a1924; }
.csv-report .table-scroll td:first-child { white-space: nowrap; }

.csv-export-control { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; margin-top: 1.2rem; }
.csv-export-control .field { width: min(100%, 19rem); }

.delete-control summary { color: #93212b; }
.delete-control p { margin-top: .55rem; }
.delete-control .form-actions { margin-top: .65rem; }
.button.danger { background: #9c2430; color: #fff; }
.button.danger:hover { background: #7e1b26; }

.reset-form { margin-top: .9rem; }

.admin .hall-ranking-state { color: var(--muted); }
.form-actions > form { display: inline-grid; }

/* Turnierbaum */
.bracket {
  --tree-board: #f7f3ef;
  --tree-grid: #d9c9c7;
  --tree-card: #fffdfb;
  --tree-line: #e0d1cf;
  --tree-wire: #9e6670;
  --tree-wire-open: #b7959a;
  --tree-ink: #241a1b;
  --tree-muted: #655054;
  --tree-slot: #f4eeec;
  --tree-win: #f7e1e2;
  --tree-accent: #a8131a;
  min-width: 0;
  margin-block: 1.2rem;
  color: var(--tree-ink);
}
.hall-screen .bracket {
  --tree-board: #1d1d1d;
  --tree-grid: #515151;
  --tree-card: var(--hall-surface);
  --tree-line: var(--hall-line);
  --tree-wire: #e4e4e4;
  --tree-wire-open: #aaa;
  --tree-ink: #fff;
  --tree-muted: var(--hall-muted);
  --tree-slot: #383838;
  --tree-win: #515151;
  --tree-accent: #fff;
}
.office-screen .bracket {
  --tree-board: #f4f4f4;
  --tree-grid: #ccc;
  --tree-card: #fff;
  --tree-line: #ccc;
  --tree-wire: #555;
  --tree-wire-open: #888;
  --tree-ink: var(--ink);
  --tree-muted: var(--muted);
  --tree-slot: #f4f4f4;
  --tree-win: #ddd;
  --tree-accent: var(--accent);
}
.bracket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  padding: 1rem 1.25rem;
  background: var(--tree-card);
  border: 1px solid var(--tree-line);
  border-inline-start: .25rem solid var(--tree-accent);
  border-radius: .65rem;
}
.bracket-header h2 { font-size: clamp(1.28rem, 2vw, 1.77rem); }
.bracket-header p { color: var(--tree-muted); margin-top: .3rem; }
.bracket-toolbar, .bracket-classes, .bracket-jumps, .bracket-zoom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
}
.bracket-toolbar { justify-content: space-between; gap: .6rem 1rem; margin-block: 1rem .55rem; }
.bracket-classes { margin-block: 1rem; }
.bracket-classes [aria-current="page"] { background: #a8131a; border-color: #a8131a; color: #fff; }
.bracket-classes [aria-current="page"]:hover { background: #861019; color: #fff; }
.hall-screen .bracket-classes [aria-current="page"],
.hall-screen .bracket-classes [aria-current="page"]:hover { background: #171717; border-color: #fff; color: #fff; }
.office-screen .bracket-classes [aria-current="page"],
.office-screen .bracket-classes [aria-current="page"]:hover { background: var(--tree-accent); border-color: var(--tree-accent); color: #fff; }
.bracket-control {
  min-block-size: 2.75rem;
  padding: .35rem .7rem;
  border: 1px solid var(--tree-line);
  border-radius: .42rem;
  background: var(--tree-card);
  color: var(--tree-ink);
  font: inherit;
  font-size: .84rem;
  font-weight: 650;
}
.bracket-control:hover { border-color: var(--tree-accent); }
.bracket-control:disabled { cursor: default; opacity: .55; }
.bracket-zoom .bracket-control { min-inline-size: 2.75rem; font-variant-numeric: tabular-nums; }
.bracket-window {
  margin-top: .65rem;
  max-block-size: min(73vh, 52rem);
  overflow: auto;
  border: 1px solid var(--tree-line);
  border-radius: .75rem;
  background-color: var(--tree-board);
  background-image: radial-gradient(var(--tree-grid) 1px, transparent 1px);
  background-size: 18px 18px;
  overscroll-behavior: contain;
}
.bracket-window:focus-visible { outline: 2px solid var(--tree-accent); outline-offset: 2px; }
.bracket-size { position: relative; min-inline-size: 100%; }
.bracket-stage {
  position: relative;
  display: flex;
  align-items: start;
  gap: clamp(2.5rem, 5vw, 5rem);
  inline-size: max-content;
  padding: 1.3rem;
  transform-origin: top left;
}
.bracket[data-enhanced] .bracket-size { overflow: hidden; overflow: clip; }
.bracket[data-enhanced] .bracket-stage { position: absolute; inset: 0 auto auto 0; }
.bracket-round { flex: 0 0 16.5rem; inline-size: 16.5rem; min-inline-size: 0; }
.bracket-round h3 {
  min-block-size: 2.65rem;
  margin: 0 0 .8rem;
  padding: .45rem .7rem;
  display: flex;
  align-items: center;
  background: var(--tree-card);
  color: var(--tree-ink);
  border: 1px solid var(--tree-line);
  border-block-start: 2px solid var(--tree-accent);
  border-radius: .38rem;
  font-size: .92rem;
  line-height: 1.15;
  white-space: nowrap;
}
.bracket-stack { display: flex; flex-direction: column; gap: 1.15rem; }
.bracket-lines { position: absolute; inset: 0; pointer-events: none; }
.bracket-match {
  position: relative;
  padding: .68rem;
  background: var(--tree-card);
  color: var(--tree-ink);
  border: 1px solid var(--tree-line);
  border-radius: .58rem;
  box-shadow: 0 2px 5px rgb(24 10 12 / 8%);
}
:is(.office-screen, .hall-screen) .bracket-match { box-shadow: 0 2px 5px rgb(0 0 0 / 8%); }
.bracket-final { border-color: var(--tree-accent); }
.bracket-match-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .4rem;
  margin-bottom: .5rem;
  color: var(--tree-muted);
  font-size: .77rem;
  font-weight: 640;
}
.bracket-match-head .row-link { color: var(--tree-accent); white-space: nowrap; }
.bracket-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-block-size: 2.2rem;
  padding: .32rem .62rem;
  gap: .4rem;
  background: var(--tree-slot);
  border-inline-start: 3px solid transparent;
  border-radius: .25rem;
  font-size: .88rem;
  line-height: 1.3;
}
.bracket-side + .bracket-side { margin-top: .28rem; }
.bracket-side.is-winner {
  background: var(--tree-win);
  border-inline-start-color: var(--tree-accent);
  font-weight: 700;
}
.bracket-person { min-width: 0; overflow-wrap: anywhere; }
.bracket-person small { display: block; color: var(--tree-muted); font-size: .76em; font-weight: 500; }
.bracket-players { display: flex; flex-wrap: wrap; gap: .32rem .7rem; min-width: 0; }
.bracket-placeholder, .bracket-match-result { color: var(--tree-muted); }
.bracket-winner { color: var(--tree-accent); font-size: 1rem; line-height: 1; }
.bracket-match-result {
  margin-top: .5rem;
  display: flex;
  align-items: center;
  font-size: .77rem;
  font-variant-numeric: tabular-nums;
}
.bracket-match[data-state="finished"] .bracket-match-result,
.bracket-match[data-state="running"] .bracket-match-result { color: var(--tree-accent); font-weight: 700; }
@media (max-width: 575px) {
  .hall-header-inner { gap: .55rem; }
  .hall-header-inner > nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hall-header .button { padding-inline: .55rem; }
  .bracket-stage { padding: 1rem; gap: 2.4rem; }
  .bracket-round { flex-basis: 15.75rem; inline-size: 15.75rem; }
}
