:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #60706a;
  --line: #dbe4df;
  --panel: #ffffff;
  --page: #f5f7f4;
  --green: #11684f;
  --green-soft: #dff0e8;
  --blue: #245a8d;
  --red: #b33a35;
  --amber: #ad701b;
  --gold: #f1c44f;
  --gold-dark: #7b6333;
  --shadow: 0 18px 45px rgba(23, 33, 29, 0.1);
  --hall-card-scale: 1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.admin-quick-access {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.admin-quick-access-fab {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  border: 1px solid rgba(17, 37, 31, 0.22);
  box-shadow: 0 14px 32px rgba(17, 37, 31, 0.28);
  font-size: 22px;
  line-height: 1;
}

.admin-quick-access-fab:hover {
  background: #245f47;
  transform: translateY(-1px);
}

.admin-quick-access.open .admin-quick-access-fab {
  background: #245f47;
}

.admin-quick-access-panel {
  display: none;
  flex-direction: column;
  gap: 2px;
  width: 248px;
  padding: 8px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.admin-quick-access.open .admin-quick-access-panel {
  display: flex;
}

.admin-quick-access-panel button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.admin-quick-access-panel button:hover {
  background: var(--green-soft);
}

.admin-quick-access-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  flex: none;
  font-size: 15px;
  color: var(--green);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  background: #11251f;
  color: #f7fbf8;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: hidden;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.brand-link:hover .brand-mark {
  filter: brightness(1.06);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f1c44f;
  color: #11251f;
  font-weight: 900;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
}

.brand p {
  margin: 2px 0 0;
  color: #b8c9c1;
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.nav-group {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.nav-group:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.nav button {
  min-height: 44px;
  border-radius: 8px;
  background: transparent;
  color: #dce8e2;
  text-align: left;
  padding: 10px 12px;
}

.nav-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-panel {
  display: none;
  gap: 4px;
  padding-top: 2px;
}

.nav-group.open .nav-panel {
  display: grid;
}

@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .nav-group:hover .nav-panel {
    display: grid;
  }

  .nav-group:hover .nav-chevron {
    transform: rotate(90deg);
  }
}

.nav-chevron {
  color: #f1c44f;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  transition: transform 0.16s ease;
}

.nav-group.open .nav-chevron {
  transform: rotate(90deg);
}

.nav button.active,
.nav button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.nav button.top-link {
  width: 100%;
}

.nav-section {
  margin-top: 6px;
  color: #f1c44f;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-sub {
  color: #b8c9c1;
  font-size: 12px;
  font-weight: 800;
  margin: 0;
}

.nav .indent {
  margin-left: 8px;
}

.menu-toggle {
  display: none;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 900;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.menu-toggle b {
  font-size: 13px;
}

.main {
  padding: 28px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background: #11251f;
}

.auth-panel {
  width: min(440px, 100%);
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.auth-brand {
  margin-bottom: 18px;
  color: var(--ink);
}

.auth-brand p {
  color: var(--muted);
}

.auth-note {
  margin: 14px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.topbar h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.topbar p {
  color: var(--muted);
  margin: 8px 0 0;
}

.admin-sync-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-sync-controls .sync-banner {
  margin-top: 0;
  text-transform: none;
}

.admin-sync-controls .sync-banner[hidden] {
  display: none;
}

.admin-sync-controls .sync-banner.pending {
  color: #5a4204;
}

.admin-sync-controls .btn.active {
  background: var(--accent);
  color: var(--ink);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.collapsible-panel {
  padding: 0;
  overflow: visible;
}

.collapsible-panel > summary {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  cursor: pointer;
  list-style: none;
}

.collapsible-panel > summary::-webkit-details-marker {
  display: none;
}

.collapsible-panel > summary::after {
  content: "›";
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #eef3ef;
  color: var(--green);
  font-size: 22px;
  font-weight: 950;
  transition: transform 0.16s ease;
}

.collapsible-panel[open] > summary::after {
  transform: rotate(90deg);
}

.collapsible-panel > summary strong {
  display: block;
  font-size: 18px;
}

.collapsible-panel > summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.collapsible-content {
  padding: 0 18px 18px;
}

.collapsible-content > .panel-heading:first-child {
  margin-top: -2px;
}

.panel h3,
.card h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-heading h3 {
  margin-bottom: 0;
}

.info-popover {
  position: relative;
  flex: 0 0 auto;
}

.info-popover[open] {
  z-index: 500;
}

.info-popover summary {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
  line-height: 1;
  list-style: none;
  cursor: pointer;
}

.info-popover summary::-webkit-details-marker {
  display: none;
}

.info-popover[open] summary {
  background: var(--green);
  color: #ffffff;
}

.info-popover-content {
  position: absolute;
  z-index: 501;
  top: 36px;
  right: 0;
  width: min(360px, calc(100vw - 56px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.check-field {
  align-content: end;
  grid-template-columns: auto 22px;
  column-gap: 10px;
}

.check-field > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.check-field input {
  width: 18px;
  height: 18px;
  align-self: center;
}

.check-field small {
  grid-column: 1 / -1;
}

.label-with-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.label-with-info .info-popover summary {
  width: 22px;
  height: 22px;
  font-size: 12px;
}

.label-with-info .info-popover-content {
  top: 30px;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

input[type="checkbox"] {
  width: auto;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--green);
  flex: 0 0 auto;
}

.field-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.field-status button {
  position: relative;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  background: #fff;
  color: var(--ink);
}

.field-status button.free {
  border-color: rgba(17, 104, 79, 0.35);
  background: #f2faf6;
}

.field-status button.occupied {
  background: #f1f3f1;
  color: var(--muted);
  border-style: dashed;
  cursor: pointer;
}

.field-status button.occupied:hover,
.field-status button.occupied:focus-visible {
  border-color: rgba(17, 104, 79, 0.35);
  background: #e9eee9;
}

.field-status strong,
.field-status span {
  display: block;
}

.field-status span {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
}

.field-occupant-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 80;
  width: min(320px, 78vw);
  padding: 10px 12px;
  border: 1px solid rgba(17, 104, 79, 0.22);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 18px 36px rgba(12, 29, 23, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  visibility: hidden;
  transition: opacity 160ms ease 520ms, transform 160ms ease 520ms, visibility 0ms linear 700ms;
}

.field-occupant-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid rgba(17, 104, 79, 0.22);
  border-bottom: 1px solid rgba(17, 104, 79, 0.22);
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.field-status button.occupied:hover .field-occupant-bubble,
.field-status button.occupied:focus-visible .field-occupant-bubble {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
  transition-delay: 520ms, 520ms, 0ms;
}

.field-occupant-bubble b,
.field-occupant-bubble span,
.field-occupant-bubble em {
  display: block;
}

.field-occupant-bubble b {
  font-size: 12px;
  font-weight: 950;
  color: var(--green);
}

.field-occupant-bubble span {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.25;
  color: var(--ink);
}

.field-occupant-bubble em {
  margin-top: 6px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  color: var(--muted);
}

.hall-status-strip {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hall-status-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hall-status-head h3 {
  margin: 0;
}

.match-card.match-card-focus {
  animation: match-card-focus-pulse 1.6s ease;
}

@keyframes match-card-focus-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(17, 104, 79, 0);
  }
  24% {
    box-shadow: 0 0 0 5px rgba(17, 104, 79, 0.22), 0 18px 38px rgba(17, 104, 79, 0.16);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(17, 104, 79, 0);
  }
}

.workflow-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  font-weight: 900;
  color: var(--green);
}

.referee-match-option {
  width: auto;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  white-space: nowrap;
}

.referee-name-input {
  width: 100%;
  min-width: 0;
}

.referee-name-select {
  min-width: 0;
}

.match-admin-actions {
  margin-top: 12px;
}

.match-admin-actions .referee-match-controls {
  flex: 1 0 100%;
}

.referee-match-controls {
  display: grid;
  grid-template-columns: minmax(170px, max-content) minmax(180px, 280px) minmax(220px, 420px);
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  align-items: center;
}

.referee-match-controls .inline-check {
  min-width: 0;
}

.code-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: #f7faf8;
  border: 1px solid var(--line);
}

.code-box img,
.code-box .qr-code {
  width: 96px;
  height: 96px;
  border-radius: 6px;
  background: #fff;
}

.qr-code {
  display: block;
  fill: #101a16;
  shape-rendering: crispEdges;
}

.code-box strong {
  font-size: 26px;
}

.btn {
  min-height: 42px;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.btn.secondary {
  background: var(--green-soft);
  color: var(--green);
}

.btn.ghost {
  background: #eef3ef;
  color: var(--ink);
}

.btn.danger {
  background: var(--red);
  color: #fff;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(179, 58, 53, 0.28);
  border-radius: 8px;
  background: rgba(179, 58, 53, 0.06);
}

.danger-zone.compact {
  align-items: flex-start;
}

.danger-zone strong,
.danger-zone span {
  display: block;
}

.danger-zone span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.btn.warning {
  background: var(--gold);
  color: var(--ink);
}

.btn.dark {
  background: #101512;
  color: #fff;
}

.btn.subtle {
  background: #f4e8e7;
  color: var(--red);
}

.btn.active-test {
  background: #fff4cf;
  color: #7b6333;
  border: 1px solid rgba(123, 99, 51, 0.22);
}

.compact-select {
  width: auto;
  min-height: 42px;
  max-width: 190px;
  background: #fbfcfb;
}

.compact-input {
  width: auto;
  min-height: 42px;
  max-width: 210px;
  background: #fbfcfb;
}

.org-select {
  max-width: 260px;
}

.tournament-select {
  max-width: 280px;
}

.org-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 11px;
  background: #eef3ef;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.tournament-context {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-color: rgba(235, 198, 91, 0.34);
  background: linear-gradient(135deg, #fffdf6 0%, #fbfcfb 58%, #eef3ef 100%);
}

.tournament-context h3 {
  margin-bottom: 4px;
}

.setup-section {
  display: grid;
  gap: 14px;
}

.setup-section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 2px 2px 0;
}

.setup-section-head > span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
}

.setup-section-head h3 {
  margin: 0;
  font-size: 22px;
}

.setup-section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.planning-setup-section {
  scroll-margin-top: 18px;
}

.quick-tile-panel {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.quick-tile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.quick-tile {
  aspect-ratio: 1 / 1;
  min-height: 178px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(43, 95, 78, 0.16);
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff 0%, #fbfcfb 58%, #edf5ef 100%);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 30px rgba(23, 33, 29, 0.08);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.quick-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(17, 104, 79, 0.35);
  box-shadow: 0 16px 38px rgba(23, 33, 29, 0.12);
}

.quick-tile-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #11251f;
  color: #f1c44f;
}

.quick-tile-icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-tile strong {
  align-self: end;
  font-size: 20px;
  line-height: 1.08;
}

.quick-tile small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: radial-gradient(circle at top, rgba(241, 196, 79, 0.12), transparent 32%), #eef2ed;
}

.portal-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 24px 30px;
}

.portal-brand h1 {
  color: var(--ink);
}

.portal-main {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  align-content: start;
  gap: 28px;
  padding: clamp(70px, 8vh, 110px) 0 56px;
}

.portal-hero {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.portal-hero h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1;
}

.portal-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  font-weight: 800;
}

.portal-sport-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 auto 12px;
}

.portal-sport-switcher button {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.portal-sport-switcher button.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.portal-module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.portal-module-grid.compact {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.portal-module-card {
  min-height: 240px;
  display: grid;
  align-content: space-between;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(43, 95, 78, 0.18);
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff 0%, #fbfcfb 58%, #e8f1ec 100%);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 16px 42px rgba(23, 33, 29, 0.11);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.portal-module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(17, 104, 79, 0.38);
  box-shadow: 0 22px 50px rgba(23, 33, 29, 0.16);
}

.portal-module-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #11251f;
  color: #f1c44f;
}

.portal-module-icon svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-module-card strong {
  font-size: 24px;
  line-height: 1.05;
}

.portal-module-card small {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.start-wizard {
  display: grid;
  gap: 22px;
}

.start-wizard-head {
  display: grid;
  gap: 6px;
}

.start-wizard-head h3 {
  margin: 0;
  font-size: 30px;
}

.start-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.start-choice {
  min-height: 300px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(43, 95, 78, 0.18);
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff 0%, #fbfcfb 58%, #edf5ef 100%);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 14px 34px rgba(23, 33, 29, 0.09);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.start-choice:hover {
  transform: translateY(-2px);
  border-color: rgba(17, 104, 79, 0.36);
  box-shadow: 0 18px 42px rgba(23, 33, 29, 0.13);
}

.start-choice.selected {
  border-color: rgba(241, 196, 79, 0.85);
  box-shadow: inset 0 0 0 2px rgba(241, 196, 79, 0.45), 0 18px 42px rgba(23, 33, 29, 0.11);
}

.start-choice strong {
  max-width: 680px;
  font-size: 26px;
  line-height: 1.08;
}

.start-choice small {
  max-width: 720px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill.active {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.archived {
  background: #f3eee1;
  color: #7b6333;
}

.status-pill.warning {
  background: #fff4cf;
  color: #7b6333;
}

.status-pill.danger {
  background: #f6dddd;
  color: var(--red);
}

.status-pill.muted {
  background: #eef3ef;
  color: var(--muted);
}

.status-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

button.status-pill.clickable-pill {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

button.status-pill.clickable-pill:hover {
  background: var(--green-soft);
  color: var(--green);
}

.archived-notice {
  border-color: rgba(123, 99, 51, 0.25);
  background: #fffaf0;
}

.cockpit-dashboard {
  display: grid;
  gap: 16px;
  border-color: rgba(43, 95, 78, 0.18);
}

.dashboard-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.dashboard-head h3 {
  margin-bottom: 4px;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.quick-action-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(43, 95, 78, 0.14);
  border-radius: 8px;
  background: #f7faf8;
}

.quick-action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.quick-action-group > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.quick-select {
  width: min(260px, 48vw);
  min-height: 36px;
  padding: 6px 9px;
}

.compact-btn {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 14px;
}

.lol-alias-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

td input[id^="lolUnmatchedName-"] {
  min-width: 260px;
  width: 100%;
}

.lol-rest-list {
  display: grid;
  gap: 12px;
}

.lol-rest-card {
  border: 1px solid rgba(20, 60, 50, 0.16);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.lol-rest-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lol-rest-head strong,
.lol-rest-head span,
.lol-rest-head small {
  display: block;
}

.lol-rest-head span,
.lol-rest-head small {
  color: var(--muted);
  margin-top: 3px;
}

.lol-rest-name-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  max-width: 620px;
}

.lol-rest-name-edit input {
  min-width: min(420px, 58vw);
}

.lol-email-cell {
  display: grid;
  gap: 3px;
  min-width: 210px;
}

.lol-email-cell input {
  min-height: 32px;
}

.lol-email-cell small {
  color: var(--muted);
  font-size: 11px;
}

.lol-rest-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-metrics div {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.dashboard-metrics strong {
  font-size: 28px;
  line-height: 1;
}

.dashboard-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.readiness-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.readiness-item {
  min-height: 112px;
  display: grid;
  gap: 5px;
  align-content: start;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.readiness-item:disabled {
  cursor: default;
}

.readiness-item.ok {
  border-color: rgba(43, 95, 78, 0.22);
  background: #f5faf7;
}

.readiness-item.todo {
  border-color: rgba(235, 198, 91, 0.36);
  background: #fffaf0;
}

.readiness-item span {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.readiness-item.ok span {
  background: var(--green-soft);
  color: var(--green);
}

.readiness-item.todo span {
  background: #f3eee1;
  color: #7b6333;
}

.readiness-item strong {
  font-size: 16px;
}

.readiness-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.tournament-overview {
  grid-column: 1 / -1;
}

.tournament-list {
  display: grid;
  gap: 10px;
}

.tournament-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto minmax(220px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.tournament-row.archived {
  background: #faf7ef;
}

.tournament-row strong {
  display: block;
}

.tournament-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tournament-row .status-pill {
  margin-bottom: 0;
}

.notice {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 8px;
  padding: 6px 10px;
  background: rgba(241, 196, 79, 0.18);
  color: #f9e7a8;
  font-weight: 800;
}

.notice-slot {
  min-height: 44px;
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
}

.smtp-load-warning {
  margin: 0 0 14px;
  border: 1px solid rgba(241, 196, 79, 0.42);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(241, 196, 79, 0.14);
  color: #6c5420;
  font-weight: 800;
}

.online-entry-fee-warning {
  margin-top: 12px;
  border: 1px solid rgba(241, 196, 79, 0.42);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(241, 196, 79, 0.16);
  color: #6c5420;
  font-weight: 900;
}

.sync-banner {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 11px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sync-banner.online {
  background: rgba(123, 166, 140, 0.2);
  color: #d8f1e0;
}

.sync-banner.pending {
  background: rgba(241, 196, 79, 0.24);
  color: #ffe7a3;
}

.sync-banner.offline {
  background: rgba(179, 58, 53, 0.28);
  color: #ffd7d5;
}

.notice.strong {
  background: rgba(241, 196, 79, 0.28);
  color: #ffe38b;
}

.notice.danger {
  background: rgba(179, 58, 53, 0.25);
  color: #ffd7d5;
}

.read-only-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.panel-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: end;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 800;
}

.option-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btp-preview-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(360px, 1.4fr);
  gap: 18px;
}

.btp-preview-grid h4 {
  margin: 0 0 10px;
}

@media (max-width: 900px) {
  .btp-preview-grid {
    grid-template-columns: 1fr;
  }
}

.compact-table-wrap {
  overflow-x: auto;
}

.compact-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
  font-size: 13px;
}

.compact-table th,
.compact-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compact-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.code-block {
  display: block;
  overflow-x: auto;
  margin: 14px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1720;
  color: #f4f7f5;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
}

.nuportal-workbench {
  display: grid;
  gap: 18px;
}

.nuportal-path-form,
.nuportal-search-form,
.nuportal-preview-form,
.nuportal-probe-form {
  display: grid;
  gap: 14px;
}

.nuportal-path-form .wide {
  grid-column: 1 / -1;
}

.nuportal-value-grid,
.nuportal-search-form,
.nuportal-preview-form,
.nuportal-probe-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.nuportal-value-grid label,
.nuportal-path-form label,
.nuportal-search-form label,
.nuportal-preview-form label,
.nuportal-probe-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.nuportal-path-form input,
.nuportal-search-form input,
.nuportal-search-form select,
.nuportal-preview-form input,
.nuportal-probe-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
}

.nuportal-preview-form {
  grid-template-columns: minmax(280px, 1fr) auto;
  margin-bottom: 14px;
}

@media (max-width: 720px) {
  .nuportal-preview-form {
    grid-template-columns: 1fr;
  }
}

.nuportal-plan-result,
.nuportal-step-list,
.nuportal-candidates,
.nuportal-endpoint-list {
  display: grid;
  gap: 12px;
}

.nuportal-step,
.nuportal-candidate,
.nuportal-endpoint {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
  padding: 12px;
}

.nuportal-candidate,
.nuportal-endpoint {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.nuportal-step-index {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 950;
}

.nuportal-step h4,
.nuportal-key-grid h4,
.nuportal-subhead {
  margin: 0 0 6px;
  font-size: 14px;
}

.nuportal-step p,
.nuportal-candidate small,
.nuportal-endpoint small {
  margin: 0;
  color: var(--muted);
}

.nuportal-candidate code,
.nuportal-endpoint code {
  display: block;
  margin: 7px 0;
  padding: 7px 8px;
  border-radius: 7px;
  background: #eef4f0;
  color: #18372c;
  font-size: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.nuportal-key-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.nuportal-key-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.nuportal-key-grid p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.nuportal-probe-form {
  grid-template-columns: minmax(120px, 180px) minmax(220px, 1fr) auto;
  margin-bottom: 14px;
}

.nuportal-check-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.nuportal-check-label input {
  width: auto;
}

.nuportal-probe-summary {
  display: grid;
  gap: 14px;
}

.nuportal-doc-table {
  min-width: 1180px;
}

.nuportal-doc-table code,
.data-table td code {
  display: block;
  max-width: 520px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.nuportal-doc-table small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.nuportal-key-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 220px;
}

.nuportal-key-list span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef4f0;
  color: #244139;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 720px) {
  .nuportal-probe-form {
    grid-template-columns: 1fr;
  }
}

.nuportal-player-table {
  min-width: 1120px;
}

.nuportal-field-list {
  display: grid;
  gap: 5px;
  min-width: 240px;
  max-width: 420px;
}

.nuportal-field-list span {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(120px, 1.2fr);
  gap: 8px;
  padding: 5px 7px;
  border-radius: 6px;
  background: #eef4f0;
  color: #31453e;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.nuportal-field-list b {
  color: #18372c;
}

.wide-stat {
  grid-column: span 2;
}

.wide-stat strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.error-preview .stat strong {
  color: var(--red);
}

.planning-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: end;
}

.planning-status {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 52px;
}

.planning-system-summary {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.planning-system-summary.locked {
  width: fit-content;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff7dc;
  color: var(--gold-dark);
}

.pool-size-editor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.pool-size-editor label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.pool-size-editor input {
  width: 100%;
  min-height: 42px;
}

.pool-size-warning {
  color: var(--red);
  font-weight: 900;
}

.ranking-stage-assignment {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fbf7;
}

.ranking-stage-head {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 240px);
  gap: 16px;
  align-items: end;
}

.ranking-stage-head strong {
  display: block;
  font-size: 1.05rem;
}

.ranking-stage-head span,
.ranking-stage-row small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.ranking-stage-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.ranking-stage-counts span {
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 900;
  background: #eef6f0;
  color: var(--green);
}

.ranking-stage-counts span.warn {
  background: #fff3db;
  color: #8b5c12;
}

.ranking-stage-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ranking-stage-row {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.planning-entry-list {
  display: grid;
  gap: 10px;
}

.planning-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcfa;
}

.planning-entry-row strong {
  display: block;
  font-size: 18px;
}

.planning-entry-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.planning-entry-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 900;
}

.manual-entry-admin {
  display: grid;
  gap: 18px;
}

.compact-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.chessminton-entry-section {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.chessminton-entry-section h4 {
  margin: 0 0 4px;
  font-size: 20px;
}

.manual-entry-form {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcfa;
}

.manual-form-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.manual-form-head h4,
.manual-entry-columns h4 {
  margin: 0 0 4px;
  font-size: 18px;
}

.manual-player-grid,
.manual-entry-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.manual-player-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.manual-player-card legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 900;
}

.manual-entry-columns > section {
  display: grid;
  align-content: start;
  gap: 10px;
}

.manual-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.manual-entry-row strong,
.manual-entry-row small {
  display: block;
}

.manual-entry-row small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.manual-entry-player-code {
  display: block;
  margin-top: 5px;
  color: #7a857f;
  font-size: 13px;
  font-weight: 900;
}

.critical-warning-popover {
  display: inline-block;
  margin-left: 8px;
  vertical-align: 2px;
}

.critical-warning-popover summary {
  width: 20px;
  height: 20px;
  background: #b74336;
  color: #fff;
  font-size: 13px;
}

.critical-warning-popover[open] summary {
  background: #8f3028;
  color: #fff;
}

.critical-warning-popover .info-popover-content {
  right: auto;
  left: 0;
  width: min(330px, calc(100vw - 56px));
  border-color: rgba(183, 67, 54, 0.28);
}

.seed-input {
  width: 100%;
  text-align: center;
}

.planning-progress-panel {
  border-color: rgba(241, 196, 79, 0.42);
  background: linear-gradient(180deg, #fffef8 0%, #fbfdfb 100%);
}

.planning-progress-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.planning-progress-stats div {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.planning-progress-stats strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.planning-progress-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.planning-progress-bar {
  height: 10px;
  margin: 14px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eee9;
}

.planning-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.planning-suggestions {
  display: grid;
  gap: 14px;
}

.planning-suggestion-group {
  display: grid;
  gap: 8px;
}

.planning-suggestion-group h4 {
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f3ed;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.planning-suggestion-group-list {
  display: grid;
  gap: 10px;
}

.planning-suggestion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(46, 112, 85, 0.2);
  border-radius: 8px;
  background: #ffffff;
}

.planning-suggestion-row strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 17px;
}

.planning-suggestion-row strong span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.planning-suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.planning-worklist,
.planning-worklist-rows {
  display: grid;
  gap: 12px;
}

.planning-next-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(17, 104, 79, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fbf8 0%, #ffffff 62%, #fff8df 100%);
}

.planning-next-card.muted {
  border-color: var(--line);
  background: #f8faf8;
}

.planning-next-card h4 {
  margin: 6px 0 6px;
  font-size: 22px;
}

.planning-next-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.planning-next-card p strong {
  color: var(--ink);
}

.pool-round-planner {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(241, 196, 79, 0.34);
  border-radius: 8px;
  background: #fffdf4;
}

.pool-round-planner-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.pool-round-planner h4,
.pool-round-group h5 {
  margin: 4px 0;
}

.pool-round-planner p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.pool-main-groups-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(46, 112, 85, 0.18);
  border-radius: 8px;
  background: #f7fbf8;
}

.pool-main-groups-panel div {
  display: grid;
  gap: 2px;
}

.pool-main-groups-panel span {
  color: var(--muted);
  font-weight: 800;
}

.pool-main-groups-panel .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pool-round-all-actions,
.pool-round-card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pool-round-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.pool-round-group {
  display: grid;
  gap: 8px;
}

.pool-round-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pool-round-card.active {
  border-color: rgba(46, 112, 85, 0.26);
  background: #f5fbf7;
}

.pool-round-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pool-round-card > div:first-child span {
  color: var(--muted);
  font-weight: 900;
}

.pool-round-card ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-weight: 800;
}

.pool-round-card li b {
  color: var(--gold-dark);
}

.planning-next-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.planning-next-actions select {
  min-width: 190px;
}

.planning-worklist-filters {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(150px, 0.75fr) minmax(150px, 0.75fr) minmax(220px, 1.2fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.planning-worklist-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 900;
}

.planning-worklist-filters > strong {
  align-self: center;
  justify-self: end;
  color: var(--muted);
}

.planning-worklist-print {
  display: flex;
  justify-content: flex-end;
}

.match-cards-print {
  display: grid;
  gap: 18px;
}

.match-cards-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(220px, 1.2fr) minmax(160px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
}

.match-cards-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 900;
}

.match-card-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.match-card-toolbar-actions span {
  color: var(--muted);
  font-weight: 900;
}

.match-card-sheet {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.match-card-print-body,
.match-card-print-page {
  min-height: 100vh;
  margin: 0;
  background: #dfe5e0;
  color: #111;
}

.match-card-print-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(18, 32, 26, 0.12);
}

.match-card-print-document {
  display: grid;
  justify-content: center;
  gap: 18px;
  padding: 18px;
}

.match-card-print-document .match-card-sheet {
  padding: 8mm;
  gap: 4mm;
  background: #fff;
  box-shadow: 0 18px 44px rgba(18, 32, 26, 0.2);
}

.match-card-print-document .match-card-sheet.portrait-ten {
  width: 194mm;
  height: 281mm;
}

.match-card-print-document .match-card-sheet.landscape-six {
  width: 281mm;
  height: 194mm;
}

.match-card-sheet.portrait-ten {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
}

.match-card-sheet.landscape-six {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.match-card-sheet.landscape-six .match-score-card {
  gap: 4px;
}

.match-score-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-height: 180px;
  padding: 12px;
  border: 1.5px solid #17251f;
  border-radius: 8px;
  background: #fff;
  color: #111;
  break-inside: avoid;
}

.match-score-card.blank {
  border-style: dashed;
  opacity: 0.24;
}

.match-score-card-head {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #d6ddd8;
}

.match-score-card-head span {
  display: block;
  color: #5d6b63;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.match-score-card-head strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.match-score-card-table {
  width: 100%;
  border-collapse: collapse;
  align-self: end;
  table-layout: fixed;
}

.match-score-card-table th,
.match-score-card-table td {
  height: 30px;
  border: 1px solid #17251f;
  text-align: center;
}

.match-score-card-table th:not(:first-child),
.match-score-card-table td {
  width: 14%;
}

.match-score-card-table th {
  width: 58%;
  padding: 4px 6px;
  font-size: 10px;
  font-weight: 500;
  text-align: left;
  vertical-align: middle;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.match-score-card-table thead th {
  text-align: center;
  font-size: 9px;
  text-transform: uppercase;
}

.match-score-card-table thead th:first-child {
  text-align: left;
}

.match-score-card-table th.seeded {
  font-weight: 900;
}

.match-score-card-table th strong {
  display: block;
  font-weight: 500;
}

.match-score-card-table th.seeded strong,
.match-score-card-table th strong b {
  font-weight: 900;
}

.match-score-card-table th small {
  display: block;
  margin-top: 2px;
  color: #5d6b63;
  font-size: 8px;
  font-weight: 800;
}

.planning-match-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.planning-match-row.ready {
  border-color: rgba(46, 112, 85, 0.24);
  background: #f6fbf8;
}

.planning-match-row.next-ready {
  border-color: rgba(241, 196, 79, 0.72);
  box-shadow: 0 12px 34px rgba(173, 112, 27, 0.12);
}

.planning-match-row.queued {
  border-color: rgba(173, 112, 27, 0.28);
}

.planning-match-row.live {
  border-color: rgba(36, 90, 141, 0.28);
}

.planning-match-row.finished {
  opacity: 0.82;
}

.cockpit-switch-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cockpit-switch-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.cockpit-switch-controls label {
  min-width: min(360px, 100%);
}

.cockpit-switch-controls select {
  min-width: min(320px, 100%);
}

.planning-match-main,
.planning-match-actions,
.planning-match-result {
  display: grid;
  gap: 10px;
  align-content: start;
}

.planning-match-result {
  grid-column: 1 / -1;
}

.planning-match-meta,
.planning-match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.planning-match-meta .highlight {
  background: rgba(241, 196, 79, 0.3);
  color: var(--gold-dark);
}

.planning-schedule-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(47, 105, 83, 0.14);
  border-radius: var(--radius-sm);
  background: #fbfcfb;
}

.schedule-custom-input,
.schedule-custom-field {
  max-width: 190px;
}

.schedule-summary-card {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfcfb;
}

.schedule-summary-card strong {
  font-size: 28px;
}

.schedule-summary-card span {
  color: var(--muted);
  font-weight: 800;
}

.schedule-slot-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.schedule-slot-preview span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef3ef;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.schedule-slot-preview span.assigned {
  background: #f7f1dc;
  color: #7a5b08;
}

.time-slot-planning {
  display: grid;
  gap: 18px;
}

.time-slot-planning-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.time-slot-planning-head h3 {
  margin: 0 0 4px;
}

.time-slot-planning-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.time-slot-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.time-slot-summary span {
  display: grid;
  min-width: 92px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f6faf7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.time-slot-summary strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.time-slot-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.time-slot-ready-panel,
.time-slot-grid-wrap {
  min-width: 0;
}

.time-slot-ready-panel {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 12px;
}

.time-slot-ready-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-weight: 900;
}

.time-slot-ready-list {
  display: grid;
  gap: 10px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}

.time-slot-ready-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(46, 112, 85, 0.24);
  border-radius: var(--radius-sm);
  background: #f6fbf8;
  cursor: grab;
  box-shadow: 0 10px 26px rgba(16, 38, 30, 0.06);
}

.time-slot-ready-card:active {
  cursor: grabbing;
}

.time-slot-ready-card strong,
.time-slot-ready-card span {
  overflow-wrap: anywhere;
}

.time-slot-grid-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.time-slot-grid {
  width: 100%;
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
}

.time-slot-grid th,
.time-slot-grid td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.time-slot-grid thead th,
.time-slot-grid tbody > tr > th {
  position: sticky;
  z-index: 1;
  background: #f3f7f4;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}

.time-slot-grid thead th {
  top: 0;
  padding: 10px 12px;
}

.time-slot-grid tbody > tr > th {
  left: 0;
  width: 82px;
  padding: 12px;
}

.time-slot-cell {
  width: 220px;
  min-width: 220px;
  min-height: 128px;
  padding: 10px;
  background: #fbfdfb;
}

.time-slot-cell.free {
  background: #f8fcfa;
}

.time-slot-cell.free:not(.past) {
  outline: 2px dashed rgba(46, 112, 85, 0.14);
  outline-offset: -8px;
}

.time-slot-cell.assigned {
  background: #edf7f1;
}

.time-slot-cell.past {
  background: #f1f3f1;
}

.time-slot-cell.missing {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.time-slot-assigned-card,
.time-slot-free-card {
  display: grid;
  gap: 8px;
  min-height: 108px;
  align-content: start;
}

.time-slot-assigned-card strong,
.time-slot-assigned-card small {
  overflow-wrap: anywhere;
}

.time-slot-assigned-card small,
.time-slot-free-card small {
  color: var(--muted);
  font-weight: 800;
}

.time-slot-free-card.muted {
  opacity: 0.64;
}

.time-slot-assign-controls {
  display: grid;
  gap: 6px;
}

.time-slot-assign-controls select {
  width: 100%;
  min-width: 0;
}

.time-slot-empty {
  display: grid;
  gap: 16px;
}

.planning-match-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  font-size: 17px;
}

.planning-match-teams strong {
  overflow-wrap: anywhere;
}

.planning-match-teams .entry-availability,
.upcoming-teams .entry-availability {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-transform: none;
}

.entry-availability.active-blocked {
  color: #b42318;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.rest-countdown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, #b3423d calc(var(--rest-percent) * 1%), rgba(179, 66, 61, 0.14) 0),
    rgba(179, 66, 61, 0.08);
  box-shadow: inset 0 0 0 2px rgba(179, 66, 61, 0.2);
  white-space: nowrap;
  vertical-align: middle;
}

.rest-countdown::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbfdfb;
}

.planning-match-teams span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.match-waiting-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.match-waiting-notes span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 8px;
  background: #f4f1e4;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 950;
}

.draw-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.draw-summary span,
.draw-seed {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #eef7f2;
  color: var(--green);
  font-size: 13px;
  font-weight: 950;
}

.draw-rounds,
.draw-match-list {
  display: grid;
  gap: 12px;
}

.draw-round h4 {
  margin: 0 0 10px;
  font-size: 18px;
}

.draw-match {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.draw-match-no {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(241, 196, 79, 0.2);
  color: var(--gold-dark);
  font-weight: 950;
}

.draw-match > b {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.draw-side {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.draw-side strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.draw-bye strong {
  color: var(--muted);
  font-style: italic;
}

.bracket-rounds,
.bracket-match-list {
  display: grid;
  gap: 14px;
}

.bracket-round h4 {
  margin: 0 0 10px;
  font-size: 18px;
}

.bracket-match {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.bracket-match.ready {
  border-color: rgba(46, 112, 85, 0.24);
  background: #f6fbf8;
}

.bracket-match-head,
.bracket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.bracket-sides {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.bracket-sides > b {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.bracket-side {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px;
  border-radius: 8px;
  background: #eef4f0;
}

.bracket-side strong {
  overflow-wrap: anywhere;
}

.bracket-side small {
  color: var(--muted);
  font-weight: 800;
}

.bracket-side.empty {
  color: var(--muted);
  font-weight: 900;
  font-style: italic;
}

.bracket-side.source {
  background: #f4f1e4;
}

.bracket-side.feed-in {
  border: 1px solid rgba(46, 112, 85, 0.25);
  background: linear-gradient(135deg, #f4e6b7, #e3f1ea);
}

.bracket-side.feed-in em {
  width: fit-content;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(46, 112, 85, 0.14);
  color: var(--green);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  line-height: 1.1;
  text-transform: uppercase;
}

.bracket-side.winner {
  background: rgba(241, 196, 79, 0.22);
}

.bracket-actions select {
  min-width: 180px;
}

.bracket-result {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bracket-result span {
  border-radius: 8px;
  padding: 5px 8px;
  background: rgba(241, 196, 79, 0.2);
  color: var(--green);
  font-weight: 900;
}

.bracket-result .bracket-result-status {
  align-self: center;
  padding: 2px 6px;
  background: rgba(96, 112, 106, 0.12);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0;
}

.bracket-manual-result {
  border: 1px solid rgba(17, 104, 79, 0.18);
  border-radius: 8px;
  background: #f7fbf8;
  padding: 8px 10px;
}

.bracket-manual-result summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 900;
  list-style-position: inside;
}

.bracket-result-help {
  border-radius: 8px;
  background: #f3f6f2;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  padding: 8px 10px;
}

.manual-result-grid {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.manual-result-grid label {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-weight: 900;
}

.manual-result-grid input {
  min-width: 0;
}

.bracket-special-result {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 104, 79, 0.16);
}

.bracket-special-result > strong {
  color: var(--green);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.bracket-special-result label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 900;
}

.superadmin-panel {
  border-color: rgba(36, 90, 141, 0.22);
}

.user-table {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.user-row {
  display: grid;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.user-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  align-items: end;
}

.user-fields label {
  display: grid;
  gap: 5px;
}

.user-table span,
.user-fields label > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.user-table input {
  min-height: 38px;
  padding: 7px 9px;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-admin-layout {
  display: grid;
  gap: 16px;
}

.role-admin-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.role-admin-tab {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.role-admin-tab strong {
  font-size: 16px;
}

.role-admin-tab span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.role-admin-tab.active {
  border-color: rgba(43, 95, 78, 0.45);
  background: var(--green-soft);
  box-shadow: 0 0 0 2px rgba(43, 95, 78, 0.08) inset;
}

.support-login-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(161, 74, 38, 0.32);
  border-radius: 8px;
  background: #fff4e8;
  color: #3b2317;
}

.support-login-banner strong {
  font-size: 14px;
}

.support-login-banner span {
  flex: 1 1 260px;
  color: #6b3b20;
  font-size: 13px;
  font-weight: 800;
}

.support-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.support-user-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.support-user-card strong,
.support-user-card small {
  display: block;
}

.support-user-card small,
.support-user-card p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.support-user-card p {
  margin: 0;
  line-height: 1.35;
}

.support-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.support-user-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.structured-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.structured-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  overflow: hidden;
}

.structured-item.organization-row,
.structured-item.user-row {
  display: block;
  padding: 0;
}

.structured-summary {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
}

.structured-summary::-webkit-details-marker {
  display: none;
}

.structured-summary::after {
  content: "›";
  justify-self: end;
  color: var(--green);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.15s ease;
}

.structured-item[open] > .structured-summary::after {
  transform: rotate(90deg);
}

.structured-summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.summary-badges em {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.structured-detail {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.subpanel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.managed-password-check,
.user-must-change {
  align-self: end;
  min-height: 44px;
}

.organization-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.organization-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.organization-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.structured-item.organization-row,
.structured-item.user-row {
  display: block;
  grid-template-columns: none;
  gap: 0;
  align-items: stretch;
  padding: 0;
}

.structured-item.organization-row span,
.structured-item.user-row span {
  display: initial;
  margin-top: 0;
}

.structured-item .structured-summary small {
  display: block;
}

.structured-item .structured-summary > span:first-child {
  display: block;
}

.structured-item .summary-badges {
  display: flex;
}

.ad-admin-panel {
  border-color: rgba(43, 95, 78, 0.18);
}

.ad-active-create {
  align-self: end;
  min-height: 42px;
}

.manual-ad-control {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.8fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(241, 196, 79, 0.28);
  border-radius: 8px;
  background: rgba(241, 196, 79, 0.08);
}

.manual-ad-control strong,
.manual-ad-control span {
  display: block;
}

.manual-ad-control span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.manual-ad-control select {
  min-height: 42px;
}

.ad-upload-box {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px dashed rgba(43, 95, 78, 0.26);
  border-radius: 8px;
  background: #f7faf8;
}

.inline-field-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.ad-format-hint {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ad-admin-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.ad-admin-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(150px, 0.75fr) minmax(150px, 1fr) minmax(130px, 0.65fr) minmax(150px, 0.85fr) 90px auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.ad-admin-row.muted {
  opacity: 0.68;
}

.ad-admin-row strong,
.ad-admin-row span {
  display: block;
}

.ad-admin-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ad-admin-row .ad-format-hint {
  grid-column: 1 / -1;
  margin-top: -2px;
}

.ad-admin-row input,
.ad-admin-row select {
  min-height: 38px;
  padding: 7px 9px;
}

.media-browser-backdrop {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 24, 18, 0.58);
}

.media-browser-panel {
  width: min(980px, 96vw);
  max-height: min(760px, 92vh);
  overflow: auto;
  padding: 18px;
  border-radius: 8px;
  background: #fbfcfb;
  box-shadow: 0 24px 70px rgba(7, 24, 18, 0.28);
}

.media-browser-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.media-browser-head h3 {
  margin: 0;
}

.media-browser-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.media-browser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.media-browser-item {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.media-browser-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 6px;
  background: #10221a;
}

.media-browser-item strong,
.media-browser-item span {
  display: block;
}

.media-browser-item strong {
  overflow-wrap: anywhere;
}

.media-browser-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.file-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.view-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.certificate-form {
  margin-top: 4px;
}

.certificate-template-form {
  margin-top: 4px;
}

.certificate-template-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.certificate-template-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.certificate-template-row.active {
  border-color: rgba(28, 90, 71, 0.36);
  background: rgba(28, 90, 71, 0.07);
}

.certificate-template-row strong,
.certificate-template-row span {
  display: block;
}

.certificate-template-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  word-break: break-word;
}

.certificate-layout-editor {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.panel-heading.compact {
  margin-bottom: 12px;
}

.certificate-editor-sheet,
.certificate-sheet {
  aspect-ratio: 210 / 297;
  box-sizing: border-box;
}

.certificate-editor-sheet {
  width: min(620px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  touch-action: none;
}

.certificate-editor-sheet.has-template {
  background: #fff;
}

.certificate-editor-sheet.show-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(28, 90, 71, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 90, 71, 0.14) 1px, transparent 1px);
  background-size: 10% 10%;
}

.certificate-page {
  min-height: 100vh;
  padding: 28px;
  background: #eef3f0;
  display: grid;
  place-items: center;
  gap: 18px;
}

.certificate-batch-box {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #f6faf8;
  display: grid;
  gap: 12px;
}

.certificate-batch-box h3 {
  margin: 0 0 4px;
}

.certificate-manual-placement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.certificate-batch-page {
  align-content: start;
}

.certificate-batch-page .certificate-sheet {
  break-after: page;
  page-break-after: always;
}

.certificate-batch-page .certificate-sheet:last-of-type {
  break-after: auto;
  page-break-after: auto;
}

.certificate-sheet {
  width: min(780px, 100%);
  padding: clamp(42px, 6vw, 78px);
  border: 10px solid #1c5a47;
  background:
    linear-gradient(135deg, rgba(241, 196, 79, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(28, 90, 71, 0.12), transparent 36%),
    #fbfcfb;
  color: #10261f;
  text-align: center;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  box-shadow: 0 24px 80px rgba(18, 40, 32, 0.2);
  position: relative;
  overflow: hidden;
}

.certificate-sheet.has-template {
  background: #fff;
  padding: 0;
  border: 0;
  display: block;
}

.certificate-sheet.has-template > :not(.certificate-template-image):not(.certificate-template-pdf):not(.certificate-positioned-text) {
  position: relative;
  z-index: 1;
}

.certificate-sheet.has-template > .certificate-positioned-text {
  position: absolute;
  z-index: 2;
}

.certificate-template-image,
.certificate-template-pdf {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.certificate-template-image {
  display: block;
  object-fit: fill;
}

.certificate-positioned-text {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  color: #10261f;
  line-height: 1.08;
  white-space: normal;
  pointer-events: none;
}

.certificate-layout-field {
  padding: 5px 8px;
  border: 1px dashed rgba(28, 90, 71, 0.7);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
  cursor: grab;
  pointer-events: auto;
  user-select: none;
}

.certificate-layout-field.dragging {
  cursor: grabbing;
  background: rgba(241, 196, 79, 0.28);
  border-color: #b68513;
}

.certificate-field-kicker {
  text-transform: uppercase;
}

.certificate-field-name {
  line-height: 1.03;
}

.certificate-field-signatureLeft,
.certificate-field-signatureRight {
  padding-top: 8px;
}

.certificate-field-signatureLeft.with-line,
.certificate-field-signatureRight.with-line {
  border-top: 2px solid rgba(16, 38, 31, 0.3);
}

.certificate-field-settings {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.certificate-field-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.1fr) minmax(130px, 0.9fr) minmax(110px, 0.8fr) minmax(92px, 0.55fr) minmax(86px, 0.5fr) minmax(86px, 0.5fr) minmax(100px, 0.7fr) auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.certificate-field-row label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.certificate-field-row input[type="number"],
.certificate-field-row input[type="text"],
.certificate-field-row input:not([type]),
.certificate-field-row select {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
}

.certificate-field-row input[type="color"] {
  width: 100%;
  min-height: 34px;
  padding: 3px;
}

.certificate-kicker {
  color: #1c5a47;
  font-size: clamp(24px, 2.6vw, 42px);
  font-weight: 950;
  text-transform: uppercase;
}

.certificate-sheet h1 {
  margin: 10px 0 0;
  color: #10261f;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.04;
}

.certificate-place {
  margin: 18px 0 0;
  color: #b68513;
  font-size: clamp(24px, 3.2vw, 42px);
  font-weight: 950;
}

.certificate-name {
  margin-top: 20px;
  color: #07130f;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.03;
  font-weight: 950;
}

.certificate-club,
.certificate-discipline,
.certificate-meta {
  margin: 0;
  color: #4d625a;
  font-weight: 800;
}

.certificate-club {
  font-size: clamp(18px, 2vw, 30px);
}

.certificate-discipline {
  margin-top: 20px;
  font-size: clamp(20px, 2.8vw, 34px);
}

.certificate-meta {
  margin-top: 18px;
  font-size: clamp(16px, 1.6vw, 24px);
}

.certificate-signatures {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 80px;
  margin-top: 112px;
  transform: translateY(calc(42px + 3cm));
  color: #4d625a;
  font-size: 16px;
  font-weight: 800;
  pointer-events: none;
}

.certificate-signatures span {
  border-top: 2px solid rgba(16, 38, 31, 0.28);
  padding-top: 16px;
  min-height: 170px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.certificate-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

.announcement-composer {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(260px, 1.5fr) minmax(140px, 0.6fr);
  gap: 12px;
}

.announcement-generator {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(140px, 0.6fr) minmax(120px, 0.45fr) minmax(280px, 1.6fr);
  gap: 12px;
  align-items: end;
}

.announcement-test-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(140px, 0.45fr) minmax(260px, 1fr);
  gap: 12px;
  align-items: end;
}

.announcement-test-grid textarea {
  min-height: 86px;
  resize: vertical;
  font: inherit;
}

.instant-announcement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.instant-announcement-prefix {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.55fr) minmax(220px, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6fbf8;
}

.instant-announcement-call {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.instant-announcement-call label {
  font-weight: 900;
  color: var(--muted);
}

.live-announcement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.live-announcement-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.live-announcement-box > strong {
  color: var(--ink);
}

.announcement-preview {
  width: 100%;
  margin: 12px 0;
  min-height: 96px;
  resize: vertical;
  font: inherit;
}

.announcement-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.announcement-readiness-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.announcement-readiness-card {
  display: grid;
  gap: 7px;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  cursor: pointer;
}

.announcement-readiness-card.ok {
  border-color: rgba(45, 111, 85, 0.28);
  background: #f0f7f2;
}

.announcement-readiness-card.todo {
  border-color: rgba(232, 196, 90, 0.45);
  background: #fff9e8;
}

.announcement-readiness-card.empty {
  opacity: 0.72;
}

.announcement-readiness-card span {
  color: var(--muted);
  font-weight: 800;
}

.announcement-readiness-card strong {
  font-size: 1.7rem;
  line-height: 1;
}

.announcement-readiness-card small {
  color: var(--muted);
  line-height: 1.25;
}

.announcement-readiness-card em {
  justify-self: start;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(45, 111, 85, 0.12);
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

.generation-status {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef5f1;
  color: var(--green);
  font-weight: 800;
}

.readiness-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(18, 43, 35, 0.12);
}

.readiness-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.announcement-filters {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(140px, 0.7fr) minmax(140px, 0.7fr) minmax(220px, 1.3fr);
  gap: 12px;
  margin-bottom: 10px;
}

.announcement-block-list {
  display: grid;
  gap: 8px;
  max-height: none;
  overflow: visible;
}

.announcement-block-row {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  grid-template-areas:
    "badge main status"
    ". upload actions";
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.announcement-block-row > .badge {
  grid-area: badge;
  align-self: center;
}

.announcement-block-row strong {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  line-height: 1.15;
}

.announcement-block-main {
  grid-area: main;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.announcement-block-row > .status-pill {
  grid-area: status;
  align-self: center;
  justify-self: end;
  white-space: nowrap;
}

.pronunciation-input {
  width: 100%;
  min-width: 0;
}

.pronunciation-language-select {
  width: 190px;
  min-width: 0;
}

.pronunciation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px) auto;
  gap: 8px;
  align-items: center;
}

.pronunciation-info summary {
  width: 34px;
  height: 34px;
}

.pronunciation-info .info-popover-content {
  right: 0;
  width: min(390px, calc(100vw - 56px));
}

.announcement-audio-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.announcement-block-row .file-input {
  grid-area: upload;
  min-width: 0;
  width: 100%;
  align-self: center;
}

.certificate-print-body {
  margin: 0;
  background: #fff;
}

.certificate-print-page {
  min-height: 100vh;
  padding: 0;
  background: #fff;
  display: grid;
  place-items: center;
}

.certificate-print-page .certificate-sheet {
  width: 210mm;
  height: 297mm;
  aspect-ratio: auto;
  box-shadow: none;
  break-after: page;
  page-break-after: always;
}

.certificate-print-page .certificate-sheet:last-of-type {
  break-after: auto;
  page-break-after: auto;
}

.view-card span {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.view-card h3 {
  margin: 12px 0 0;
  font-size: 22px;
}

.view-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.view-link-list {
  display: grid;
  gap: 10px;
}

.view-link-list div {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.view-link-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.monitor-page {
  min-height: 100vh;
  padding: 14px 18px;
  background: var(--bg);
}

.monitor-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.monitor-page-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1;
  white-space: nowrap;
}

.monitor-page-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.monitor-page-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.monitor-page-meta span {
  padding: 7px 10px;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.monitor-toggle {
  display: inline-flex;
  gap: 8px;
  flex: 0 0 auto;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.monitor-toggle button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 7px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 950;
  cursor: pointer;
}

.monitor-toggle button.active {
  background: var(--green);
  color: #fff;
}

.monitor-board {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.monitor-older-board {
  margin-top: 16px;
}

.monitor-board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.monitor-board-head span {
  color: var(--green);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.monitor-board-head h3 {
  margin: 4px 0 0;
  font-size: 26px;
}

.monitor-board-head small {
  color: var(--muted);
  font-weight: 800;
}

.monitor-list {
  display: grid;
  gap: 10px;
}

.monitor-row {
  display: grid;
  grid-template-columns: 110px minmax(260px, 1.4fr) minmax(390px, 1.2fr) minmax(120px, 0.4fr) 54px 120px;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.monitor-row.status-running {
  border-color: rgba(17, 104, 79, 0.22);
  background: #f4fbf7;
}

.monitor-row.status-done {
  background: #f9faf8;
}

.monitor-row.status-recent-done {
  border-color: rgba(43, 142, 101, 0.48);
  background: #d4f0df;
  box-shadow: inset 4px 0 0 rgba(43, 142, 101, 0.58);
}

.monitor-field,
.monitor-status {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 950;
}

.monitor-field {
  background: #f7f1dc;
  color: #7a5b08;
}

.monitor-status {
  background: var(--green);
  color: #fff;
}

.monitor-row.status-done .monitor-status {
  background: #dde5df;
  color: var(--ink);
}

.monitor-row.status-recent-done .monitor-status {
  background: #9bdcbc;
  color: #073c29;
}

.monitor-ack {
  display: flex;
  align-items: center;
  justify-content: center;
}

.monitor-ack-button,
.monitor-ack-placeholder {
  width: 46px;
  height: 46px;
  border-radius: 8px;
}

.monitor-ack-button {
  border: 2px solid rgba(7, 60, 41, 0.24);
  background: #2f7658;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(25, 74, 55, 0.14);
}

.monitor-ack-button:hover {
  background: #245f47;
  transform: translateY(-1px);
}

.monitor-pairing {
  min-width: 0;
}

.monitor-pairing strong,
.monitor-pairing small {
  display: block;
  overflow-wrap: anywhere;
}

.monitor-pairing strong {
  color: var(--ink);
  font-size: 17px;
}

.monitor-pairing strong span {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.monitor-pairing small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.monitor-sets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.monitor-sets span {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 8px;
  background: #eef3ef;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.monitor-sets strong {
  color: var(--ink);
  font-size: 15px;
}

.monitor-duration span,
.monitor-duration strong {
  display: block;
}

.monitor-duration span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.monitor-duration strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 16px;
}

.monitor-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
}

.monitor-ready-board {
  border-color: rgba(17, 104, 79, 0.18);
  background: #f7fbf8;
}

.monitor-ready-list {
  display: grid;
  gap: 8px;
}

.monitor-ready-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.4fr) 150px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(17, 104, 79, 0.14);
  border-radius: 8px;
  background: #fff;
}

.monitor-ready-row strong,
.monitor-ready-row span,
.monitor-ready-row p,
.monitor-ready-row em {
  overflow-wrap: anywhere;
}

.monitor-ready-row strong {
  display: block;
  color: var(--green);
  font-size: 15px;
}

.monitor-ready-row div > span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.monitor-ready-row p {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: var(--ink);
}

.monitor-ready-row p span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.monitor-ready-row em {
  justify-self: end;
  padding: 8px 10px;
  border-radius: 999px;
  background: #e5f3eb;
  color: var(--green);
  font-style: normal;
  font-weight: 950;
}

.monitor-load-more {
  width: 100%;
  margin-top: 12px;
}

.compact-overview-page {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  padding: clamp(8px, 1vw, 14px);
  background: var(--bg);
  color: var(--ink);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(6px, 0.8vw, 10px);
}

.compact-overview-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
}

.compact-overview-head h1 {
  margin: 0;
  font-size: clamp(18px, 2vw, 30px);
  line-height: 1;
  white-space: nowrap;
}

.compact-overview-head div {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.compact-overview-head span {
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 950;
  box-shadow: var(--shadow);
}

.compact-overview-list {
  min-height: 0;
  display: grid;
  grid-auto-rows: minmax(0, min(46px, calc((100vh - 74px - var(--compact-row-gap-count) * 4px) / var(--compact-row-count))));
  align-content: start;
  gap: 4px;
}

.compact-overview-row {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(58px, 0.32fr) minmax(220px, 2.2fr) minmax(300px, 1.6fr) minmax(78px, 0.48fr);
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(17, 104, 79, 0.2);
  border-radius: 7px;
  background: #f8fcfa;
  box-shadow: 0 2px 10px rgba(12, 33, 25, 0.05);
  font-size: clamp(10px, calc(15px - var(--compact-density) * 0.45px), 15px);
  line-height: 1.05;
}

.compact-overview-row.status-running,
.compact-overview-row.status-live {
  background: #effaf4;
}

.compact-overview-field {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border-radius: 6px;
  background: #f7f1dc;
  color: #725206;
  font-size: 1.1em;
  font-weight: 950;
  white-space: nowrap;
}

.compact-overview-pairing {
  min-width: 0;
}

.compact-overview-pairing strong {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.08em;
  font-weight: 950;
}

.compact-overview-pairing strong span {
  color: var(--muted);
  font-size: 0.78em;
  text-transform: uppercase;
}

.compact-overview-pairing small {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.82em;
  font-weight: 850;
}

.compact-overview-sets {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.compact-overview-sets span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 100%;
  min-height: 26px;
  padding: 3px 5px;
  border-radius: 6px;
  background: #edf3ef;
  color: var(--muted);
  font-size: 0.86em;
  font-weight: 900;
  white-space: nowrap;
}

.compact-overview-sets strong {
  color: var(--ink);
  font-size: 1.08em;
}

.compact-overview-meta {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 1px;
}

.compact-overview-meta span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--green);
  font-size: 0.78em;
  font-weight: 950;
  text-transform: uppercase;
}

.compact-overview-meta strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 1.02em;
  font-weight: 950;
}

.compact-overview-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 950;
}

@media (max-width: 900px) {
  .compact-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .compact-overview-head span {
    max-width: 92vw;
  }

  .compact-overview-row {
    grid-template-columns: minmax(50px, 0.3fr) minmax(120px, 1.7fr) minmax(180px, 1.5fr) minmax(62px, 0.42fr);
    gap: 4px;
    padding-inline: 5px;
  }

  .compact-overview-sets span b {
    display: none;
  }
}

.stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.stat strong {
  display: block;
  font-size: 30px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.import-summary p {
  margin: 10px 0 0;
  color: var(--muted);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.summary-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.summary-grid strong,
.summary-grid span,
.warning-list span,
.ok-line {
  display: block;
}

.summary-grid strong {
  font-size: 24px;
}

.summary-grid span,
.ok-line {
  color: var(--muted);
  font-size: 13px;
}

.warning-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.warning-list span {
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff2dc;
  color: #7c4f12;
  font-weight: 700;
}

.ok-line {
  margin-top: 10px;
  color: var(--green);
  font-weight: 800;
}

.match-list {
  display: grid;
  gap: 12px;
}

.upcoming-form {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.upcoming-list,
.public-upcoming-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.upcoming-card,
.public-upcoming-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.upcoming-card.status-aufgerufen {
  border-color: rgba(173, 112, 27, 0.42);
  background: #fffaf1;
}

.upcoming-card.status-bereit {
  border-color: rgba(17, 104, 79, 0.36);
  background: #f4fbf7;
}

.upcoming-rank {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 950;
  font-size: 20px;
}

.upcoming-body {
  min-width: 0;
}

.upcoming-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.upcoming-head strong,
.upcoming-head em {
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef3ef;
  color: var(--green);
  font-style: normal;
  text-transform: uppercase;
  font-size: 11px;
}

.upcoming-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-top: 8px;
}

.upcoming-teams b {
  font-size: 18px;
  line-height: 1.1;
}

.upcoming-teams span {
  color: var(--muted);
  font-weight: 800;
}

.upcoming-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.upcoming-actions {
  margin-top: 12px;
}

.done-list {
  display: grid;
  gap: 12px;
}

.done-list summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 900;
  padding: 8px 0;
}

.done-list .match-card {
  margin-top: 12px;
}

.result-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.result-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.result-filters .wide-filter {
  grid-column: 1 / -1;
}

.result-list {
  display: grid;
  gap: 12px;
}

.result-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.result-meta,
.result-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.result-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.result-scoreline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 12px;
}

.result-team {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #fbfcfb;
}

.result-team.winner {
  background: #e2f4ed;
  color: var(--green);
}

.result-team b,
.result-team small {
  display: block;
}

.result-team b {
  overflow-wrap: anywhere;
}

.result-team small {
  margin-top: 3px;
  color: var(--muted);
}

.result-score {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  min-width: 150px;
}

.result-set {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 5px 9px;
  background: #f1f4ef;
  color: var(--ink);
  font-weight: 900;
}

.result-footer {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.audit-list {
  display: grid;
  gap: 10px;
}

.audit-list.compact {
  margin-top: 10px;
  gap: 8px;
}

.audit-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.audit-list.compact .audit-card {
  background: #fbfcfb;
  box-shadow: none;
}

.usage-log-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.usage-log-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(190px, 1.5fr) minmax(170px, 1.4fr) minmax(94px, 0.7fr) minmax(96px, 0.7fr);
  gap: 10px;
  align-items: center;
  min-width: 860px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.usage-log-row.head {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.36);
}

.usage-log-row span {
  min-width: 0;
}

.usage-log-row strong,
.usage-log-row small {
  display: block;
}

.usage-log-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.audit-time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.audit-main {
  min-width: 0;
}

.audit-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.audit-head strong {
  color: var(--green);
}

.audit-head span {
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef3ef;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.audit-card p {
  margin: 5px 0 0;
}

.audit-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.match-audit {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.match-audit summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 900;
}

.match-card {
  position: relative;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.match-card-primary-actions {
  margin-top: 10px;
  display: flex;
}

.match-card-primary-actions .btn {
  width: 100%;
}

.match-card-manage {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.match-card-manage > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--green);
  font-weight: 900;
  font-size: 13px;
  list-style: none;
}

.match-card-manage > summary::-webkit-details-marker {
  display: none;
}

.match-card-manage > summary::after {
  content: "›";
  font-size: 15px;
  transition: transform 0.16s ease;
}

.match-card-manage[open] > summary::after {
  transform: rotate(90deg);
}

.match-card-manage > summary + * {
  margin-top: 12px;
}

.match-card-manage .match-audit {
  border-top: none;
  padding-top: 0;
}

.match-card-quick-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  gap: 6px;
}

.match-card-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgba(17, 104, 79, 0.22);
  border-radius: 8px;
  background: #eef8f3;
  color: var(--green);
  font-size: 22px;
  line-height: 1;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(17, 37, 31, 0.08);
}

.match-card-icon-btn:hover,
.match-card-icon-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(17, 37, 31, 0.14);
}

.match-card-icon-btn.danger {
  border-color: rgba(178, 70, 62, 0.25);
  background: #fff1ef;
  color: var(--red);
}

.match-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.admin-match-card .match-head {
  padding-right: 84px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #eef3ef;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.badge.live {
  background: #e2f4ed;
  color: var(--green);
}

.badge.done {
  background: #f2e4e3;
  color: var(--red);
}

.badge.free-field {
  background: #e2f4ed;
  color: var(--green);
}

.badge.bracket-code {
  background: rgba(241, 196, 79, 0.22);
  color: #7a5b08;
}

.badge.schedule-badge {
  background: #e4f2ed;
  color: var(--green);
}

.duration-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #f7f1dc;
  color: #7a5b08;
  font-size: 12px;
  font-weight: 900;
}

.field-handoff {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(260px, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(17, 104, 79, 0.24);
  border-radius: 8px;
  background: #f4fbf7;
}

.field-handoff strong,
.field-handoff span {
  display: block;
}

.field-handoff span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field-handoff.muted {
  background: #fbfcfb;
  border-color: var(--line);
}

.next-select {
  min-width: min(100%, 360px);
  max-width: 520px;
}

.scoreline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.team {
  min-width: 0;
}

.team b {
  display: block;
  overflow-wrap: anywhere;
}

.team small {
  color: var(--muted);
}

.score {
  min-width: 92px;
  text-align: center;
  font-size: 28px;
  font-weight: 900;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.sets {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.set-editor {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.set-edit-row {
  display: grid;
  grid-template-columns: 72px 72px auto 72px minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
}

.set-editor-actions {
  display: flex;
  justify-content: flex-end;
}

.set-special-result-row {
  display: grid;
  grid-template-columns: 72px minmax(150px, 220px) minmax(170px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding-top: 2px;
}

.set-special-result-row > strong {
  color: var(--muted);
}

.set-special-result-row .compact-select {
  min-width: 0;
}

.set-edit-row input[type="number"] {
  min-height: 38px;
  padding: 6px 8px;
  text-align: center;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.check input {
  width: 18px;
  min-height: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.field-card {
  min-height: 178px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.field-card.free {
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f9fbf9;
}

.tablet-device-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.tablet-device-list h4 {
  margin: 0 0 4px;
}

.tablet-device-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.tablet-device-row-multi {
  grid-template-columns: 90px minmax(0, 1fr) auto minmax(0, 1fr) auto auto;
}

.tablet-device-row input {
  width: 100%;
}

.org-device-page {
  place-items: center;
}

.org-device-page .tablet-wrap {
  width: min(1120px, calc(100vw - 40px));
}

.org-device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.org-device-grid.fields {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.org-device-card {
  min-height: 150px;
  border: 1px solid rgba(241, 196, 79, 0.45);
  border-radius: 8px;
  background: #1c332a;
  color: #f8fbf9;
  text-align: left;
  padding: 22px;
  cursor: pointer;
  display: grid;
  align-content: center;
  gap: 8px;
  font: inherit;
}

.org-device-card.field {
  min-height: 110px;
  text-align: center;
}

.org-device-card strong {
  font-size: clamp(24px, 3vw, 42px);
}

.org-device-card span {
  color: #c4d0c8;
}

.tv-device-switch {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(15, 32, 27, 0.85);
  color: #f8fbf9;
  padding: 10px 14px;
  font-weight: 800;
}

.tablet {
  min-height: 100vh;
  background: #0f201b;
  color: #f8fbf9;
  padding: 18px;
}

.tablet-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.control-warmup-page {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: clamp(8px, 1.5vh, 18px);
}

.control-warmup-page .tablet-wrap {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.control-warmup-page .topbar {
  margin-bottom: clamp(8px, 1.5vh, 18px);
}

.control-warmup-page .topbar h2 {
  font-size: clamp(28px, 4.4vh, 44px);
  line-height: 1;
}

.control-warmup-page .topbar p {
  font-size: clamp(15px, 2.2vh, 20px);
  line-height: 1.15;
}

.control-warmup-page .sync-banner {
  margin-top: clamp(6px, 1vh, 10px);
}

.tablet::before {
  display: none;
}

.tablet .scoreboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-tablet-wait {
  margin-top: 32px;
  padding: 28px;
  border: 1px solid rgba(248, 251, 249, 0.18);
  border-radius: 8px;
  background: rgba(248, 251, 249, 0.08);
  color: #f8fbf9;
}

.field-tablet-wait h3 {
  margin: 0 0 10px;
  color: #f8fbf9;
  font-size: clamp(26px, 4vw, 42px);
}

.field-tablet-wait p {
  margin: 0;
  color: rgba(248, 251, 249, 0.78);
  font-size: clamp(17px, 2.4vw, 24px);
  line-height: 1.35;
}

.control-warmup-card {
  min-height: 0;
  margin-top: 0;
  padding: clamp(14px, 2.6vh, 34px) clamp(16px, 3vw, 42px);
  display: grid;
  place-items: center;
  justify-items: center;
  align-content: center;
  gap: clamp(8px, 1.5vh, 16px);
  border: 1px solid rgba(248, 251, 249, 0.18);
  border-radius: 8px;
  background: rgba(248, 251, 249, 0.07);
  color: #f8fbf9;
  text-align: center;
}

.control-warmup-card h1 {
  margin: 0;
  color: #f8fbf9;
  font-size: clamp(34px, 8vh, 76px);
  line-height: 1;
}

.control-warmup-card p {
  max-width: 820px;
  margin: 0;
  color: rgba(248, 251, 249, 0.8);
  font-size: clamp(16px, 3vh, 27px);
  line-height: 1.2;
}

.control-warmup-card .badge.warmup {
  background: rgba(247, 211, 91, 0.16);
  color: var(--accent);
  font-size: clamp(16px, 2vw, 22px);
}

.control-warmup-actions {
  width: min(100%, 760px);
  display: grid;
  gap: 12px;
}

.control-warmup-start,
.control-warmup-direct {
  width: min(100%, 760px);
  min-height: clamp(56px, 10vh, 96px);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  font-size: clamp(24px, 6vh, 50px);
  font-weight: 950;
  line-height: 1.05;
  cursor: pointer;
}

.control-warmup-start {
  background: #267452;
  box-shadow: 0 18px 36px rgba(38, 116, 82, 0.28);
}

.control-warmup-direct {
  background: #b8463e;
  box-shadow: 0 18px 36px rgba(184, 70, 62, 0.26);
}

.control-warmup-countdown {
  color: var(--accent);
  font-size: clamp(58px, 9vw, 112px);
  font-weight: 950;
  line-height: 0.95;
}

.control-set-transition-page .tablet-wrap {
  min-height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto 1fr;
}

.control-set-transition-card,
.control-set-correction-card {
  margin-top: 18px;
  border: 1px solid rgba(248, 251, 249, 0.18);
  border-radius: 8px;
  background: rgba(248, 251, 249, 0.08);
  color: #f8fbf9;
}

.control-set-transition-card {
  padding: clamp(18px, 4vw, 44px);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(12px, 2.5vw, 22px);
  text-align: center;
}

.control-set-transition-card h1,
.control-set-correction-head h1 {
  margin: 0;
  color: #f8fbf9;
  line-height: 1;
}

.control-set-transition-card h1 {
  font-size: clamp(38px, 8vw, 92px);
}

.control-set-transition-card p,
.control-set-correction-head p {
  margin: 0;
  color: rgba(248, 251, 249, 0.78);
  line-height: 1.25;
}

.control-set-transition-card p {
  max-width: 820px;
  font-size: clamp(18px, 2.6vw, 30px);
}

.control-set-transition-score {
  color: var(--accent);
  font-size: clamp(78px, 18vw, 190px);
  font-weight: 950;
  line-height: 0.9;
}

.control-set-transition-actions {
  width: min(100%, 820px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.control-transition-next,
.control-transition-correct {
  min-height: clamp(60px, 8vh, 88px);
  border-radius: 8px;
  color: #ffffff;
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 950;
  line-height: 1.08;
  padding: 12px 16px;
}

.control-transition-next {
  background: #267452;
}

.control-transition-correct {
  background: rgba(248, 251, 249, 0.16);
  border: 1px solid rgba(248, 251, 249, 0.22);
}

.control-transition-next:disabled {
  opacity: 0.45;
}

.control-set-correction-card {
  padding: clamp(14px, 2.5vw, 28px);
}

.control-set-correction-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
}

.control-set-correction-head h1 {
  margin-top: 10px;
  font-size: clamp(34px, 5vw, 60px);
}

.control-set-correction-head p {
  margin-top: 8px;
  font-size: clamp(16px, 2.3vw, 24px);
}

.control-set-correction-card .tablet-correction {
  margin-top: 0;
}

.score-panel {
  background: #f8fbf9;
  color: var(--ink);
  border-radius: 8px;
  padding: 16px;
  min-height: 360px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
}

.score-panel h2 {
  margin: 0;
  font-size: 24px;
  overflow-wrap: anywhere;
}

.big-score {
  align-self: center;
  text-align: center;
  font-size: clamp(82px, 16vw, 170px);
  line-height: 1;
  font-weight: 950;
}

.score-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.score-buttons button {
  min-height: 82px;
  border-radius: 8px;
  font-size: 36px;
  font-weight: 900;
}

.tablet-correction {
  margin-top: 14px;
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tablet-correction-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.tablet-correction h3 {
  margin: 0;
  font-size: 18px;
}

.tablet-correction-head span {
  color: #b8c9c1;
  font-size: 13px;
}

.tablet-correction-grid {
  display: grid;
  gap: 8px;
}

.tablet-set-row {
  display: grid;
  grid-template-columns: 72px 70px auto 70px minmax(130px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.tablet-set-row input[type="number"] {
  min-height: 40px;
  padding: 6px 8px;
  text-align: center;
}

.tablet-set-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dce8e2;
  font-weight: 800;
}

.tablet-set-row label input {
  width: 18px;
  min-height: 18px;
}

.referee-tablet .tablet-wrap {
  max-width: 1480px;
}

.referee-tablet {
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
  padding: clamp(8px, 1.2vw, 18px);
}

.referee-tablet .tablet-wrap {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) minmax(82px, 16svh) auto;
  gap: clamp(6px, 1vw, 12px);
  overflow: hidden;
}

.referee-tablet-court .tablet-wrap {
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(4px, 0.7vw, 8px);
}

.referee-tablet .topbar {
  gap: clamp(6px, 1vw, 12px);
}

.referee-tablet-court .topbar {
  margin-bottom: 0;
}

.referee-tablet .topbar h2 {
  font-size: clamp(20px, 2.4vw, 34px);
}

.referee-tablet .topbar p,
.referee-tablet .notice-slot {
  font-size: clamp(12px, 1.2vw, 16px);
}

.referee-shuttle,
.referee-undo {
  width: clamp(44px, 4vw, 58px);
  height: clamp(44px, 4vw, 58px);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  font-weight: 950;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.referee-shuttle {
  background: #e7f4ef;
  color: var(--green);
  overflow: hidden;
  padding: 0;
}

.referee-shuttle img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.referee-undo {
  background: var(--gold);
  color: #111712;
  font-size: clamp(24px, 3vw, 36px);
}

.referee-undo span {
  display: block;
  transform: scaleX(-1);
  line-height: 1;
}

.referee-setup,
.referee-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(8px, 1vw, 12px);
  margin: 0;
}

.referee-tablet-court .referee-tools {
  display: grid;
  grid-template-columns: 1fr;
}

.referee-tablet-court .referee-tools .btn {
  width: 100%;
  min-height: 48px;
  height: 50px;
  padding: 8px 16px;
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1;
}

.referee-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 17, 13, 0.72);
}

.referee-modal {
  position: relative;
  width: min(720px, 100%);
  border-radius: 10px;
  background: #f8fbf6;
  color: var(--ink);
  padding: 28px;
  display: grid;
  gap: 14px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.referee-modal p {
  color: var(--muted);
  font-weight: 800;
}

.referee-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #eef3ef;
  color: var(--ink);
  font-size: 28px;
  font-weight: 900;
}

.referee-extra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.referee-interruption-timer {
  justify-items: center;
  gap: 22px;
  text-align: center;
}

.referee-interruption-timer > strong {
  color: var(--accent);
  font-size: clamp(64px, 12vw, 132px);
  font-weight: 950;
  line-height: 0.95;
}

.referee-interruption-end {
  width: min(520px, 100%);
  min-height: 76px;
  font-size: clamp(20px, 2.6vw, 32px);
}

.hidden {
  display: none !important;
}

.referee-modal-section {
  max-height: min(52svh, 480px);
  overflow: auto;
}

.referee-modal-section .tablet-correction,
.referee-modal-section .tablet-correction {
  margin-top: 0;
  background: #13211b;
}

.referee-modal-section .referee-log {
  margin-top: 0;
}

.referee-setup label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.referee-start-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2vw, 22px);
  background: rgba(5, 17, 13, 0.9);
}

.referee-start-card {
  width: min(960px, 100%);
  max-height: calc(100svh - 24px);
  border: 3px solid var(--accent);
  border-radius: 10px;
  background: #f8fbf6;
  color: var(--ink);
  padding: clamp(14px, 2vw, 24px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 16px);
  overflow: auto;
}

.referee-start-wizard {
  grid-template-columns: 1fr;
}

.referee-start-card h3 {
  font-size: clamp(24px, 3vw, 38px);
  margin: 0;
}

.referee-start-card p {
  color: var(--muted);
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 800;
  margin: 6px 0 0;
}

.referee-start-card .referee-setup-note {
  display: inline-block;
  margin-top: 12px;
  border-radius: 999px;
  background: #e3f0e9;
  color: var(--green);
  padding: 7px 11px;
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 950;
}

.referee-start-card > div:first-child,
.referee-start-card .referee-coin,
.referee-start-card > button,
.referee-choice-grid,
.referee-selection-block,
.referee-announcement-preview {
  grid-column: 1 / -1;
}

.referee-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 18px);
}

.referee-large-choice {
  min-height: clamp(128px, 20svh, 210px);
  border: 2px solid #d7e2dc;
  border-radius: 10px;
  background: #eef6f0;
  color: var(--ink);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: clamp(16px, 2vw, 26px);
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.referee-large-choice span {
  color: var(--muted);
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 950;
  text-transform: uppercase;
}

.referee-large-choice strong {
  font-size: clamp(21px, 2.6vw, 36px);
  line-height: 1.05;
}

.referee-large-choice.selected {
  border-color: var(--green);
  background: #dff1e8;
  box-shadow: 0 14px 40px rgba(47, 113, 86, 0.16), inset 0 0 0 2px rgba(47, 113, 86, 0.14);
}

.referee-large-choice.muted {
  background: #f7f4e5;
  border-color: #eadc9f;
}

.referee-selection-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.referee-selection-block h4 {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 950;
}

.referee-player-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.referee-player-choice {
  min-height: clamp(54px, 7svh, 78px);
  border: 2px solid #dce7e1;
  border-radius: 9px;
  background: #f3f8f5;
  color: var(--ink);
  font-size: clamp(17px, 1.8vw, 24px);
  font-weight: 950;
}

.referee-player-choice.selected {
  border-color: var(--green);
  background: #dff1e8;
}

.referee-announcement-preview {
  border: 2px solid rgba(47, 113, 86, 0.24);
  border-radius: 10px;
  background: #edf6f1;
  color: var(--ink);
  padding: clamp(16px, 2vw, 24px);
  font-size: clamp(20px, 2.2vw, 32px);
  font-weight: 900;
  line-height: 1.3;
}

.referee-start-card label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 900;
}

.referee-coin {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 0.6fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef6f0;
}

.referee-coin strong {
  color: var(--ink);
}

.referee-start-card select,
.referee-start-card button {
  min-height: 44px;
  font-size: clamp(16px, 1.6vw, 20px);
}

.referee-start-card > button {
  min-height: 54px;
  font-size: clamp(18px, 2vw, 24px);
}

@media (max-width: 820px), (max-height: 680px) {
  .referee-start-card,
  .referee-coin,
  .referee-choice-grid {
    grid-template-columns: 1fr;
  }

  .referee-large-choice {
    min-height: 96px;
  }
}

.referee-court-score-layout {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(360px, 1fr) min-content min-content min-content;
  gap: clamp(5px, 0.7vw, 8px);
  align-content: stretch;
}

.referee-current-call {
  grid-row: 1;
  min-height: clamp(28px, 4svh, 48px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: clamp(21px, 2.4vw, 38px);
  font-style: italic;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-wrap: balance;
  opacity: 0.94;
  pointer-events: none;
}

.referee-card-action-row {
  grid-row: 2;
  min-height: clamp(32px, 3.4vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6px minmax(0, 1fr);
  align-items: end;
  gap: 0;
  pointer-events: none;
  position: relative;
  z-index: 4;
}

.referee-card-actions {
  display: flex;
  align-items: flex-end;
  gap: clamp(9px, 1.2vw, 16px);
  pointer-events: auto;
}

.referee-card-actions.left {
  justify-content: flex-start;
  padding-left: clamp(8px, 1.2vw, 16px);
}

.referee-card-actions.right {
  justify-content: flex-end;
  padding-right: clamp(8px, 1.2vw, 16px);
}

.referee-card-actions.empty {
  min-height: 1px;
  pointer-events: none;
}

.referee-card-button {
  width: clamp(24px, 2.5vw, 38px);
  height: clamp(34px, 3.8vw, 52px);
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 5px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
  cursor: pointer;
}

.referee-card-button.gelb {
  background: #f5d94e;
}

.referee-card-button.rot {
  background: #c9443c;
}

.referee-card-button.schwarz {
  background: #050505;
  border-color: rgba(255, 255, 255, 0.95);
}

.referee-card-button:hover,
.referee-card-button:focus-visible {
  transform: translateY(-1px);
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.referee-player-card-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.14em;
  margin-left: 0.22em;
  vertical-align: middle;
}

.referee-player-card {
  display: inline-block;
  width: 0.38em;
  height: 0.56em;
  border-radius: 0.08em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.referee-player-card.gelb {
  background: #f5d94e;
}

.referee-player-card.rot {
  background: #c9443c;
}

.referee-player-card.schwarz {
  background: #050505;
}

.referee-card-picker-list {
  display: grid;
  gap: 10px;
}

.referee-confirm-card-button {
  width: 100%;
  min-height: 70px;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 950;
  margin-top: 10px;
}

.referee-badminton-court {
  grid-row: 3;
  position: relative;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6px minmax(0, 1fr);
  border: 3px solid rgba(238, 204, 89, 0.72);
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(238, 204, 89, 0.72) calc(50% - 1px), rgba(238, 204, 89, 0.72) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), rgba(238, 204, 89, 0.42) calc(50% - 1px), rgba(238, 204, 89, 0.42) calc(50% + 1px), transparent calc(50% + 1px)),
    #12261f;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.referee-net {
  background: repeating-linear-gradient(
    0deg,
    rgba(238, 204, 89, 0.95) 0 4px,
    rgba(238, 204, 89, 0.25) 4px 10px
  );
  box-shadow: 0 0 18px rgba(238, 204, 89, 0.2);
}

.referee-court-half {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(6px, 1vw, 12px);
  padding: clamp(10px, 1.4vw, 22px);
  background:
    linear-gradient(90deg, transparent 18%, rgba(238, 204, 89, 0.28) 18% calc(18% + 2px), transparent calc(18% + 2px) 82%, rgba(238, 204, 89, 0.28) 82% calc(82% + 2px), transparent calc(82% + 2px)),
    linear-gradient(0deg, transparent 14%, rgba(238, 204, 89, 0.28) 14% calc(14% + 2px), transparent calc(14% + 2px));
  cursor: pointer;
  user-select: none;
  transition: filter 120ms ease, box-shadow 120ms ease;
}

.referee-court-half:active {
  filter: brightness(1.12);
}

.referee-court-half:focus-visible {
  outline: 3px solid rgba(238, 204, 89, 0.85);
  outline-offset: -7px;
}

.referee-side-score {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: clamp(64px, 12vw, 176px);
  line-height: 0.82;
  font-weight: 950;
}

.referee-court-half.left .referee-side-score {
  left: clamp(18px, 2vw, 34px);
}

.referee-court-half.right .referee-side-score {
  right: clamp(18px, 2vw, 34px);
}

.referee-court-services {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.referee-court-service {
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: clamp(8px, 1vw, 16px);
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 4px;
}

.referee-court-service span,
.referee-court-service em {
  color: var(--muted);
  font-size: clamp(11px, 1vw, 14px);
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.referee-court-service strong {
  color: var(--text);
  font-size: clamp(16px, 2.4vw, 34px);
  line-height: 1.05;
}

.referee-court-service.serving {
  background: rgba(78, 86, 42, 0.92);
  box-shadow: inset 0 0 0 2px rgba(238, 204, 89, 0.36);
}

.referee-court-service.serving em {
  color: var(--accent);
}

.referee-court-service.empty {
  opacity: 0.5;
}

.referee-court-score-controls {
  grid-row: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6px minmax(0, 1fr);
  gap: 0;
  align-self: start;
}

.referee-court-score-controls > div:not(:empty) {
  display: grid;
  grid-template-columns: minmax(64px, 1fr);
  gap: clamp(8px, 1vw, 14px);
}

.referee-court-score-controls > div:first-child {
  padding-right: clamp(8px, 1vw, 14px);
}

.referee-court-score-controls > div:last-child {
  padding-left: clamp(8px, 1vw, 14px);
}

.referee-court-score-controls button {
  height: 22px;
  min-height: 22px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
  font-weight: 950;
}

.referee-court-score-controls .plus {
  background: var(--green);
  color: #fff;
}

.referee-court-score-controls .minus {
  background: #efe8c8;
  color: #332b13;
}

.referee-court-status {
  grid-row: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #14241e;
  color: var(--muted);
  font-weight: 900;
  align-self: start;
}

.referee-court-tools {
  grid-row: 6;
}

.referee-court-status strong {
  color: var(--accent);
}

.referee-status-line {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  align-items: center;
  gap: 8px;
}

.referee-status-line .sync-banner {
  margin: 0;
}

.referee-pause {
  margin: 14px 0;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: #2b2718;
  color: var(--text);
  padding: 16px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 14px;
  align-items: center;
}

.referee-pause span {
  color: var(--accent);
  font-size: 34px;
  font-weight: 950;
}

.referee-pause.compact {
  margin: 0;
  justify-self: center;
  min-width: min(640px, 72vw);
  padding: 7px 14px 9px;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 4px;
  border-radius: 12px;
  border-width: 0;
  background: #2b2718;
  line-height: 1;
}

.referee-pause.compact strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.referee-pause.compact span {
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: .95;
}

.referee-pause.done {
  opacity: .55;
}

.referee-log {
  margin-top: 0;
  display: grid;
  gap: 10px;
  overflow: visible;
  min-height: 0;
  color: #17241e;
}

.referee-log h3 {
  margin: 0;
  color: #17241e;
  font-size: 20px;
}

.referee-log-list {
  display: grid;
  gap: 8px;
}

.referee-log-entry {
  display: grid;
  grid-template-columns: minmax(118px, 0.36fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid #d8e4dc;
  border-left: 8px solid #7da88f;
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: #17241e;
  font-size: clamp(12px, 1.1vw, 15px);
  box-shadow: 0 6px 18px rgba(18, 38, 30, 0.08);
}

.referee-log-entry time {
  color: #53645d;
  font-weight: 850;
  line-height: 1.2;
}

.referee-log-entry strong {
  display: block;
  color: #17241e;
  font-weight: 950;
  line-height: 1.25;
}

.referee-log-entry small {
  display: block;
  margin-top: 4px;
  color: #53645d;
  font-weight: 750;
  line-height: 1.25;
}

.referee-log-entry.score {
  border-left-color: #4b8f68;
  background: #f7fcf9;
}

.referee-log-entry.correction {
  border-left-color: #947226;
  background: #fffaf0;
}

.referee-log-entry.warning,
.referee-log-entry.card-rot,
.referee-log-entry.card-schwarz {
  border-left-color: #b94e42;
  background: #fff7f5;
}

.referee-log-entry.card-gelb {
  border-left-color: #d7aa28;
  background: #fffbea;
}

.referee-log-entry.shuttle {
  border-left-color: #5a7f8f;
  background: #f5fbfd;
}

.referee-log-entry.undo {
  border-left-color: #202823;
  background: #f7f8f7;
}

.referee-log-entry.undone {
  border-style: dashed;
  background-image: linear-gradient(135deg, rgba(23, 36, 30, 0.035), rgba(23, 36, 30, 0));
}

.referee-log-entry.undone strong {
  color: #405047;
}

.referee-log-entry.finish {
  border-left-color: #2f4c3d;
  background: #f2f7f4;
}

.referee-report-page {
  background: #f3f4f0;
  min-height: 100vh;
  padding: 24px;
  color: #17241e;
}

.referee-report-sheet {
  background: white;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px;
}

.module-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.portal-order-list {
  display: grid;
  gap: 8px;
}

.portal-order-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(235, 246, 240, 0.6);
  cursor: grab;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.portal-order-row.dragging {
  border-color: rgba(10, 116, 67, 0.55);
  box-shadow: 0 14px 28px rgba(10, 41, 28, 0.16);
  cursor: grabbing;
  opacity: 0.72;
  transform: scale(0.995);
}

.portal-order-row div {
  min-width: 0;
}

.portal-order-handle,
.portal-order-actions button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  font-weight: 900;
  line-height: 1;
}

.portal-order-handle {
  cursor: grab;
}

.portal-order-actions {
  display: flex;
  gap: 6px;
}

.portal-order-actions button {
  cursor: pointer;
}

.portal-order-row strong,
.portal-order-row small {
  display: block;
}

.portal-order-row small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.module-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(235, 246, 240, 0.6);
}

.module-check.disabled {
  opacity: 0.45;
}

.module-check input {
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 3px;
}

.module-check > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.module-check strong,
.module-check small {
  display: block;
  overflow-wrap: anywhere;
}

.module-check small {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.25;
}

.team-fixture-create {
  display: grid;
  gap: 14px;
}

.team-fixture-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.team-fixture-head {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 14px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(68, 124, 96, 0.18);
  border-radius: 8px;
  background: rgba(235, 246, 240, 0.42);
}

.team-fixture-identity,
.team-fixture-status,
.team-fixture-progress,
.team-fixture-settings {
  min-width: 0;
}

.team-fixture-title-input {
  font-size: 1.05rem;
  font-weight: 800;
}

.team-fixture-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.team-fixture-teams strong {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--accent);
  text-align: center;
  white-space: nowrap;
}

.team-fixture-status {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(260px, 1fr);
  gap: 10px;
  align-items: stretch;
}

.team-fixture-status small {
  color: var(--muted);
}

.team-fixture-progress {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
}

.team-fixture-progress .status-pill {
  justify-self: start;
}

.team-fixture-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
}

.team-fixture-settings label {
  min-width: 0;
}

.team-fixture-settings select,
.team-fixture-settings input:not([type="color"]) {
  width: 100%;
}

.team-fixture-ruleset,
.team-fixture-scoring,
.team-fixture-settings label:has(input[id^="team-fixture-shuttle-type"]) {
  grid-column: 1 / -1;
}

.team-fixture-settings input[type="color"] {
  width: 100%;
  min-height: 40px;
  padding: 5px;
}

.team-turnier-card,
.team-turnier-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.team-turnier-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.4fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 12px;
}

.team-turnier-card h4 {
  margin: 0 0 4px;
}

.team-turnier-card p,
.team-turnier-row span,
.team-turnier-row small {
  color: var(--muted);
}

.team-turnier-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.team-turnier-export-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}

.team-turnier-export-hint small {
  color: var(--muted);
  font-weight: 800;
}

.team-turnier-url-analyze {
  margin-bottom: 18px;
}

.team-turnier-analyze-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.team-turnier-catalog {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(68, 124, 96, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.team-turnier-catalog .section-head.compact h4 {
  margin: 0;
}

.team-turnier-catalog-admin {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.team-turnier-catalog-admin span {
  color: var(--muted);
  font-weight: 800;
}

.team-turnier-catalog-admin-panel {
  border-color: rgba(68, 124, 96, 0.28);
  background: rgba(235, 246, 240, 0.5);
}

.team-turnier-catalog-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(320px, 1.35fr) auto;
  gap: 12px;
  align-items: end;
}

.team-turnier-catalog-list {
  display: grid;
  gap: 10px;
}

.team-turnier-catalog-division {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.team-turnier-catalog-division > div:first-child {
  display: grid;
  gap: 3px;
}

.team-turnier-catalog-division span,
.team-turnier-catalog-samples small {
  color: var(--muted);
  font-weight: 800;
}

.team-turnier-catalog-samples {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
}

.team-turnier-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.team-turnier-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
}

.team-turnier-table {
  display: grid;
  gap: 10px;
}

.team-turnier-row {
  display: grid;
  grid-template-columns: 0.5fr 0.75fr 1fr 1fr;
  gap: 12px;
}

.team-turnier-row > div {
  display: grid;
  gap: 4px;
  align-content: start;
}

.team-turnier-row .ok {
  color: var(--success);
}

.team-turnier-row .warn {
  color: var(--warning);
}

.team-rubber-list {
  display: grid;
  gap: 10px;
}

.team-rubber-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(235, 246, 240, 0.45);
  overflow: hidden;
}

.team-rubber-card[open] {
  background: rgba(235, 246, 240, 0.6);
}

.team-rubber-summary {
  display: grid;
  grid-template-columns: auto minmax(150px, 0.52fr) minmax(260px, 1.25fr) minmax(150px, 0.48fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.team-rubber-summary::-webkit-details-marker {
  display: none;
}

.team-rubber-summary::before {
  content: ">";
  color: var(--accent);
  font-weight: 950;
  transform: rotate(0deg);
  transition: transform 0.16s ease;
}

.team-rubber-card[open] .team-rubber-summary::before {
  transform: rotate(90deg);
}

.team-rubber-summary-main,
.team-rubber-summary-result {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.team-rubber-summary-main {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.team-rubber-summary-main strong,
.team-rubber-summary-main small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.team-rubber-summary-main strong {
  grid-column: 1 / -1;
}

.team-rubber-summary-main small,
.team-rubber-summary-teams em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
}

.team-rubber-summary-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.team-rubber-summary-teams span,
.team-rubber-summary-result strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.team-rubber-summary-result {
  justify-items: end;
  text-align: right;
}

.team-fixture-lifecycle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

.team-rubber-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.48fr) minmax(0, 1fr) minmax(0, 1fr) minmax(300px, 0.78fr);
  gap: 10px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(235, 246, 240, 0.45);
}

.team-rubber-edit-grid {
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.52);
}

.team-rubber-row.compact {
  grid-template-columns: minmax(150px, 0.38fr) minmax(0, 1fr) minmax(0, 1fr) minmax(130px, 0.32fr) auto;
  align-items: center;
}

.team-rubber-row.compact > strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.05;
}

.team-rubber-row.compact span,
.team-rubber-row.compact em {
  min-width: 0;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.score-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.score-summary article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.score-summary span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.score-summary strong {
  min-width: 0;
  color: var(--accent);
}

.score-summary em {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--accent);
  font-size: 2rem;
  font-style: normal;
  font-weight: 950;
}

.team-rubber-label,
.team-rubber-side,
.team-rubber-meta {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.team-rubber-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: end;
}

.team-rubber-admin {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
}

.team-rubber-officials {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
}

.team-rubber-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  gap: 8px;
}

.team-rubber-label small,
.team-rubber-side span,
.team-rubber-meta label {
  color: var(--muted);
  font-weight: 800;
}

.team-rubber-player {
  display: grid;
  gap: 8px;
}

.team-turnier-import {
  border-color: rgba(68, 124, 96, 0.28);
  background: rgba(235, 246, 240, 0.5);
}

.team-turnier-reset-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.team-turnier-reset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.team-turnier-reset-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.team-turnier-reset-row span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.team-turnier-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.team-option-card {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.team-option-card h4 {
  margin: 0 0 4px;
  color: var(--accent);
}

.team-option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.team-option-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.team-option-row small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.team-option-row input {
  text-align: center;
}

.team-rubber-meta {
  grid-template-columns: 1fr;
}

.team-rubber-meta select option:disabled {
  color: #9a9f9b;
}

.team-rubber-set-editor {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
}

.team-rubber-set-editor > strong {
  color: var(--accent);
  font-size: 0.92rem;
}

.team-rubber-set-row {
  display: grid;
  grid-template-columns: 48px minmax(46px, 1fr) auto minmax(46px, 1fr) minmax(66px, auto);
  gap: 6px;
  align-items: center;
}

.team-rubber-set-row span,
.team-rubber-set-row label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.team-rubber-set-row input[type="number"] {
  min-width: 0;
  padding: 7px 6px;
  text-align: center;
}

.team-rubber-set-row label {
  display: flex;
  gap: 5px;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
}

.team-rubber-referee-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-rubber-meta .btn {
  width: 100%;
}

.team-display-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.team-field-scoreboard-links {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 4px;
}

.team-field-scoreboard-links strong {
  flex: 1 1 100%;
  color: var(--muted);
  font-size: 0.9rem;
}

.team-scoreboard-link-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(235, 246, 240, 0.45);
}

.team-scoreboard-link-card h4 {
  margin: 0;
  font-size: 1.05rem;
}

.team-scoreboard-link-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.team-scoreboard-link-grid {
  display: grid;
  gap: 8px;
}

.team-scoreboard-field-links {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(18, 44, 34, 0.12);
}

.team-scoreboard-link-row {
  display: grid;
  grid-template-columns: minmax(140px, max-content) minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
}

.team-scoreboard-link-row strong {
  color: var(--accent);
  min-width: 0;
  white-space: nowrap;
}

.team-scoreboard-link-row input {
  min-width: 0;
  width: 100%;
}

.overlay-on-air {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 34px;
  padding: 0 12px;
  border: 3px solid #050505;
  border-radius: 10px;
  background: #ffffff;
  color: #17a85b;
  font-size: 0.78rem;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  animation: overlay-on-air-blink 1s steps(1, end) infinite;
}

@keyframes overlay-on-air-blink {
  0%,
  49% {
    color: #17a85b;
  }
  50%,
  100% {
    color: #c83f36;
  }
}

@media (max-width: 900px) {
  .team-scoreboard-link-row {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
  }

  .team-scoreboard-link-row strong {
    grid-column: 1 / -1;
  }
}

.team-overlay-page {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: #00ff00;
  color: #ffffff;
  font-family: var(--font, system-ui, sans-serif);
}

.team-scoreboard-page .team-scoreboard-overlay {
  position: absolute;
  top: 96px;
  left: 44px;
  width: 430px;
}

.team-scoreboard-head,
.team-scoreboard-row {
  display: grid;
  grid-template-columns: minmax(0, 326px) 52px 52px;
  align-items: center;
}

.team-scoreboard-head {
  width: 430px;
}

.team-scoreboard-head span {
  min-height: 30px;
}

.team-scoreboard-head strong {
  box-sizing: border-box;
  width: 100%;
  min-height: 30px;
  display: grid;
  justify-content: center;
  justify-items: center;
  place-items: center;
  padding: 7px 2px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: #666666;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.team-scoreboard-head strong:last-child {
  background: #858585;
}

.team-scoreboard-row span,
.team-scoreboard-row strong {
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 3px 8px;
  color: #ffffff;
  font-weight: 500;
  line-height: 1;
}

.team-scoreboard-row span {
  justify-content: center;
  overflow: hidden;
  font-size: 20px;
  text-align: center;
  white-space: nowrap;
}

.team-scoreboard-row span > b,
.team-matchboard-name > span {
  display: inline-block;
  max-width: 100%;
  overflow: visible;
  font: inherit;
  font-weight: inherit;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.team-scoreboard-row span > b {
  text-align: center;
}

.team-scoreboard-row strong {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 25px;
}

.team-scoreboard-row strong:nth-child(2) {
  background: #5f5f5f;
}

.team-scoreboard-row strong:nth-child(3) {
  background: #929292;
}

.team-scoreboard-row.home span {
  background: #bb5757;
}

.team-scoreboard-row.away span {
  background: #b7b7b7;
}

.team-matchboard {
  position: absolute;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 58px 22px 58px minmax(260px, 1fr);
  align-items: center;
  min-width: 720px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.18));
}

.team-matchboard.has-logos {
  grid-template-columns: 64px minmax(260px, 1fr) 58px 22px 58px minmax(260px, 1fr) 64px;
}

.team-matchboard-logo {
  width: 64px;
  height: 58px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
}

.team-matchboard-logo.home {
  border-radius: 2px 0 0 2px;
}

.team-matchboard-logo.away {
  border-radius: 0 2px 2px 0;
}

.team-matchboard-logo img {
  max-width: 52px;
  max-height: 48px;
  object-fit: contain;
  display: block;
}

.team-matchboard-name,
.team-matchboard-score,
.team-matchboard-separator {
  height: 58px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
}

.team-matchboard-name {
  padding: 0 18px;
  overflow: hidden;
  white-space: nowrap;
}

.team-matchboard-name.home {
  justify-content: end;
  background: #bb5757;
}

.team-matchboard-name.home > span {
  text-align: right;
}

.team-matchboard-name.away {
  justify-content: start;
  background: #b7b7b7;
}

.team-matchboard-name.away > span {
  text-align: left;
}

.team-matchboard-score,
.team-matchboard-separator {
  background: #888888;
  font-size: 31px;
}

.team-public-page {
  min-height: 100vh;
  padding: 28px;
  background: #07130f;
  color: #eef8f2;
  font-family: var(--font, system-ui, sans-serif);
}

.team-hall-header,
.team-overview-header,
.team-detail-page header {
  margin-bottom: 24px;
}

.team-hall-header h1,
.team-overview-header h1,
.team-detail-page h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 78px);
  line-height: 1.05;
}

.team-hall-header h1 {
  overflow: hidden;
  white-space: nowrap;
}

.team-hall-scoreline {
  display: inline-block;
  max-width: 100%;
  color: #eef8f2;
  font: inherit;
  line-height: 1;
  white-space: nowrap;
}

.team-hall-scoreline b {
  color: var(--gold);
  font: inherit;
  font-weight: inherit;
}

.team-hall-header p,
.team-detail-page header p,
.team-detail-page header span {
  margin: 8px 0 0;
  color: rgba(238, 248, 242, 0.7);
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 800;
}

.team-hall-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.team-hall-card,
.team-overview-list article {
  border: 1px solid rgba(244, 211, 94, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.team-hall-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.team-hall-card.status-running {
  box-shadow: inset 0 0 0 2px rgba(57, 255, 136, 0.4);
}

.team-hall-card.status-completed {
  opacity: 0.82;
}

.team-hall-card-head,
.team-hall-sets {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(238, 248, 242, 0.76);
  font-size: clamp(14px, 1.4vw, 22px);
  font-weight: 900;
}

.team-hall-card-head strong {
  color: var(--gold);
}

.team-hall-pairing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.team-hall-pairing b {
  overflow-wrap: anywhere;
  font-size: clamp(20px, 2.4vw, 38px);
  line-height: 1.05;
}

.team-hall-pairing b:last-child {
  text-align: right;
}

.team-hall-pairing strong {
  color: var(--gold);
  font-size: clamp(26px, 3vw, 48px);
}

.team-hall-sets strong {
  color: #39ff88;
}

.team-hall-sets .team-hall-result {
  min-width: max-content;
  text-align: right;
  text-transform: uppercase;
}

.team-hall-sets .team-hall-result.won {
  color: #39ff88;
}

.team-hall-sets .team-hall-result.lost {
  color: #ff6b5f;
}

.team-hall-sets .team-hall-result.neutral {
  color: rgba(238, 248, 242, 0.7);
}

.team-overview-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.team-overview-header strong {
  color: var(--gold);
  font-size: clamp(24px, 3vw, 52px);
  white-space: nowrap;
}

.team-overview-list {
  display: grid;
  gap: 10px;
}

.team-overview-list article {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 260px minmax(0, 1fr) 110px;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  font-size: clamp(16px, 1.5vw, 26px);
}

.team-overview-list span,
.team-overview-list em {
  color: rgba(238, 248, 242, 0.68);
  font-style: normal;
  font-weight: 900;
}

.team-overview-list strong {
  color: var(--gold);
  text-align: center;
}

.team-board-page {
  display: grid;
  align-items: center;
  padding: clamp(8px, 1.6vw, 26px);
}

.team-board {
  width: min(1580px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 2px solid rgba(244, 211, 94, 0.26);
  border-radius: 8px;
  background: #050a08;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.team-board-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(96px, 12vw, 172px) minmax(0, 1fr);
  border-bottom: 2px solid #050a08;
}

.team-board-team,
.team-board-score {
  min-height: clamp(56px, 9vh, 110px);
  display: grid;
  place-items: center;
  padding: 8px 18px;
  color: #f7fbf8;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.team-board-team.home {
  background: var(--team-home-color, #bb5757);
}

.team-board-team.away {
  background: #b7b7b7;
}

.team-board-team span {
  display: inline-block;
  max-width: 100%;
  overflow: visible;
  white-space: nowrap;
}

.team-board-score {
  background: #e9efed;
  color: #07130f;
  font-size: clamp(32px, 5vw, 76px);
}

.team-board-subtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(238, 248, 242, 0.72);
  font-size: clamp(13px, 1.4vw, 20px);
  font-weight: 900;
  text-transform: uppercase;
}

.team-board-subtitle strong {
  color: var(--gold);
}

.team-board-head,
.team-board-row {
  display: grid;
  align-items: stretch;
}

.team-board-head span,
.team-board-label,
.team-board-side,
.team-board-set,
.team-board-status {
  min-width: 0;
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(238, 248, 242, 0.12);
  border-bottom: 1px solid rgba(238, 248, 242, 0.12);
}

.team-board-head span:last-child,
.team-board-row > :last-child {
  border-right: 0;
}

.team-board-head span {
  min-height: clamp(30px, 4vh, 46px);
  padding: 6px;
  background: #202723;
  color: rgba(238, 248, 242, 0.72);
  font-size: clamp(10px, 1vw, 15px);
  font-weight: 1000;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
}

.team-board-row {
  min-height: clamp(46px, 8.5vh, 82px);
}

.team-board-label {
  background: #07130f;
  color: var(--gold);
  padding: 6px 8px;
  font-size: clamp(12px, 1.05vw, 18px);
  font-weight: 1000;
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
}

.team-board-side {
  padding: 7px 12px;
  background: #101815;
  color: #f7fbf8;
  font-size: clamp(16px, 2vw, 28px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.team-board-side.away {
  background: #dce4e1;
  color: #07130f;
}

.team-board-row.winner-home .team-board-side.home.winner {
  background: var(--team-home-color, #bb5757);
  color: #07130f;
}

.team-board-row.winner-away .team-board-side.away.winner {
  background: #b7b7b7;
  color: #07130f;
}

.team-board-side b {
  display: inline-block;
  max-width: 100%;
  overflow: visible;
  font: inherit;
  white-space: nowrap;
}

.team-board-set {
  padding: 5px;
  background: #111915;
  color: #eef8f2;
  font-size: clamp(15px, 2vw, 30px);
  font-weight: 1000;
  line-height: 1;
}

.team-board-set.empty {
  color: rgba(238, 248, 242, 0.34);
  padding: 5px;
  border-top: 0;
  border-left: 0;
  border-right: 1px solid rgba(238, 248, 242, 0.12);
  border-bottom: 1px solid rgba(238, 248, 242, 0.12);
  border-radius: 0;
}

.team-board-set.set-away {
  background: #dce4e1;
  color: #07130f;
}

.team-board-row.winner-home .team-board-set.winner-set {
  background: var(--team-home-color, #bb5757);
  color: #07130f;
}

.team-board-row.winner-away .team-board-set.winner-set {
  background: #b7b7b7;
  color: #07130f;
}

.team-board-status {
  padding: 5px;
  background: #07130f;
  color: rgba(238, 248, 242, 0.64);
  font-size: clamp(10px, 1vw, 15px);
  font-weight: 1000;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.team-board-row.status-running .team-board-status {
  color: #39ff88;
}

.team-board-row.status-completed .team-board-status {
  color: var(--gold);
}

.team-detail-page {
  display: grid;
  align-content: center;
  gap: 28px;
}

.team-detail-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.team-detail-score div {
  min-height: 220px;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 24px;
  border-radius: 8px;
}

.team-detail-score div:first-child {
  background: #bb5757;
}

.team-detail-score div:last-child {
  background: #b7b7b7;
}

.team-detail-score b {
  font-size: clamp(28px, 4vw, 76px);
  line-height: 1;
}

.team-detail-score strong {
  font-size: clamp(70px, 10vw, 180px);
  line-height: 0.9;
}

.team-detail-score span {
  color: rgba(238, 248, 242, 0.58);
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
}

.team-detail-sets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.team-detail-sets div {
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}

.team-detail-sets span {
  display: block;
  color: rgba(238, 248, 242, 0.62);
  font-weight: 900;
}

.team-detail-sets strong {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font-size: clamp(34px, 5vw, 86px);
}

.team-public-error {
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

@media (max-width: 1100px) {
  .team-rubber-row:not(.compact),
  .team-rubber-summary,
  .team-rubber-summary-teams,
  .team-turnier-card,
  .team-turnier-row,
  .team-turnier-analyze-row,
  .team-turnier-catalog-grid,
  .team-turnier-catalog-division {
    grid-template-columns: 1fr;
  }

  .team-rubber-summary::before {
    grid-row: 1;
  }

  .team-rubber-summary-main,
  .team-rubber-summary-result {
    grid-column: 1;
  }

  .team-rubber-summary-result {
    justify-items: start;
    text-align: left;
  }

  .team-fixture-head,
  .team-fixture-teams {
    grid-template-columns: 1fr;
  }

  .team-fixture-status {
    grid-template-columns: 1fr;
  }

  .team-rubber-row.compact {
    grid-template-columns: minmax(130px, 0.75fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  }

  .team-rubber-row.compact em {
    grid-column: 2 / 4;
  }
}

@media (min-width: 720px) and (max-width: 1100px) {
  .team-rubber-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-rubber-admin {
    grid-template-columns: minmax(260px, 0.95fr) minmax(260px, 1.05fr);
  }

  .team-rubber-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1101px) and (max-width: 1500px) {
  .team-rubber-row:not(.compact) {
    grid-template-columns: minmax(130px, 0.45fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .team-rubber-meta {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .team-fixture-head {
    grid-template-columns: 1fr;
  }

  .team-fixture-status {
    grid-template-columns: minmax(180px, 0.38fr) minmax(320px, 1fr);
  }

  .team-rubber-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-rubber-admin {
    grid-template-columns: minmax(260px, 0.95fr) minmax(260px, 1.05fr);
  }

  .team-rubber-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.public-result-page,
.qr-display-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--dark);
  color: white;
}

.public-result-card,
.qr-display-card {
  width: min(920px, 100%);
  padding: 32px;
  border-radius: 8px;
  border: 1px solid rgba(245, 210, 91, 0.35);
  background: rgba(18, 42, 34, 0.96);
  box-shadow: var(--shadow);
}

.public-result-card h1,
.qr-display-card h1 {
  margin: 14px 0 8px;
  font-size: clamp(30px, 5vw, 64px);
  line-height: 1.05;
}

.public-result-card p,
.qr-display-card p {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.public-result-card .online-entry-tournament-title {
  margin: 0;
  color: #fff;
  font-size: clamp(18px, 2.4vw, 28px);
  line-height: 1.2;
}

.public-result-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.online-entry-contact-grid,
.online-entry-line-head {
  align-items: end;
}

.online-entry-lines {
  display: grid;
  gap: 12px;
}

.online-entry-line {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.online-entry-line-head {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(160px, 1fr) auto;
  gap: 10px;
}

.online-entry-player-grid {
  gap: 10px;
}

.online-entry-player-grid .manual-player-card {
  padding: 10px;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
}

.online-entry-autocomplete-field {
  position: relative;
}

.online-entry-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow: auto;
  padding: 4px;
  border: 1px solid rgba(20, 28, 44, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
}

.online-entry-suggestion {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #111827;
  text-align: left;
  cursor: pointer;
}

.online-entry-suggestion strong {
  font-size: 0.92rem;
  font-weight: 700;
}

.online-entry-suggestion span {
  color: #64748b;
  font-size: 0.78rem;
}

.online-entry-suggestion:hover,
.online-entry-suggestion.active {
  background: #e8f2ff;
}

.online-entry-form-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.public-result-set {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.public-result-set label {
  display: grid;
  gap: 5px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 800;
}

.public-result-set input {
  min-height: 52px;
  text-align: center;
  font-size: 28px;
  font-weight: 900;
}

.public-result-form .bracket-special-result {
  border-top-color: rgba(255, 255, 255, 0.16);
}

.public-result-form .bracket-special-result > strong,
.public-result-form .bracket-special-result label {
  color: rgba(255, 255, 255, 0.78);
}

.special-result-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 19, 15, 0.58);
}

.special-result-confirm {
  width: min(480px, 100%);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.special-result-confirm h3 {
  margin: 0 0 12px;
}

.special-result-confirm label {
  display: grid;
  gap: 5px;
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 900;
}

.special-result-confirm select {
  min-height: 42px;
}

.special-result-confirm pre {
  margin: 0;
  padding: 10px 0 0;
  white-space: pre-wrap;
  font: inherit;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.qr-display-card {
  text-align: center;
}

.qr-display-card.muted {
  opacity: 0.78;
}

.qr-display-code {
  width: min(58vh, 520px);
  margin: 24px auto;
  padding: 18px;
  border-radius: 8px;
  background: white;
}

.qr-display-code svg {
  display: block;
  width: 100%;
  height: auto;
}

.online-entry-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
}

.online-entry-link-row input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.online-entry-schedule {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.online-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.online-entry-row strong,
.online-entry-row small,
.online-entry-row p {
  display: block;
}

.online-entry-row small {
  color: var(--muted);
  font-weight: 700;
  margin-top: 4px;
}

.online-entry-row p {
  margin: 8px 0 0;
  color: var(--ink);
}

.online-entry-cancel-reason {
  color: var(--danger) !important;
  font-weight: 800;
}

.public-result-summary {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.public-result-summary strong,
.public-result-summary small {
  display: block;
}

.public-result-summary small {
  color: var(--muted);
  margin-top: 4px;
}

.tender-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}

.tender-side-stack {
  display: grid;
  gap: 18px;
}

.tender-form-panel,
.tender-documents-panel,
.tender-output-panel {
  margin-bottom: 18px;
}

.tender-output {
  min-height: 520px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.5;
  white-space: pre-wrap;
}

.tender-document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: stretch;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.tender-document-row:first-of-type {
  border-top: 0;
}

.tender-document-row > button:first-child {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
}

.tender-document-row strong,
.tender-document-row small {
  display: block;
}

.tender-document-row small {
  color: var(--muted);
  margin-top: 4px;
}

.tender-knowledge-picker,
.tender-voice-box,
.tender-pdf-upload,
.tender-transcript {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f9fbf8;
}

.tender-knowledge-picker {
  display: grid;
  gap: 10px;
}

.tender-knowledge-picker strong,
.tender-voice-box strong,
.tender-pdf-upload strong,
.tender-transcript strong {
  display: block;
}

.tender-knowledge-picker small,
.tender-voice-box small,
.tender-pdf-upload small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.tender-knowledge-checks {
  display: grid;
  gap: 6px;
}

.tender-knowledge-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--ink);
}

.tender-voice-box {
  display: grid;
  gap: 12px;
}

.tender-pdf-upload {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.tender-transcript {
  background: #fff;
}

.tender-transcript p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.organization-modules,
.user-module-field,
.user-org-access-field {
  grid-column: 1 / -1;
}

.user-org-access-list {
  display: grid;
  gap: 8px;
}

.user-org-access-pill {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, auto) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.user-org-access-pill small {
  color: var(--muted);
  font-weight: 800;
}

.user-org-access-add {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, auto) auto;
  gap: 10px;
  align-items: center;
}

.referee-report-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.report-grid > div {
  border: 1px solid #ccd5cf;
  padding: 12px;
  display: grid;
  gap: 4px;
}

.report-grid span {
  color: #65736b;
  font-weight: 800;
}

.referee-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.referee-report-table th,
.referee-report-table td {
  border: 1px solid #ccd5cf;
  padding: 7px;
  text-align: left;
  vertical-align: top;
}

.hidden-report-text {
  display: none;
}

.plus {
  background: var(--green);
  color: #fff;
}

.minus {
  background: #e8eeea;
  color: var(--ink);
}

.display-page {
  min-height: 100vh;
  height: 100vh;
  padding: clamp(16px, 2.2vw, 34px);
  background: #07130f;
  color: #f7fbf8;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.display-header {
  display: grid;
  grid-template-columns: minmax(310px, auto) minmax(420px, 1fr) minmax(120px, auto);
  gap: 18px;
  align-items: center;
  margin-bottom: clamp(16px, 2vw, 28px);
}

.display-header h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 64px);
  line-height: 1;
}

.display-header p {
  margin: 8px 0 0;
  color: #b8c9c1;
  font-size: clamp(15px, 1.4vw, 22px);
}

.display-clock {
  min-width: 96px;
  text-align: right;
  color: #f1c44f;
  font-size: clamp(24px, 3vw, 46px);
  font-weight: 950;
}

.display-grid-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 26px;
  margin-bottom: 8px;
  color: #9fb2aa;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.display-grid-head strong {
  color: #f1c44f;
}

.display-page-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.display-page-controls button {
  width: clamp(34px, 3vw, 48px);
  height: clamp(34px, 3vw, 48px);
  display: grid;
  place-items: center;
  border: 1px solid rgba(241, 196, 79, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #f1c44f;
  font-size: clamp(26px, 2.6vw, 42px);
  font-weight: 900;
  line-height: 1;
}

.display-page-controls button:hover {
  background: rgba(241, 196, 79, 0.14);
}

.display-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: clamp(240px, 27vw, 560px);
  gap: clamp(10px, 1.2vw, 18px);
  min-height: 0;
  overflow: hidden;
  align-content: start;
}

.display-grid.slide-in {
  animation: upcomingSlideIn 720ms cubic-bezier(0.2, 0.78, 0.22, 1);
}

.display-ad {
  display: grid;
  grid-template-columns: minmax(340px, 0.55fr) minmax(0, 1fr);
  gap: clamp(12px, 1.4vw, 22px);
  align-items: center;
  border: 1px solid rgba(241, 196, 79, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.display-ad-image-only {
  grid-template-columns: 1fr;
  padding: clamp(8px, 0.8vw, 14px);
}

.display-ad img {
  width: 100%;
  max-width: none;
  max-height: clamp(90px, 8vw, 150px);
  object-fit: contain;
  padding-left: 0;
}

.display-ad-image-only img {
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.display-ad strong,
.display-ad span {
  display: block;
}

.display-ad strong {
  color: #fff;
  font-size: clamp(18px, 2.1vw, 34px);
  line-height: 1.06;
}

.display-ad span {
  margin-top: 5px;
  color: #c4d1cc;
  font-size: clamp(13px, 1.1vw, 18px);
  font-weight: 800;
}

.display-ad-hall {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: clamp(72px, 7vw, 124px);
  padding: 0;
  align-self: stretch;
  overflow: hidden;
}

.display-ad-hall img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.display-ad-field {
  position: fixed;
  inset: 0;
  border: 0;
  border-radius: 0;
  background: #07130f;
  box-shadow: none;
  width: 100vw;
  height: 100vh;
  padding: clamp(24px, 3vw, 54px);
  z-index: 20;
}

.display-ad-field img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.display-upcoming {
  margin-bottom: clamp(12px, 1.4vw, 20px);
  border: 1px solid rgba(241, 196, 79, 0.3);
  border-radius: 8px;
  padding: clamp(12px, 1.2vw, 18px);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  min-height: clamp(142px, 10vw, 172px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.display-upcoming.slide-in {
  animation: upcomingSlideIn 720ms cubic-bezier(0.2, 0.78, 0.22, 1);
}

@keyframes upcomingSlideIn {
  0% {
    opacity: 0;
    transform: translateX(42px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.display-upcoming-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
}

.display-upcoming h3 {
  margin: 0;
  color: #f1c44f;
  font-size: clamp(16px, 1.4vw, 24px);
  text-transform: uppercase;
}

.display-upcoming-head span {
  color: #9fb2aa;
  font-weight: 900;
}

.display-upcoming article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 0;
}

.display-upcoming-number {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(241, 196, 79, 0.18);
  color: #f1c44f;
  font-size: 22px;
  font-weight: 950;
}

.display-upcoming article span {
  color: #9fb2aa;
  font-size: 13px;
  font-weight: 900;
}

.display-upcoming article b {
  display: block;
  color: #fff;
  font-size: clamp(20px, 1.65vw, 28px);
  line-height: 1.08;
  overflow-wrap: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.display-upcoming article b small {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  margin-right: 8px;
  border-radius: 6px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #f1c44f;
  font-size: 0.72em;
  vertical-align: middle;
}

.display-upcoming article em {
  color: #9fb2aa;
  font-style: normal;
  font-size: 0.8em;
}

.display-upcoming article p {
  margin: 8px 0 0;
  color: #9fb2aa;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.display-card {
  --hall-card-scale: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  height: 100%;
  padding: calc(clamp(14px, 1.4vw, 20px) * var(--hall-card-scale));
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: calc(10px * var(--hall-card-scale));
  overflow: hidden;
  container-type: inline-size;
}

.display-card.status-running,
.display-card.status-ready {
  border-color: rgba(241, 196, 79, 0.48);
  background: rgba(255, 255, 255, 0.1);
}

.display-card.status-paused {
  border-color: rgba(173, 112, 27, 0.7);
}

.display-free {
  min-height: 0;
  grid-template-rows: 1fr;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(247, 251, 248, 0.52);
}

.display-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: #d7e5df;
  font-weight: 900;
  text-transform: uppercase;
}

.display-card-head span {
  font-size: calc(clamp(18px, 2vw, 30px) * var(--hall-card-scale));
}

.display-card-head strong {
  color: #f1c44f;
  font-size: calc(13px * var(--hall-card-scale));
}

.display-duration,
.tv-duration {
  color: #f1c44f;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.display-duration {
  font-size: calc(clamp(12px, 1vw, 17px) * var(--hall-card-scale));
}

.tv-duration {
  justify-self: center;
  margin-top: calc(-1 * clamp(8px, 1.2vw, 16px));
  font-size: clamp(20px, 2vw, 34px);
}

.display-discipline {
  color: #9fb2aa;
  font-size: calc(clamp(13px, 1.1vw, 18px) * var(--hall-card-scale));
  font-weight: 800;
}

.display-teams,
.tv-teams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "left right"
    "score score";
  grid-template-rows: minmax(0, 1fr) auto;
  gap: calc(clamp(12px, 1.4vw, 22px) * var(--hall-card-scale));
  align-items: center;
  min-height: 0;
  overflow: hidden;
}

.display-card .display-teams {
  align-items: stretch;
}

.tv-teams {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "score score"
    "left right";
}

.display-team {
  min-width: 0;
  align-self: center;
}

.display-team.right {
  text-align: right;
}

.display-team.left {
  grid-area: left;
}

.display-team.right {
  grid-area: right;
}

.display-team b {
  display: block;
  color: #ffffff;
  font-size: calc(clamp(20px, 4.8cqw, 38px) * var(--hall-card-scale));
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.display-team small {
  display: block;
  margin-top: calc(6px * var(--hall-card-scale));
  color: #9fb2aa;
  font-size: calc(clamp(12px, 2.4cqw, 18px) * var(--hall-card-scale));
  line-height: 1.15;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.display-current {
  grid-area: score;
  color: #f1c44f;
  font-size: calc(clamp(64px, 13cqw, 112px) * var(--hall-card-scale));
  line-height: 0.92;
  font-weight: 950;
  white-space: nowrap;
  text-align: center;
  align-self: end;
}

.display-current span {
  color: #9fb2aa;
  margin: 0 0.12em;
}

.display-sets,
.tv-sets {
  display: flex;
  flex-wrap: wrap;
  gap: calc(8px * var(--hall-card-scale));
}

.display-sets span,
.tv-sets span {
  min-height: calc(34px * var(--hall-card-scale));
  display: inline-flex;
  align-items: center;
  gap: calc(8px * var(--hall-card-scale));
  border-radius: 8px;
  padding: calc(6px * var(--hall-card-scale)) calc(10px * var(--hall-card-scale));
  background: rgba(255, 255, 255, 0.08);
  color: #d7e5df;
  font-weight: 900;
}

.display-sets b,
.tv-sets b {
  color: #9fb2aa;
  font-size: calc(12px * var(--hall-card-scale));
}

.display-sets .active,
.tv-sets .active {
  background: rgba(241, 196, 79, 0.18);
  color: #f9e7a8;
}

.tv-field {
  min-height: 100vh;
  display: grid;
  place-items: stretch;
  padding: 0;
}

.tv-score-card {
  width: 100vw;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  padding: clamp(26px, 4.5vw, 74px);
  background: transparent;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(18px, 3.2vw, 42px);
  container-type: inline-size;
  overflow: hidden;
}

.tv-score-card.free {
  place-items: center;
  text-align: center;
}

.tv-score-card.free h2 {
  margin: 0;
  color: #f1c44f;
  font-size: clamp(54px, 8vw, 120px);
}

.tv-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #9fb2aa;
  font-size: clamp(18px, 2vw, 32px);
  font-weight: 900;
  text-transform: uppercase;
}

.tv-teams {
  align-self: center;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 58px);
  overflow: visible;
}

.tv-teams .display-team b {
  display: block;
  font-size: clamp(34px, 4.2cqw, 70px);
  line-height: 1.02;
  max-width: 100%;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  overflow: visible;
}

.tv-teams .display-team small {
  display: block;
  font-size: clamp(16px, 2.2cqw, 24px);
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  overflow: visible;
}

.tv-teams .display-current {
  font-size: clamp(120px, 22cqw, 260px);
  margin-bottom: clamp(8px, 2vh, 28px);
}

.tv-sets {
  justify-content: center;
  gap: clamp(12px, 1.4vw, 24px);
}

.tv-sets span {
  min-height: clamp(64px, 7vh, 92px);
  padding: clamp(10px, 1.2vw, 18px) clamp(18px, 2vw, 30px);
  border-radius: 10px;
  font-size: clamp(32px, 3.5vw, 58px);
  line-height: 1;
}

.tv-sets b {
  font-size: clamp(16px, 1.45vw, 24px);
}

.tv-table-page {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #050807;
  color: #ffffff;
}

.tv-score-table {
  width: 100vw;
  height: 100vh;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 0;
  background: #07130f;
}

.tv-score-table col,
.tv-score-table th,
.tv-score-table td {
  border: 2px solid #07130f;
}

.tv-score-table thead {
  height: clamp(44px, 8vh, 76px);
}

.tv-score-table thead th {
  height: clamp(44px, 8vh, 76px);
  padding: 4px 10px;
  background: #101512;
  color: #ffffff;
  font-size: clamp(20px, 3vw, 44px);
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.tv-score-table thead th:first-child {
  width: 43%;
  text-align: left;
}

.tv-score-table thead th:not(:first-child) {
  width: 19%;
}

.tv-score-table thead span,
.tv-score-table thead small {
  display: block;
}

.tv-score-table thead small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(11px, 1.3vw, 18px);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tv-table-topdown .tv-score-table {
  background: #101512;
}

.tv-table-topdown .tv-score-table th,
.tv-table-topdown .tv-score-table td {
  border-color: #101512;
}

.tv-table-topdown .tv-score-table tbody th {
  min-width: 0;
  overflow: hidden;
  vertical-align: middle;
}

.tv-table-entry {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  gap: clamp(8px, 1.1vh, 16px);
  overflow: hidden;
}

.tv-table-topdown .tv-score-table tbody th span {
  font-size: clamp(28px, 4.35vw, 72px);
  line-height: 0.96;
  max-width: 100%;
}

.tv-table-topdown .tv-score-table tbody th small {
  margin-top: 0;
  font-size: clamp(14px, 1.75vw, 28px);
  line-height: 1.05;
  max-width: 100%;
}

.tv-score-table tbody tr {
  height: calc((100vh - clamp(44px, 8vh, 76px)) / 2);
}

.tv-score-table tbody th {
  padding: clamp(14px, 2.2vw, 36px);
  color: #06120d;
  text-align: left;
  vertical-align: middle;
}

.tv-score-table tbody th span {
  display: block;
  font-size: clamp(30px, 5.4vw, 92px);
  font-weight: 950;
  line-height: 1;
  overflow-wrap: anywhere;
}

.tv-score-table tbody th small {
  display: block;
  margin-top: clamp(8px, 1.4vw, 18px);
  font-size: clamp(15px, 2vw, 34px);
  font-weight: 900;
  line-height: 1.08;
  opacity: 0.72;
  overflow-wrap: anywhere;
}

.tv-score-table tbody td {
  padding: 0;
  color: #06120d;
  font-size: clamp(76px, 14vw, 250px);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  vertical-align: middle;
}

.tv-score-table tbody td span {
  opacity: 0.35;
}

.tv-score-table .team-a th,
.tv-score-table .team-a td {
  background: #39ff88;
}

.tv-score-table .team-b th,
.tv-score-table .team-b td {
  background: #ff4f2f;
}

.tv-score-table td.done {
  box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.12);
}

.tv-table-bwf {
  background: #050807;
}

.tv-table-bwf .tv-score-table {
  background: #050807;
}

.tv-table-bwf .tv-score-table th,
.tv-table-bwf .tv-score-table td {
  border-color: #1d2420;
}

.tv-table-bwf .tv-score-table thead th {
  background: #050807;
  color: #dfe9e4;
}

.tv-table-bwf .tv-score-table thead small {
  color: rgba(223, 233, 228, 0.58);
}

.tv-table-bwf .tv-score-table .team-a th,
.tv-table-bwf .tv-score-table .team-a td,
.tv-table-bwf .tv-score-table .team-b th,
.tv-table-bwf .tv-score-table .team-b td {
  background: #050807;
}

.tv-table-bwf .tv-score-table .team-a th,
.tv-table-bwf .tv-score-table .team-a td {
  color: #ff6338;
}

.tv-table-bwf .tv-score-table .team-b th,
.tv-table-bwf .tv-score-table .team-b td {
  color: #39ff88;
}

.tv-table-bwf .tv-score-table .team-a th.serving-name,
.tv-table-bwf .tv-score-table .team-a td.serving-score {
  background: #ff6338;
  color: #050807;
}

.tv-table-bwf .tv-score-table .team-b th.serving-name,
.tv-table-bwf .tv-score-table .team-b td.serving-score {
  background: #39ff88;
  color: #050807;
}

.tv-table-bwf .tv-score-table td.done {
  box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.04);
}

.tv-table-free {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  background: #07130f;
  color: #ffffff;
  text-align: center;
}

.tv-table-free span {
  color: #f1c44f;
  font-size: clamp(24px, 4vw, 70px);
  font-weight: 950;
}

.tv-table-free h1 {
  margin: 0;
  font-size: clamp(70px, 12vw, 220px);
  line-height: 1;
}

.public-page {
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
}

.public-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 28px;
  background: #11251f;
  color: #fff;
}

.public-kicker {
  display: block;
  color: #f1c44f;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.public-header h1 {
  margin: 4px 0 0;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1;
}

.public-header p {
  margin: 10px 0 0;
  color: #b8c9c1;
  font-size: 16px;
}

.public-actions .btn.ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.public-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 240px));
  gap: 12px;
  padding: 16px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.public-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.public-content {
  display: grid;
  gap: 22px;
  padding: 24px 28px 40px;
}

.public-content h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.public-match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 14px;
}

.public-upcoming-card {
  box-shadow: 0 10px 30px rgba(23, 33, 29, 0.07);
}

.public-match {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(23, 33, 29, 0.07);
  overflow: hidden;
}

.public-match.status-running,
.public-match.status-ready {
  border-color: rgba(17, 104, 79, 0.32);
}

.public-match-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.public-match-head strong {
  color: var(--green);
  font-size: 18px;
}

.public-match-head span {
  color: var(--muted);
  font-weight: 800;
  min-width: 0;
}

.public-match-head em {
  font-style: normal;
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.public-score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(86px, auto) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.public-team {
  min-width: 0;
  max-width: 100%;
}

.public-team.right {
  text-align: right;
}

.public-team b {
  display: block;
  max-width: 100%;
  font-size: 20px;
  line-height: 1.08;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

.public-team small {
  display: block;
  max-width: 100%;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  hyphens: auto;
}

.public-score {
  color: var(--green);
  font-size: 42px;
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
}

.public-score span {
  color: var(--muted);
  margin: 0 0.1em;
}

.public-sets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.public-sets span {
  border-radius: 8px;
  padding: 5px 9px;
  background: #eef3ef;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.public-sets .active {
  background: var(--green-soft);
  color: var(--green);
}

.public-done summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 900;
  margin-bottom: 12px;
}

.public-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: #fff;
}

.public-archive-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: #071510;
  color: #edf5f1;
}

.public-archive-card {
  width: min(720px, 100%);
  padding: 42px;
  border: 1px solid rgba(241, 196, 79, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.public-archive-card h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1;
}

.public-archive-card p,
.public-archive-card small,
.public-archive-card em {
  display: block;
  color: rgba(237, 245, 241, 0.72);
  font-weight: 800;
}

.public-archive-card em {
  margin-top: 18px;
  font-style: normal;
  color: rgba(241, 196, 79, 0.82);
}

.public-bracket-page {
  background: #071510;
  color: #edf5f1;
}

.public-bracket-page .public-content {
  padding: 24px 28px 48px;
  overflow-x: auto;
}

.public-placement-overview {
  display: grid;
  gap: 18px;
  min-width: min(100%, 920px);
  max-width: 1240px;
  padding: 20px;
  border: 1px solid rgba(241, 196, 79, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.public-placement-overview h2 {
  margin: 2px 0 4px;
  color: #fff;
  font-size: 26px;
}

.public-placement-overview p {
  margin: 0;
  color: #b8c9c1;
  font-weight: 800;
}

.public-placement-list {
  display: grid;
  grid-template-columns: minmax(280px, 760px);
  gap: 10px;
}

.public-placement-list article {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.public-placement-list article.placed {
  background: rgba(241, 196, 79, 0.14);
}

.public-placement-list strong {
  color: #f1c44f;
  font-size: 18px;
  line-height: 1;
}

.public-placement-list button {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 900;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.public-placement-list button:hover {
  color: #f1c44f;
}

.public-placement-list b {
  display: block;
  color: #fff;
  overflow-wrap: anywhere;
}

.public-placement-list small,
.public-placement-list span {
  color: #b8c9c1;
  font-weight: 800;
}

.public-placement-list span {
  font-size: 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.public-history-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 21, 16, 0.78);
}

.public-history-dialog {
  width: min(760px, 100%);
  max-height: min(760px, 88vh);
  overflow: auto;
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(241, 196, 79, 0.35);
  border-radius: 10px;
  background: #10221c;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.public-history-dialog header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.public-history-dialog h2 {
  margin: 4px 0;
  color: #fff;
}

.public-history-dialog p {
  margin: 0;
  color: #b8c9c1;
  font-weight: 800;
}

.public-history-dialog header button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.public-history-list {
  display: grid;
  gap: 10px;
}

.public-history-list article {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.public-history-list article.won {
  background: rgba(46, 112, 85, 0.3);
}

.public-history-list article.lost {
  background: rgba(255, 255, 255, 0.05);
}

.public-history-list strong,
.public-history-list b {
  display: block;
  color: #fff;
}

.public-history-list span,
.public-history-list small,
.public-history-list em {
  color: #b8c9c1;
  font-weight: 800;
  font-style: normal;
}

@media (max-width: 720px) {
  .public-placement-list {
    grid-template-columns: 1fr;
  }

  .public-placement-list article,
  .public-history-list article,
  .public-pool-standings-list article {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .public-pool-standings-head {
    display: grid;
  }

  .public-pool-standings-list em {
    text-align: left;
  }

  .public-history-dialog header {
    display: grid;
  }
}

.public-bracket-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 28px 0;
  overflow: visible;
  background: #071510;
}

.public-bracket-tabs button {
  border: 1px solid rgba(241, 196, 79, 0.32);
  background: rgba(255, 255, 255, 0.08);
  color: #edf5f1;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.public-bracket-tabs button.active {
  background: #f1c44f;
  border-color: #f1c44f;
  color: #071510;
}

.public-pool-view {
  display: grid;
  gap: 18px;
  min-width: min(100%, 980px);
}

.public-pool-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.public-pool-head h2 {
  margin: 4px 0;
  color: #fff;
  font-size: 30px;
}

.public-pool-head p {
  margin: 0;
  color: #b8c9c1;
  font-weight: 800;
}

.public-pool-head strong {
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(241, 196, 79, 0.16);
  color: #f1c44f;
  white-space: nowrap;
}

.public-pool-scroll {
  overflow-x: auto;
  border: 1px solid rgba(241, 196, 79, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.public-pool-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.public-pool-table th,
.public-pool-table td {
  border-bottom: 1px solid rgba(184, 201, 193, 0.14);
  border-right: 1px solid rgba(184, 201, 193, 0.14);
  padding: 12px;
  vertical-align: middle;
}

.public-pool-table thead th {
  color: #f1c44f;
  font-size: 13px;
  text-transform: uppercase;
}

.public-pool-table tbody th {
  min-width: 220px;
  text-align: left;
  cursor: pointer;
}

.public-pool-table tbody th b {
  display: block;
  color: #fff;
  overflow-wrap: anywhere;
}

.public-pool-table tbody th small {
  color: #b8c9c1;
  font-weight: 800;
}

.public-pool-table td {
  min-width: 150px;
  color: #edf5f1;
  text-align: center;
  cursor: pointer;
}

.public-pool-table td span {
  display: inline-block;
  margin: 2px;
  border-radius: 7px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.public-pool-table td span.decided {
  background: rgba(241, 196, 79, 0.2);
}

.public-pool-table .pool-diagonal {
  color: rgba(184, 201, 193, 0.5);
  background: rgba(255, 255, 255, 0.03);
  cursor: default;
}

.public-pool-table .pool-active {
  background: rgba(241, 196, 79, 0.18);
  box-shadow: inset 0 0 0 2px rgba(241, 196, 79, 0.35);
}

.public-pool-table .pool-next {
  background: rgba(46, 112, 85, 0.36);
  box-shadow: inset 0 0 0 2px rgba(95, 180, 139, 0.5);
}

.public-pool-list {
  display: grid;
  gap: 8px;
}

.public-pool-standings {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(241, 196, 79, 0.24);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.public-pool-standings-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.public-pool-standings-head h3 {
  margin: 2px 0 0;
  color: #fff;
  font-size: 24px;
}

.public-pool-standings-head small {
  color: #b8c9c1;
  font-weight: 900;
}

.public-pool-standings-list {
  display: grid;
  gap: 7px;
}

.public-pool-standings-list article {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 72px 92px 112px;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.public-pool-standings-list article.pool-active {
  background: rgba(241, 196, 79, 0.18);
  box-shadow: inset 0 0 0 2px rgba(241, 196, 79, 0.35);
}

.public-pool-standings-list strong {
  color: #f1c44f;
  font-size: 20px;
}

.public-pool-standings-list b {
  color: #fff;
  overflow-wrap: anywhere;
}

.public-pool-standings-list small {
  display: block;
  color: #b8c9c1;
  font-weight: 800;
}

.public-pool-standings-list em {
  color: #edf5f1;
  font-style: normal;
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.public-pool-list article {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.public-pool-list article.pool-active {
  background: rgba(241, 196, 79, 0.18);
  box-shadow: inset 0 0 0 2px rgba(241, 196, 79, 0.35);
}

.public-pool-list strong {
  color: #f1c44f;
}

.public-pool-list span {
  color: #fff;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.public-pool-list em {
  color: #b8c9c1;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.public-swiss-view {
  min-width: min(100%, 820px);
}

.public-swiss-rounds {
  display: grid;
  gap: 14px;
}

.public-swiss-round {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(184, 201, 193, 0.16);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.public-swiss-round-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.public-swiss-round-head h3 {
  margin: 0;
  color: #fff;
  font-size: 22px;
}

.public-swiss-round-head span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(241, 196, 79, 0.14);
  color: #f1c44f;
  font-weight: 950;
  white-space: nowrap;
}

.public-bracket-map {
  position: relative;
  min-width: max-content;
}

.public-bracket-stack {
  display: grid;
  gap: 24px;
}

.public-placement-details {
  display: grid;
  gap: 14px;
}

.public-placement-detail {
  display: grid;
  gap: 0;
}

.public-bracket-connectors {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.public-bracket-connectors path {
  fill: none;
  stroke: rgba(241, 196, 79, 0.42);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.public-bracket-connectors path.result {
  stroke: rgba(241, 196, 79, 0.72);
}

.public-bracket-round-title {
  position: absolute;
  margin: 0;
  color: #f1c44f;
  font-size: 20px;
  text-transform: uppercase;
  white-space: nowrap;
}

.public-bracket-map.compact .public-bracket-round-title {
  font-size: 15px;
}

.public-bracket-card-position {
  position: absolute;
  width: var(--bracket-card-width);
  height: var(--bracket-card-height);
}

.public-bracket-result-position {
  position: absolute;
}

.public-bracket-result-card {
  display: grid;
  gap: 7px;
  min-height: 96px;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid rgba(241, 196, 79, 0.62);
  border-radius: 8px;
  background: rgba(241, 196, 79, 0.16);
}

.public-bracket-map.compact .public-bracket-result-card {
  min-height: 74px;
  padding: 9px;
}

.public-bracket-result-card strong {
  color: #f1c44f;
  font-size: 15px;
  text-transform: uppercase;
}

.public-bracket-result-card b {
  color: #fff;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.public-bracket-map.compact .public-bracket-result-card b {
  font-size: 13px;
}

.public-bracket-result-card small {
  color: #b8c9c1;
  font-weight: 800;
}

.public-bracket-match {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 9px;
  height: 100%;
  box-sizing: border-box;
  padding: 12px 12px 13px;
  border: 1px solid rgba(184, 201, 193, 0.2);
  border-radius: 8px;
  background: #10221c;
  overflow: visible;
}

.public-bracket-map.compact .public-bracket-match {
  gap: 8px;
  padding: 10px;
}

.public-bracket-match.ready,
.public-bracket-match.live {
  border-color: rgba(241, 196, 79, 0.55);
}

.public-bracket-match.finished {
  border-color: rgba(46, 112, 85, 0.7);
}

.public-bracket-match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.public-bracket-match-head strong {
  color: #fff;
  font-size: 18px;
}

.public-bracket-map.compact .public-bracket-match-head strong {
  font-size: 14px;
}

.public-bracket-match-head span,
.public-bracket-note {
  color: #b8c9c1;
  font-weight: 900;
}

.public-bracket-note-list {
  display: grid;
  gap: 2px;
  margin-top: 1px;
}

.public-bracket-note-list .public-bracket-note {
  font-size: 10px;
  line-height: 1.12;
}

.public-bracket-map.compact .public-bracket-match-head span,
.public-bracket-map.compact .public-bracket-note {
  font-size: 11px;
}

.public-bracket-side-list {
  display: grid;
  gap: 7px;
  align-content: start;
  min-height: 0;
}

.public-bracket-match.has-result .public-bracket-side-list {
  padding-bottom: 16px;
}

.public-bracket-map.compact .public-bracket-match.has-result .public-bracket-side-list {
  padding-bottom: 12px;
}

.public-bracket-side {
  display: grid;
  gap: 2px;
  min-height: 52px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.public-bracket-map.compact .public-bracket-side {
  min-height: 36px;
  padding: 6px 7px;
}

.public-bracket-side b {
  overflow-wrap: anywhere;
}

.public-bracket-map.compact .public-bracket-side b {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.05;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.public-bracket-side small {
  color: #b8c9c1;
  font-weight: 800;
}

.public-bracket-map.compact .public-bracket-side small {
  display: -webkit-box;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.05;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.public-bracket-match-result {
  display: grid;
  grid-template-columns: minmax(0, max-content) auto;
  gap: 7px;
  align-items: center;
  min-height: 0;
  margin-top: 0;
  width: fit-content;
  max-width: 100%;
}

.public-bracket-score-grid {
  display: grid;
  gap: 0;
  padding: 3px 6px;
  border-radius: 7px;
  background: rgba(241, 196, 79, 0.12);
  color: #f1c44f;
  font-weight: 950;
  line-height: 1;
}

.public-bracket-score-row {
  display: grid;
  grid-template-columns: repeat(var(--public-bracket-set-count), minmax(12px, max-content));
  column-gap: 8px;
  justify-content: center;
  text-align: center;
}

.public-bracket-score-row span {
  min-width: 12px;
  font-size: 12px;
}

.public-bracket-score-separator span {
  color: #b8c9c1;
  font-size: 9px;
  line-height: 0.95;
}

.public-bracket-match-result em {
  border-radius: 6px;
  padding: 2px 5px;
  background: rgba(184, 201, 193, 0.12);
  color: #b8c9c1;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  line-height: 1.15;
  text-transform: uppercase;
}

.public-bracket-map.compact .public-bracket-match-result {
  gap: 5px;
}

.public-bracket-map.compact .public-bracket-score-grid {
  padding: 2px 5px;
}

.public-bracket-map.compact .public-bracket-score-row {
  column-gap: 6px;
}

.public-bracket-map.compact .public-bracket-score-row span {
  font-size: 10px;
}

.public-bracket-map.compact .public-bracket-score-separator span,
.public-bracket-map.compact .public-bracket-match-result em {
  font-size: 8px;
}

.public-bracket-side.source {
  background: rgba(241, 196, 79, 0.12);
}

.public-bracket-side.feed-in {
  border: 1px solid rgba(241, 196, 79, 0.62);
  background: linear-gradient(135deg, rgba(241, 196, 79, 0.28), rgba(46, 112, 85, 0.28));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.public-bracket-side.feed-in span {
  width: fit-content;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(7, 21, 16, 0.42);
  color: #f1c44f;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.1;
  text-transform: uppercase;
}

.public-bracket-map.compact .public-bracket-side.feed-in span {
  font-size: 8px;
}

.public-bracket-side.winner {
  background: rgba(241, 196, 79, 0.24);
}

.public-bracket-side.empty {
  color: #b8c9c1;
}

.public-bracket-side.bye {
  align-content: center;
  border: 1px dashed rgba(184, 201, 193, 0.55);
  background: rgba(255, 255, 255, 0.03);
}

.empty {
  color: var(--muted);
  padding: 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #11251f;
  color: #fff;
  box-shadow: var(--shadow);
  z-index: 20;
}

.referee-undo-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 24px));
  padding: 12px 18px;
  border: 2px solid #111;
  border-radius: 8px;
  background: #fff;
  color: #000;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  font-weight: 900;
  text-align: center;
  z-index: 1000;
}

@media (max-width: 900px) {
  .time-slot-planning-head,
  .time-slot-layout {
    grid-template-columns: 1fr;
  }

  .time-slot-planning-head {
    display: grid;
  }

  .time-slot-summary {
    justify-content: flex-start;
  }

  .time-slot-ready-panel {
    position: static;
  }

  .time-slot-ready-list {
    max-height: none;
  }

  .ranking-stage-head,
  .ranking-stage-list,
  .ranking-stage-row {
    grid-template-columns: 1fr;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .nav {
    display: none;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .nav.open {
    display: grid;
  }

  .nav .indent {
    margin-left: 0;
  }

  .nav-sub {
    margin-left: 0;
  }

  .nav-group {
    padding-bottom: 12px;
  }

  .main {
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
  }

  .portal-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .portal-main {
    width: min(100% - 32px, 720px);
    align-content: start;
    padding-top: 18px;
  }

  .portal-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-head {
    flex-direction: column;
  }

  .dashboard-actions {
    justify-content: flex-start;
  }

  .quick-action-bar,
  .quick-action-group {
    justify-content: flex-start;
  }

  .quick-select {
    width: 100%;
  }

  .quick-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-tile {
    min-height: 150px;
  }

  .start-choice-grid {
    grid-template-columns: 1fr;
  }

  .start-choice {
    min-height: 220px;
  }

  .tournament-context {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid.two,
  .grid.three,
  .stat-row,
  .tournament-row,
  .ad-admin-row,
  .ad-upload-box,
  .manual-ad-control,
  .organization-row,
  .certificate-template-row,
  .certificate-field-row,
  .display-grid,
  .display-ad,
  .dashboard-metrics,
  .readiness-grid,
  .summary-grid,
  .planning-progress-stats,
  .planning-suggestion-row,
  .workflow-options {
    grid-template-columns: 1fr;
  }

  .scoreline {
    grid-template-columns: 1fr;
  }

  .referee-match-controls {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .set-special-result-row {
    grid-template-columns: 1fr;
  }

  .score {
    text-align: left;
  }

  .set-edit-row {
    grid-template-columns: 1fr 72px auto 72px;
  }

  .set-edit-row .check {
    grid-column: 1 / -1;
  }

  .set-editor-actions {
    justify-content: stretch;
  }

  .set-editor-actions .btn {
    width: 100%;
  }

  .admin-quick-access {
    right: 10px;
    bottom: 10px;
  }

  .admin-quick-access-fab {
    width: 46px;
    height: 46px;
    font-size: 20px;
  }

  .admin-quick-access-panel {
    width: 216px;
  }

  .control-set-transition-actions,
  .control-set-correction-head {
    grid-template-columns: 1fr;
  }

  .control-set-correction-head .control-transition-next {
    width: 100%;
  }

  .field-handoff {
    grid-template-columns: 1fr;
  }

  .result-filters,
  .result-scoreline,
  .audit-card,
  .user-fields,
  .planning-toolbar,
  .planning-entry-row,
  .planning-worklist-filters,
  .planning-match-row,
  .planning-match-teams,
  .manual-player-grid,
  .online-entry-line-head,
  .manual-entry-columns,
  .manual-entry-row,
  .user-org-access-pill,
  .user-org-access-add,
  .draw-match,
  .bracket-sides,
  .announcement-composer,
  .announcement-generator,
  .announcement-test-grid,
  .instant-announcement-grid,
  .instant-announcement-prefix,
  .instant-announcement-call,
  .live-announcement-grid,
  .announcement-readiness-grid,
  .announcement-filters,
  .announcement-stats,
  .tender-layout,
  .view-link-list div {
    grid-template-columns: 1fr;
  }

  .monitor-board-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .monitor-row {
    grid-template-columns: 1fr;
  }

  .monitor-ready-row {
    grid-template-columns: 1fr;
  }

  .monitor-ready-row em {
    justify-self: start;
  }

  .monitor-field,
  .monitor-status {
    justify-content: flex-start;
    padding: 0 12px;
  }

  .monitor-sets {
    grid-template-columns: 1fr;
  }

  .planning-status,
  .draw-side {
    justify-content: flex-start;
  }

  .bracket-actions,
  .bracket-match-head {
    justify-content: flex-start;
  }

  .announcement-block-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "badge"
      "main"
      "status"
      "upload"
      "actions";
  }

  .announcement-block-row > .status-pill,
  .announcement-audio-actions {
    justify-self: start;
    justify-content: flex-start;
  }

  .pronunciation-row {
    grid-template-columns: 1fr auto;
  }

  .pronunciation-language-select {
    grid-column: 1 / -1;
    width: 100%;
  }

  .result-score {
    justify-content: flex-start;
  }

  .next-select {
    width: 100%;
    max-width: none;
  }

  .tablet-device-row {
    grid-template-columns: 1fr;
  }

  .tablet {
    padding: 10px;
  }

  .tablet .topbar {
    gap: 10px;
  }

  .tablet .scoreboard {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .score-panel {
    min-height: min(56vh, 440px);
    padding: 10px;
    gap: 8px;
  }

  .score-panel h2 {
    font-size: clamp(15px, 4.2vw, 22px);
    line-height: 1.05;
  }

  .score-panel p {
    font-size: 12px;
    line-height: 1.15;
  }

  .big-score {
    font-size: clamp(70px, 22vw, 150px);
  }

  .score-buttons {
    gap: 8px;
  }

  .score-buttons button {
    min-height: clamp(72px, 18vw, 94px);
    font-size: clamp(32px, 9vw, 46px);
  }

  @media (orientation: portrait) and (max-width: 700px) {
    .tablet {
      min-height: 100vh;
      display: grid;
      place-items: center;
      padding: 22px;
    }

    .tablet::before {
      content: "Bitte Gerät quer halten";
      display: grid;
      place-items: center;
      width: min(92vw, 420px);
      min-height: 170px;
      padding: 24px;
      border: 1px solid rgba(241, 196, 79, 0.35);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.08);
      color: #f8fbf9;
      text-align: center;
      font-size: clamp(28px, 8vw, 42px);
      font-weight: 950;
      line-height: 1.05;
    }

    .tablet-wrap {
      display: none;
    }
  }

  .tablet-correction-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .tablet-set-row {
    grid-template-columns: 1fr 70px auto 70px;
  }

  .tablet-set-row label,
  .tablet-set-row button {
    grid-column: 1 / -1;
  }

  .display-header,
  .tv-meta {
    flex-direction: column;
  }

  .display-clock {
    text-align: left;
  }

  .display-teams,
  .tv-teams {
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "score"
      "right";
  }

  .display-team.right {
    text-align: left;
  }

  .display-current {
    text-align: left;
  }

  .tv-teams .display-current {
    width: 100%;
    justify-self: center;
    text-align: center;
  }

  .public-header {
    flex-direction: column;
    padding: 20px;
  }

  .public-filters,
  .public-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .public-filters,
  .public-score-row,
  .public-match-head {
    grid-template-columns: 1fr;
  }

  .public-team.right {
    text-align: left;
  }

  .public-score {
    font-size: 38px;
  }
}

@media (max-width: 520px) {
  .quick-tile-grid {
    grid-template-columns: 1fr;
  }

  .quick-tile {
    aspect-ratio: auto;
    min-height: 124px;
  }
}

@media (max-width: 700px) {
  .display-page {
    display: block;
    height: auto;
    min-height: 100svh;
    padding: 18px 14px max(82px, env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
  }

  .display-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    align-items: start;
    margin-bottom: 18px;
  }

  .display-header > div:first-child {
    min-width: 0;
  }

  .display-header h2 {
    font-size: clamp(38px, 12vw, 54px);
    line-height: 0.98;
  }

  .display-header p {
    font-size: clamp(17px, 5vw, 24px);
    line-height: 1.15;
  }

  .display-clock {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    max-width: 34vw;
    min-width: 0;
    overflow: hidden;
    color: #f1c44f;
    font-size: clamp(24px, 8vw, 38px);
    line-height: 1;
    text-align: right;
    white-space: nowrap;
  }

  .display-ad-hall {
    grid-column: 1 / -1;
    height: 86px;
    max-height: 86px;
  }

  .display-upcoming {
    min-height: 0;
    margin-bottom: 16px;
  }

  .display-grid-head {
    margin: 20px 0 10px;
    font-size: clamp(14px, 4.3vw, 18px);
  }

  .display-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: clamp(260px, 92vw, 420px);
    gap: 14px;
    overflow: visible;
    align-content: start;
  }

  .display-card {
    padding: 16px;
    gap: 8px;
    overflow: hidden;
  }

  .display-card-head {
    align-items: flex-start;
  }

  .display-card-head span {
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1;
  }

  .display-card-head strong {
    font-size: clamp(12px, 3.6vw, 15px);
    text-align: right;
  }

  .display-duration {
    font-size: clamp(16px, 4.5vw, 22px);
  }

  .display-discipline {
    font-size: clamp(15px, 4.4vw, 20px);
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  .display-card .display-teams {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "left score right";
    grid-template-rows: auto;
    gap: 10px;
    align-items: center;
    overflow: visible;
  }

  .display-team {
    min-width: 0;
  }

  .display-team b {
    font-size: clamp(18px, 5.6vw, 27px);
    line-height: 1.06;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 4;
  }

  .display-team small {
    font-size: clamp(12px, 3.8vw, 16px);
    line-height: 1.12;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 3;
  }

  .display-current {
    align-self: center;
    justify-self: center;
    min-width: max-content;
    font-size: clamp(38px, 15vw, 66px);
    line-height: 0.92;
    text-align: center;
  }

  .display-sets,
  .tv-sets {
    gap: 6px;
  }

  .display-sets span,
  .tv-sets span {
    min-height: 28px;
    padding: 5px 8px;
    font-size: clamp(13px, 4vw, 16px);
  }
}

@media (max-width: 460px) {
  .display-card .display-teams {
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "score"
      "right";
    gap: 8px;
  }

  .display-team.right {
    text-align: left;
  }

  .display-current {
    justify-self: start;
    font-size: clamp(54px, 22vw, 82px);
  }
}

.panel-divider {
  height: 1px;
  margin: 22px 0;
  background: rgba(43, 95, 78, 0.14);
}

.panel-heading.compact {
  margin-bottom: 12px;
}

.organization-logo-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid rgba(43, 95, 78, 0.14);
  border-radius: 8px;
  background: rgba(236, 246, 241, 0.58);
}

.organization-logo-box h4 {
  margin: 0 0 4px;
}

.organization-logo-preview,
.organization-logo-placeholder {
  width: 160px;
  height: 92px;
  margin-top: 12px;
  border: 1px solid rgba(43, 95, 78, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(18, 44, 34, 0.05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(18, 44, 34, 0.05) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(18, 44, 34, 0.05) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(18, 44, 34, 0.05) 75%),
    #ffffff;
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.organization-logo-preview {
  object-fit: contain;
  padding: 10px;
}

.organization-logo-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.organization-logo-upload {
  display: grid;
  gap: 10px;
}

.organization-logo-preview.small {
  width: 96px;
  height: 60px;
  margin-top: 0;
}

.organization-logo-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(43, 95, 78, 0.14);
  border-radius: 8px;
  background: rgba(236, 246, 241, 0.58);
}

.organization-logo-review.muted {
  color: var(--muted);
  font-weight: 900;
}

.organization-logo-review h4 {
  margin: 0 0 6px;
}

.organization-logo-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.billing-club-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.table-scroll table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.table-scroll th,
.table-scroll td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.table-scroll th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.online-entry-fee-list {
  display: grid;
  gap: 10px;
}

.online-entry-fee-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 220px auto;
  align-items: end;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(43, 95, 78, 0.14);
  border-radius: 8px;
  background: #fbfcfb;
}

.online-entry-club-detail {
  display: grid;
  gap: 8px;
}

.online-entry-club-detail h4 {
  margin: 8px 0 0;
}

.online-entry-club-detail p {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f4f8f5;
}

.invoice-filter-row {
  margin-bottom: 16px;
}

.invoice-list {
  display: grid;
  gap: 10px;
}

.invoice-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(43, 95, 78, 0.16);
  border-radius: 8px;
  background: #fbfcfb;
}

.invoice-row span {
  display: grid;
  gap: 4px;
}

.invoice-row small {
  color: var(--muted);
  font-weight: 800;
}

.invoice-print-page {
  min-height: 100vh;
  padding: 24px;
  background: #e9eee9;
}

.invoice-print-actions {
  max-width: 210mm;
  margin: 0 auto 16px;
  display: flex;
  justify-content: flex-end;
}

.invoice-sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto 18px;
  padding: 22mm 18mm;
  background: #fff;
  color: #15231f;
  box-shadow: 0 20px 60px rgba(23, 33, 29, 0.18);
  page-break-after: always;
}

.invoice-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 28mm;
}

.invoice-header h1 {
  margin: 0 0 6px;
  font-size: 36px;
}

.invoice-sender {
  text-align: right;
}

.invoice-sender p,
.invoice-meta-grid p {
  margin: 6px 0 0;
  color: #4f6058;
  font-weight: 700;
}

.invoice-meta-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  margin-bottom: 18mm;
}

.invoice-meta-grid small {
  display: block;
  margin-bottom: 5px;
  color: #6c7972;
  font-weight: 900;
  text-transform: uppercase;
}

.invoice-meta-grid strong {
  display: block;
  margin-bottom: 12px;
  font-size: 19px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.invoice-table th,
.invoice-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #d6ded9;
  text-align: left;
  vertical-align: top;
}

.invoice-table th {
  background: #edf4ef;
  font-weight: 900;
}

.invoice-table small {
  color: #66736d;
  font-weight: 700;
}

.invoice-table .num {
  text-align: right;
  white-space: nowrap;
}

.invoice-table tfoot td {
  border-top: 2px solid #15231f;
  border-bottom: 0;
  font-size: 16px;
  font-weight: 900;
}

.chessminton-panel {
  display: grid;
  gap: 18px;
}

.chessminton-rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.chessminton-rule-card,
.chessminton-phase-card {
  border: 1px solid #d7e2dc;
  border-radius: 8px;
  background: #f6faf7;
  padding: 16px;
}

.chessminton-rule-card {
  display: grid;
  gap: 8px;
}

.chessminton-rule-card strong {
  color: #2c6e55;
  font-size: 22px;
}

.chessminton-rule-card span,
.chessminton-board-input strong {
  color: #5f6f67;
  font-weight: 850;
}

.chessminton-setup-grid,
.chessminton-list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.chessminton-setup-card,
.chessminton-list-card {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid #d7e2dc;
  border-radius: 8px;
  background: #f8fbf9;
  padding: 16px;
}

.chessminton-setup-card h4,
.chessminton-list-card h4 {
  margin: 0;
  font-size: 20px;
}

.chessminton-stack-list {
  display: grid;
  gap: 8px;
}

.chessminton-stack-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #dfe8e3;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.chessminton-stack-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chessminton-stack-row strong,
.chessminton-stack-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chessminton-stack-row > div > span {
  color: #5f6f67;
  font-size: 14px;
  font-weight: 850;
}

.chessminton-stack-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.chessminton-resource-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chessminton-resource-pills span {
  border-radius: 999px;
  background: #e0f0e8;
  color: #2c6e55;
  font-weight: 950;
  padding: 8px 12px;
}

.chessminton-system-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
}

.chessminton-match-board {
  display: grid;
  gap: 14px;
}

.chessminton-cockpit-list {
  display: grid;
  gap: 14px;
}

.chessminton-cockpit-section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.chessminton-cockpit-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #d7e2dc;
  padding-bottom: 8px;
}

.chessminton-cockpit-section-head h4 {
  margin: 0;
  font-size: 20px;
}

.chessminton-cockpit-section-head span {
  min-width: 34px;
  border-radius: 999px;
  background: #e0f0e8;
  color: #2c6e55;
  font-weight: 900;
  text-align: center;
  padding: 5px 10px;
}

.chessminton-ko-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d7e2dc;
  border-radius: 8px;
  background: #f2f8f5;
  padding: 12px 14px;
}

.chessminton-ko-actions > div {
  display: grid;
  gap: 3px;
}

.chessminton-ko-actions strong {
  font-size: 18px;
}

.chessminton-ko-actions span {
  color: #5f6f67;
  font-weight: 800;
}

.chessminton-cockpit-card,
.chessminton-view-link-card {
  display: grid;
  gap: 14px;
  border: 1px solid #d7e2dc;
  border-radius: 8px;
  background: #f8fbf9;
  padding: 16px;
}

.chessminton-cockpit-card.finished {
  opacity: 0.78;
}

.chessminton-cockpit-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.chessminton-cockpit-head span,
.chessminton-view-link-card span {
  color: #5f6f67;
  font-weight: 900;
}

.chessminton-cockpit-head h4 {
  margin: 4px 0 0;
  font-size: 22px;
  overflow-wrap: anywhere;
}

.chessminton-cockpit-head small {
  display: block;
  margin-top: 6px;
  color: #6b7c73;
  font-weight: 800;
}

.chessminton-cockpit-head em {
  color: #819089;
  font-style: normal;
  font-size: 0.85em;
}

.chessminton-cockpit-head > strong {
  border-radius: 999px;
  background: #e0f0e8;
  color: #2c6e55;
  padding: 8px 12px;
  white-space: nowrap;
}

.chessminton-assignment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 10px;
}

.chessminton-view-link-card {
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.6fr) auto auto auto;
  align-items: center;
}

.chessminton-view-link-card > div {
  display: grid;
  gap: 4px;
}

.chessminton-match-group {
  display: grid;
  gap: 10px;
  border: 1px solid #d7e2dc;
  border-radius: 8px;
  background: #f8fbf9;
  padding: 14px;
}

.chessminton-match-group h4 {
  margin: 0;
  font-size: 20px;
}

.chessminton-match-list {
  display: grid;
  gap: 8px;
}

.chessminton-match-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.35fr);
  align-items: start;
  gap: 14px;
  border: 1px solid #dfe8e3;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.chessminton-match-main {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 112px;
  align-items: center;
  gap: 10px;
}

.chessminton-match-main span,
.chessminton-match-main small {
  color: #5f6f67;
  font-weight: 900;
}

.chessminton-match-main strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chessminton-match-main em {
  color: #819089;
  font-style: normal;
  font-size: 0.85em;
}

.chessminton-match-main small {
  text-align: right;
}

.chessminton-result-form {
  display: grid;
  gap: 10px;
}

.chessminton-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.chessminton-result-grid label {
  display: grid;
  gap: 4px;
  color: #5f6f67;
  font-size: 12px;
  font-weight: 950;
}

.chessminton-result-grid label span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  color: #26352d;
}

.chessminton-result-grid input {
  min-width: 0;
  padding: 6px;
  text-align: center;
}

.chessminton-result-actions {
  display: grid;
  grid-template-columns: auto auto minmax(150px, auto);
  align-items: center;
  justify-content: end;
  gap: 10px;
}

.chessminton-result-actions strong {
  font-size: 20px;
}

.chessminton-p4-skip-hint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(240, 207, 98, 0.36);
  border-radius: 8px;
  background: rgba(240, 207, 98, 0.12);
  color: #26352d;
  padding: 10px 12px;
}

.chessminton-p4-skip-hint div {
  display: grid;
  gap: 2px;
}

.chessminton-p4-skip-hint strong {
  color: #6b5511;
  font-size: 13px;
  font-weight: 950;
}

.chessminton-p4-skip-hint span {
  color: #5f6f67;
  font-size: 12px;
  font-weight: 850;
}

.chessminton-result-summary {
  align-self: center;
  color: #5f6f67;
  font-weight: 950;
  text-align: right;
}

.chessminton-standings {
  display: grid;
  gap: 4px;
  border: 1px solid #dfe8e3;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.chessminton-standings h5 {
  margin: 0 0 4px;
  font-size: 16px;
}

.chessminton-standings-head,
.chessminton-standings-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 64px 90px 64px;
  align-items: center;
  gap: 8px;
}

.chessminton-standings-head {
  color: #5f6f67;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.chessminton-standings-row {
  border-top: 1px solid #edf2ef;
  padding-top: 4px;
  font-weight: 850;
}

.chessminton-standings-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chessminton-public-page {
  min-height: 100vh;
  background: #081811;
  color: #eef6f0;
  padding: 32px;
}

.chessminton-public-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.chessminton-public-header span,
.chessminton-public-competition-head span {
  color: #f0cf62;
  font-weight: 950;
  text-transform: uppercase;
}

.chessminton-public-header h1,
.chessminton-public-header p,
.chessminton-public-competition h2,
.chessminton-public-competition h3,
.chessminton-public-competition h4 {
  margin: 0;
}

.chessminton-public-header h1 {
  font-size: clamp(34px, 6vw, 76px);
}

.chessminton-public-header p {
  color: #b9c8bf;
  font-size: 24px;
  font-weight: 850;
}

.chessminton-public-content,
.chessminton-public-competition,
.chessminton-public-groups,
.chessminton-public-match-list,
.chessminton-public-ko,
.chessminton-public-ko-round {
  display: grid;
  gap: 18px;
}

.chessminton-public-competition {
  border: 1px solid rgba(240, 207, 98, 0.35);
  border-radius: 10px;
  background: rgba(18, 39, 31, 0.92);
  padding: 20px;
}

.chessminton-public-competition-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.chessminton-public-competition-head h2 {
  font-size: clamp(28px, 4vw, 48px);
}

.chessminton-public-competition-head strong {
  color: #b9c8bf;
  font-size: 22px;
}

.chessminton-public-groups {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.chessminton-public-group {
  display: grid;
  gap: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 14px;
}

.chessminton-public-ko-rounds {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.chessminton-public-ko-round {
  min-width: 320px;
}

.chessminton-public-bracket-scroll {
  overflow-x: auto;
  padding: 4px 0 10px;
}

.chessminton-public-bracket-map {
  position: relative;
  min-width: max-content;
}

.chessminton-public-bracket-connectors {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.chessminton-public-bracket-connectors path {
  fill: none;
  stroke: rgba(240, 207, 98, 0.4);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chessminton-public-bracket-connectors path.result {
  stroke: rgba(240, 207, 98, 0.82);
}

.chessminton-public-bracket-round-title {
  position: absolute;
  margin: 0;
  color: #f0cf62;
  font-size: 18px;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.chessminton-public-bracket-card-position {
  position: absolute;
  width: var(--chessminton-bracket-card-width);
  height: var(--chessminton-bracket-card-height);
}

.chessminton-public-bracket-match {
  display: grid;
  align-content: start;
  gap: 9px;
  height: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(185, 200, 191, 0.2);
  border-radius: 8px;
  background: #0d2118;
  padding: 12px;
  overflow: visible;
}

.chessminton-public-bracket-match.live,
.chessminton-public-bracket-match.finished {
  border-color: rgba(240, 207, 98, 0.58);
}

.chessminton-public-bracket-match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chessminton-public-bracket-match-head strong {
  color: #fff;
  font-size: 17px;
  font-weight: 950;
}

.chessminton-public-bracket-match-head span,
.chessminton-public-bracket-note {
  color: #b9c8bf;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.chessminton-public-bracket-side-list {
  display: grid;
  gap: 7px;
}

.chessminton-public-bracket-side {
  display: grid;
  align-content: center;
  min-height: 42px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 10px;
}

.chessminton-public-bracket-side b {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  line-height: 1.08;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chessminton-public-bracket-side small {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: #b9c8bf;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chessminton-public-bracket-side.source b {
  color: #f0cf62;
}

.chessminton-public-bracket-side.winner {
  background: rgba(240, 207, 98, 0.24);
}

.chessminton-public-bracket-side.empty {
  color: #b9c8bf;
}

.chessminton-public-bracket-side.empty b {
  color: #b9c8bf;
}

.chessminton-public-bracket-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.chessminton-public-bracket-result b {
  color: #f0cf62;
  font-size: 22px;
  font-weight: 950;
}

.chessminton-public-bracket-result span {
  overflow: visible;
  color: #b9c8bf;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
}

.chessminton-public-bracket-phase-list {
  display: grid;
  gap: 2px;
}

.chessminton-public-bracket-phase-list em {
  display: block;
  font-style: normal;
}

.chessminton-public-match {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #0d2118;
  padding: 12px;
}

.chessminton-public-match.finished {
  border-color: rgba(240, 207, 98, 0.55);
}

.chessminton-public-match-head,
.chessminton-public-sides,
.chessminton-public-phases {
  display: grid;
  align-items: center;
  gap: 8px;
}

.chessminton-public-match-head {
  grid-template-columns: 1fr auto;
  color: #b9c8bf;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.chessminton-public-sides {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.chessminton-public-sides > b {
  color: #f0cf62;
  font-size: 28px;
  font-weight: 950;
}

.chessminton-public-side {
  min-width: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px;
  font-size: 18px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.chessminton-public-side.winner {
  background: #f0cf62;
  color: #081811;
}

.chessminton-public-phases {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.chessminton-public-phases span {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #b9c8bf;
  padding: 8px;
  font-weight: 900;
}

.chessminton-public-phases b {
  color: #fff;
}

.chessminton-public-winner {
  color: #f0cf62;
  font-weight: 950;
}

.chessminton-public-empty,
.chessminton-public-loading {
  border-radius: 10px;
  background: #fff;
  color: #10261f;
  padding: 24px;
  font-size: 22px;
  font-weight: 850;
}

.chessminton-phases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.chessminton-phase-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.chessminton-phase-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chessminton-phase-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 32px;
  border-radius: 999px;
  background: #2c6e55;
  color: #fff;
  font-weight: 950;
}

.chessminton-phase-head strong {
  font-size: 20px;
}

.chessminton-board-input {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.chessminton-result-board {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 8px;
  background: #10261f;
  color: #fff;
}

.chessminton-total {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}

.chessminton-total span {
  color: #c8d3cd;
  font-size: 18px;
  font-weight: 900;
}

.chessminton-total span:last-child {
  text-align: right;
}

.chessminton-total strong {
  color: #f3d264;
  font-size: 52px;
  line-height: 1;
}

.chessminton-winner {
  color: #fff;
  font-size: 24px;
  font-weight: 950;
}

.chessminton-phase-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.chessminton-phase-results div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.chessminton-phase-results span,
.chessminton-phase-results small {
  color: #b7c5be;
  font-weight: 850;
}

.chessminton-phase-results strong {
  color: #fff;
  font-size: 24px;
}

.chessminton-ko-note {
  border-radius: 8px;
  background: rgba(243, 210, 100, 0.16);
  color: #f3d264;
  padding: 12px;
  font-weight: 900;
}

.chessminton-warnings {
  display: grid;
  gap: 6px;
}

.chessminton-warnings span {
  border-radius: 8px;
  background: rgba(185, 63, 54, 0.18);
  color: #ffd8d4;
  padding: 10px;
  font-weight: 850;
}

@media (max-width: 900px) {
  .chessminton-rule-grid,
  .chessminton-setup-grid,
  .chessminton-list-grid,
  .chessminton-phases,
  .chessminton-phase-results {
    grid-template-columns: 1fr;
  }

  .chessminton-system-form,
  .chessminton-match-row {
    grid-template-columns: 1fr;
  }

  .chessminton-match-main {
    grid-template-columns: 1fr;
  }

  .chessminton-match-main small {
    text-align: left;
  }

  .chessminton-result-grid,
  .chessminton-result-actions,
  .chessminton-standings-head,
  .chessminton-standings-row {
    grid-template-columns: 1fr;
  }

  .chessminton-total {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .chessminton-total span:last-child {
    text-align: center;
  }
}

.sports-dashboard {
  display: grid;
  gap: 1.1rem;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.dashboard-stat-grid > div {
  background: linear-gradient(145deg, #10251d, #1f4b3b);
  color: #fff;
  border-radius: 8px;
  padding: 1rem;
  min-height: 7rem;
  display: grid;
  align-content: space-between;
  box-shadow: 0 18px 40px rgba(20, 44, 36, 0.16);
}

.dashboard-stat-grid span,
.dashboard-stat-grid small {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 800;
}

.dashboard-stat-grid strong {
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.dashboard-event-form {
  display: grid;
  grid-template-columns: minmax(14rem, 2fr) minmax(10rem, 1fr) minmax(9rem, 0.8fr) minmax(9rem, 0.8fr);
  gap: 0.85rem;
  align-items: end;
}

.dashboard-event-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-weight: 900;
}

.dashboard-event-form input,
.dashboard-event-form select,
.dashboard-event-form textarea {
  width: 100%;
}

.dashboard-deadline-check {
  min-height: 3.5rem;
  align-content: center;
}

.dashboard-notes {
  grid-column: 1 / -2;
}

.dashboard-event-form button {
  min-height: 3.4rem;
}

.deadline-timeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  min-height: 20rem;
  padding: 1rem 0.2rem 0;
}

.timeline-side {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 1.5rem 1.2rem;
  scrollbar-width: thin;
}

.timeline-past {
  justify-content: flex-end;
}

.timeline-future {
  justify-content: flex-start;
}

.timeline-now {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  background: #f6d366;
  border: 4px solid #10251d;
  display: grid;
  place-items: center;
  align-content: center;
  color: #10251d;
  text-align: center;
  box-shadow: 0 18px 40px rgba(20, 44, 36, 0.2);
}

.timeline-now strong {
  font-size: 1.25rem;
}

.timeline-now span {
  color: rgba(16, 37, 29, 0.72);
  font-weight: 900;
}

.timeline-empty {
  border: 2px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
  padding: 1.1rem;
  min-width: 15rem;
  text-align: center;
}

.dashboard-event-card {
  flex: 0 0 calc(14.5rem * var(--event-scale, 1));
  min-width: calc(14.5rem * var(--event-scale, 1));
  max-width: calc(18rem * var(--event-scale, 1));
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0.95rem;
  box-shadow: 0 12px 32px rgba(20, 44, 36, 0.13);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.dashboard-event-card.deadline {
  border-color: #d8b34d;
  background: #fff9e8;
}

.dashboard-event-card.today {
  box-shadow: 0 0 0 4px rgba(49, 117, 91, 0.18), 0 18px 40px rgba(20, 44, 36, 0.14);
}

.dashboard-event-card.done {
  opacity: 0.72;
  background: #f4f7f4;
}

.dashboard-event-meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.55rem;
}

.dashboard-event-meta span,
.dashboard-event-meta strong {
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 1000;
}

.dashboard-event-meta span {
  background: #e7f3ed;
  color: var(--accent);
}

.dashboard-event-meta strong {
  background: #f6d366;
  color: #6b5520;
}

.dashboard-event-card h4 {
  font-size: clamp(1.05rem, calc(1.05rem * var(--event-scale, 1)), 1.55rem);
  line-height: 1.12;
  margin: 0 0 0.45rem;
  overflow-wrap: anywhere;
}

.dashboard-event-card p {
  color: var(--muted);
  font-weight: 900;
  margin: 0;
}

.dashboard-event-card b {
  display: inline-block;
  color: var(--accent);
  font-size: clamp(1.25rem, calc(1.2rem * var(--event-scale, 1)), 2rem);
  line-height: 1.05;
  margin: 0.45rem 0;
}

.dashboard-event-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.team-assignment-page {
  display: grid;
  gap: 1rem;
}

.team-assignment-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(20, 44, 36, 0.1);
}

.team-assignment-toolbar > div:first-child {
  display: grid;
  gap: 0.15rem;
}

.team-assignment-toolbar strong {
  font-size: 1.4rem;
  line-height: 1;
}

.team-assignment-toolbar span {
  color: var(--muted);
  font-weight: 850;
}

.team-assignment-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.team-pool-panel,
.league-stage,
.league-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.team-pool-panel {
  position: sticky;
  top: 5.2rem;
  padding: 1rem;
  max-height: calc(100vh - 7rem);
  overflow: auto;
}

.section-head.compact {
  margin-bottom: 0.75rem;
}

.team-pool-drop,
.league-team-list {
  display: grid;
  gap: 0.55rem;
  min-height: 4.2rem;
}

.team-assignment-team {
  border: 1px solid #cfded6;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  background: #f8fbf9;
  cursor: grab;
  box-shadow: 0 8px 20px rgba(20, 44, 36, 0.08);
}

.team-assignment-team:active {
  cursor: grabbing;
}

.team-assignment-team.dragging {
  opacity: 0.55;
}

.team-assignment-team strong,
.team-assignment-team small {
  display: block;
  overflow-wrap: anywhere;
}

.team-assignment-team strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.team-assignment-team small {
  color: var(--muted);
  font-weight: 800;
  margin-top: 0.18rem;
}

.league-tree-panel {
  display: grid;
  gap: 1rem;
}

.league-stage {
  padding: 1rem;
}

.league-stage-head,
.league-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.league-stage-head {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.league-stage-head span,
.league-card-head span {
  display: inline-block;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.league-stage-head h3,
.league-card-head h4 {
  margin: 0.1rem 0 0;
  overflow-wrap: anywhere;
}

.league-stage-lanes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.9rem;
  padding-top: 1rem;
}

.league-card {
  padding: 0.85rem;
  background: #fbfcfb;
  min-height: 12rem;
}

.league-card:hover {
  border-color: #8ab8a3;
}

.league-drop-hint,
.league-empty {
  min-height: 4rem;
  display: grid;
  place-items: center;
  border: 2px dashed #cbdad2;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
  padding: 0.8rem;
}

.icon-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.icon-actions button {
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f6faf8;
  color: var(--green);
  font-size: 1.15rem;
  font-weight: 950;
}

.icon-actions button:hover {
  background: var(--green-soft);
}

.icon-actions button.danger {
  color: var(--red);
}

.dashboard-event-actions {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.dashboard-event-actions button {
  min-height: 2.3rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
}

.dashboard-event-actions .danger-text {
  background: #faeeee;
  color: #a34039;
}

.dashboard-done-list {
  margin-top: 1rem;
}

.dashboard-done-list summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 1000;
  margin-bottom: 0.75rem;
}

.dashboard-done-list > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.85rem;
}

.badix-dashboard {
  display: grid;
  gap: 18px;
}

.badix-toolbar .section-head {
  align-items: flex-start;
}

.badix-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.badix-panel-head > div:first-child {
  min-width: 0;
}

.badix-panel-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-left: auto;
}

.badix-import-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  position: relative;
  z-index: 0;
}

.badix-import-button input {
  width: 100%;
  height: 100%;
}

.badix-tool-strip,
.badix-converter-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.badix-tool-strip {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.badix-tool-strip strong,
.badix-converter-panel strong {
  display: block;
  color: var(--ink);
  font-weight: 950;
}

.badix-tool-strip span,
.badix-converter-panel span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.badix-converter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-items: end;
}

.badix-converter-grid input,
.badix-converter-grid select {
  width: 100%;
}

.badix-rating-filter {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  margin-bottom: 16px;
}

.badix-rating-filter label {
  flex: 1 1 280px;
  max-width: 520px;
}

.badix-club-filter-wrap {
  position: relative;
}

.badix-rating-filter input {
  width: 100%;
}

.badix-club-suggestions {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  display: grid;
  gap: 2px;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.badix-club-suggestions button,
.badix-club-suggestions span {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.badix-club-suggestions button:hover,
.badix-club-suggestions button.active {
  background: var(--soft);
  color: var(--green);
}

.badix-info-note {
  margin: 12px 0 14px;
  padding: 12px 14px;
  border: 1px solid #ecd06d;
  border-radius: 8px;
  background: #fff7d6;
  color: #3d3413;
  font-weight: 800;
  line-height: 1.45;
}

.badix-info-note strong {
  color: #241d08;
}

.badix-info-note.is-working {
  border-color: #8bb8d8;
  background: #e8f4fb;
  color: #123248;
}

.badix-info-note.is-error {
  border-color: #e29b9b;
  background: #fff0f0;
  color: #6f1f1f;
}

.badix-ratings-table {
  table-layout: fixed;
  min-width: 920px;
}

.badix-ratings-table .badix-rank-col {
  width: 44px;
}

.badix-ratings-table .badix-rating-col {
  width: 170px;
}

.badix-ratings-table .badix-matches-col {
  width: 86px;
}

.badix-ratings-table .badix-recommendation-col {
  width: 112px;
}

.badix-ratings-table .badix-status-col {
  width: 116px;
}

.badix-ratings-table th:nth-child(6),
.badix-ratings-table td:nth-child(6) {
  white-space: normal;
}

.badix-guide {
  display: grid;
  gap: 14px;
}

.badix-guide h4 {
  margin: 10px 0 0;
  font-size: 1.05rem;
  color: var(--ink);
}

.badix-guide p,
.badix-guide li {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.55;
}

.badix-guide ul {
  margin: 0;
  padding-left: 1.25rem;
}

.badix-formula {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f8f6;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-weight: 900;
  overflow-x: auto;
}

.badix-guide-table {
  min-width: 560px;
}

.badix-calc-legend {
  max-width: 520px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
}

.badix-calc-legend strong {
  color: var(--green);
}

.badix-detail-actions {
  display: grid;
  justify-items: end;
  gap: 7px;
  margin-left: auto;
}

.badix-detail-table th:nth-child(2),
.badix-detail-table td:nth-child(2) {
  width: 92px;
  max-width: 92px;
  white-space: nowrap;
}

.badix-detail-table th:nth-child(3),
.badix-detail-table td:nth-child(3) {
  width: 72px;
  max-width: 90px;
  white-space: nowrap;
}

.badix-league-label {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 5px;
  background: #eef5f0;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 4px 7px;
}

@media (max-width: 720px) {
  .badix-panel-head {
    flex-direction: column;
  }

  .badix-panel-actions {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .badix-tool-strip {
    grid-template-columns: 1fr;
  }

  .badix-detail-actions {
    justify-items: start;
    margin-left: 0;
  }

  .badix-calc-legend {
    text-align: left;
  }
}

.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tab-btn {
  min-height: 38px;
  border-radius: 8px;
  padding: 8px 12px;
  background: #edf4ef;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 800;
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.badix-dummy-tabs {
  margin: 0 0 14px;
}

.badix-dummy-tabs .tab-btn span {
  display: inline-flex;
  min-width: 24px;
  justify-content: center;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(18, 69, 45, 0.12);
  color: inherit;
  font-size: 0.8rem;
}

.badix-dummy-tabs .tab-btn.active span,
.badix-dummy-tabs .tab-btn:hover span {
  background: rgba(255, 255, 255, 0.22);
}

.data-table tr.dummy-attest-row td {
  background: #e4f5e9;
}

.dummy-attest-note {
  display: block;
  margin-top: 5px;
  color: #1f6b3a;
  font-weight: 800;
  line-height: 1.25;
}

.dummy-action-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 250px;
}

.dummy-attest-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

.dummy-attest-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.dummy-upload-btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.dummy-upload-btn input {
  display: none;
}

.dummy-attest-link {
  color: #1f6b3a;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.dummy-attest-link:hover {
  text-decoration: underline;
}

.dummy-attest-files,
.dummy-attest-add {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.badix-attests-table {
  min-width: 1380px;
}

.badix-attests-table th,
.badix-attests-table td {
  vertical-align: top;
}

.dummy-attest-file-row {
  display: grid;
  grid-template-columns: 220px minmax(250px, 1fr) 104px 128px;
  align-items: center;
  gap: 8px;
  min-width: 700px;
}

.dummy-attest-file-row input,
.dummy-attest-add input {
  min-width: 0;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 7px 9px;
  font: inherit;
}

.dummy-attest-add {
  grid-template-columns: 240px 124px;
  align-items: center;
  min-width: 380px;
}

.dummy-attest-file-row .compact-btn,
.dummy-attest-add .compact-btn {
  width: 100%;
  min-width: 0;
  justify-content: center;
  white-space: normal;
  line-height: 1.15;
  text-align: center;
}

.badix-attests-table .dummy-attest-link {
  display: inline-block;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.data-table .table-group-separator td {
  padding: 14px 8px 8px;
  border-top: 2px solid #b9c8c1;
  border-bottom: 1px solid var(--line);
  background: #eef4f0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:hover {
  color: #0a4d3a;
}

.badix-player-link {
  color: var(--green);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.muted-cell {
  color: var(--muted);
}

.badix-season-form,
.badix-sync-form {
  margin-top: 12px;
}

.ranking-check-form {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  align-items: end;
}

.ranking-check-table {
  min-width: 980px;
}

.ranking-master-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.ranking-master-btn {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8faf7;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
}

.ranking-master-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.ranking-master-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ranking-master-btn.active:hover {
  color: #fff;
}

.ranking-club-combobox {
  position: relative;
}

.ranking-club-combobox small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.ranking-club-suggestions {
  top: calc(100% - 16px);
}

.ranking-normalized-note {
  margin: 12px 0;
  border: 1px solid #cfe1d7;
  border-radius: 7px;
  background: #f4faf6;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  padding: 10px 12px;
}

.ranking-check-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.ranking-detail-row > td {
  padding: 0 !important;
  background: #f8fbf8;
}

.ranking-detail-row .badix-detail-panel {
  margin: 0;
  border-width: 1px 0;
  border-radius: 0;
  box-shadow: none;
}

.ranking-transfer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  margin-left: 6px;
  border-radius: 5px;
  background: #e9f1ff;
  color: #2d5f9f;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  vertical-align: 1px;
}

.ranking-diff-row {
  background: #fffaf0;
}

.ranking-arrow {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  margin-right: 8px;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
  vertical-align: middle;
}

.ranking-arrow.up {
  background: #e2f3eb;
  color: var(--green);
}

.ranking-arrow.down {
  background: #fde9e6;
  color: var(--red);
}

.ranking-arrow.same {
  background: #edf4ef;
  color: var(--muted);
}

.ranking-arrow.only,
.ranking-arrow.missing {
  background: #fff1c7;
  color: var(--amber);
}

@media (max-width: 820px) {
  .dashboard-stat-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-event-form {
    grid-template-columns: 1fr;
  }

  .dashboard-notes {
    grid-column: auto;
  }

  .deadline-timeline {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .timeline-now {
    width: 100%;
    height: auto;
    border-radius: 8px;
    padding: 1rem;
    order: -1;
  }

  .timeline-side {
    overflow-x: visible;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
  }

  .timeline-past,
  .timeline-future {
    justify-content: stretch;
  }

  .dashboard-event-card {
    max-width: none;
    min-width: 0;
    flex-basis: auto;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  .invoice-print-page {
    padding: 0;
    background: #fff;
  }

  .invoice-print-actions {
    display: none;
  }

  .invoice-sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    box-shadow: none;
  }

  @page match-cards-portrait {
    size: A4 portrait;
    margin: 0;
  }

  @page match-cards-landscape {
    size: A4 landscape;
    margin: 0;
  }

  body {
    background: #fff;
  }

  .no-print {
    display: none !important;
  }

  .shell {
    display: block;
  }

  .sidebar,
  .topbar,
  .toast {
    display: none !important;
  }

  .main {
    padding: 0 !important;
    max-width: none !important;
  }

  .match-cards-print {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: #fff;
  }

  .match-card-print-body,
  .match-card-print-page {
    background: #fff;
  }

  .match-card-print-document {
    display: block;
    padding: 0;
  }

  .match-card-sheet.portrait-ten {
    page: match-cards-portrait;
  }

  .match-card-sheet.landscape-six {
    page: match-cards-landscape;
  }

  .match-card-sheet {
    margin: 8mm;
    padding: 0;
    display: grid;
    gap: 4mm;
    box-shadow: none !important;
    break-after: page;
  }

  .match-card-sheet:last-child {
    break-after: auto;
  }

  .match-card-sheet.portrait-ten {
    width: 194mm;
    height: 281mm;
    grid-template-columns: repeat(2, 1fr);
  }

  .match-card-sheet.landscape-six {
    width: 281mm;
    height: 194mm;
    grid-template-columns: repeat(2, 1fr);
  }

  .match-card-sheet.portrait-ten {
    grid-template-rows: repeat(5, 1fr);
  }

  .match-card-sheet.landscape-six {
    grid-template-rows: repeat(3, 1fr);
  }

  .match-score-card {
    min-height: 0;
    height: 100%;
    padding: 3mm;
    border-radius: 0;
    gap: 2mm;
    page-break-inside: avoid;
  }

  .match-card-sheet.landscape-six .match-score-card {
    gap: 1mm;
  }

  .match-score-card-head {
    gap: 2mm;
    padding-bottom: 1mm;
  }

  .match-score-card-head strong {
    font-size: 8pt;
  }

  .match-score-card-table th,
  .match-score-card-table td {
    height: 10mm;
  }

  .match-score-card-table th:not(:first-child),
  .match-score-card-table td {
    width: 12mm;
  }

  .match-score-card-table th:first-child {
    width: auto;
  }

  .match-score-card-table th {
    font-size: 7.5pt;
  }

  .match-score-card-table thead th {
    font-size: 6.5pt;
  }

  .match-score-card-table th small {
    font-size: 6.3pt;
  }

  .certificate-page {
    min-height: auto;
    padding: 0;
    background: #fff;
  }

  .certificate-sheet {
    width: 210mm;
    height: 297mm;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    box-shadow: none;
  }

  .referee-report-page {
    padding: 0;
    background: #fff;
  }

  .referee-report-sheet {
    max-width: none;
    padding: 10mm;
    box-shadow: none;
  }

  .no-print {
    display: none !important;
  }
}
