:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #637083;
  --line: #dce2ea;
  --accent: #00456a;
  --accent-strong: #00324d;
  --accent-soft: #e6f2f7;
  --accent-mid: #b8d8e8;
  --accent-muted: #3f7b99;
  --danger: #b42318;
  --shadow: 0 12px 30px rgba(20, 30, 45, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

button,
input,
select {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 0 14px;
}

a.link-button {
  display: inline-grid;
  min-height: 42px;
  align-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 0 14px;
  text-decoration: none;
}

.secondary-link {
  border: 1px solid var(--line);
  background: #fff !important;
  color: var(--ink) !important;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 150px;
  padding: 12px;
  resize: vertical;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.65rem, 2vw, 2.35rem);
  line-height: 1.1;
}

h2 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 18px clamp(16px, 4vw, 42px);
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-controls {
  display: grid;
  gap: 8px;
  width: min(640px, 56vw);
}

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

.admin-login {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(180px, 1fr) auto;
  gap: 8px;
}

.admin-key {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-emergency {
  justify-self: end;
  width: min(320px, 100%);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-emergency summary,
.admin-key summary {
  cursor: pointer;
  list-style: none;
  text-align: right;
}

.admin-emergency summary::-webkit-details-marker,
.admin-key summary::-webkit-details-marker {
  display: none;
}

.admin-emergency[open],
.admin-key[open] {
  display: grid;
  gap: 8px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(250px, 310px) 1fr;
  gap: 20px;
  padding: 20px clamp(16px, 4vw, 42px) 42px;
}

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

.sidebar {
  align-self: start;
  padding: 16px;
}

article {
  padding: 18px;
}

.stack,
.form-grid {
  display: grid;
  gap: 10px;
}

.spaced {
  margin-top: 16px;
}

.spaced button,
button.spaced {
  width: 100%;
}

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

.tabs {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.inline-subtabs {
  justify-content: start;
  margin: 0 0 12px;
}

.tab,
.subtab {
  justify-content: start;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.tab.active,
.subtab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

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

.section-head h2 {
  margin-bottom: 0;
}

.management-page {
  display: grid;
  gap: 18px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
}

.settings-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 16px;
}

.settings-card h2 {
  margin-bottom: 2px;
}

.settings-card > button,
.settings-card > .danger {
  width: 100%;
}

.management-shell {
  display: grid;
  gap: 18px;
  padding: 20px clamp(16px, 4vw, 42px) 42px;
}

.management-shell > article,
.management-pane > article {
  width: min(1480px, 100%);
}

.management-tabs {
  width: min(1480px, 100%);
}

.management-pane {
  display: none;
}

.management-pane.active {
  display: grid;
  gap: 18px;
}

.management-race-filters {
  grid-template-columns: minmax(240px, 1fr) minmax(170px, 220px) minmax(170px, 220px);
  margin: 16px 0;
}

.race-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.race-card {
  display: grid;
  gap: 16px;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(20, 30, 45, 0.05);
  padding: 18px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.race-card:hover,
.race-card:focus-visible {
  border-color: var(--accent-mid);
  box-shadow: inset 5px 0 0 var(--accent), var(--shadow);
  outline: none;
  transform: translateY(-1px);
}

.race-card-main {
  display: grid;
  align-content: start;
  gap: 10px;
}

.race-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.2rem, 1.5vw, 1.55rem);
  line-height: 1.12;
}

.race-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: end;
}

.race-card-actions button {
  flex: 1 1 120px;
}

.management-user-item .badge {
  min-width: 96px;
}

.management-user-controls select {
  width: auto;
  min-width: 150px;
}

.admin-users-settings-grid {
  align-items: start;
}

.admin-users-settings-grid .settings-card {
  align-self: start;
}

/* Figma visual language: management workspace */
.management-body {
  --management-glass: rgba(255, 255, 255, 0.24);
  --management-surface: rgba(255, 255, 255, 0.42);
  --management-surface-strong: rgba(255, 255, 255, 0.68);
  --management-border: rgba(255, 255, 255, 0.88);
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 5%, rgba(0, 135, 255, 0.2), transparent 34rem),
    radial-gradient(circle at 94% 72%, rgba(0, 69, 106, 0.16), transparent 38rem),
    linear-gradient(135deg, #edf7fb 0%, #dcecf4 50%, #f3f8fa 100%);
  background-attachment: fixed;
  font-family: Gilroy, Inter, ui-sans-serif, system-ui, sans-serif;
}

.management-body .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-color: var(--management-border);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 8px 28px rgba(0, 69, 106, 0.08);
  padding: 22px clamp(20px, 4vw, 54px);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.management-body .topbar h1 {
  color: #071f2c;
  letter-spacing: -0.025em;
}

.management-body .eyebrow {
  margin-bottom: 7px;
  color: #00456a;
  letter-spacing: 0.08em;
}

.management-body .admin-session .meta {
  color: #31596d;
  font-weight: 700;
}

.management-body button {
  border-radius: 40px;
  box-shadow: 0 4px 8px rgba(0, 69, 106, 0.2);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.management-body button:hover {
  background: #0087ff;
  box-shadow: 0 7px 14px rgba(0, 69, 106, 0.22);
  transform: translateY(-1px);
}

.management-body button:focus-visible,
.management-body input:focus-visible,
.management-body select:focus-visible,
.management-body summary:focus-visible,
.management-body .race-card:focus-visible {
  outline: 3px solid rgba(0, 135, 255, 0.34);
  outline-offset: 3px;
}

.management-body .secondary {
  border-color: var(--management-border);
  background: var(--management-surface-strong);
  box-shadow: none;
  color: #00456a;
}

.management-body .secondary:hover {
  border-color: #0087ff;
  background: #fff;
  color: #00456a;
}

.management-body .management-shell {
  gap: 14px;
  width: min(1560px, 100%);
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 54px) 54px;
}

.management-body .management-tabs {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 40px;
  background: linear-gradient(110deg, rgba(236, 236, 236, 0.88), rgba(236, 234, 234, 0.34));
  padding: 4px;
  box-shadow: 0 8px 20px rgba(0, 69, 106, 0.07);
}

.management-body .management-tabs .subtab {
  min-height: 42px;
  border: 0;
  border-radius: 40px;
  background: transparent;
  box-shadow: none;
  color: #071f2c;
  padding: 0 22px;
  font-weight: 600;
}

.management-body .management-tabs .subtab.active {
  background: #fff;
  box-shadow: 0 5px 14px rgba(0, 69, 106, 0.1);
  color: #00456a;
}

.management-body .management-tabs .subtab:hover {
  background: rgba(255, 255, 255, 0.62);
  transform: none;
}

.management-body .management-race-tabs {
  width: max-content;
  margin: 0 0 18px;
  border: 1px solid var(--management-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  padding: 4px;
}

.management-body .management-race-tabs .subtab {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #071f2c;
  padding: 0 18px;
  box-shadow: none;
}

.management-body .management-race-tabs .subtab.active {
  background: #fff;
  color: #00456a;
  box-shadow: 0 5px 14px rgba(0, 69, 106, 0.1);
}

.management-body .management-pane > article {
  border: 1px solid var(--management-border);
  border-radius: 40px;
  background: var(--management-glass);
  box-shadow: 0 22px 55px rgba(0, 69, 106, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  padding: clamp(20px, 3vw, 30px);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.management-body .section-head h2,
.management-body .settings-card h2 {
  color: #071f2c;
  font-size: 1.15rem;
}

.management-body .section-head > div > h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.management-body .meta {
  color: #4c6978;
}

.management-body .settings-card {
  gap: 15px;
  margin-top: 18px;
  border-color: var(--management-border);
  border-radius: 30px;
  background: var(--management-surface);
  box-shadow: none;
  padding: clamp(18px, 2.5vw, 26px);
}

.management-body input,
.management-body select {
  min-height: 46px;
  border-color: var(--management-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  padding-inline: 16px;
  outline: none;
}

.management-body input:focus,
.management-body select:focus {
  border-color: #0087ff;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 4px rgba(0, 135, 255, 0.12);
}

.management-body .management-race-filters {
  grid-template-columns: minmax(280px, 1fr) 170px 170px;
  align-items: end;
  gap: 10px;
  margin: 18px 0;
  border: 1px solid var(--management-border);
  border-radius: 30px;
  background: var(--management-surface);
  padding: 14px;
}

.management-body .management-filter-field {
  gap: 8px;
}

.management-body .management-filter-field span {
  padding-left: 8px;
}

.management-body .management-filter-field input {
  width: 100%;
}

.management-body .race-card-grid {
  gap: 16px;
}

.management-body .race-card {
  min-height: 200px;
  border-color: var(--management-border);
  border-radius: 30px;
  background: var(--management-surface);
  box-shadow: 0 10px 26px rgba(0, 69, 106, 0.08);
  padding: 22px;
}

.management-body .race-card:hover,
.management-body .race-card:focus-visible {
  border-color: #fff;
  background: var(--management-surface-strong);
  box-shadow: 0 16px 34px rgba(0, 69, 106, 0.14);
  transform: translateY(-2px);
}

.management-body .race-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.management-body .icon-danger-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--danger);
  padding: 0;
}

.management-body .icon-danger-button:hover,
.management-body .icon-danger-button:focus-visible {
  background: transparent;
  color: #8f1d14;
  box-shadow: none;
}

.management-body .icon-danger-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.management-body .management-modal {
  width: min(680px, 100%);
}

.management-body .nested-management-modal {
  z-index: 1300;
}

.management-body .round-state {
  width: max-content;
  border: 1px solid #00a6ff;
  border-radius: 30px;
  background: #0087ff;
  color: #fff;
  font-weight: 700;
}

.management-body .item {
  border-color: var(--management-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.38);
  padding: 14px;
}

.management-body .badge {
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.75);
  color: #00456a;
}

.management-body .message,
.management-body .empty {
  border: 1px solid var(--management-border);
  border-radius: 20px;
  background: var(--management-surface-strong);
}

/* Shared Figma visual language for the remaining application surfaces. */
.figma-page {
  --figma-glass: rgba(255, 255, 255, 0.25);
  --figma-surface: rgba(255, 255, 255, 0.45);
  --figma-surface-strong: rgba(255, 255, 255, 0.72);
  --figma-border: rgba(255, 255, 255, 0.9);
  --figma-blue: #0087ff;
  --figma-navy: #00456a;
  min-height: 100vh;
  background:
    radial-gradient(circle at 7% 6%, rgba(0, 135, 255, 0.2), transparent 34rem),
    radial-gradient(circle at 95% 76%, rgba(0, 69, 106, 0.16), transparent 40rem),
    linear-gradient(135deg, #edf7fb 0%, #dcecf4 50%, #f3f8fa 100%);
  background-attachment: fixed;
  font-family: Gilroy, Inter, ui-sans-serif, system-ui, sans-serif;
}

.figma-page h1,
.figma-page h2,
.figma-page h3 {
  color: #071f2c;
  letter-spacing: -0.015em;
}

.figma-page .eyebrow {
  color: var(--figma-navy);
  letter-spacing: 0.08em;
}

.figma-page input,
.figma-page select,
.figma-page textarea {
  border-color: var(--figma-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
  outline: none;
}

.figma-page input:focus,
.figma-page select:focus,
.figma-page textarea:focus {
  border-color: var(--figma-blue);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 4px rgba(0, 135, 255, 0.12);
}

.figma-page button,
.figma-page .link-button {
  border-radius: 40px;
  box-shadow: 0 4px 8px rgba(0, 69, 106, 0.2);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.figma-page button:hover,
.figma-page .link-button:hover {
  background: var(--figma-blue);
  box-shadow: 0 7px 14px rgba(0, 69, 106, 0.22);
  transform: translateY(-1px);
}

.figma-page button:focus-visible,
.figma-page a:focus-visible,
.figma-page input:focus-visible,
.figma-page select:focus-visible,
.figma-page summary:focus-visible,
.figma-page [tabindex]:focus-visible {
  outline: 3px solid rgba(0, 135, 255, 0.36);
  outline-offset: 3px;
}

.figma-page .secondary,
.figma-page .secondary-link {
  border-color: var(--figma-border);
  background: var(--figma-surface-strong) !important;
  box-shadow: none;
  color: var(--figma-navy) !important;
}

.figma-page .secondary:hover,
.figma-page .secondary-link:hover {
  border-color: var(--figma-blue);
  background: #fff !important;
}

.admin-workspace-page .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-color: var(--figma-border);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 8px 28px rgba(0, 69, 106, 0.08);
  padding: 22px clamp(20px, 4vw, 54px);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.admin-workspace-page .layout {
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 18px;
  padding: 24px clamp(16px, 4vw, 54px) 54px;
}

.admin-workspace-page .sidebar {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 24px;
  z-index: 15;
  width: 88px;
  height: calc(100vh - 48px);
  min-height: 0;
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.45);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  padding: 20px 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: width 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.admin-workspace-page .sidebar:hover,
.admin-workspace-page .sidebar:focus-within {
  width: 260px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 12px 36px rgba(0, 69, 106, 0.16);
}

.admin-workspace-page .sidebar.is-collapsed-after-click {
  width: 88px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.sidebar-brand {
  display: flex;
  height: 48px;
  align-items: center;
  gap: 12px;
  margin: 0 8px 28px;
  white-space: nowrap;
}

.sidebar-brand-mark {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 14px;
  background: var(--figma-navy);
  box-shadow: 0 4px 10px rgba(0, 69, 106, 0.2);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
}

.sidebar-brand-name {
  opacity: 0;
  display: grid;
  gap: 2px;
  min-width: 0;
  color: #071f2c;
  transform: translateX(-6px);
  transition: opacity 0.16s ease, transform 0.2s ease;
}

.sidebar-brand-name strong {
  overflow: hidden;
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
}

.sidebar-brand-name small {
  overflow: hidden;
  color: #5b6b7b;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.1;
  text-overflow: ellipsis;
}

.sidebar:hover .sidebar-brand-name,
.sidebar:focus-within .sidebar-brand-name {
  opacity: 1;
  transform: translateX(0);
}

.sidebar.is-collapsed-after-click .sidebar-brand-name,
.sidebar.is-collapsed-after-click .sidebar-label {
  opacity: 0;
  transform: translateX(-6px);
}

.admin-workspace-page .tabs {
  flex: 1;
  gap: 12px;
  margin-top: 0;
}

.admin-workspace-page .tab {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  gap: 14px;
  border-color: transparent;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  color: #153747;
  padding: 0 17px;
  white-space: nowrap;
  overflow: hidden;
}

.admin-workspace-page .tab.active {
  border-color: var(--figma-border);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(0, 69, 106, 0.1);
  color: var(--figma-navy);
}

.admin-workspace-page .tab:hover {
  background: rgba(255, 255, 255, 0.68);
  box-shadow: none;
  transform: none;
}

.sidebar-icon {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #676767;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.tab.active .sidebar-icon {
  color: var(--figma-navy);
}

.sidebar-label {
  opacity: 0;
  font-size: 0.92rem;
  font-weight: 650;
  transform: translateX(-6px);
  transition: opacity 0.16s ease, transform 0.2s ease;
}

.sidebar:hover .sidebar-label,
.sidebar:focus-within .sidebar-label {
  opacity: 1;
  transform: translateX(0);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 24px;
}

.sidebar-logout {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: none !important;
  color: #436271;
  padding: 0 16px;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.68) !important;
  box-shadow: none !important;
  color: var(--figma-navy);
  transform: none !important;
}

.sidebar-logout img {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.admin-workspace-page .workspace article,
.admin-workspace-page .setup-pane > article {
  border-color: var(--figma-border);
  border-radius: 40px;
  background: var(--figma-glass);
  box-shadow: 0 22px 55px rgba(0, 69, 106, 0.1);
  padding: clamp(20px, 3vw, 30px);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.admin-workspace-page .settings-card,
.admin-workspace-page .dashboard-refresh-status,
.admin-workspace-page .item,
.admin-workspace-page .filter-bar,
.admin-workspace-page .control-panel,
.admin-workspace-page .live-section,
.admin-workspace-page .round-pinned {
  border-color: var(--figma-border);
  border-radius: 30px;
  background: var(--figma-surface);
  box-shadow: none;
}

.admin-workspace-page .subtabs {
  width: max-content;
  max-width: 100%;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 40px;
  background: linear-gradient(110deg, rgba(236, 236, 236, 0.88), rgba(236, 234, 234, 0.34));
  padding: 4px;
}

.admin-workspace-page .subtab {
  border: 0;
  border-radius: 40px;
  background: transparent;
  box-shadow: none;
  color: #153747;
  padding-inline: 20px;
}

.admin-workspace-page .subtab.active {
  background: #fff;
  box-shadow: 0 5px 14px rgba(0, 69, 106, 0.1);
  color: var(--figma-navy);
}

.admin-workspace-page .chip-filter button.active,
.admin-workspace-page .round-state.active,
.admin-workspace-page .round-state.judging {
  border-color: #00a6ff;
  background: var(--figma-blue);
  color: #fff;
}

.public-page .public-rankings-shell {
  width: min(1500px, 100%);
  padding: clamp(16px, 4vw, 50px);
}

.public-page .public-rankings-head {
  border: 1px solid var(--figma-border);
  border-radius: 40px;
  background: var(--figma-glass);
  box-shadow: 0 22px 55px rgba(0, 69, 106, 0.1);
  padding: clamp(22px, 4vw, 36px);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.public-page .public-rankings-controls,
.public-page .tracking-form {
  gap: 10px;
}

.public-page .public-result-group,
.public-page .tracking-card,
.public-page .empty {
  border-color: var(--figma-border);
  border-radius: 30px;
  background: var(--figma-surface);
  box-shadow: 0 12px 30px rgba(0, 69, 106, 0.08);
}

.public-page .public-results-menu,
.public-page .public-result-section,
.public-page .tracking-current,
.public-page .tracking-round-card,
.public-page .public-report-details {
  border-color: var(--figma-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.44);
}

.public-page .public-results-menu a,
.public-page .public-section-menu a {
  border-radius: 30px;
}

.judge-page.figma-page {
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 135, 255, 0.24), transparent 28rem),
    linear-gradient(145deg, #e8f4fa, #d6e9f2 58%, #f4f9fb);
}

.judge-page.figma-page .judge-layout {
  width: 100%;
  max-width: min(920px, 100vw);
  min-height: 100dvh;
  align-content: start;
  padding: clamp(12px, 3vw, 28px);
}

.judge-page.figma-page .judge-panel {
  border: 1px solid var(--figma-border);
  border-radius: 40px;
  background: var(--figma-glass);
  box-shadow: 0 20px 50px rgba(0, 69, 106, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.judge-page.figma-page #judgeLoginPanel {
  width: min(520px, 100%);
  margin: max(8vh, 28px) auto 0;
  padding: clamp(24px, 5vw, 40px);
}

.judge-page.figma-page #judgeWorkPanel {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 28px);
}

.judge-page.figma-page .judge-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: start;
  gap: 12px;
  margin-bottom: clamp(14px, 2vw, 22px);
  padding-right: 0;
}

.judge-page.figma-page .judge-head > div {
  min-width: 0;
}

.judge-page.figma-page .judge-head .eyebrow,
.judge-page.figma-page .judge-head h2 {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.judge-page.figma-page .power-logout {
  position: static;
  width: 58px;
  min-width: 58px;
  height: 58px;
  min-height: 58px;
  border: 0;
  font-size: 1.65rem;
  box-shadow: 0 12px 26px rgba(0, 69, 106, 0.22);
}

.judge-page.figma-page #judgeLoginPanel .stack {
  gap: 14px;
  margin-top: 20px;
}

.judge-page.figma-page .round-strip {
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 40px;
  background: rgba(236, 235, 235, 0.58);
}

.judge-page.figma-page .round-strip button {
  border-radius: 40px;
  box-shadow: none;
}

.judge-page.figma-page .tablet-bib-card,
.judge-page.figma-page .judge-status,
.judge-page.figma-page .judge-bottom-bar,
.judge-page.figma-page .judge-complete-modal {
  border-color: rgba(0, 69, 106, 0.18);
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 69, 106, 0.24);
  color: var(--ink);
  opacity: 1;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.judge-page.figma-page .bib-button {
  border-radius: 24px;
}

@media (max-width: 900px) {
  .admin-workspace-page .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-workspace-page .sidebar {
    position: static;
    width: 100%;
    min-height: 0;
    overflow: visible;
    padding: 10px;
  }

  .admin-workspace-page .sidebar:hover,
  .admin-workspace-page .sidebar:focus-within {
    width: 100%;
  }

  .admin-workspace-page .sidebar-brand {
    display: none;
  }

  .admin-workspace-page .tabs {
    display: flex;
    flex: 1 1 auto;
    gap: 4px;
    overflow-x: auto;
  }

  .admin-workspace-page .tab {
    flex: 0 0 auto;
    width: auto;
    padding-inline: 14px;
  }

  .admin-workspace-page .sidebar-label {
    opacity: 1;
    transform: none;
  }

  .admin-workspace-page .sidebar-footer {
    margin-top: 0;
    padding-top: 0;
  }

  .admin-workspace-page .sidebar-logout {
    width: auto;
    min-width: 48px;
    padding-inline: 12px;
  }

  .admin-workspace-page .subtabs {
    width: 100%;
    overflow-x: auto;
  }

  .admin-workspace-page .subtab {
    flex: 0 0 auto;
  }

  .public-admin-links {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 430px) {
  .figma-page button,
  .figma-page .link-button {
    box-shadow: 0 3px 7px rgba(0, 69, 106, 0.16);
  }

  .admin-workspace-page .workspace article,
  .admin-workspace-page .setup-pane > article,
  .public-page .public-rankings-head,
  .judge-page.figma-page .judge-panel {
    border-radius: 28px;
  }
}

.backup-list-card {
  max-height: 420px;
}

.backup-list-card .section-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  padding-bottom: 8px;
}

.backup-list-card .compact-list {
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.danger-zone {
  align-content: start;
  border-color: rgba(180, 35, 24, 0.22);
  background: #fff7f6;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(auto-fit, minmax(170px, auto));
  gap: 8px;
  margin: 12px 0;
}

.filter-bar select {
  min-width: 170px;
}

.compact-filter {
  width: min(420px, 100%);
  margin: 0;
}

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

.dashboard-refresh-status {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.dashboard-refresh-status > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.dashboard-refresh-status strong {
  color: var(--accent-strong);
}

.dashboard-refresh-status span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.dashboard-refresh-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--accent-soft);
}

.dashboard-refresh-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.25s linear;
}

.dashboard-refresh-status.refreshing .dashboard-refresh-track span {
  width: 100% !important;
  opacity: 0.7;
}

.compact-dashboard {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

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

.dash-card strong {
  display: block;
  font-size: 1.6rem;
}

.system-card strong {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.2;
}

.public-admin-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.public-link-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 0;
  padding: 12px 14px;
  gap: 10px;
}

.public-link-item strong {
  font-size: 0.95rem;
  line-height: 1.1;
}

.public-link-item .meta {
  overflow-wrap: normal;
  margin-top: 2px;
  font-size: 0.78rem;
  line-height: 1.15;
}

.public-link-item .item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-only-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border: 1px solid rgba(0, 69, 106, 0.16);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}

.icon-only-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.public-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 86px;
  min-width: 86px;
  height: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  padding: 3px;
}

.public-toggle span {
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
}

.public-toggle.off span:first-child,
.public-toggle.on span:last-child {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 69, 106, 0.16);
}

.import-preview {
  margin-top: 10px;
}

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

.preview-box.ready {
  border-color: var(--accent-mid);
  background: var(--accent-soft);
}

.preview-box.blocked,
.error-box {
  border-color: #f1c27d;
  background: #fff8eb;
}

.preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preview-chips span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 6px 10px;
}

.chip-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip-filter button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.86rem;
  padding: 0 12px;
}

.chip-filter button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.login-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(0, 135, 255, 0.28), transparent 31rem),
    radial-gradient(circle at 84% 82%, rgba(0, 69, 106, 0.24), transparent 34rem),
    linear-gradient(135deg, #e9f4fa 0%, #d8eaf3 48%, #f1f7fa 100%);
  padding: clamp(20px, 5vw, 64px);
}

.login-shell::before,
.login-shell::after {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  content: "";
  filter: blur(1px);
}

.login-shell::before {
  width: min(42vw, 560px);
  aspect-ratio: 1;
  top: -22%;
  right: -10%;
}

.login-shell::after {
  width: min(34vw, 430px);
  aspect-ratio: 1;
  bottom: -20%;
  left: -8%;
}

.login-panel {
  width: min(480px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 24px 70px rgba(0, 69, 106, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: clamp(30px, 6vw, 48px);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.login-panel .eyebrow {
  margin-bottom: 10px;
  color: #00456a;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.login-panel h1 {
  color: #071f2c;
  font-family: Gilroy, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2rem, 6vw, 2.65rem);
  letter-spacing: -0.025em;
}

.login-panel .stack {
  gap: 16px;
}

.login-panel .spaced {
  margin-top: 30px;
}

.login-field {
  display: grid;
  gap: 8px;
  color: #071f2c;
  font-size: 0.86rem;
  font-weight: 700;
}

.login-panel input {
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 1px 2px rgba(0, 69, 106, 0.04);
  padding: 0 18px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.login-panel input:focus {
  border-color: #0087ff;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(0, 135, 255, 0.14);
}

.login-panel button {
  min-height: 54px;
  margin-top: 4px;
  border: 1px solid #006fae;
  border-radius: 40px;
  background: #00456a;
  box-shadow: 0 6px 12px rgba(0, 69, 106, 0.25);
  font-size: 1rem;
}

.login-panel button:hover {
  background: #0087ff;
}

.login-panel button:focus-visible,
.login-panel summary:focus-visible {
  outline: 3px solid rgba(0, 135, 255, 0.38);
  outline-offset: 3px;
}

.login-panel .admin-key {
  margin-top: 22px;
  color: #3f667a;
}

.login-panel .admin-key summary {
  text-align: center;
}

.login-panel .admin-key input {
  margin-top: 10px;
}

.login-panel .message {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  padding: 12px 16px;
  text-align: center;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

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

.subtab {
  min-height: 36px;
}

.workspace {
  min-width: 0;
}

.panel {
  display: none;
}

.panel.active {
  display: grid;
  gap: 18px;
}

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

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

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.pager button {
  min-height: 34px;
}

.item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.item button {
  justify-self: end;
}

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

.item-actions.grouped {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  align-items: start;
  min-width: min(620px, 100%);
}

.audit-event-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.audit-event-card summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding: 12px;
}

.audit-event-card summary::-webkit-details-marker {
  display: none;
}

.audit-event-card[open] summary {
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.audit-event-summary {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.audit-event-summary strong,
.audit-event-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-event-summary span,
.audit-event-time,
.audit-facts span,
.audit-user-agent span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.audit-event-body {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.audit-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.audit-facts div,
.audit-user-agent {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  padding: 9px 10px;
}

.audit-json-block {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
}

.audit-json-block summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 900;
  padding: 9px 10px;
}

.audit-json-block pre {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  border-top: 1px solid var(--line);
  color: #111827;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
  padding: 10px;
}

.audit-user-agent code {
  color: var(--ink);
  font-size: 0.8rem;
  white-space: pre-wrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.tag {
  border: 1px solid #c9d5df;
  border-radius: 999px;
  background: #e6f2f7;
  color: #00456a;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.tag.muted {
  background: #eef2f6;
  color: var(--muted);
}

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

.discipline-dances-editor {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.discipline-dance-rows {
  display: grid;
  gap: 8px;
}

.discipline-dance-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 90px 150px auto;
  gap: 8px;
  align-items: center;
}

.round-action-section {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
}

.round-action-section button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.88rem;
}

.action-label {
  width: 100%;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.round-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.round-state {
  display: inline-grid;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #e9eef5;
  color: #344054;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 0 10px;
}

.round-state.published {
  background: var(--accent-soft);
  color: var(--accent);
}

.round-state.judging,
.round-state.active {
  background: #e7f0ff;
  color: #1d4f91;
}

.round-state.completed,
.round-state.closed {
  background: #eef0f3;
  color: #667085;
}

.round-state.reopened {
  background: #fff2cc;
  color: #8a5a00;
}

.round-state.break {
  background: #e6f2f7;
  color: var(--accent);
}

.round-item.status-completed,
.round-item.status-closed {
  background: #f3f5f7;
  opacity: 0.72;
}

.round-item.status-published {
  border-color: var(--accent-mid);
  box-shadow: inset 4px 0 0 var(--accent);
}

.time-table-break-slot {
  border-color: rgba(0, 69, 106, 0.24);
  background: rgba(230, 242, 247, 0.68);
}

.time-table-slot {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  cursor: grab;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.time-table-slot:active {
  cursor: grabbing;
}

.time-table-slot.dragging {
  opacity: 0.48;
  transform: scale(0.995);
}

.time-table-slot.drag-over-before {
  box-shadow: inset 0 4px 0 var(--accent);
}

.time-table-slot.drag-over-after {
  box-shadow: inset 0 -4px 0 var(--accent);
}

.drag-handle {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 42px;
  border-radius: 999px;
  background: #e6f2f7;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -2px;
  user-select: none;
}

.time-table-planner {
  display: grid;
  gap: 16px;
}

.planner-help {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.planner-chips,
.planner-discipline-actions,
.planner-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.planner-chips .chip {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 900;
}

.planner-chips .chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

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

.planner-column,
.planner-available {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
}

.planner-column h3,
.planner-available h3 {
  margin: 0;
}

.planner-column-list {
  display: grid;
  gap: 8px;
}

.planner-group-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.planner-group-card strong,
.planner-group-card span {
  display: block;
  min-width: 0;
}

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

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

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

.round-group-head strong {
  font-size: 1.05rem;
}

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

.round-group-turn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 10px;
}

.round-group-turn.completed {
  background: #f1f3f5;
  opacity: 0.68;
}

.round-pinned {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 10px;
  z-index: 5;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 16px;
}

.round-pinned.status-published {
  border-color: var(--accent-mid);
  box-shadow: inset 5px 0 0 var(--accent), var(--shadow);
}

.round-pinned-main {
  display: flex;
  gap: 12px;
  align-items: start;
}

.round-pinned-main strong {
  display: block;
  font-size: 1.18rem;
}

.round-pinned-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 8px;
}

.round-pinned-stats > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.round-pinned-stats strong {
  display: block;
  font-size: 1.35rem;
}

.round-pinned .item-actions.grouped {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  min-width: 0;
}

.round-console {
  position: sticky;
  top: 10px;
  z-index: 10;
}

.round-console-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: start;
}

.round-console .round-pinned {
  position: static;
}

.round-live-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(560px, 1.25fr);
  gap: 14px;
  align-items: start;
}

.round-live-reference,
.round-live-details {
  display: grid;
  gap: 12px;
}

.round-live-layout .round-live-hero {
  grid-template-columns: 1fr;
  align-items: start;
}

.round-live-layout .round-live-hero h3 {
  font-size: clamp(1.45rem, 1.6vw, 2rem);
}

.round-live-layout .round-range {
  width: 100%;
}

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

.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.secondary:hover {
  background: #eef3f7;
}

.danger {
  background: var(--danger);
}

.badge {
  border-radius: 999px;
  background: #e9eef5;
  color: #344054;
  font-weight: 800;
  min-width: 42px;
  padding: 6px 10px;
  text-align: center;
}

.meta {
  color: var(--muted);
  font-size: 0.86rem;
}

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

.check {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 42px;
  padding: 8px 10px;
}

.check input {
  width: 18px;
  min-height: 18px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(180px, 320px) auto;
  gap: 10px;
  align-items: center;
}

.score-sheet,
.leaderboard {
  display: grid;
  gap: 12px;
}

.score-row,
.result-row {
  display: grid;
  grid-template-columns: 80px 1fr repeat(3, minmax(96px, 120px));
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.result-row {
  grid-template-columns: 70px 90px 1fr 140px;
}

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

.round-live-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 5px 0 0 #d9e1ea;
  padding: 16px;
}

.round-live-hero.status-active,
.round-live-hero.status-published,
.round-live-hero.status-judging {
  box-shadow: inset 5px 0 0 var(--accent);
}

.round-live-hero h3 {
  margin: 8px 0 4px;
  font-size: clamp(1.45rem, 2vw, 2.15rem);
  line-height: 1.08;
}

.round-live-hero p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.round-range {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 8px;
}

.round-range > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  text-align: center;
}

.round-range strong {
  display: block;
  font-size: 1.65rem;
  line-height: 1;
}

.round-range span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.round-management-modal {
  display: grid;
  gap: 12px;
}

.round-modal-actions {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.live-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 12px;
}

.live-card strong {
  display: block;
  font-size: 1.4rem;
}

.round-workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr)) auto;
  gap: 8px;
  align-items: stretch;
}

.workflow-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.workflow-step span {
  grid-row: span 2;
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #e9eef4;
  color: var(--muted);
  font-weight: 800;
}

.workflow-step.done span,
.workflow-step.current span {
  background: var(--accent);
  color: #fff;
}

.workflow-step.current {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.workflow-step small {
  color: var(--muted);
}

.workflow-state {
  display: grid;
  align-items: center;
}

.round-dance-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
}

.round-dance-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  font-weight: 800;
}

.round-dance-pill strong {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #e9eef4;
  color: var(--muted);
}

.round-dance-pill small {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.round-dance-pill.active {
  border-color: var(--accent);
  background: #e6f2f7;
  color: var(--accent-strong);
}

.round-dance-pill.active strong,
.round-dance-pill.closed strong {
  background: var(--accent);
  color: #fff;
}

.round-dance-pill.closed {
  opacity: 0.72;
}

.rankings-list,
.ranking-group,
.ranking-rounds,
.ranking-preference-list,
.ranking-preferences {
  display: grid;
  gap: 10px;
}

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

.ranking-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.ranking-group h3,
.ranking-round-detail h4 {
  margin: 0;
}

.ranking-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ranking-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  background: #fff;
}

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

.ranking-table th {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.ranking-table tr:last-child td {
  border-bottom: 0;
}

.ranking-preferences {
  gap: 4px;
  font-size: 0.84rem;
}

.public-rankings-shell {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 4vw, 42px);
}

.public-rankings-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.public-rankings-head select {
  max-width: 360px;
}

.public-rankings-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: min(100%, 980px);
}

.public-rankings-controls select {
  min-width: 180px;
}

.public-bib-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-bib-search input {
  width: 140px;
}

.public-waiting-card {
  display: grid;
  justify-items: start;
  gap: 12px;
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 42px);
}

.public-waiting-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1;
}

.public-waiting-card p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.public-page.rankings-waiting .public-rankings-head {
  display: none;
}

.public-page.rankings-waiting .public-rankings-shell {
  min-height: 100dvh;
  align-content: center;
  justify-items: center;
}

.public-page.rankings-waiting .rankings-list {
  width: min(720px, 100%);
}

.public-page.rankings-waiting .public-waiting-card {
  width: 100%;
  max-width: none;
  border-color: rgba(255, 255, 255, 0.75);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 80px rgba(0, 69, 106, 0.14);
}

.public-bib-search button {
  white-space: nowrap;
}

.tracking-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: min(100%, 780px);
}

.tracking-form select {
  min-width: 260px;
}

.tracking-form input {
  width: 150px;
}

.tracking-shell {
  min-height: 100vh;
}

.tracking-refresh-status {
  margin: 14px 0 18px;
  background: rgba(255, 255, 255, 0.72);
}

.tracking-refresh-status .dashboard-refresh-track span {
  background: #00456a;
}

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

.tracking-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 7px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: clamp(16px, 3vw, 26px);
}

.tracking-card.status-closed {
  border-left-color: var(--danger);
}

.tracking-card.status-completed {
  border-left-color: #0f766e;
}

.tracking-card.status-ready,
.tracking-card.status-judging {
  border-left-color: var(--accent);
}

.tracking-card h2 {
  margin: 10px 0 4px;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1;
}

.tracking-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.tracking-bib-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 10px 0 4px;
}

.tracking-bib-line strong {
  color: var(--ink);
  font-size: clamp(2.3rem, 8vw, 4.3rem);
  line-height: 0.95;
}

.tracking-bib-line span {
  color: var(--ink);
  font-size: clamp(1.25rem, 3vw, 2.1rem);
  font-weight: 900;
  line-height: 1.08;
}

.tracking-message {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 900;
  padding: 14px 16px;
}

.tracking-friendly-message {
  display: grid;
  gap: 6px;
  text-align: left;
}

.tracking-friendly-message strong {
  color: var(--ink);
  font-size: 1.15rem;
}

.tracking-friendly-message span {
  color: var(--muted);
  font-weight: 800;
}

.tracking-current {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.tracking-current div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.tracking-current span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tracking-current strong {
  font-size: 1.05rem;
}

.tracking-history {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.tracking-history summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  color: var(--accent);
  font-weight: 900;
}

.tracking-history summary strong {
  color: var(--muted);
  font-size: 0.86rem;
}

.tracking-round-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.tracking-round-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.55fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 5px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.tracking-round-card.in-round {
  border-left-color: var(--accent);
  background: #fff;
}

.tracking-round-card.current {
  border-color: var(--accent-mid);
  background: var(--accent-soft);
}

.tracking-round-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.tracking-round-main strong {
  display: block;
  font-size: 1rem;
  line-height: 1.15;
}

.tracking-round-meta {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 8px;
}

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

.tracking-round-meta span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tracking-round-meta strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.public-results-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 18px;
  align-items: start;
}

.public-results-menu {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 14px;
}

.public-results-menu strong {
  color: var(--accent);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.public-results-menu a,
.public-section-menu a {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 9px 10px;
  text-decoration: none;
}

.public-results-menu a:hover,
.public-section-menu a:hover,
.public-results-menu a.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.public-results-groups {
  display: grid;
  gap: 22px;
}

.public-result-group {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: clamp(16px, 2.4vw, 26px);
}

.public-result-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-left: 6px solid var(--accent);
  padding-left: 14px;
}

.public-result-title h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 2.7rem);
  line-height: 1;
}

.public-section-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.public-result-section {
  display: grid;
  gap: 12px;
  scroll-margin-top: 18px;
}

.public-result-section h3 {
  margin: 0;
  color: var(--accent-strong);
  font-size: 1.25rem;
}

.public-staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.public-staff-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  padding: 10px 12px;
}

.public-staff-grid span,
.public-round-head span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.public-judge-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  padding: 10px;
}

.public-judge-legend span {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
  padding: 7px 9px;
}

.public-judge-legend strong {
  color: var(--accent);
}

.public-report-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.public-report-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  border-left: 5px solid var(--accent);
  background: #f8fafc;
  color: var(--ink);
  font-weight: 900;
  padding: 12px 14px;
}

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

.public-report-details summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.public-report-details[open] summary::after {
  content: "-";
}

.public-report-details summary strong {
  color: var(--muted);
  font-size: 0.9rem;
}

.public-report-details > .public-staff-grid,
.public-report-details > .ranking-table-wrap,
.public-report-content {
  margin: 12px;
}

.public-report-content {
  display: grid;
  gap: 14px;
}

.public-report-content h3 {
  margin: 8px 0 0;
  color: var(--accent-strong);
}

.public-dance-block,
.public-round-block {
  display: grid;
  gap: 8px;
}

.public-dance-block h4,
.public-round-block h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.ranking-table caption {
  caption-side: top;
  padding: 0 0 10px;
  color: var(--ink);
  font-weight: 900;
  text-align: left;
}

.public-unit-reports {
  display: grid;
  gap: 10px;
}

.public-unit-report summary span strong {
  color: var(--accent);
}

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

.public-unit-heading h3 {
  margin: 0;
  font-size: 1.2rem;
}

.public-unit-history-table th,
.public-unit-history-table td {
  text-align: center;
}

.public-unit-history-table th:first-child,
.public-unit-history-table td:first-child {
  min-width: 180px;
  text-align: left;
}

.public-unit-history-table td:first-child span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.public-unit-history-table .final-row td {
  background: var(--accent-soft);
}

.public-round-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  padding: 10px 12px;
}

.public-tt-table {
  border-collapse: separate;
  border-spacing: 1px;
  background: var(--line);
  font-size: 0.9rem;
}

.public-tt-table th {
  background: var(--accent);
  color: #fff;
  text-align: center;
}

.public-tt-table td {
  background: #fff;
  text-align: center;
}

.public-tt-table td:nth-child(3),
.public-tt-table th:nth-child(3) {
  text-align: left;
}

.public-preference-report {
  min-width: 980px;
}

.public-preference-report th,
.public-preference-report td {
  font-size: 0.82rem;
  padding: 6px 7px;
}

.public-preference-report td:nth-child(3),
.public-preference-report th:nth-child(3) {
  text-align: center;
}

.public-unit-cell {
  min-width: 220px;
  text-align: left !important;
}

.public-unit-cell strong,
.public-unit-cell span {
  display: block;
}

.public-unit-cell span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 2px;
}

.public-tt-table.compact th,
.public-tt-table.compact td {
  padding: 7px 8px;
  white-space: nowrap;
}

.public-tt-table tr.eliminated td {
  background: #f2f5f8;
  color: #64748b;
}

.public-tt-table tr.qualified td {
  background: #fff;
}

.public-tt-table tr.public-bib-highlight td {
  background: #fff4bf;
  box-shadow: inset 0 2px 0 #d29b00, inset 0 -2px 0 #d29b00;
  color: #1f2937;
}

.public-tt-table tr.public-bib-highlight td:first-child {
  box-shadow: inset 4px 0 0 #d29b00, inset 0 2px 0 #d29b00, inset 0 -2px 0 #d29b00;
}

.ranking-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
}

.ranking-details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
}

.ranking-rounds {
  margin-top: 12px;
}

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

.ranking-preference-list > div {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) minmax(220px, 2fr);
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 7px 0;
}

.ranking-preference-list > div:last-child {
  border-bottom: 0;
}

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

.control-panel.ready {
  border-color: var(--accent-mid);
  background: var(--accent-soft);
}

.control-panel.blocked {
  border-color: #f1c27d;
  background: #fff8eb;
}

.control-blockers {
  display: grid;
  gap: 6px;
}

.control-blockers span {
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 6px;
  background: #fff;
  color: #8a4b00;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 8px 10px;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 999px;
  background: #98a2b3;
}

.status-dot.online {
  background: var(--accent);
}

.live-state-ok {
  color: #0f7b6c;
}

.live-state-active {
  color: var(--primary);
}

.live-state-warning {
  color: #8a4b00;
}

.live-state-muted {
  color: #667085;
}

.message {
  margin-bottom: 14px;
  border-radius: 6px;
  background: #fff4e5;
  color: #8a4b00;
  padding: 12px 14px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  align-items: center;
  justify-items: center;
  background: rgba(15, 23, 42, 0.42);
  padding: 20px;
}

#assignmentModal {
  z-index: 1200;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal {
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  padding: 18px;
  overflow: hidden;
}

.content-modal {
  width: min(1360px, 100%);
}

.orientation-lock {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  place-items: center;
  background: rgba(228, 242, 247, 0.92);
  padding: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.orientation-lock-card {
  width: min(420px, 100%);
  display: grid;
  justify-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 60px rgba(0, 69, 106, 0.16);
  padding: 30px 24px;
  text-align: center;
}

.orientation-lock-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 999px;
  background: var(--figma-navy, #00456a);
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
}

.orientation-lock-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.45rem;
}

.orientation-lock-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.35;
}

@media (orientation: portrait) and (max-width: 1024px) and (pointer: coarse) {
  .admin-workspace-page .orientation-lock {
    display: grid;
  }

  .admin-workspace-page {
    overflow: hidden;
  }
}

.modal-scroll {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

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

.modal-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.modal-tab-workspace {
  display: grid;
  gap: 14px;
}

.modal-inner-tabs {
  margin-bottom: 0;
}

.official-heats-view {
  display: grid;
  gap: 18px;
}

.official-heat-group {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(0, 69, 106, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.56);
  padding: 16px;
}

.official-heat-group-head,
.official-heat-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.official-heat-group-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.official-heat-group-head span,
.official-heat-title span {
  border-radius: 999px;
  background: rgba(0, 69, 106, 0.1);
  color: var(--primary);
  padding: 7px 12px;
  font-weight: 800;
}

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

.official-heat-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 150px;
  border: 1px solid rgba(0, 69, 106, 0.14);
  border-radius: 20px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 14px 34px rgba(0, 69, 106, 0.08);
}

.official-heat-title strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.official-heat-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 10px;
}

.official-heat-number {
  display: grid;
  min-height: 58px;
  place-items: center;
  border: 1px solid rgba(0, 69, 106, 0.14);
  border-radius: 18px;
  background: rgba(232, 244, 250, 0.72);
  color: var(--primary);
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  font-weight: 900;
  line-height: 1;
}

.assignment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
  min-height: 0;
  overflow: hidden;
}

.assignment-grid > div {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.assignment-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.assignment-option {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff !important;
  color: var(--ink) !important;
  padding: 10px;
  text-align: left;
  justify-items: start;
  cursor: pointer;
}

.assignment-option:hover {
  border-color: var(--accent);
  background: var(--accent-soft) !important;
}

.assignment-option strong,
.assignment-option span {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.assignment-option strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.judge-layout {
  display: grid;
  gap: 10px;
  max-width: 393px;
  margin: 0 auto;
  padding: 10px;
}

.judge-page {
  background: #eef1f4;
}

.judge-page .judge-panel {
  font-family: Montserrat, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.judge-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.judge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-right: 48px;
  position: relative;
}

.power-logout {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.judge-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.round-strip {
  display: grid;
  gap: 10px;
  padding-bottom: 10px;
}

.round-strip button {
  min-width: 0;
}

.setup-tabs {
  margin-bottom: 14px;
}

.setup-pane {
  display: grid;
  gap: 16px;
}

.units-workspace,
.setup-workspace {
  display: grid;
  gap: 14px;
}

.units-pane,
.setup-inner-pane {
  display: grid;
  gap: 12px;
}

.unit-group-accordion {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.unit-group-accordion summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding: 12px;
}

.unit-group-accordion summary::-webkit-details-marker {
  display: none;
}

.unit-group-accordion[open] summary {
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.unit-group-tools {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.unit-group-tools input {
  max-width: 520px;
}

.unit-group-body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.setup-disciplines-grid {
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.35fr);
  align-items: start;
}

.setup-disciplines-grid > * {
  min-width: 0;
}

.setup-settings-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.setup-disciplines-card {
  display: grid;
  gap: 16px;
}

.settings-form-compact {
  grid-template-columns: 1fr;
}

.discipline-create-form {
  grid-template-columns: minmax(220px, 1fr) 120px auto;
  align-items: end;
}

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

.discipline-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  padding: 14px;
}

.discipline-card.is-disabled {
  opacity: 0.68;
}

.discipline-card-main {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.discipline-order {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #e9eff8;
  color: #26344a;
  font-weight: 900;
}

.discipline-summary {
  min-width: 0;
}

.discipline-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.discipline-title-row strong {
  font-size: 1.05rem;
  line-height: 1.15;
}

.dance-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.dance-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid #bedbea;
  border-radius: 999px;
  background: #e6f6fd;
  color: #00456a;
  padding: 4px 10px 4px 5px;
  font-size: 0.78rem;
  font-weight: 900;
}

.dance-chip span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  color: #2a5a74;
}

.dance-chip.muted {
  border-color: #d6dee6;
  background: #eef2f6;
  color: var(--muted);
}

.discipline-actions {
  display: grid;
  gap: 8px;
  min-width: 112px;
}

.compact-empty {
  margin-top: 10px;
  padding: 10px;
}

.field-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.field-label span {
  color: var(--ink);
}

.public-timetable-body {
  margin: 0;
  min-height: 100vh;
  background: #d9e3e5;
  color: #11141c;
  font-family: "DM Sans", Montserrat, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.public-timetable-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 16px 0 36px;
}

.public-timetable-list {
  display: grid;
  gap: 20px;
}

.public-current-slot {
  position: sticky;
  top: 0;
  z-index: 5;
  padding-top: 8px;
  background: linear-gradient(180deg, #d9e3e5 78%, rgba(217, 227, 229, 0));
}

.public-upcoming-slots {
  display: grid;
  gap: 20px;
}

.public-slot-container {
  padding: 22px 22px 24px;
  border-radius: 34px;
  background: rgba(245, 248, 249, 0.82);
  box-shadow: 0 14px 26px rgba(19, 36, 48, 0.045);
}

.public-slot-container.active {
  position: relative;
  border-bottom: 6px solid #31d236;
}

.public-slot-container.active::after {
  display: none;
}

.public-title-block {
  display: flex;
  justify-content: space-between;
  margin: 0 10px 24px;
}

.public-title {
  color: #3f424d;
  font-size: 1.45rem;
  font-weight: 800;
}

.public-date {
  margin-top: 5px;
  color: #70747c;
  font-size: 1.02rem;
  font-weight: 600;
}

.public-slot-info {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 10px 18px;
}

.public-slot-times {
  display: flex;
  align-items: baseline;
}

.public-slot-times strong {
  font-size: 1.92rem;
  line-height: 1;
  font-weight: 900;
}

.public-delay {
  flex: none;
  min-width: 84px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #fff;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 900;
}

.public-delay-late {
  background: #df3434;
}

.public-slot-items {
  display: grid;
  gap: 8px;
}

.public-slot-card {
  width: 100%;
  min-height: 96px;
  padding: 24px 28px;
  border: 0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 18px rgba(44, 56, 66, 0.06);
  color: #11141c;
  text-align: left;
  cursor: pointer;
}

.public-slot-card:hover {
  background: #fff;
}

.public-slot-card:disabled {
  cursor: default;
}

.public-slot-discipline {
  display: block;
  margin-bottom: 7px;
  font-size: 1.18rem;
  font-weight: 800;
}

.public-slot-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #242936;
  font-size: 1.02rem;
  font-weight: 500;
}

.public-slot-row span:last-child {
  color: #4e5057;
  text-align: right;
}

.public-timetable-empty {
  padding: 28px;
  border-radius: 24px;
  background: rgba(245, 248, 249, 0.85);
  color: #4f5d68;
  font-weight: 700;
}

.public-popup-open {
  overflow: hidden;
}

.public-timetable-popup[hidden] {
  display: none;
}

.public-timetable-popup {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: grid;
  place-items: start center;
  overflow: auto;
  padding: 12px 0 40px;
}

.public-timetable-popup-bg {
  position: fixed;
  inset: 0;
  background: rgba(217, 227, 229, 0.78);
  backdrop-filter: blur(4px);
}

.public-timetable-popup-shell {
  position: relative;
  z-index: 1;
  width: min(800px, calc(100% - 28px));
  display: grid;
  gap: 15px;
}

.public-timetable-wide-banner {
  min-height: 158px;
  padding: 34px 30px;
  border-radius: 16px;
  background: #172c49;
  color: #fff;
  text-decoration: none;
  overflow: hidden;
}

.public-timetable-wide-banner span {
  display: block;
  margin-bottom: 34px;
  color: #986cff;
  font-size: 1.72rem;
  line-height: 0.98;
  font-weight: 700;
}

.public-timetable-wide-banner span::first-line {
  color: #9c78ff;
}

.public-timetable-wide-banner strong {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
}

.public-timetable-popup-card {
  padding: 24px 15px 18px;
  background: rgba(245, 248, 249, 0.88);
  box-shadow: 15px 15px 0 #fff;
}

.public-popup-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin: 0 10px 20px;
}

.public-popup-head strong,
.public-popup-head span {
  display: block;
}

.public-popup-head strong {
  margin-bottom: 4px;
  font-size: 1rem;
  font-weight: 700;
}

.public-popup-head span {
  font-size: 0.95rem;
}

.public-popup-head button {
  width: 36px;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: #676b72;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.public-popup-rounds {
  display: grid;
  gap: 15px;
}

.public-popup-round {
  border-radius: 18px;
  background: #fff;
}

.public-popup-round summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 0 24px;
  cursor: pointer;
  list-style: none;
}

.public-popup-round summary::-webkit-details-marker {
  display: none;
}

.public-popup-round summary > span:first-child {
  display: flex;
  align-items: center;
  gap: 22px;
}

.public-popup-round summary strong {
  font-size: 1.25rem;
  font-weight: 900;
}

.public-popup-round summary span span {
  font-size: 1rem;
  font-weight: 500;
}

.public-popup-chevron {
  font-size: 1.35rem;
  transition: transform 0.18s ease;
}

.public-popup-round[open] .public-popup-chevron {
  transform: rotate(180deg);
}

.public-popup-round-detail {
  display: grid;
  gap: 8px;
  padding: 0 24px 18px;
}

.public-popup-round-detail div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #3d444f;
  font-size: 0.9rem;
}

.public-popup-round-detail strong {
  color: #11141c;
}

.round-icon-button {
  position: relative;
  width: 58px;
  min-width: 58px;
  height: 58px;
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(0, 69, 106, 0.28);
  color: #fff;
  padding: 0;
}

.round-icon-button::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 17px;
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.round-icon-button::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 32px;
  width: 18px;
  height: 9px;
  border: 2px solid currentColor;
  border-top-left-radius: 999px;
  border-top-right-radius: 999px;
  border-bottom: 0;
}

.round-icon-button span {
  position: absolute;
  right: 14px;
  bottom: 13px;
  font-size: 1.45rem;
  line-height: 1;
}

.import-unit-modal {
  gap: 12px;
}

.import-unit-modal button[type="submit"] {
  width: 100%;
}

.judge-waiting {
  display: grid;
  justify-items: center;
  gap: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  min-height: 220px;
  padding: 42px 18px;
  text-align: center;
}

.loader {
  width: 48px;
  height: 48px;
  border: 5px solid #dce2ea;
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

.round-action-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: rgba(241, 245, 249, 0.68);
  backdrop-filter: blur(2px);
}

.round-action-overlay[hidden] {
  display: none !important;
}

.round-action-loader {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-width: min(320px, calc(100vw - 40px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 24px;
  color: var(--ink);
  text-align: center;
}

body.busy-round-action {
  cursor: wait;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.heat-nav {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  text-align: center;
}

.heat-nav strong {
  display: block;
  font-size: 1.2rem;
}

.heat-arrow {
  min-height: 56px;
  font-size: 1.5rem;
}

.counter {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  padding: 12px;
}

.judge-bottom-bar {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: min(100%, 393px);
  transform: translateX(-50%);
  border-top: 1px solid rgba(216, 222, 232, 0.9);
  background: rgba(238, 241, 244, 0.96);
  padding: 10px;
}

.judge-bottom-bar #judgeComplete {
  min-width: 112px;
}

.judge-sync-status {
  margin-top: 5px;
  color: #5e6b7f;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}

.judge-sync-status.synced {
  color: #0f7b6c;
}

.judge-sync-status.pending {
  color: #8a5600;
}

.judge-sync-status.offline {
  color: #b42318;
}

.ballot-grid {
  display: grid;
  justify-content: stretch;
  gap: 15px;
  max-height: calc(100vh - 245px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 0 120px;
  scrollbar-width: none;
}

.ballot-grid::-webkit-scrollbar {
  display: none;
}

.ballot-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.ballot-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.ballot-card.reserve {
  box-shadow: inset 0 0 0 2px #f4b740;
}

.bib-button {
  min-height: 86px;
  font-size: 2.35rem;
}

.tablet-dance-tabs {
  display: flex;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  padding: 0 0 10px;
  scrollbar-width: none;
}

.tablet-dance-tabs::-webkit-scrollbar {
  display: none;
}

.tablet-dance-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 1px solid #c9d5df;
  border-radius: 999px;
  background: #fff;
  color: #00456a;
  padding: 9px 13px;
  font-size: 0.9rem;
  font-weight: 800;
}

.tablet-dance-tabs button span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #e6f2f7;
}

.tablet-dance-tabs button.active {
  border-color: #00456a;
  background: #00456a;
  color: #fff;
}

.tablet-dance-tabs button.active span {
  background: rgba(255, 255, 255, 0.18);
}

.tablet-heat-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid #d8dee8;
  border-radius: 40px;
  background: #f7f8fa;
  padding: 10px;
}

.tablet-heat-title {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 20px;
  color: #000;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.tablet-bib-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 111px));
  grid-auto-rows: 111px;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

.tablet-bib-card {
  grid-template-rows: 1fr 45px;
  gap: 0;
  min-height: 111px;
  height: 111px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 30px;
  background: #e8eeee;
  padding: 5px;
  overflow: hidden;
}

.tablet-bib-card:first-child {
  border-color: rgba(255, 255, 255, 0.78);
  border-radius: 30px;
}

.tablet-bib-card.selected {
  border-color: #0b4c2b;
  background: #145d33;
}

.tablet-bib-card.reserve {
  box-shadow: none;
}

.tablet-bib-card.selected.reserve {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.22), inset 0 0 0 6px rgba(11, 76, 43, 0.9);
}

.tablet-bib-card .bib-button {
  display: grid;
  min-height: 0;
  height: 56px;
  place-items: center;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: #000;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  padding: 0;
}

.tablet-bib-card .bib-button:hover,
.tablet-bib-card .bib-button:focus-visible {
  background: rgba(255, 255, 255, 0.18);
}

.tablet-bib-card.selected .bib-button {
  color: #fff;
}

.tablet-choice-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 45px;
  border-radius: 35px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.42);
}

.tablet-bib-card.selected .tablet-choice-row {
  border-color: rgba(255, 255, 255, 0.16);
  background: #659a6e;
}

.tablet-preference-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 35px;
  background: transparent;
  color: inherit;
  padding: 0;
}

.tablet-preference-button:hover,
.tablet-preference-button:focus-visible {
  background: transparent;
}

.tablet-dot {
  width: 15px;
  min-width: 15px;
  height: 15px;
  min-height: 15px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  padding: 0;
}

.tablet-dot:hover,
.tablet-dot:focus-visible,
.tablet-dot.active {
  background: #000;
}

.tablet-bib-card.selected .tablet-dot {
  border-color: rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.55);
}

.tablet-bib-card.selected .tablet-dot.active {
  border-color: rgba(0, 0, 0, 0.38);
  background: #000;
}

.tablet-placement {
  width: 58px;
  min-height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #000;
  font-size: 16px;
  font-weight: 800;
  padding: 0 6px;
  text-align: center;
}

.judge-panel .bib-button {
  min-height: 104px;
  font-size: 2.8rem;
}

.judge-panel button,
.judge-panel select,
.judge-panel input {
  min-height: 50px;
}

.judge-panel .power-logout {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.judge-panel .tablet-preference-button {
  min-height: 0;
  height: 100%;
  background: transparent;
  padding: 0;
}

.judge-panel .tablet-bib-card .bib-button {
  min-height: 0;
  font-size: 24px;
}

.judge-panel .tablet-dot {
  min-height: 15px;
}

.judge-panel .tablet-placement {
  min-height: 32px;
}

.judge-page.figma-page .tablet-bib-card {
  border-color: rgba(255, 255, 255, 0.78);
  background: #e8eeee;
}

.judge-page.figma-page .tablet-bib-card.selected {
  border-color: #0b4c2b;
  background: #145d33;
}

.judge-page.figma-page .tablet-bib-card .bib-button {
  color: #000;
}

.judge-page.figma-page .tablet-bib-card.selected .bib-button {
  color: #fff;
}

.judge-page.figma-page .tablet-bib-card .tablet-choice-row {
  background: rgba(255, 255, 255, 0.42);
}

.judge-page.figma-page .tablet-bib-card.selected .tablet-choice-row {
  background: #659a6e;
}

.judge-page.figma-page .tablet-dot.active,
.judge-page.figma-page .tablet-bib-card.selected .tablet-dot.active {
  background: #000;
}

.judge-complete-backdrop {
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  padding: 16px;
}

.judge-complete-modal {
  width: min(420px, 100%);
  max-height: none;
  grid-template-rows: auto auto auto;
  background: #fff;
}

/* Figma source: SistemaGiudizio node 4009:104 */
.judge-page.figma-page {
  --judge-canvas: 393px;
  --judge-pad: 10px;
  --judge-glass: rgba(255, 255, 255, 0.17);
  --judge-glass-strong: rgba(255, 255, 255, 0.4);
  --judge-border: rgba(255, 255, 255, 0.3);
  --judge-bg: rgba(217, 226, 227, 0.89);
  --judge-green: #15552d;
  --judge-blue: #0087ff;
  min-height: 100dvh;
  margin: 0;
  background: var(--judge-bg);
  color: #000;
  font-family: Montserrat, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.judge-page.figma-page .judge-layout {
  position: relative;
  display: block;
  width: min(var(--judge-canvas), 100vw);
  max-width: var(--judge-canvas);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0;
}

.judge-page.figma-page .judge-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.judge-page.figma-page #judgeLoginPanel {
  width: calc(100% - 20px);
  margin: 24px auto 0;
  border: 1px solid var(--judge-border);
  border-radius: 30px;
  background: var(--judge-glass-strong);
  padding: 20px;
}

.judge-page.figma-page #judgeWorkPanel {
  width: 100%;
  margin: 0;
  padding: 0 0 94px;
}

.judge-page.figma-page .judge-head {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 30;
  display: grid;
  width: min(373px, calc(100vw - 20px));
  min-height: 89px;
  transform: translateX(-50%);
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--judge-border);
  border-radius: 30px;
  background: var(--judge-glass-strong);
  padding: 20px;
  box-shadow: none;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.judge-page.figma-page .judge-head .eyebrow {
  margin: 0;
  color: #000;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: none;
  white-space: nowrap;
}

.judge-page.figma-page .judge-head h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin: 0;
  color: #000;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}

.judge-page.figma-page .judge-head h2 span:first-child {
  margin-right: 0;
}

.judge-page.figma-page .judge-head h2 span:nth-child(2) {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

.judge-page.figma-page .judge-head h2 span:last-child {
  color: rgba(0, 0, 0, 0.8);
}

.judge-page.figma-page .power-logout {
  position: absolute;
  right: 10px;
  top: -9999px;
  width: 1px;
  min-width: 1px;
  height: 1px;
  min-height: 1px;
  opacity: 0;
  pointer-events: none;
}

.judge-page.figma-page #judgeRounds,
.judge-page.figma-page .judge-status {
  display: none !important;
}

.judge-page.figma-page .ballot-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-height: none;
  overflow: visible;
  padding: 107px 10px 120px;
}

.judge-page.figma-page .tablet-heat-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 0;
  border: 1px solid var(--judge-border);
  border-radius: 40px;
  background: var(--judge-glass);
  padding: 10px;
  box-shadow: none;
}

.judge-page.figma-page .tablet-heat-title {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
  padding: 10px 20px;
  color: #000;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.judge-page.figma-page .tablet-bib-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 111px;
  gap: 10px;
  width: 100%;
}

.judge-page.figma-page .tablet-bib-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 111px;
  height: 111px;
  border: 1px solid var(--judge-border);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.2);
  padding: 5px;
  box-shadow: none;
  overflow: hidden;
}

.judge-page.figma-page .tablet-bib-card:first-child {
  border-radius: 25px;
}

.judge-page.figma-page .tablet-bib-card.selected {
  border-color: transparent;
  background: var(--judge-green);
}

.judge-page.figma-page .tablet-bib-card.reserve,
.judge-page.figma-page .tablet-bib-card.selected.reserve {
  box-shadow: none;
}

.judge-page.figma-page .tablet-bib-card .bib-button {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #000;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.judge-page.figma-page .tablet-bib-card.selected .bib-button {
  color: #fff;
}

.judge-page.figma-page .tablet-bib-card .bib-button:hover,
.judge-page.figma-page .tablet-bib-card .bib-button:focus-visible {
  background: transparent;
}

.judge-page.figma-page .tablet-choice-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 45px;
  min-height: 45px;
  border: 1px solid var(--judge-border);
  border-radius: 35px;
  background: rgba(255, 255, 255, 0.22);
}

.judge-page.figma-page .tablet-bib-card.selected .tablet-choice-row {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.22);
}

.judge-page.figma-page .tablet-preference-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 35px;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.judge-page.figma-page .tablet-dot {
  width: 15px;
  min-width: 15px;
  height: 15px;
  min-height: 15px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.3);
  padding: 0;
}

.judge-page.figma-page .tablet-bib-card.selected .tablet-dot {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.3);
}

.judge-page.figma-page .tablet-dot.active,
.judge-page.figma-page .tablet-bib-card.selected .tablet-dot.active {
  border-color: rgba(0, 0, 0, 0.2);
  background: #000;
}

.judge-page.figma-page .judge-bottom-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(373px, calc(100vw - 20px));
  min-height: 65px;
  transform: translateX(-50%);
  border: 1px solid #fff;
  border-radius: 30px;
  background: var(--judge-glass-strong);
  box-shadow: none;
  padding: 10px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.judge-page.figma-page .judge-bottom-bar::before,
.judge-page.figma-page .judge-head::before {
  content: "";
  position: fixed;
  left: 50%;
  z-index: -1;
  width: min(393px, 100vw);
  height: 150px;
  transform: translateX(-50%);
  pointer-events: none;
}

.judge-page.figma-page .judge-head::before {
  top: -10px;
  background: linear-gradient(0deg, rgba(196, 204, 205, 0), #c4cccd);
}

.judge-page.figma-page .judge-bottom-bar::before {
  bottom: -20px;
  background: linear-gradient(180deg, rgba(196, 204, 205, 0), #c4cccd);
}

.judge-page.figma-page .judge-bottom-bar > div {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 20px;
}

.judge-page.figma-page .counter {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #000;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  padding: 0;
}

.judge-page.figma-page .judge-sync-status {
  display: none;
}

.judge-page.figma-page #judgeComplete {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 45px;
  border: 0;
  border-radius: 50px;
  background: var(--judge-blue);
  box-shadow: none;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 20px;
}

.modal-confirm-line {
  margin: 18px 0 0;
}

.reserve-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.placement-select {
  min-height: 48px;
  font-weight: 800;
}

.confirm-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 10px;
  font-weight: 700;
}

.confirm-line input {
  width: 22px;
  min-height: 22px;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
}

@media (max-width: 900px) {
  .public-timetable-shell {
    width: calc(100% - 18px);
    padding: 10px 0 20px;
  }

  .public-timetable-list {
    gap: 16px;
  }

  .public-current-slot {
    padding-top: 5px;
  }

  .public-upcoming-slots {
    gap: 16px;
  }

  .public-slot-container {
    border-radius: 24px;
    padding: 15px 10px 12px;
    box-shadow: 0 8px 22px rgba(19, 36, 48, 0.04);
  }

  .public-slot-container.active {
    border-bottom-width: 5px;
  }

  .public-title-block {
    margin: 0 8px 18px;
  }

  .public-title {
    font-size: 1.08rem;
  }

  .public-date {
    font-size: 1rem;
  }

  .public-slot-info {
    align-items: center;
    margin-bottom: 12px;
  }

  .public-slot-times strong {
    font-size: 1.12rem;
  }

  .public-slot-times span {
    font-size: 0.86rem;
  }

  .public-delay {
    min-width: 0;
    padding: 7px 10px;
    font-size: 0.68rem;
  }

  .public-slot-card {
    min-height: 66px;
    padding: 14px 16px;
    border-radius: 16px;
  }

  .public-slot-discipline {
    margin-bottom: 5px;
    font-size: 1rem;
  }

  .public-slot-row {
    gap: 12px;
    font-size: 0.86rem;
  }

  .public-timetable-popup {
    padding-top: 0;
  }

  .public-timetable-popup-shell {
    width: calc(100% - 18px);
  }

  .public-timetable-wide-banner {
    min-height: 132px;
    padding: 28px 24px;
    border-radius: 0 0 16px 16px;
  }

  .public-timetable-wide-banner span {
    font-size: 1.35rem;
    margin-bottom: 24px;
  }

  .public-timetable-popup-card {
    padding: 22px 14px 16px;
    box-shadow: 12px 12px 0 #fff;
  }

  .public-popup-round summary {
    padding: 0 18px;
  }

  .public-popup-round summary > span:first-child {
    gap: 16px;
  }

  .public-popup-round-detail {
    padding: 0 18px 16px;
  }

  .topbar,
  .layout,
  .management-race-filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-controls,
  .admin-login,
  .admin-key,
  .admin-emergency {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .grid.two,
  .settings-grid,
  .setup-disciplines-grid,
  .round-console-grid,
  .round-live-layout,
  .round-live-hero,
  .round-workflow,
  .toolbar,
  .score-row,
  .result-row,
  .live-summary,
  .assignment-grid,
  .item-actions.grouped,
  .round-pinned-stats,
  .round-pinned .item-actions.grouped,
  .round-group-turn {
    grid-template-columns: 1fr;
  }

  .discipline-create-form {
    grid-template-columns: 1fr;
  }

  .discipline-card {
    grid-template-columns: 1fr;
  }

  .discipline-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .public-results-layout {
    grid-template-columns: 1fr;
  }

  .public-results-menu {
    position: static;
  }

  .public-rankings-head {
    align-items: stretch;
  }

  .public-rankings-head select,
  .public-rankings-controls,
  .public-rankings-controls select {
    max-width: none;
    width: 100%;
  }

  .public-rankings-controls {
    justify-content: stretch;
  }

  .public-bib-search,
  .tracking-form {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .tracking-shell {
    padding: 14px;
  }

  .tracking-form select,
  .tracking-form input,
  .tracking-form button,
  .tracking-form .link-button {
    width: 100%;
    min-width: 0;
  }

  .tracking-card {
    border-left-width: 5px;
    padding: 16px;
  }

  .tracking-current {
    grid-template-columns: 1fr 1fr;
  }

  .tracking-round-card {
    grid-template-columns: 1fr;
  }

  .tracking-round-meta {
    grid-template-columns: 1fr 1fr;
  }

  .round-range {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .heat-nav {
    grid-template-columns: 54px 1fr 54px;
  }

  .judge-layout {
    width: 100%;
    max-width: none;
  }

  .judge-bottom-bar {
    width: 100%;
  }

  .tablet-heat-panel {
    max-width: none;
  }

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

  .discipline-dance-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .tracking-current {
    grid-template-columns: 1fr;
  }

  .tracking-shell {
    padding: 10px;
  }

  .tracking-bib-line {
    display: grid;
    gap: 4px;
  }

  .tracking-bib-line strong {
    font-size: 3.2rem;
  }

  .tracking-bib-line span {
    font-size: 1.35rem;
  }

  .tracking-message {
    font-size: 1.06rem;
    padding: 12px;
  }

  .tracking-round-main {
    grid-template-columns: 1fr;
  }

  .tracking-round-main .round-state {
    width: max-content;
  }

  .tracking-round-meta {
    grid-template-columns: 1fr;
  }

  .judge-layout {
    width: 100vw;
    padding: 8px;
  }

  .judge-panel {
    padding: 0;
  }

  .tablet-heat-panel {
    width: 100%;
    border-radius: 32px;
  }

  .tablet-bib-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(98px, 1fr);
  }

  .tablet-bib-card {
    height: 100%;
    min-height: 98px;
    border-radius: 25px;
  }

  .judge-bottom-bar {
    grid-template-columns: 1fr;
  }
}

/* Judge tablet: waiting and dance navigation controls */
.judge-page.figma-page .power-logout,
.judge-page.figma-page .judge-panel .power-logout {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 35;
  display: grid;
  place-items: center;
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--judge-blue);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  opacity: 1;
  pointer-events: auto;
  box-shadow: 0 12px 26px rgba(0, 69, 106, 0.22);
}

.judge-page.figma-page #judgeWorkPanel {
  position: relative;
  padding-top: 34px;
}

.judge-page.figma-page .judge-head {
  padding-right: 58px;
}

.judge-page.figma-page .judge-dance-chip-bar {
  display: none;
}

.judge-page.figma-page #judgeWorkPanel.judging-mode .judge-head {
  align-items: center;
  margin-bottom: 10px;
  padding-right: 58px;
}

.judge-page.figma-page #judgeWorkPanel.judging-mode .judge-head .eyebrow,
.judge-page.figma-page #judgeWorkPanel.judging-mode .judge-head h2 {
  display: none;
}

.judge-page.figma-page #judgeWorkPanel.judging-mode .judge-dance-chip-bar {
  display: block;
  min-width: 0;
}

.judge-page.figma-page #judgeWorkPanel.judging-mode #judgeRounds {
  display: none !important;
}

.judge-page.figma-page #judgeRounds {
  display: block !important;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.judge-page.figma-page #judgeRounds.waiting-mode {
  margin-top: 28px;
}

.judge-page.figma-page .judge-waiting {
  min-height: min(430px, calc(100dvh - 250px));
  border: 1px solid var(--judge-border);
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.64);
  padding: 44px 22px;
}

.judge-page.figma-page .judge-waiting strong {
  color: var(--ink);
  font-size: clamp(1.15rem, 5vw, 1.7rem);
  line-height: 1.18;
}

.judge-page.figma-page .judge-waiting span:last-child {
  max-width: 360px;
  color: #5e6b7f;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
}

.judge-page.figma-page .loader {
  width: 58px;
  height: 58px;
  border-width: 7px;
  border-color: #d8dee8;
  border-top-color: var(--judge-blue);
}

.judge-page.figma-page .tablet-dance-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  width: 100%;
  padding: 2px 2px 10px;
  scrollbar-width: none;
}

.judge-page.figma-page .tablet-dance-tabs button {
  min-height: 42px;
  border: 1px solid var(--judge-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  box-shadow: none;
  padding: 7px 13px 7px 8px;
  white-space: nowrap;
}

.judge-page.figma-page .tablet-dance-tabs button span {
  width: 28px;
  height: 28px;
  background: #e6eef4;
  color: #667085;
}

.judge-page.figma-page .tablet-dance-tabs button.active {
  border-color: var(--judge-blue);
  background: var(--judge-blue);
  color: #fff;
}

.judge-page.figma-page .tablet-dance-tabs button.active span {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.judge-page.figma-page #judgeComplete {
  gap: 8px;
}

.judge-page.figma-page .judge-complete-label {
  display: inline-block;
}

.judge-page.figma-page .judge-complete-sync-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
}

.judge-page.figma-page #judgeComplete.sync-synced .judge-complete-sync-icon {
  background: #15a36d;
}

.judge-page.figma-page #judgeComplete.sync-synced .judge-complete-sync-icon::before {
  content: "✓";
}

.judge-page.figma-page #judgeComplete.sync-pending .judge-complete-sync-icon::before {
  content: "⇄";
  animation: spin 0.9s linear infinite;
}

.judge-page.figma-page #judgeComplete.sync-offline .judge-complete-sync-icon {
  background: #8a93a3;
}

.judge-page.figma-page #judgeComplete.sync-offline .judge-complete-sync-icon::before {
  content: "!";
}

@media print {
  :root {
    --bg: #fff;
    --panel: #fff;
    --ink: #000;
    --muted: #000;
    --line: #999;
    --accent: #000;
    --accent-strong: #000;
    --accent-soft: #fff;
    --accent-mid: #fff;
    --accent-muted: #000;
    --danger: #000;
    --shadow: none;
  }

  body,
  .public-rankings-shell,
  .public-result-group,
  .public-report-details,
  .ranking-table,
  .tracking-card {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
  }

  .public-rankings-controls,
  .public-results-menu,
  .public-bib-search-empty,
  button,
  a.link-button {
    display: none !important;
  }

  .public-results-layout {
    display: block;
  }

  .public-report-details {
    break-inside: avoid;
  }

  .ranking-table th,
  .ranking-table td {
    color: #000 !important;
    border-color: #999 !important;
  }
}
