* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

:root {
  --bg-a: #f6fbff;
  --bg-b: #eef4ff;
  --card-bg: #ffffff;
  --card-border: #dce7f7;
  --text: #0f2238;
  --muted: #4a6078;
  --accent: #0f69ff;
  --accent-2: #0b4fbd;
  --danger: #b64848;
  --ok: #1d8d4d;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Manrope", "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px circle at 10% -5%, rgba(15, 105, 255, 0.12), transparent 60%),
    radial-gradient(900px circle at 90% 0%, rgba(80, 151, 255, 0.11), transparent 62%),
    linear-gradient(180deg, var(--bg-b) 0%, var(--bg-a) 100%);
  min-height: 100vh;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #e0eaf8;
  color: #17395d;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid #cfe0f8;
  background: #f2f7ff;
  color: #174978;
  text-decoration: none;
  font-weight: 600;
}

.header-link:hover {
  color: #0f3c64;
  background: #e6f0ff;
}

main {
  max-width: 1240px;
  margin: 18px auto;
  padding: 0 16px 28px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 12px 28px rgba(20, 68, 129, 0.12);
}

.hero {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.4fr 0.6fr;
  align-items: center;
}

.hero h2,
.card h3 {
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

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

.form-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-grid > div[hidden],
.form-grid > div.is-hidden {
  display: none !important;
}

.form-grid > div > label {
  min-height: 20px;
  font-size: 13px;
  color: #294562;
  font-weight: 600;
}

.form-grid > .action-cell {
  justify-content: flex-end;
  padding-top: 26px;
}

.form-grid > .action-cell > button,
.form-grid > .action-cell > a.action-link {
  height: 44px;
}

.current-attempt-banner {
  margin-top: 8px;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid #d4e2f6;
  border-left: 4px solid #87aee2;
  background: #f4f8ff;
  color: #1f4569;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.current-attempt-banner strong {
  font-weight: 800;
}

.current-attempt-banner.is-active {
  border-color: #bcd2f1;
  border-left-color: #2f68b7;
  background: linear-gradient(135deg, #edf4ff 0%, #f8fbff 100%);
  color: #123e66;
  box-shadow: 0 6px 14px rgba(39, 90, 156, 0.12);
}

body.judge-page .judge-assignment-card {
  border-color: #cdddf4;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

body.judge-page .judge-assignment-grid > div:not(.action-cell) {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d7e4f6;
  background: #fafdff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body.judge-page .judge-assignment-grid > div > label {
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #355678;
}

body.judge-page #panel-input-hint {
  margin-top: 2px;
  padding: 10px !important;
  border: 1px dashed #d5e3f6;
  border-radius: 10px;
  background: #ffffff;
  min-height: 66px;
  line-height: 1.35;
}

body.judge-page #attempt-sync-hint {
  font-size: 12px;
  line-height: 1.3;
  color: #476585;
}

body.judge-page .judge-hint {
  margin-top: 6px;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid #cfdff4;
  line-height: 1.35;
  font-size: 13px;
  font-weight: 600;
}

body.judge-page .judge-hint-main {
  border-color: #9fc0e8;
  border-left: 4px solid #2f69b7;
  background: linear-gradient(135deg, #edf4ff 0%, #f8fbff 100%);
  color: #15456e;
  box-shadow: 0 5px 12px rgba(47, 105, 183, 0.12);
}

body.judge-page .judge-hint-soft {
  border-color: #d4e2f6;
  border-left: 4px solid #87aee2;
  background: #f4f8ff;
  color: #2f557c;
}

body.judge-page .judge-hint-ok {
  border-color: #abd8ba;
  border-left: 4px solid #2f8d53;
  background: #f3fbf6;
  color: #1f6f3e;
}

body.judge-page .judge-hint-error {
  border-color: #e5b8b8;
  border-left: 4px solid #c25151;
  background: #fff5f5;
  color: #8a2c2c;
}

body.judge-page .judge-assignment-grid .field-comment textarea {
  min-height: 82px;
  resize: vertical;
}

body.judge-page .judge-assignment-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

body.judge-page .judge-assignment-grid > .action-cell {
  padding-top: 0;
  justify-content: flex-end;
  align-self: end;
}

body.judge-page .judge-assignment-grid > .action-cell > button {
  width: 100%;
  min-width: 0;
}

body.judge-page .judge-assignment-grid .field-assignment {
  grid-column: 1 / 5;
}

body.judge-page .judge-assignment-grid .field-attempt {
  grid-column: 5 / 9;
}

body.judge-page .judge-assignment-grid .field-judge-tools {
  grid-column: 1 / 5;
  display: grid;
  gap: 10px;
  border-color: #c9dbf4;
  background:
    radial-gradient(circle at top left, rgba(69, 118, 207, 0.12), transparent 44%),
    linear-gradient(180deg, #f9fbff 0%, #eef5ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 12px 28px rgba(29, 58, 104, 0.08);
}

body.judge-page .judge-tools-intro {
  margin-top: -4px;
  color: #49627e;
  font-size: 13px;
  line-height: 1.35;
}

body.judge-page .judge-quick-menu {
  display: grid;
  gap: 8px;
}

body.judge-page .judge-quick-menu-btn {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  min-height: 48px;
  font-weight: 700;
  border-radius: 13px;
}

body.judge-page .judge-quick-menu-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 13px;
  border: 1px solid #cfdff4;
  background: rgba(255, 255, 255, 0.88);
  color: #214e80;
  text-decoration: none;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body.judge-page .judge-quick-menu-link:hover {
  border-color: #9fc0e8;
  background: linear-gradient(135deg, #edf4ff 0%, #f8fbff 100%);
}

body.judge-page .judge-quick-menu-btn.active {
  border: 2px solid #2f6fd1;
  background: linear-gradient(135deg, #2f6fd1 0%, #5f8fda 100%);
  color: #ffffff;
  box-shadow:
    0 0 0 2px rgba(47, 111, 209, 0.14),
    0 12px 24px rgba(47, 111, 209, 0.2);
}

body.judge-page #judge-tools-hint {
  margin-top: 0;
}

body.judge-page .attempt-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

body.judge-page .attempt-control-row button {
  width: auto;
  min-width: 120px;
  min-height: 44px;
  padding: 0 14px;
  white-space: nowrap;
}

body.judge-page .performer-board-control-wrap {
  margin-top: 8px;
  border: 1px solid #d6e4f7;
  border-radius: 11px;
  padding: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

body.judge-page .performer-status-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

body.judge-page .performer-status-actions .performer-state-btn {
  min-width: 0;
  white-space: normal;
}

body.judge-page .performer-status-actions .performer-state-btn.active {
  border: 2px solid #2f6fd1;
  box-shadow: 0 0 0 2px rgba(47, 111, 209, 0.16);
}

@media (max-width: 960px) {
  body.judge-page .performer-status-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.judge-page .d-vault-try-wrap {
  margin-top: 7px;
  display: grid;
  grid-template-columns: auto minmax(0, 180px);
  gap: 8px;
  align-items: center;
}

body.judge-page .d-vault-try-label {
  font-size: 12px;
  font-weight: 700;
  color: #355678;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

body.judge-page .judge-assignment-grid .field-score {
  grid-column: 9 / 11;
}

body.judge-page .judge-assignment-grid .field-hint {
  grid-column: 11 / 13;
}

body.judge-page .judge-assignment-grid .field-comment {
  grid-column: 5 / 9;
}

body.judge-page .judge-assignment-grid .field-submit {
  grid-column: 9 / 13;
}

body.judge-page .judge-assignment-grid .field-e-mode {
  grid-column: 1 / 4;
}

body.judge-page .judge-assignment-grid .field-d-vault-widget {
  grid-column: 1 / 13;
}

body.judge-page .judge-assignment-grid .field-e-exec {
  grid-column: 4 / 7;
}

body.judge-page .judge-assignment-grid .field-e-art {
  grid-column: 7 / 10;
}

body.judge-page .judge-assignment-grid .field-e-derived {
  grid-column: 10 / 13;
}

body.judge-page .judge-assignment-grid.e-deductions-layout .field-assignment {
  grid-column: 1 / 5;
}

body.judge-page .judge-assignment-grid.e-deductions-layout .field-judge-tools {
  grid-column: 1 / 5;
}

body.judge-page .judge-assignment-grid.e-deductions-layout .field-attempt {
  grid-column: 5 / 10;
}

body.judge-page .judge-assignment-grid.e-deductions-layout .field-hint {
  grid-column: 10 / 13;
}

body.judge-page .judge-assignment-grid.e-deductions-layout .field-comment {
  grid-column: 5 / 9;
}

body.judge-page .judge-assignment-grid.e-deductions-layout .field-submit {
  grid-column: 9 / 13;
}

body.judge-page .judge-assignment-grid .field-e-beam {
  grid-column: 4 / 13;
}

body.judge-page .judge-assignment-grid.d-vault-layout {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

body.judge-page .judge-assignment-grid.d-vault-layout .field-assignment {
  grid-column: 1 / 4;
}

body.judge-page .judge-assignment-grid.d-vault-layout .field-judge-tools {
  grid-column: 1 / 4;
}

body.judge-page .judge-assignment-grid.d-vault-layout .field-attempt {
  grid-column: 4 / 8;
}

body.judge-page .judge-assignment-grid.d-vault-layout .field-d-vault-widget {
  grid-column: 1 / 13;
}

body.judge-page .judge-assignment-grid.d-vault-layout .field-hint {
  grid-column: 8 / 13;
}

body.judge-page .judge-assignment-grid.d-vault-layout .field-comment {
  grid-column: 1 / 9;
}

body.judge-page .judge-assignment-grid.d-vault-layout .field-submit {
  grid-column: 9 / 13;
  align-self: end;
}

body.judge-page .d-vault-widget {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.judge-page .d-vault-attempt-badge {
  margin: 0 0 8px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid #bcd2f1;
  background: linear-gradient(135deg, #edf4ff 0%, #f8fbff 100%);
  color: #123e66;
  font-weight: 700;
  font-size: 13px;
}

body.judge-page .d-vault-card {
  border: 1px solid #d4e1f4;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fbff 100%);
  padding: 10px;
}

body.judge-page .d-vault-title {
  font-weight: 700;
  color: #173f6a;
  margin-bottom: 6px;
  font-size: 13px;
}

body.judge-page #d-vault-score-integer {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

body.judge-page #d-vault-score-tenths,
body.judge-page #d-vault-bonus-integer,
body.judge-page #d-vault-bonus-tenths,
body.judge-page #d-vault-neutral-integer,
body.judge-page #d-vault-neutral-tenths {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.judge-page .d-vault-card .d-bars-digit-btn {
  min-height: 36px;
}

body.judge-page .d-vault-card .d-bars-b-preview-wrap {
  margin-top: 4px;
  font-weight: 700;
}

/* Compact top layout for D panel on beam: keep key controls in one row on wide screens. */
body.judge-page .judge-assignment-grid.d-beam-layout {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
}

body.judge-page .judge-assignment-grid.d-beam-layout .field-assignment {
  grid-column: 1 / 4;
}

body.judge-page .judge-assignment-grid.d-beam-layout .field-attempt {
  grid-column: 4 / 9;
}

body.judge-page .judge-assignment-grid.d-beam-layout .field-hint {
  grid-column: 9 / 13;
}

body.judge-page .judge-assignment-grid.d-beam-layout .field-comment {
  grid-column: 1 / 13;
}

body.judge-page .judge-assignment-grid.d-beam-layout .field-comment textarea {
  min-height: 58px;
}

body.judge-page .judge-assignment-grid.d-beam-layout #attempt-sync-hint,
body.judge-page .judge-assignment-grid.d-beam-layout #panel-input-hint {
  font-size: 12px;
}

body.judge-page .judge-assignment-grid.d-beam-layout #panel-input-hint {
  min-height: 54px;
  padding: 8px 9px !important;
}

body.judge-page .judge-assignment-grid.d-beam-layout #attempt-sync-hint {
  margin-top: 5px;
  padding: 8px 9px;
}

body.judge-page .judge-assignment-grid.d-beam-layout .current-attempt-banner {
  margin-top: 6px;
  padding: 9px 10px;
}

body.judge-page #e-recheck-notifications {
  margin-top: 6px;
  display: grid;
  gap: 5px;
}

body.judge-page #e-recheck-notifications .e-recheck-item {
  font-size: 13px;
  font-weight: 600;
}

body.judge-review-page .judge-review-card {
  border: 1px solid #cfdff4;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

body.judge-review-page .judge-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

body.judge-review-page .judge-review-block {
  border: 1px solid #d3e2f6;
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px;
}

body.judge-review-page .judge-review-block h4 {
  margin: 0 0 8px;
  color: #1c456d;
}

body.judge-review-page .judge-review-table th,
body.judge-review-page .judge-review-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e3edfb;
}

body.judge-review-page .judge-review-table th {
  width: 56%;
  color: #244a6f;
  font-size: 12px;
}

body.judge-review-page .judge-review-table td {
  font-weight: 700;
  color: #163b60;
  font-variant-numeric: tabular-nums;
}

body.judge-review-page .review-e-table th {
  width: auto;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
}

body.judge-review-page .review-e-table td {
  font-weight: 600;
}

body.judge-review-page .review-e-recheck-btn {
  white-space: nowrap;
  padding: 7px 10px;
}

body.judge-review-page .judge-review-total-row th {
  background: #eef5ff;
}

body.judge-review-page .judge-review-total-row td {
  background: #eef5ff;
  color: #0f2c49;
  font-size: 18px;
}

body.judge-review-page .judge-review-action-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.judge-review-page .judge-review-action-box {
  border: 1px solid #d3e2f6;
  border-radius: 12px;
  background: #f9fcff;
  padding: 10px;
}

body.judge-review-page .judge-review-action-box h4 {
  margin: 0 0 6px;
  color: #1d476f;
}

body.judge-review-page .judge-review-action-box .muted {
  min-height: 34px;
}

body.judge-page .e-beam-deductions-wrap {
  gap: 8px;
}

body.judge-page .e-beam-deductions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.judge-page .e-beam-deduction-card {
  display: grid;
  gap: 7px;
  border: 1px solid #d4e1f4;
  border-radius: 11px;
  background: #ffffff;
  padding: 8px;
}

body.judge-page .e-beam-deduction-title {
  font-size: 13px;
  font-weight: 700;
  color: #1f466d;
}

body.judge-page .e-beam-deduction-row {
  display: grid;
  gap: 5px;
}

body.judge-page .e-beam-deduction-label {
  font-size: 12px;
  font-weight: 700;
  color: #385a7f;
}

body.judge-page .e-beam-digit-buttons {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

body.judge-page .e-beam-digit-btn {
  min-height: 34px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid #bcd2ec;
  background: #fff;
  color: #1a4c75;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

body.judge-page .e-beam-digit-btn:hover {
  transform: none;
  filter: none;
  border-color: #87abd8;
  background: #eef5ff;
}

body.judge-page .e-beam-digit-btn.active {
  color: #fff;
  border-color: #2459a6;
  background: linear-gradient(135deg, #2e76cf 0%, #2559a6 100%);
}

body.judge-page .e-beam-digit-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.judge-page .e-beam-deduction-preview {
  margin-top: 1px;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid #d4e1f3;
  background: #f8fbff;
  color: #244a70;
  font-size: 13px;
}

input,
select,
button,
textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(33, 62, 91, 0.2);
  font: inherit;
}

input,
select,
textarea {
  background: #fff;
  border-color: #cfdcf2;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(15, 105, 255, 0.25);
  border-color: #79a7ff;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-height: 44px;
  line-height: 1.2;
  font-weight: 600;
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
  box-shadow: 0 8px 18px rgba(15, 80, 186, 0.28);
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

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

button.secondary {
  background: linear-gradient(135deg, #2f78d6 0%, #245fb2 100%);
}

button.danger {
  background: linear-gradient(135deg, #c24f4f 0%, #9b3f3f 100%);
}

button.success {
  background: linear-gradient(135deg, #249d5a 0%, #1c7f49 100%);
}

a.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
  min-height: 44px;
  line-height: 1.2;
  width: 100%;
  border-radius: 12px;
  padding: 0 12px;
  background: linear-gradient(135deg, #2f78d6 0%, #245fb2 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 80, 186, 0.2);
}

a.action-link:hover {
  color: #fff;
  filter: brightness(1.04);
}

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

.hero-actions > .action-link,
.hero-actions > button {
  width: auto;
  min-width: 180px;
  flex: 0 1 auto;
}

.hero-actions > .action-link {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  padding: 8px 12px;
  min-height: 44px;
}

.hero-actions > button.danger {
  min-width: 140px;
}

.hero-actions > button {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  padding: 8px 12px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

header .muted {
  color: #416080;
}

.status {
  margin-top: 10px;
  font-size: 14px;
  min-height: 20px;
}

.status.error {
  color: var(--danger);
}

.status.ok {
  color: var(--ok);
}

.competition-state {
  min-height: 22px;
  font-weight: 600;
}

.competition-state.state-active {
  color: var(--ok);
}

.competition-state.state-inactive {
  color: var(--danger);
}

.competition-state.state-finished {
  color: #5b6472;
}

.competition-state.state-strict {
  color: #a24a3f;
}

.competition-state.state-flexible {
  color: #1d8d4d;
}

.two-col {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

.wizard {
  overflow: hidden;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.wizard-step {
  border: 1px solid #d7e3f8;
  border-radius: 10px;
  padding: 8px;
  background: #f7faff;
  text-align: center;
  font-size: 13px;
  color: #26445e;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}

.wizard-step:hover {
  border-color: #9fc2ff;
  background: #eef5ff;
}

.wizard-step.active {
  border-color: #7db0ff;
  background: #e9f2ff;
  color: #134f98;
  font-weight: 600;
}

.wizard-progress {
  height: 6px;
  border-radius: 999px;
  background: #deebff;
  margin-bottom: 16px;
  overflow: hidden;
}

.wizard-progress > div {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  transition: width 0.2s ease;
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
  animation: fade-slide 0.22s ease;
}

.step-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

.step-actions button {
  min-width: 170px;
}

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

.collapsible-head h3 {
  margin: 0;
}

.collapse-toggle {
  width: auto;
  min-width: 190px;
}

.collapse-panel {
  display: none;
  margin-top: 10px;
}

.collapse-panel.open {
  display: block;
}

.judge-menu-wrap {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.menu-toggle-btn {
  width: auto;
  min-width: 130px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.menu-lines {
  display: inline-grid;
  gap: 3px;
}

.menu-lines i {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
}

.judge-menu-panel {
  position: absolute;
  top: 46px;
  right: 0;
  min-width: 220px;
  max-height: min(72vh, 420px);
  overflow: auto;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #dce7f7;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 66, 129, 0.16);
  display: none;
  z-index: 20;
}

.judge-menu-panel.open {
  display: grid;
  gap: 8px;
}

@media (max-width: 640px) {
  .judge-menu-panel {
    left: 0;
    right: auto;
    min-width: min(88vw, 280px);
  }
}

.menu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 10px 12px;
  text-decoration: none;
  font-weight: 600;
  white-space: normal;
  text-align: center;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: #204a76;
  background: #eef5ff;
  border: 1px solid #d7e5fb;
}

.menu-link:hover {
  color: #173a5d;
  background: #e3eeff;
}

.apparatus-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.apparatus-toolbar button {
  width: auto;
  min-width: 120px;
}

body.admin-page .step-panel .attempt-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

body.admin-page .step-panel .attempt-control-row button {
  width: auto;
  min-width: 140px;
}

body.admin-page .athlete-library-block {
  grid-column: 1 / -1;
  border: 1px solid #d8e5f7;
  border-radius: 12px;
  padding: 10px;
  background: #f8fbff;
}

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

.apparatus-chip {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #d7e3f8;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fbff;
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.apparatus-chip:hover {
  border-color: #9ec1ff;
  background: #eef5ff;
  box-shadow: 0 6px 14px rgba(17, 81, 180, 0.12);
}

.apparatus-chip input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.apparatus-chip small {
  color: #3e5f82;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #edf4ff;
  color: #1258a8;
  padding: 4px 10px;
  font-size: 12px;
  margin-right: 8px;
}

.d-bars-worksheet {
  margin-top: 12px;
  border: 1px solid #c9d8ef;
  border-radius: 14px;
  background: #edf4ff;
  overflow: hidden;
}

.d-bars-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 12px;
  background: linear-gradient(90deg, #2b425f 0%, #36567a 100%);
  color: #fff;
}

.d-bars-toptext {
  font-weight: 600;
  color: #f2f7ff;
}

.d-bars-guide {
  padding: 10px 12px;
  border-bottom: 1px solid #d5e2f4;
  background: linear-gradient(180deg, #f6f9ff 0%, #edf4ff 100%);
}

.d-bars-guide-title {
  font-size: 13px;
  font-weight: 800;
  color: #173f6a;
}

.d-bars-guide-steps {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.d-bars-guide-step {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #c8d8ee;
  background: #ffffff;
  color: #284f75;
  font-size: 11px;
  font-weight: 700;
}

.d-bars-live-hint {
  margin-top: 8px;
}

.d-bars-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
}

.d-bars-left-column {
  display: grid;
  gap: 8px;
}

.d-bars-block {
  border: 1px solid #d4e1f4;
  border-radius: 12px;
  background: #fafdff;
  padding: 8px;
}

.d-bars-block-title {
  font-weight: 700;
  color: #173f6a;
  margin-bottom: 6px;
  font-size: 13px;
}

.d-bars-block-note {
  margin: 0 0 7px;
  color: #4a6684;
  font-size: 12px;
}

.d-bars-subtitle {
  margin: 8px 0 6px;
  font-weight: 700;
  color: #274f79;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.d-bars-cr-wrap {
  display: grid;
  gap: 7px;
}

.d-bars-cr-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.d-bars-cr-preset {
  min-height: 34px;
  font-size: 12px;
  font-weight: 700;
  width: 100%;
  border-radius: 8px;
  border: 1px solid #b9cee8;
  box-shadow: none;
  color: #19496f;
  background: #fff;
}

.d-bars-cr-preset:hover {
  transform: none;
  filter: none;
  border-color: #87abd8;
  background: #eef5ff;
}

.d-bars-cr-preset.active {
  color: #fff;
  border-color: #2459a6;
  background: linear-gradient(135deg, #2e76cf 0%, #2559a6 100%);
}

.d-bars-cr-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.d-bars-cr-input-wrap label {
  min-width: 24px;
  font-size: 12px;
  font-weight: 700;
  color: #2f557b;
}

.d-bars-cr-input-wrap input {
  max-width: 120px;
  min-height: 34px;
  padding: 8px 10px;
}

.d-bars-special-wrap {
  display: grid;
  gap: 6px;
}

.d-bars-special-row {
  display: grid;
  gap: 5px;
}

.d-bars-special-row label {
  font-size: 12px;
  font-weight: 700;
  color: #2f557b;
}

.d-bars-penalty-editor {
  gap: 8px;
}

.d-bars-penalty-editor .d-bars-b-preview-wrap {
  margin-top: 0;
}

.d-bars-table {
  margin-top: 0;
  background: #fff;
}

.d-bars-table th,
.d-bars-table td {
  text-align: center;
  padding: 5px 4px;
  font-size: 12px;
}

.d-bars-table th:first-child,
.d-bars-table td:first-child {
  text-align: left;
  min-width: 68px;
}

.d-bars-table th:nth-child(2),
.d-bars-table td:nth-child(2) {
  min-width: 48px;
}

.d-bars-toggle {
  width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #c8d9f6;
  box-shadow: none;
  background: #f4f8ff;
  color: #1f4b79;
  font-weight: 700;
  font-size: 12px;
}

.d-bars-toggle:hover {
  transform: none;
  filter: none;
  border-color: #8bb2ec;
  background: #e7f1ff;
}

.d-bars-toggle.active {
  background: linear-gradient(135deg, #2e76cf 0%, #2559a6 100%);
  border-color: #2b68bc;
  color: #fff;
}

.d-bars-b-editor {
  display: grid;
  gap: 8px;
}

.d-bars-b-row {
  display: grid;
  gap: 5px;
}

.d-bars-b-label {
  font-size: 12px;
  font-weight: 700;
  color: #2a4e74;
}

.d-bars-b-buttons {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.d-bars-digit-btn {
  min-height: 34px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid #bcd2ec;
  background: #fff;
  color: #1a4c75;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

.d-bars-digit-btn:hover {
  transform: none;
  filter: none;
  border-color: #87abd8;
  background: #eef5ff;
}

.d-bars-digit-btn.active {
  color: #fff;
  border-color: #2459a6;
  background: linear-gradient(135deg, #2e76cf 0%, #2559a6 100%);
}

.d-bars-digit-btn:disabled,
.d-bars-digit-btn.disabled {
  cursor: not-allowed;
  opacity: 0.58;
  border-color: #d1ddeb;
  background: #f3f7fd;
  color: #6f8aa5;
}

.d-bars-b-preview-wrap {
  margin-top: 2px;
  padding: 8px 10px;
  border: 1px solid #d1dff3;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #2c4d71;
}

.d-bars-summary-table th,
.d-bars-summary-table td {
  text-align: left;
  font-size: 12px;
  border-bottom: none;
  vertical-align: middle;
}

.d-bars-summary-table th {
  width: 66%;
  color: #214764;
  font-weight: 700;
  border: 1px solid #d4e1f5;
  border-right: none;
  border-radius: 10px 0 0 10px;
  background: #f8fbff;
  padding: 8px 10px;
}

.d-bars-summary-table td {
  width: 34%;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #123c63;
  border: 1px solid #c8d9f1;
  border-radius: 0 10px 10px 0;
  background: #ffffff;
  padding: 8px 10px;
  font-size: 15px;
}

.d-bars-summary-table {
  border-collapse: separate;
  border-spacing: 0 4px;
  background: transparent;
}

.d-bars-summary-row:nth-child(even) th {
  background: #f2f7ff;
}

.d-bars-summary-row:nth-child(even) td {
  background: #f9fcff;
}

.d-bars-summary-row.d-bars-summary-row-total th {
  border-color: #4f85d1;
  background: linear-gradient(135deg, #dfeeff 0%, #edf5ff 100%);
  color: #102b45;
}

.d-bars-summary-row.d-bars-summary-row-total td {
  border-color: #7ea5d9;
  background: linear-gradient(135deg, #eef5ff 0%, #e2eeff 100%);
  color: #111;
  font-size: 18px;
}

/* Guard style: total D value must remain readable even if generic table rules override row styles. */
body.judge-page #d-bars-total-score {
  color: #111 !important;
  background: linear-gradient(135deg, #eef5ff 0%, #e2eeff 100%) !important;
  border-color: #7ea5d9 !important;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.d-bars-actions {
  margin-top: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr;
}

.d-bars-actions button {
  width: 100%;
  min-height: 42px;
}

.d-bars-head {
  padding: 0 12px 10px;
}

.d-bars-head p {
  margin: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 10px;
  background: #ffffff;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid #e4ecfa;
  padding: 10px 8px;
  transition: background-color 0.32s ease, color 0.22s ease;
}

th {
  color: #234863;
  font-size: 13px;
}

.score {
  font-weight: 700;
  color: #12324a;
}

td.value-update {
  background-color: #eaf3ff;
}

.judge-scores-cell {
  font-size: 12px;
  line-height: 1.35;
  color: #315271;
  min-width: 340px;
  white-space: normal;
}

.warning-text {
  color: #b45420;
  font-weight: 600;
}

.ok-text {
  color: #1d8d4d;
  font-weight: 600;
}

tr.warning-row td {
  background: #fff8f1;
}

.status-warning {
  color: #b45420;
  font-weight: 600;
}

input.status-warning,
textarea.status-warning,
select.status-warning {
  border-color: #d48752;
  background: #fff7ef;
}

.checkbox-cell {
  justify-content: center;
  padding-top: 0;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: #294562;
  font-weight: 600;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.attempt-order-editor {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 200px;
}

.attempt-order-editor .attempt-order-input {
  min-width: 78px;
}

.attempt-order-editor .attempt-order-save-btn {
  width: auto;
  min-width: 110px;
  padding: 9px 12px;
}

.attempt-order-editor .attempt-delete-btn {
  width: auto;
  min-width: 100px;
  padding: 9px 12px;
}

.vault-profile-panel {
  margin: 8px 0 10px;
  padding: 10px;
  border: 1px solid #d7e4f5;
  border-radius: 12px;
  background: #fbfdff;
}

.vault-profile-panel .vault-profile-declared {
  min-width: 130px;
}

.vault-profile-panel .vault-profile-save-btn {
  width: auto;
  min-width: 110px;
}

.result-override-table .result-override-number {
  min-width: 92px;
  padding: 8px 10px;
}

.result-override-table .result-override-note {
  min-width: 220px;
  padding: 8px 10px;
}

.result-override-table .result-override-status {
  min-width: 140px;
  padding: 8px 10px;
}

.result-override-actions {
  display: flex;
  gap: 6px;
  min-width: 220px;
}

.result-override-actions button {
  width: auto;
  min-width: 102px;
  padding: 9px 12px;
}

.judge-score-edit-value {
  min-width: 110px;
  padding: 8px 10px;
}

.judge-score-edit-comment {
  min-width: 220px;
  padding: 8px 10px;
}

.judge-score-edit-save-btn {
  width: auto;
  min-width: 170px;
  padding: 9px 12px;
}

.nowrap {
  white-space: nowrap;
}

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

.board-toolbar button {
  width: auto;
  min-width: 170px;
}

.mobile-action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: none;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(246, 251, 255, 0.96);
  border-top: 1px solid #d9e6fb;
  backdrop-filter: blur(8px);
}

.mobile-action-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

a {
  color: #0b58c6;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: #08469e;
}

.judge-menu-panel .menu-link {
  text-decoration: none;
}

.loading-shimmer {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.92) 50%, rgba(255, 255, 255, 0.38) 100%);
  background-size: 220% 100%;
  animation: shimmer 1.25s infinite;
  border-radius: 10px;
  height: 38px;
}

.rules-sheet h3 {
  margin-top: 18px;
}

.rules-sheet p {
  margin: 8px 0;
}

.rules-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rules-print-btn {
  width: auto;
  min-width: 140px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes fade-slide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 950px) {
  .hero,
  .two-col {
    grid-template-columns: 1fr;
  }
  .d-bars-layout {
    grid-template-columns: 1fr;
  }
  .wizard-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  body.judge-page main,
  body.admin-page main {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  body.judge-page .row,
  body.admin-page .row,
  body.chief-page .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.judge-page .two-col,
  body.chief-page .two-col {
    grid-template-columns: 1fr;
  }

  body.judge-page input,
  body.judge-page select,
  body.judge-page button,
  body.judge-page textarea,
  body.admin-page input,
  body.admin-page select,
  body.admin-page button,
  body.admin-page textarea,
  body.chief-page input,
  body.chief-page select,
  body.chief-page button,
  body.chief-page textarea {
    min-height: 50px;
    font-size: 16px;
  }

  body.admin-page .wizard-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.admin-page .wizard-step {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.admin-page .hero-actions {
    width: 100%;
    justify-content: stretch;
  }

  body.admin-page .hero-actions > .action-link,
  body.admin-page .hero-actions > button {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  body.admin-page .step-actions {
    position: sticky;
    bottom: 0;
    z-index: 35;
    margin: 14px -8px -2px;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
    background: rgba(247, 251, 255, 0.97);
    border-top: 1px solid #d9e6fb;
    backdrop-filter: blur(8px);
  }

  body.judge-page .mobile-action-bar {
    display: block;
  }

  body.judge-page .judge-assignment-card {
    border-radius: 14px;
  }

  body.judge-page .judge-assignment-grid > div:not(.action-cell) {
    padding: 9px 10px;
    border-radius: 11px;
  }

  body.judge-page .judge-assignment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body.judge-page .judge-assignment-grid .field-assignment {
    grid-column: 1 / 2;
  }

  body.judge-page .judge-assignment-grid .field-judge-tools {
    grid-column: 1 / 2;
  }

  body.judge-page .judge-assignment-grid .field-attempt {
    grid-column: 2 / 3;
  }

  body.judge-page .judge-assignment-grid .field-score {
    grid-column: 1 / 2;
  }

  body.judge-page .judge-assignment-grid .field-hint {
    grid-column: 2 / 3;
  }

  body.judge-page .judge-assignment-grid .field-submit {
    grid-column: 2 / 3;
  }

  body.judge-page .judge-assignment-grid .field-comment {
    grid-column: 1 / 3;
  }

  body.judge-page .judge-assignment-grid .field-e-mode {
    grid-column: 1 / 2;
  }

  body.judge-page .judge-assignment-grid .field-d-vault-widget {
    grid-column: 1 / 2;
  }

  body.judge-page .judge-assignment-grid.e-deductions-layout .field-assignment {
    grid-column: 1 / 2;
  }

  body.judge-page .judge-assignment-grid.e-deductions-layout .field-judge-tools {
    grid-column: 1 / 2;
  }

  body.judge-page .judge-assignment-grid.e-deductions-layout .field-attempt {
    grid-column: 2 / 3;
  }

  body.judge-page .judge-assignment-grid.e-deductions-layout .field-hint {
    grid-column: 1 / 3;
  }

  body.judge-page .judge-assignment-grid.e-deductions-layout .field-comment {
    grid-column: 1 / 2;
  }

  body.judge-page .judge-assignment-grid.e-deductions-layout .field-submit {
    grid-column: 2 / 3;
  }

  body.judge-page .judge-assignment-grid .field-e-beam {
    grid-column: 1 / 3;
  }

  body.judge-page .judge-assignment-grid .field-e-exec {
    grid-column: 2 / 3;
  }

  body.judge-page .judge-assignment-grid .field-e-art {
    grid-column: 1 / 2;
  }

  body.judge-page .judge-assignment-grid .field-e-derived {
    grid-column: 2 / 3;
  }

  body.judge-page .judge-assignment-grid.d-beam-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.judge-page .judge-assignment-grid.d-beam-layout .field-assignment {
    grid-column: 1 / 2;
  }

  body.judge-page .judge-assignment-grid.d-beam-layout .field-attempt {
    grid-column: 2 / 3;
  }

  body.judge-page .judge-assignment-grid.d-beam-layout .field-hint {
    grid-column: 3 / 4;
  }

  body.judge-page .judge-assignment-grid.d-beam-layout .field-comment {
    grid-column: 1 / 4;
  }

  body.judge-page .judge-assignment-grid.d-vault-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.judge-page .judge-assignment-grid.d-vault-layout .field-assignment {
    grid-column: 1 / 2;
  }

  body.judge-page .judge-assignment-grid.d-vault-layout .field-judge-tools {
    grid-column: 1 / 2;
  }

  body.judge-page .judge-assignment-grid.d-vault-layout .field-attempt {
    grid-column: 2 / 3;
  }

  body.judge-page .judge-assignment-grid.d-vault-layout .field-d-vault-widget {
    grid-column: 1 / 3;
  }

  body.judge-page .judge-assignment-grid.d-vault-layout .field-hint {
    grid-column: 1 / 3;
  }

  body.judge-page .judge-assignment-grid.d-vault-layout .field-comment {
    grid-column: 1 / 2;
  }

  body.judge-page .judge-assignment-grid.d-vault-layout .field-submit {
    grid-column: 2 / 3;
  }

  body.judge-page .d-vault-widget {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.judge-page #d-vault-score-integer {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  body.judge-page .e-beam-deductions-grid {
    grid-template-columns: 1fr;
  }

  body.judge-review-page .judge-review-grid,
  body.judge-review-page .judge-review-action-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  main {
    max-width: 1080px;
    margin: 12px auto;
    padding: 0 12px 20px;
  }
  .card {
    padding: 14px;
    border-radius: 15px;
  }
  .row {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}

@media (max-width: 760px) {
  header {
    padding: 10px 12px;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .header-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .header-link {
    width: 100%;
  }
  main {
    margin: 8px auto;
    padding: 0 10px 14px;
  }
  .card {
    padding: 12px;
    border-radius: 13px;
  }
  .row {
    grid-template-columns: 1fr;
  }
  body.judge-page .row,
  body.admin-page .row,
  body.chief-page .row {
    grid-template-columns: 1fr;
  }
  .form-grid > .action-cell {
    padding-top: 0;
  }
  .wizard-steps {
    grid-template-columns: 1fr;
  }
  body.admin-page .wizard-steps {
    grid-template-columns: 1fr;
  }
  body.admin-page .step-actions {
    position: static;
    margin: 10px 0 0;
    padding: 0;
    background: transparent;
    border-top: none;
    backdrop-filter: none;
  }
  .mobile-action-grid {
    grid-template-columns: 1fr;
  }
  input,
  select,
  button,
  textarea {
    min-height: 46px;
    font-size: 16px;
  }
  .step-actions {
    flex-direction: column;
  }
  .step-actions button {
    min-width: 0;
    width: 100%;
  }
  .collapse-toggle,
  .menu-toggle-btn {
    width: 100%;
  }
  .apparatus-toolbar button,
  .board-toolbar button {
    width: 100%;
    min-width: 0;
  }
  .vault-profile-panel .vault-profile-save-btn {
    width: 100%;
    min-width: 0;
  }
  .judge-scores-cell {
    min-width: 240px;
  }

  body.judge-page .judge-assignment-card {
    padding: 10px;
    border-radius: 12px;
  }

  body.judge-page .judge-assignment-grid > div:not(.action-cell) {
    padding: 9px;
  }

  body.judge-page .judge-assignment-grid > div > label {
    font-size: 11px;
  }

  body.judge-page #panel-input-hint {
    min-height: 0;
  }

  body.judge-page #attempt-sync-hint {
    font-size: 11px;
  }

  body.judge-page .current-attempt-banner {
    font-size: 13px;
    padding: 10px;
  }

  body.judge-page .e-beam-deductions-grid {
    gap: 8px;
  }

  body.judge-page .e-beam-digit-buttons {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  body.judge-page .e-beam-digit-btn {
    min-height: 36px;
    font-size: 13px;
  }

  body.judge-page .judge-assignment-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.judge-page .judge-assignment-grid > div {
    grid-column: 1 / -1 !important;
  }

  body.judge-page .d-vault-widget {
    grid-template-columns: 1fr;
  }

  body.judge-page #d-vault-score-integer {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body.judge-page #d-vault-score-tenths,
  body.judge-page #d-vault-bonus-integer,
  body.judge-page #d-vault-bonus-tenths,
  body.judge-page #d-vault-neutral-integer,
  body.judge-page #d-vault-neutral-tenths {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body.judge-page .attempt-control-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body.judge-page .performer-status-actions {
    grid-template-columns: 1fr;
  }

  body.admin-page .step-panel .attempt-control-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body.judge-page .d-vault-try-wrap {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body.judge-page .attempt-control-row button {
    width: 100%;
    min-width: 0;
  }

  body.admin-page .step-panel .attempt-control-row button {
    width: 100%;
    min-width: 0;
  }

  body.judge-page .judge-assignment-grid.d-beam-layout {
    gap: 8px;
  }

  body.judge-page .judge-assignment-grid.d-beam-layout .field-comment textarea {
    min-height: 52px;
  }

  body.judge-page .judge-assignment-grid .field-submit {
    justify-content: stretch;
  }

  body.judge-page .judge-assignment-grid.e-deductions-layout .field-hint {
    min-height: 0;
  }

  body.judge-review-page .judge-review-block,
  body.judge-review-page .judge-review-action-box {
    padding: 9px;
  }

  body.judge-review-page .judge-review-total-row td {
    font-size: 16px;
  }
}

@media print {
  header {
    position: static;
    border-bottom: none;
    padding: 0 0 8px;
    background: #fff;
  }
  header .header-link {
    display: none;
  }
  main {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  .card {
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
  }
  .rules-print-btn {
    display: none;
  }
}

body.board-page main {
  max-width: 1480px;
}

body.board-page table {
  min-width: 860px;
}

body.board-page.board-wall-mode header {
  display: none;
}

body.board-page.board-wall-mode main {
  max-width: 100%;
  padding: 8px 12px;
  margin-top: 0;
}

body.board-page.board-wall-mode .card {
  border-radius: 12px;
  padding: 12px;
}

body.board-page.board-wall-mode h2 {
  font-size: 34px;
}

body.board-page.board-wall-mode .muted,
body.board-page.board-wall-mode .status {
  font-size: 18px;
}

body.board-page.board-wall-mode th,
body.board-page.board-wall-mode td {
  font-size: 20px;
  padding: 12px 10px;
}

body.board-page.board-wall-mode .score {
  font-size: 25px;
}

@media (max-width: 760px) {
  body.board-page table {
    min-width: 620px;
  }
  body.board-page.board-wall-mode h2 {
    font-size: 26px;
  }
  body.board-page.board-wall-mode th,
  body.board-page.board-wall-mode td {
    font-size: 16px;
  }
}

body.judge-board-page .mobile-action-grid {
  grid-template-columns: 1fr;
}

@media (max-width: 1100px) {
  body.judge-page .d-bars-layout {
    grid-template-columns: 1fr;
  }

  body.judge-page .d-bars-left-column .d-bars-table {
    min-width: 580px;
  }

  body.judge-page .d-bars-summary-table {
    min-width: 0;
  }

  body.judge-page .d-bars-toggle {
    width: 32px;
    min-height: 32px;
    padding: 0;
    font-size: 12px;
  }

  body.judge-page .d-bars-cr-preset {
    min-height: 36px;
    font-size: 13px;
  }

  body.judge-page .d-bars-digit-btn {
    min-height: 36px;
    font-size: 13px;
  }

  body.judge-page .d-bars-actions button {
    min-height: 44px;
  }
}

@media (max-width: 760px) {
  body.judge-page .d-bars-worksheet {
    border-radius: 12px;
  }

  body.judge-page .d-bars-guide {
    padding: 8px 10px;
  }

  body.judge-page .d-bars-guide-title {
    font-size: 12px;
  }

  body.judge-page .d-bars-guide-step {
    font-size: 10px;
    padding: 4px 7px;
  }

  body.judge-page .d-bars-topbar {
    padding: 8px 10px;
  }

  body.judge-page .d-bars-toptext {
    font-size: 13px;
  }

  body.judge-page .d-bars-layout {
    padding: 8px;
    gap: 6px;
  }

  body.judge-page .d-bars-left-column .d-bars-table {
    min-width: 520px;
  }

  body.judge-page .d-bars-cr-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.judge-page .d-bars-b-buttons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.judge-page .d-bars-summary-table td {
    font-size: 14px;
  }

  body.judge-page .d-bars-summary-row-total td {
    font-size: 16px;
  }

  body.judge-page .d-bars-toggle {
    width: 30px;
    min-height: 30px;
  }

  body.judge-page .d-bars-cr-input-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  body.judge-page .d-bars-cr-input-wrap input {
    max-width: none;
    width: 100%;
  }

  body.judge-page .d-bars-special-row label {
    min-width: 0;
  }

  body.judge-page .d-bars-block-note {
    font-size: 11px;
    line-height: 1.35;
  }
}

body.admin-displays-page .display-create-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

body.admin-displays-page .display-code-wrap {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

body.admin-displays-page .display-code-wrap strong {
  color: #17395d;
}

.display-input-disabled {
  opacity: 0.56;
}

body.display-screen-page {
  background:
    radial-gradient(1000px circle at 0% -10%, rgba(11, 78, 171, 0.44), transparent 62%),
    radial-gradient(1000px circle at 100% 0%, rgba(30, 150, 255, 0.28), transparent 66%),
    linear-gradient(160deg, #071421 0%, #081b2f 46%, #0b2742 100%);
  color: #eaf4ff;
  overflow: hidden;
}

body.display-screen-page header {
  display: none;
}

body.display-screen-page main {
  max-width: 100%;
  margin: 0;
  padding: 0;
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

body.display-screen-page .display-screen-shell {
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  min-height: 100svh;
  box-sizing: border-box;
  padding: 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

body.display-screen-page .display-screen-topbar {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

body.display-screen-page .display-screen-headline {
  display: none;
}

body.display-screen-page .display-screen-headline h1,
body.display-screen-page .display-screen-headline p,
body.display-screen-page .display-runtime-status {
  display: none;
}

body.display-screen-page .display-screen-code {
  display: none;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(15, 105, 255, 0.24);
  border: 1px solid rgba(147, 195, 255, 0.36);
  color: #cbe3ff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

body.display-screen-page .display-screen-headline h1 {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 66px);
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: #f5faff;
}

body.display-screen-page .display-screen-headline p {
  margin: 0;
  color: #bad5f4;
  font-size: clamp(15px, 1.6vw, 24px);
}

body.display-screen-page .display-screen-tools {
  display: grid;
  gap: 10px;
  align-items: start;
  justify-items: end;
}

body.display-screen-page .display-clock {
  font-size: clamp(22px, 3vw, 46px);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #d7ebff;
}

body.display-screen-page .display-screen-tools button {
  min-height: 34px;
  padding: 4px 12px;
  font-size: 13px;
  border-radius: 9px;
  border-color: rgba(159, 196, 237, 0.38);
  background: rgba(18, 57, 96, 0.66);
  color: #d7ebff;
}

body.display-screen-page .display-screen-tools button:hover {
  background: rgba(27, 78, 130, 0.78);
}

body.display-screen-page .display-runtime-status {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(151, 194, 242, 0.26);
  background: rgba(8, 23, 41, 0.56);
  padding: 10px 12px;
  font-size: clamp(14px, 1.1vw, 18px);
  color: #c6def8;
  display: flex;
  align-items: center;
}

body.display-screen-page .display-runtime-status.error {
  border-color: rgba(230, 120, 120, 0.46);
  background: rgba(67, 19, 19, 0.72);
  color: #ffd6d6;
}

body.display-screen-page .display-stage {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(140, 189, 244, 0.22);
  background: linear-gradient(160deg, rgba(9, 30, 54, 0.92), rgba(6, 22, 40, 0.94));
  overflow: hidden;
  min-height: 0;
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.38);
}

body.display-screen-page .display-placeholder {
  min-height: inherit;
  padding: 26px;
  display: grid;
  gap: 12px;
  align-content: center;
  justify-items: center;
  text-align: center;
}

body.display-screen-page .display-placeholder h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 64px);
  color: #e8f5ff;
}

body.display-screen-page .display-placeholder p {
  margin: 0;
  max-width: 940px;
  font-size: clamp(16px, 1.7vw, 28px);
  color: #bad5f4;
  line-height: 1.35;
}

body.display-screen-page .display-stage iframe {
  width: 100%;
  min-height: 0;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: #071421;
}

body.display-screen-page .display-stage iframe.is-visible {
  opacity: 1;
}

body.display-screen-page .display-stage iframe[hidden] {
  display: none;
}

@media (max-width: 900px) {
  body.display-screen-page .display-screen-shell {
    padding: 10px;
  }

  body.display-screen-page .display-screen-tools {
    justify-items: start;
  }

  body.display-screen-page .display-stage iframe {
    height: 100%;
  }
}

body.display-embed-page header {
  display: none;
}

body.display-embed-page {
  overflow: hidden;
}

body.display-embed-page main {
  max-width: 100%;
  margin: 0;
  padding: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

body.display-embed-page .card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

/* Unified premium admin styling (aligned with school dashboard direction) */
body.admin-page {
  background:
    radial-gradient(1100px circle at -8% -4%, rgba(252, 204, 219, 0.2), transparent 56%),
    radial-gradient(1100px circle at 108% 0%, rgba(177, 234, 255, 0.23), transparent 60%),
    radial-gradient(900px circle at 50% 115%, rgba(202, 241, 220, 0.2), transparent 64%),
    linear-gradient(180deg, #f4f8ff 0%, #f8fbff 46%, #f5fbf8 100%);
}

body.admin-page header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid #dbe7f8;
  backdrop-filter: blur(8px);
}

body.admin-page main {
  max-width: 1380px;
  margin-top: 20px;
  padding: 0 18px 30px;
}

body.admin-page .card {
  border: 1px solid #dbe8fa;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  box-shadow:
    0 18px 36px rgba(25, 74, 140, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

body.admin-page .hero {
  border: none;
  color: #f6fbff;
  background:
    radial-gradient(1200px circle at -10% 0%, rgba(255, 255, 255, 0.3), transparent 52%),
    radial-gradient(920px circle at 110% 10%, rgba(157, 226, 255, 0.28), transparent 62%),
    linear-gradient(140deg, #071e44 0%, #0f3f83 56%, #1574ff 100%);
  padding: 24px;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
}

body.admin-page .hero h2 {
  color: #ffffff;
  margin-bottom: 10px;
}

body.admin-page .hero .muted {
  color: rgba(234, 245, 255, 0.92);
}

body.admin-page .badge {
  background: rgba(241, 248, 255, 0.2);
  color: #f4f9ff;
  border: 1px solid rgba(216, 234, 255, 0.45);
}

body.admin-page .menu-toggle-btn {
  border: 1px solid rgba(194, 220, 255, 0.5);
  background: rgba(18, 58, 115, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

body.admin-page .judge-menu-panel {
  border: 1px solid #d7e7fb;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(17, 62, 123, 0.2);
}

body.admin-page .wizard {
  border: 1px solid #d7e6fa;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
}

body.admin-page .wizard-steps {
  gap: 10px;
  margin-bottom: 16px;
}

body.admin-page .wizard-step {
  min-height: 58px;
  border-radius: 14px;
  border: 1px solid #d6e5f9;
  background: linear-gradient(180deg, #f9fcff 0%, #eff5ff 100%);
  color: #1f4670;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

body.admin-page .wizard-step.active {
  color: #fff;
  border-color: rgba(39, 119, 224, 0.85);
  background: linear-gradient(135deg, #2f7bda 0%, #205eaf 100%);
  box-shadow: 0 10px 22px rgba(36, 98, 182, 0.24);
}

body.admin-page .wizard-progress {
  height: 8px;
  border-radius: 999px;
  background: #dbeafe;
  margin-bottom: 18px;
}

body.admin-page .wizard-progress > div {
  background: linear-gradient(90deg, #1f6fd9 0%, #2a8af0 100%);
}

body.admin-page .step-panel {
  border: 1px solid #d9e6f9;
  border-radius: 16px;
  background: linear-gradient(180deg, #fcfeff 0%, #f5f9ff 100%);
  padding: 14px;
}

body.admin-page .admin-step1-layout {
  display: grid;
  gap: 12px;
}

body.admin-page .admin-step1-block {
  border: 1px solid #d7e6f9;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body.admin-page .admin-step1-block h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  color: #1d4972;
}

body.admin-page .admin-step1-note {
  margin: 0;
  color: #3a5f84;
}

body.admin-page .admin-step1-block .form-grid > div.action-cell {
  border: 1px dashed #cfe1f7;
  border-radius: 12px;
  background: #f6faff;
  padding: 8px;
  box-shadow: none;
}

body.admin-page .admin-step1-block-danger {
  border-color: #efcdcd;
  background: linear-gradient(180deg, #fffaf9 0%, #fff4f4 100%);
}

body.admin-page .admin-step1-block-danger h4 {
  color: #8c3b3b;
}

body.admin-page .admin-step1-block-danger .form-grid > div.action-cell {
  border-color: #efc6c6;
  background: #fff4f4;
}

body.admin-page .admin-step2-intro {
  margin-top: -4px;
}

body.admin-page .admin-step2-layout {
  display: grid;
  gap: 12px;
  margin-bottom: 10px;
}

body.admin-page .admin-step2-block {
  border: 1px solid #d7e6f9;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body.admin-page .admin-step2-block h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  color: #1d4972;
}

body.admin-page .admin-step2-note {
  margin: 0;
  color: #3a5f84;
  line-height: 1.35;
}

body.admin-page .admin-step2-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body.admin-page .admin-step2-headline button {
  min-height: 44px;
  min-width: 220px;
}

body.admin-page .admin-step2-context {
  margin-top: 8px;
  min-height: 68px;
  border: 1px dashed #cfe1f7;
  border-radius: 12px;
  background: #f6faff;
  padding: 10px;
  line-height: 1.4;
}

body.admin-page .admin-step2-grid {
  margin-top: 10px;
}

body.admin-page .admin-step2-field-hint {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.3;
  color: #476789;
}

body.admin-page .admin-step2-save {
  border: 1px solid #cadef6;
  border-radius: 14px;
  background: linear-gradient(135deg, #edf4ff 0%, #f8fbff 100%);
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

body.admin-page .admin-step2-save button {
  min-width: 260px;
}

body.admin-page .admin-report-summary {
  display: grid;
  gap: 12px;
  margin: 14px 0 10px;
}

body.admin-page .admin-report-summary-block {
  border: 1px solid #d7e6f9;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 250, 255, 0.96) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.42) 0%, rgba(216, 234, 255, 0.26) 100%);
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body.admin-page .admin-report-summary-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

body.admin-page .admin-report-summary-block h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #1d4972;
}

body.admin-page .admin-report-summary-note {
  margin: 4px 0 0;
  color: #446987;
  line-height: 1.35;
}

body.admin-page .admin-report-stage-summary {
  min-width: 200px;
  text-align: right;
  line-height: 1.35;
}

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

body.admin-page .admin-report-stage-card,
body.admin-page .admin-report-rule-card {
  border: 1px solid #d6e7f9;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 12px;
}

body.admin-page .admin-report-stage-card.is-active {
  border-color: #8bb5ea;
  box-shadow: 0 10px 24px rgba(39, 104, 180, 0.14);
}

body.admin-page .admin-report-stage-card.is-empty,
body.admin-page .admin-report-rule-card.is-missing {
  border-style: dashed;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fd 100%);
}

body.admin-page .admin-report-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body.admin-page .admin-report-card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(31, 92, 144, 0.08);
  color: #3f6b94;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
}

body.admin-page .admin-report-stage-card h5,
body.admin-page .admin-report-rule-card h5 {
  margin: 10px 0 6px;
  font-size: 16px;
  font-weight: 800;
  color: #173d61;
}

body.admin-page .admin-report-stage-card p,
body.admin-page .admin-report-rule-card p {
  margin: 0;
  color: #436681;
  line-height: 1.4;
}

body.admin-page .admin-report-rules-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

body.admin-page .admin-report-rule-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body.admin-page .admin-report-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body.admin-page .admin-report-chip.is-current {
  background: rgba(39, 136, 88, 0.14);
  color: #226e49;
}

body.admin-page .admin-report-chip.is-linked {
  background: rgba(38, 94, 150, 0.12);
  color: #1f5e94;
}

body.admin-page .admin-report-chip.is-missing {
  background: rgba(163, 62, 62, 0.12);
  color: #9d4040;
}

body.admin-page .admin-report-rule-source {
  margin-top: 10px;
  border: 1px solid #e0ecf8;
  border-radius: 12px;
  background: #f6faff;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #1f4c76;
  line-height: 1.35;
}

body.admin-page .admin-report-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

body.admin-page .admin-report-stage-actions button {
  flex: 1 1 150px;
  min-width: 0;
  min-height: 40px;
}

body.admin-page .admin-report-rule-note {
  margin-top: 8px;
  color: #58748f;
  line-height: 1.35;
}

body.admin-page .admin-report-warning {
  margin-top: 10px;
  border: 1px solid #f0d7aa;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffaf1 0%, #fff4de 100%);
  padding: 12px;
  color: #7d5b1d;
}

body.admin-page .admin-report-warning-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

body.admin-page .admin-report-warning ul {
  margin: 0;
  padding-left: 18px;
}

body.admin-page .admin-report-warning li + li {
  margin-top: 4px;
}

body.admin-page .admin-report-team-members {
  display: grid;
  gap: 6px;
}

body.admin-page .admin-report-team-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed #dce8f6;
  padding-bottom: 4px;
}

body.admin-page .admin-report-team-member:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

body.admin-page .admin-report-group-row td {
  background: linear-gradient(180deg, #eef5ff 0%, #e7f0ff 100%);
  color: #1f4f83;
  font-weight: 800;
}

body.admin-page .admin-step3-layout {
  display: grid;
  gap: 12px;
  margin-bottom: 10px;
}

body.admin-page .admin-step3-block {
  border: 1px solid #d7e6f9;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body.admin-page .admin-step3-block h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  color: #1d4972;
}

body.admin-page .admin-step3-note {
  margin: 0 0 10px;
  color: #3a5f84;
  line-height: 1.35;
}

body.admin-page .admin-step3-target-picker {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.admin-page .admin-step3-target-btn {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #cfe0f5;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  color: #27507c;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
  transition: transform 0.14s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

body.admin-page .admin-step3-target-btn:hover {
  transform: translateY(-1px);
  border-color: #9fc0eb;
  box-shadow: 0 8px 18px rgba(32, 90, 164, 0.14);
}

body.admin-page .admin-step3-target-btn.is-active {
  border-color: #2a70cb;
  background: linear-gradient(135deg, #2f7bda 0%, #225ea9 100%);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(32, 90, 164, 0.24);
}

body.admin-page .admin-step3-target-select {
  display: none;
}

body.admin-page .admin-step3-target-current {
  margin-top: 9px;
  font-size: 13px;
  font-weight: 800;
  color: #1c4c7f;
}

body.admin-page .admin-step3-field-hint {
  margin-top: 6px;
  color: #3a5f84;
  line-height: 1.35;
}

body.admin-page .admin-step3-replace-grid .admin-step3-note {
  grid-column: 1 / -1;
  border: 1px dashed #cfe1f7;
  border-radius: 12px;
  background: #f6faff;
  padding: 9px 10px;
  color: #365b80;
}

body.admin-page .admin-step3-toolbar {
  margin-top: 0;
  margin-bottom: 8px;
}

body.admin-page .admin-step3-actions-col,
body.admin-page .admin-step3-actions-cell {
  width: 1%;
  min-width: 72px;
  text-align: center;
  white-space: nowrap;
}

body.admin-page .admin-step3-user-menu {
  position: relative;
  display: inline-block;
  z-index: 8;
}

body.admin-page .admin-step3-user-menu > summary {
  list-style: none;
}

body.admin-page .admin-step3-user-menu > summary::-webkit-details-marker {
  display: none;
}

body.admin-page .admin-step3-user-menu > summary::marker {
  content: "";
}

body.admin-page .admin-step3-gear-btn {
  width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid #c7dbf6;
  background: linear-gradient(180deg, #f7fbff 0%, #e8f2ff 100%);
  color: #1f4f83;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: transform 0.16s ease, box-shadow 0.18s ease, background 0.2s ease, border-color 0.18s ease;
}

body.admin-page .admin-step3-gear-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(31, 79, 131, 0.18);
  border-color: #9fc1ec;
}

body.admin-page .admin-step3-user-menu[open] .admin-step3-gear-btn {
  background: linear-gradient(180deg, #eaf4ff 0%, #d9eaff 100%);
  border-color: #8eb5e6;
}

body.admin-page .admin-step3-gear-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.admin-page .admin-step3-gear-icon svg {
  width: 20px;
  height: 20px;
}

body.admin-page .admin-step3-user-menu-list {
  position: absolute;
  top: 50%;
  right: calc(100% + 12px);
  transform: translateY(-28%);
  z-index: 40;
  min-width: 240px;
  padding: 9px;
  display: grid;
  gap: 6px;
  border: 1px solid #d6e5f7;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(18, 53, 100, 0.18);
}

body.admin-page .admin-step3-user-menu-list::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-top: 1px solid #d6e5f7;
  border-right: 1px solid #d6e5f7;
  transform: translate(-6px, -50%) rotate(45deg);
}

body.admin-page .admin-step3-user-menu-list button {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 13px;
  box-shadow: none;
}

body.admin-page .admin-step3-block .table-wrap,
body.admin-page .admin-step3-block table,
body.admin-page .admin-step3-block td {
  overflow: visible;
}

body.admin-page .admin-step3-block .table-wrap {
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  body.admin-page .admin-step3-user-menu-list {
    top: calc(100% + 8px);
    right: 0;
    transform: none;
    min-width: 220px;
  }

  body.admin-page .admin-step3-user-menu-list::after {
    top: -1px;
    left: auto;
    right: 18px;
    transform: translateY(-50%) rotate(-45deg);
  }
}

body.admin-page .admin-step3-icon-btn {
  width: 38px;
  height: 38px;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid #efc6c6;
  background: linear-gradient(180deg, #fff8f8 0%, #ffecec 100%);
  color: #b64848;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  padding: 0;
  transition: transform 0.14s ease, background 0.18s ease, border-color 0.18s ease;
}

body.admin-page .admin-step3-icon-btn:hover {
  transform: translateY(-1px);
  border-color: #dd9e9e;
  background: linear-gradient(180deg, #fff1f1 0%, #ffe2e2 100%);
}

body.admin-page .admin-step3-icon-btn:focus-visible {
  outline: 2px solid rgba(182, 72, 72, 0.22);
  outline-offset: 2px;
}

body.admin-page .admin-step4-layout {
  display: grid;
  gap: 12px;
  margin-bottom: 10px;
}

body.admin-page .admin-step4-block {
  border: 1px solid #d7e6f9;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body.admin-page .admin-step4-block h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  color: #1d4972;
}

body.admin-page .admin-step4-inline-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #294562;
  font-weight: 600;
}

body.admin-page .admin-step4-selected-grid > div.action-cell {
  display: flex;
  align-items: flex-end;
}

body.admin-page .admin-step4-selected-grid > div.action-cell button {
  width: 100%;
}

body.admin-page .admin-step4-filters > div {
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.admin-page .admin-step4-filters #athlete-list-count {
  margin-left: auto;
}

body.admin-page .inline-admin-link {
  color: #1b5dae;
  text-decoration: none;
  border-bottom: 1px dashed rgba(27, 93, 174, 0.45);
  font-weight: 700;
}

body.admin-page .inline-admin-link:hover {
  color: #12447d;
  border-bottom-color: rgba(18, 68, 125, 0.45);
}

body.admin-page .step-panel h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: #123d67;
}

body.admin-page .step-panel > .muted {
  color: #365b80;
}

body.admin-page .form-grid {
  gap: 12px;
}

body.admin-page .form-grid > div {
  border: 1px solid #d7e5f7;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.admin-page .form-grid > div.action-cell {
  border: none;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

body.admin-page .form-grid > div.checkbox-cell {
  padding-top: 11px;
}

body.admin-page .form-grid > div > label {
  color: #2b5277;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body.admin-page input,
body.admin-page select,
body.admin-page textarea {
  border: 1px solid #cdddf2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(18, 53, 100, 0.05);
}

body.admin-page input:focus,
body.admin-page select:focus,
body.admin-page textarea:focus {
  border-color: #79aef8;
  outline: 2px solid rgba(41, 123, 233, 0.22);
}

body.admin-page button,
body.admin-page a.action-link {
  border-radius: 12px;
  min-height: 46px;
  font-weight: 700;
}

body.admin-page button {
  box-shadow: 0 10px 20px rgba(23, 84, 167, 0.22);
}

body.admin-page button.secondary,
body.admin-page a.action-link {
  background: linear-gradient(135deg, #2f7bda 0%, #225ea9 100%);
}

body.admin-page button.danger {
  background: linear-gradient(135deg, #d55757 0%, #aa4242 100%);
}

body.admin-page .step-actions {
  margin-top: 16px;
  gap: 10px;
}

body.admin-page .step-actions button {
  min-width: 200px;
}

body.admin-page .status {
  border-radius: 12px;
  padding: 9px 11px;
  border: 1px solid #d6e5f7;
  background: #f8fbff;
}

body.admin-page .status.ok {
  border-color: #b8ddc6;
  background: #f4fbf6;
}

body.admin-page .status.error {
  border-color: #ebc2c2;
  background: #fff6f6;
}

body.admin-page .competition-state {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 12px;
  border: 1px solid #cfe0f5;
  background: #f7fbff;
}

body.admin-page .apparatus-toolbar {
  margin-top: 12px;
  margin-bottom: 12px;
}

body.admin-page .table-wrap {
  border: 1px solid #d8e6f8;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(19, 64, 120, 0.08);
}

body.admin-page table {
  margin-top: 0 !important;
}

body.admin-page table th {
  background: linear-gradient(180deg, #f2f7ff 0%, #eaf2ff 100%);
  color: #234a73;
  border-bottom-color: #d4e4f7;
}

body.admin-page table td {
  border-bottom-color: #e0ebf8;
}

body.admin-page table tbody tr:nth-child(even) {
  background: #fbfdff;
}

body.admin-page .warning-row {
  background: #fff9ef !important;
}

body.admin-page .assignment-actions-cell {
  width: 1%;
  min-width: 66px;
  white-space: nowrap;
  vertical-align: top;
}

body.admin-page .assign-action-menu {
  display: inline-block;
}

body.admin-page .assign-action-menu > summary {
  list-style: none;
}

body.admin-page .assign-action-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #c7dbf6;
  background: linear-gradient(180deg, #f7fbff 0%, #e8f2ff 100%);
  color: #1f4f83;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: transform 0.16s ease, box-shadow 0.18s ease, background 0.2s ease;
}

body.admin-page .assign-action-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(31, 79, 131, 0.2);
}

body.admin-page .assign-action-menu[open] .assign-action-toggle {
  background: linear-gradient(180deg, #eaf4ff 0%, #d9eaff 100%);
  border-color: #9fc1ec;
}

body.admin-page .assign-action-menu > summary::-webkit-details-marker {
  display: none;
}

body.admin-page .assign-action-menu > summary::marker {
  content: "";
}

body.admin-page .assign-action-list {
  margin-top: 8px;
  display: grid;
  gap: 6px;
  min-width: 220px;
}

body.admin-page .assign-action-list button {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  font-size: 13px;
}

body.admin-page table tbody tr.assign-panel-d:not(.warning-row) td {
  background: #edf4ff;
}

body.admin-page table tbody tr.assign-panel-e:not(.warning-row) td {
  background: #edf9f1;
}

body.admin-page table tbody tr.assign-panel-neutral:not(.warning-row) td {
  background: #f3f6fa;
}

body.admin-page table tbody tr.assign-panel-d td:first-child {
  box-shadow: inset 4px 0 0 #447cf2;
}

body.admin-page table tbody tr.assign-panel-e td:first-child {
  box-shadow: inset 4px 0 0 #3a9c58;
}

body.admin-page table tbody tr.assign-panel-neutral td:first-child {
  box-shadow: inset 4px 0 0 #71859e;
}

body.admin-page .athlete-library-block {
  border-radius: 14px;
  border: 1px solid #d6e5f7;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
}

@media (max-width: 1200px) {
  body.admin-page main {
    padding: 0 12px 20px;
    margin-top: 12px;
  }

  body.admin-page .hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  body.admin-page .wizard-step {
    min-height: 54px;
    font-size: 13px;
  }

  body.admin-page .admin-step4-filters > div {
    min-width: 200px;
  }

  body.admin-page .admin-step2-headline {
    flex-direction: column;
    align-items: stretch;
  }

  body.admin-page .admin-step2-headline button {
    width: 100%;
    min-width: 0;
  }

  body.admin-page .admin-step2-save {
    grid-template-columns: 1fr;
  }

  body.admin-page .admin-step2-save button {
    width: 100%;
    min-width: 0;
  }

  body.admin-page .admin-report-summary-headline,
  body.admin-page .admin-report-rule-top,
  body.admin-page .admin-report-stage-top {
    flex-direction: column;
  }

  body.admin-page .admin-report-stage-summary {
    min-width: 0;
    text-align: left;
  }

  body.admin-page .admin-step3-replace-grid .admin-step3-note {
    padding: 8px 9px;
  }

  body.admin-page .assign-action-list {
    min-width: 200px;
  }
}

@media (max-width: 760px) {
  body.admin-page main {
    margin-top: 8px;
    padding: 0 10px 14px;
  }

  body.admin-page .card {
    border-radius: 14px;
    padding: 12px;
  }

  body.admin-page .step-panel {
    border-radius: 12px;
    padding: 10px;
  }

  body.admin-page .admin-step1-block {
    border-radius: 12px;
    padding: 9px;
  }

  body.admin-page .admin-step2-block {
    border-radius: 12px;
    padding: 9px;
  }

  body.admin-page .admin-step2-context {
    min-height: auto;
    padding: 9px;
  }

  body.admin-page .admin-step2-save {
    border-radius: 12px;
    padding: 9px;
  }

  body.admin-page .admin-report-summary-block,
  body.admin-page .admin-report-stage-card,
  body.admin-page .admin-report-rule-card,
  body.admin-page .admin-report-warning {
    border-radius: 12px;
    padding: 10px;
  }

  body.admin-page .admin-report-stage-grid,
  body.admin-page .admin-report-rules-list {
    grid-template-columns: 1fr;
  }

  body.admin-page .admin-report-stage-actions button {
    flex-basis: 100%;
  }

  body.admin-page .admin-report-stage-card h5,
  body.admin-page .admin-report-rule-card h5 {
    font-size: 15px;
  }

  body.admin-page .admin-step3-block {
    border-radius: 12px;
    padding: 9px;
  }

  body.admin-page .admin-step4-block {
    border-radius: 12px;
    padding: 9px;
  }

  body.admin-page .step-panel h3 {
    font-size: 18px;
  }

  body.admin-page .form-grid > div {
    border-radius: 12px;
    padding: 9px;
  }

  body.admin-page .step-actions button {
    min-width: 0;
  }

  body.admin-page .admin-step4-filters > div {
    min-width: 100%;
  }

  body.admin-page .admin-step4-filters #athlete-list-count {
    margin-left: 0;
    width: 100%;
  }

  body.admin-page .assign-action-toggle {
    width: 40px;
    height: 34px;
    font-size: 20px;
  }

  body.admin-page .assign-action-list {
    min-width: 176px;
  }
}

.team-rotation-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: #e8edf3;
  color: #26415b;
}

.team-rotation-status-chip.status-active {
  background: #d9f7df;
  color: #146c2e;
}

.team-rotation-status-chip.status-free {
  background: #e2f1ff;
  color: #0f4f8a;
}

.team-rotation-status-chip.status-waiting {
  background: #fff2d9;
  color: #8a5a05;
}

.team-rotation-status-chip.status-finished {
  background: #ece8ff;
  color: #4c2f8a;
}

.team-rotation-status-chip.status-bye {
  background: #fff2d9;
  color: #8a5a05;
}

body.judge-page .team-rotation-panel,
body.team-rotation-page .team-rotation-panel {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(36, 60, 92, 0.12);
  background: linear-gradient(180deg, rgba(245, 248, 252, 0.96), rgba(235, 242, 250, 0.94));
  display: grid;
  gap: 10px;
}

body.judge-page .team-rotation-panel-head,
body.team-rotation-page .team-rotation-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.judge-page .team-rotation-current-card,
body.team-rotation-page .team-rotation-current-card {
  min-height: 80px;
}

body.judge-page .team-rotation-inline-card,
body.team-rotation-page .team-rotation-team-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(36, 60, 92, 0.12);
  background: #fff;
  box-shadow: 0 10px 26px rgba(28, 42, 60, 0.06);
}

body.judge-page .team-rotation-inline-card.compact,
body.team-rotation-page .team-rotation-team-card.compact {
  padding: 10px;
}

body.judge-page .team-rotation-inline-card-top,
body.team-rotation-page .team-rotation-team-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

body.judge-page .team-rotation-inline-meta,
body.team-rotation-page .team-rotation-team-meta {
  color: #55657a;
  font-size: 13px;
  line-height: 1.4;
}

body.team-rotation-page .team-rotation-team-apparatuses {
  display: grid;
  gap: 6px;
}

body.team-rotation-page .team-rotation-apparatus-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.team-rotation-page .team-rotation-apparatus-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #cfddec;
  background: linear-gradient(180deg, #f6fbff 0%, #edf4fb 100%);
  color: #28425d;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

body.judge-page .team-rotation-inline-meta-strong,
body.team-rotation-page .team-rotation-team-meta-strong {
  color: #26415b;
  font-weight: 700;
}

body.judge-page .team-rotation-inline-empty,
body.team-rotation-page .team-rotation-empty {
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(50, 71, 94, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: #617185;
}

body.judge-page .team-rotation-mini-counters,
body.team-rotation-page .team-rotation-mini-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.judge-page .team-rotation-counter-pill,
body.team-rotation-page .team-rotation-counter-pill,
body.team-rotation-page .team-rotation-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(36, 60, 92, 0.1);
}

body.judge-page .team-rotation-panel-actions,
body.team-rotation-page .team-rotation-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.judge-page .team-rotation-panel-actions > button,
body.team-rotation-page .team-rotation-panel-actions > button {
  flex: 1 1 200px;
  min-width: 0;
}

body.judge-page .team-rotation-eligible-list,
body.team-rotation-page .team-rotation-queue-list,
body.team-rotation-page .team-rotation-list {
  display: grid;
  gap: 10px;
}

body.team-rotation-page .team-rotation-page-actions {
  align-self: flex-start;
}

body.team-rotation-page .team-rotation-toolbar {
  align-items: end;
}

body.team-rotation-page .team-rotation-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 14px;
  align-items: start;
}

body.team-rotation-page .team-rotation-summary-card {
  margin-top: 12px;
}

body.team-rotation-page .team-rotation-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

body.team-rotation-page .team-rotation-summary-pill {
  justify-content: space-between;
  background: linear-gradient(180deg, #ffffff, #f2f6fb);
}

body.team-rotation-page .team-rotation-summary-pill strong {
  font-size: 22px;
}

body.team-rotation-page .team-rotation-board {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

body.team-rotation-page .team-rotation-table-section {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

body.team-rotation-page .team-rotation-table-stack {
  display: grid;
  gap: 8px;
}

body.team-rotation-page .team-rotation-status-wrap {
  display: grid;
  gap: 6px;
}

body.team-rotation-page .team-rotation-status-note {
  color: #5f6f82;
  font-size: 12px;
  line-height: 1.35;
}

body.team-rotation-page .team-rotation-board-card {
  display: grid;
  gap: 12px;
}

body.team-rotation-page .team-rotation-board-card.empty-state {
  min-height: 140px;
  place-items: center;
}

body.team-rotation-page .team-rotation-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body.team-rotation-page .team-rotation-board-head h3,
body.team-rotation-page .team-rotation-list-head h3 {
  margin: 0;
}

body.team-rotation-page .team-rotation-board-section {
  display: grid;
  gap: 8px;
}

body.team-rotation-page .team-rotation-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6c7a89;
}

body.team-rotation-page .team-rotation-lists-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

body.team-rotation-page .team-rotation-list-card {
  display: grid;
  gap: 12px;
}

body.team-rotation-page .team-rotation-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

@media (max-width: 1180px) {
  body.team-rotation-page .team-rotation-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.team-rotation-page .team-rotation-lists-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body.judge-page .team-rotation-panel-actions,
  body.team-rotation-page .team-rotation-panel-actions {
    flex-direction: column;
  }

  body.team-rotation-page .team-rotation-board {
    grid-template-columns: 1fr;
  }

  body.team-rotation-page .team-rotation-control-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.judge-page .team-rotation-panel,
  body.team-rotation-page .team-rotation-panel {
    padding: 12px;
    border-radius: 14px;
  }

  body.judge-page .team-rotation-panel-head,
  body.judge-page .team-rotation-inline-card-top,
  body.team-rotation-page .team-rotation-panel-head,
  body.team-rotation-page .team-rotation-team-top,
  body.team-rotation-page .team-rotation-list-head {
    flex-direction: column;
    align-items: flex-start;
  }

  body.team-rotation-page .team-rotation-summary-grid {
    grid-template-columns: 1fr;
  }

  body.team-rotation-page .team-rotation-summary-pill {
    padding: 10px 12px;
  }
}

.team-rotation-builder {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.team-rotation-pool-block,
.team-rotation-board-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.team-rotation-builder-head {
  display: grid;
  gap: 3px;
}

.team-rotation-builder-head h5 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.team-rotation-builder-head .muted {
  margin: 0;
  font-size: 13px;
}

.team-rotation-pool-list,
.team-rotation-lanes {
  min-width: 0;
}

.team-rotation-pool-block {
  position: sticky;
  top: 12px;
  align-self: start;
}

.team-rotation-pool-dropzone {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 320px;
  padding: 12px;
  border: 1px dashed #cfd5de;
  border-radius: 18px;
  background: #f4f5f7;
}

.team-rotation-lanes {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.team-rotation-round {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d9dee5;
  border-radius: 18px;
  background: #fafbfc;
}

.team-rotation-round-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.team-rotation-round-head h5 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  color: #243447;
}

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

.team-rotation-slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #d6dbe2;
  border-radius: 16px;
  background: #eff1f4;
}

.team-rotation-slot.filled {
  background: #eceff3;
}

.team-rotation-slot-head {
  display: grid;
  gap: 2px;
}

.team-rotation-slot-head strong {
  font-size: 13px;
  line-height: 1.3;
  color: #233447;
}

.team-rotation-slot-head span {
  font-size: 11px;
  line-height: 1.35;
  color: #718093;
}

.team-rotation-slot-body {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 108px;
  padding: 8px;
  border: 1px dashed #c9d0d8;
  border-radius: 14px;
  background: #e8ebef;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.team-rotation-pool-dropzone.is-active,
.team-rotation-slot-body.is-active {
  border-color: #8b98a8;
  background: #e1e5ea;
  box-shadow: inset 0 0 0 1px #8b98a8;
}

.team-rotation-team-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  width: 100%;
  min-height: 78px;
  padding: 12px;
  border: 1px solid #d4d9e0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: none;
  cursor: grab;
  user-select: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    opacity 0.16s ease,
    background 0.16s ease;
}

.team-rotation-team-card:hover {
  transform: translateY(-1px);
  border-color: #bfc7d0;
  background: #fbfbfc;
}

.team-rotation-team-card.unassigned {
  background: #ffffff;
}

.team-rotation-team-card.exhausted {
  opacity: 0.5;
  cursor: default;
}

.team-rotation-team-card.dragging {
  opacity: 0.38;
  transform: scale(0.985);
  box-shadow: none;
}

.team-rotation-team-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.team-rotation-builder-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #dfe4ea;
  color: #445566;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.team-rotation-team-title {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  color: #233447;
  word-break: break-word;
}

.team-rotation-builder .team-rotation-team-meta {
  font-size: 12px;
  line-height: 1.4;
  color: #6a7686;
}

.team-rotation-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  padding: 16px;
  border: 1px dashed #cfd5dd;
  border-radius: 16px;
  background: #f9fafb;
  color: #6e7987;
  text-align: center;
  line-height: 1.45;
}

.team-rotation-empty-state.compact {
  min-height: 86px;
  grid-column: 1 / -1;
}

.team-rotation-lane-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 88px;
  padding: 14px;
  border: 1px dashed #d0d5dc;
  border-radius: 14px;
  background: #f4f5f7;
  color: #728091;
  text-align: center;
  line-height: 1.45;
  font-size: 13px;
}

.team-rotation-drop-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 12px;
  border: 2px dashed #8d98a6;
  border-radius: 14px;
  background: #eef1f4;
  color: #5d6a7b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.team-rotation-preview-cell {
  min-width: 132px;
}

.team-rotation-preview-badge {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d4dde8;
  background: linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%);
}

.team-rotation-preview-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: #2f6f49;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.team-rotation-preview-badge strong {
  font-size: 13px;
  line-height: 1.25;
}

@media (max-width: 720px) {
  .team-rotation-builder {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-rotation-pool-block {
    position: static;
  }
}

.team-rotation-preview-badge span {
  font-size: 12px;
  color: #5f6f82;
  line-height: 1.35;
}

.team-rotation-preview-badge.apparatus {
  border-color: #c8dbf6;
  background: linear-gradient(180deg, #f4f9ff 0%, #e8f1fb 100%);
}

.team-rotation-preview-badge.team {
  border-color: #c8e2d2;
  background: linear-gradient(180deg, #f3fbf6 0%, #e4f3ea 100%);
}

.team-rotation-preview-badge.pending {
  border-color: #d9e1ea;
  background: linear-gradient(180deg, #fbfdff 0%, #eef3f8 100%);
}

.team-rotation-preview-badge.active {
  border-color: #9ab7ef;
  background: linear-gradient(180deg, #f2f7ff 0%, #dce9ff 100%);
  box-shadow: inset 0 0 0 1px rgba(62, 108, 198, 0.18);
}

.team-rotation-preview-badge.completed {
  border-color: #9fceae;
  background: linear-gradient(180deg, #f4fbf6 0%, #dff1e5 100%);
}

.team-rotation-preview-badge.finish {
  border-color: #9fceae;
  background: linear-gradient(180deg, #f3fcf6 0%, #dff1e5 100%);
}

.team-rotation-preview-badge.active .team-rotation-preview-flag {
  background: #2c62c9;
}

.team-rotation-preview-badge.completed .team-rotation-preview-flag,
.team-rotation-preview-badge.finish .team-rotation-preview-flag {
  background: #2f6f49;
}

.team-rotation-preview-badge.bye,
.team-rotation-preview-badge.free {
  border-color: #ecd8a2;
  background: linear-gradient(180deg, #fff8e5 0%, #fff0c9 100%);
}

@media (max-width: 1100px) {
  .team-rotation-pool-dropzone {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .team-rotation-round-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .team-rotation-preview-cell {
    min-width: 118px;
  }

  .team-rotation-preview-badge {
    min-height: 64px;
    padding: 9px 10px;
  }
}

@media (max-width: 760px) {
  .team-rotation-pool-dropzone,
  .team-rotation-round-grid {
    grid-template-columns: 1fr;
  }

  .team-rotation-round,
  .team-rotation-slot,
  .team-rotation-pool-dropzone {
    padding: 12px;
  }

  .team-rotation-team-card {
    padding: 12px;
  }

  .team-rotation-preview-cell {
    min-width: 104px;
  }

  .team-rotation-preview-badge strong {
    font-size: 12px;
  }

  .team-rotation-preview-badge span {
    font-size: 11px;
  }
}

/* BAG brand refresh */

:root {
  --bg-a: #f6f9ff;
  --bg-b: #ffffff;
  --bg-c: #edf4ff;
  --card-bg: rgba(255, 255, 255, 0.94);
  --card-border: #d8e4f5;
  --text: #102540;
  --muted: #546b87;
  --accent: #1f56af;
  --accent-2: #2d7ae0;
  --danger: #b64848;
  --ok: #1d8d4d;
  --gold: #d6a44a;
  --gold-soft: rgba(214, 164, 74, 0.16);
}

body {
  color: var(--text);
  background:
    radial-gradient(980px circle at 4% -6%, rgba(33, 91, 184, 0.18), transparent 52%),
    radial-gradient(1100px circle at 100% 0%, rgba(149, 199, 255, 0.25), transparent 56%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 255, 0.99) 44%, rgba(238, 245, 255, 0.98) 100%);
}

header {
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(205, 221, 241, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(21, 53, 103, 0.08);
}

main {
  max-width: 1320px;
  margin: 22px auto;
  padding: 0 18px 36px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow:
    0 18px 42px rgba(18, 58, 114, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.brand-lockup {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 255, 0.98) 100%);
  border: 1px solid rgba(193, 210, 235, 0.9);
  box-shadow:
    0 12px 24px rgba(31, 75, 143, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.brand-kicker {
  display: block;
  color: #25539a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-title {
  display: block;
  color: #102949;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.screen-brand-chip {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(195, 214, 240, 0.9);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 249, 255, 0.96) 100%);
  box-shadow:
    0 12px 30px rgba(22, 54, 104, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.screen-brand-chip img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
}

.screen-brand-chip > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.screen-brand-chip strong,
.screen-brand-chip span {
  display: block;
}

.screen-brand-chip strong {
  color: #17438a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.screen-brand-chip span {
  color: #4d6482;
  font-size: 13px;
  line-height: 1.3;
}

.screen-brand-chip-hero {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(235, 243, 255, 0.12) 100%);
  border-color: rgba(206, 225, 255, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 18px 34px rgba(4, 16, 34, 0.16);
}

.screen-brand-chip-hero strong,
.screen-brand-chip-on-dark strong {
  color: #f5f9ff;
}

.screen-brand-chip-hero span,
.screen-brand-chip-on-dark span {
  color: rgba(226, 238, 255, 0.82);
}

.screen-brand-chip-on-dark {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(198, 219, 255, 0.08) 100%);
  border-color: rgba(203, 224, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 20px 44px rgba(0, 0, 0, 0.22);
}

.board-brand-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 14px;
}

body.login-page {
  background:
    radial-gradient(960px circle at 0% 0%, rgba(25, 78, 166, 0.22), transparent 54%),
    radial-gradient(980px circle at 100% 4%, rgba(162, 212, 255, 0.24), transparent 56%),
    linear-gradient(135deg, #f7faff 0%, #edf4ff 48%, #f9fbff 100%);
}

body.login-page header {
  display: none;
}

body.login-page main {
  max-width: 1420px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 24px 18px 32px;
  display: flex;
  align-items: center;
}

.login-shell {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 460px);
  gap: 26px;
  align-items: stretch;
}

.login-hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(193, 214, 244, 0.84);
  background:
    radial-gradient(780px circle at 88% 10%, rgba(196, 223, 255, 0.48), transparent 42%),
    radial-gradient(900px circle at 90% 110%, rgba(29, 88, 184, 0.18), transparent 48%),
    linear-gradient(135deg, #0d2f6a 0%, #1a57b1 52%, #dfeafc 52.3%, #f7fbff 100%);
  box-shadow:
    0 28px 56px rgba(16, 43, 87, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  display: grid;
  gap: 30px;
  align-content: space-between;
}

.login-hero-panel::before {
  content: "";
  position: absolute;
  inset: auto -10% -28% 42%;
  height: 72%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.42), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(21, 88, 194, 0.2), transparent 68%);
  pointer-events: none;
}

.login-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 640px;
  display: grid;
  gap: 14px;
}

.login-kicker {
  margin: 0;
  color: rgba(237, 245, 255, 0.9);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-hero-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(42px, 5vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.login-lead {
  margin: 0;
  color: rgba(239, 246, 255, 0.92);
  font-size: 21px;
  line-height: 1.48;
  max-width: 560px;
}

.login-feature-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 720px;
}

.login-feature-card {
  min-height: 132px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(203, 224, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(226, 239, 255, 0.08) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 14px 30px rgba(9, 24, 49, 0.12);
  display: grid;
  gap: 8px;
  align-content: start;
}

.login-feature-card strong {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.2;
}

.login-feature-card span {
  color: rgba(228, 238, 255, 0.88);
  font-size: 14px;
  line-height: 1.45;
}

.login-auth-card {
  align-self: center;
  padding: 24px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(247, 250, 255, 0.98) 100%);
}

.login-auth-head {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.login-auth-head h2,
.login-auth-head .muted,
.login-inline-status {
  margin: 0;
}

.login-auth-kicker {
  margin: 0;
  color: #1f58b0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.login-page .login-auth-card .row {
  grid-template-columns: 1fr;
}

body.login-page .login-auth-card .action-cell {
  padding-top: 8px;
}

body.board-page {
  background:
    radial-gradient(1050px circle at 4% -8%, rgba(28, 88, 180, 0.14), transparent 54%),
    radial-gradient(960px circle at 100% 0%, rgba(171, 215, 255, 0.22), transparent 56%),
    linear-gradient(180deg, #f7fbff 0%, #edf4ff 100%);
}

body.board-page .screen-brand-chip {
  padding-right: 18px;
}

body.board-page.board-wall-mode .screen-brand-chip {
  padding: 8px 12px;
  border-radius: 16px;
}

body.board-page.board-wall-mode .screen-brand-chip img {
  width: 44px;
  height: 44px;
}

body.board-page.board-wall-mode .screen-brand-chip strong,
body.board-page.board-wall-mode .screen-brand-chip span {
  font-size: 12px;
}

body.display-screen-page {
  background:
    radial-gradient(1100px circle at -6% -8%, rgba(57, 122, 224, 0.38), transparent 56%),
    radial-gradient(920px circle at 100% 4%, rgba(215, 164, 74, 0.16), transparent 52%),
    linear-gradient(160deg, #07172c 0%, #0d2850 52%, #123b73 100%);
}

body.display-screen-page .display-screen-topbar {
  justify-content: space-between;
  align-items: center;
}

body.display-screen-page .display-screen-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

body.display-screen-page .display-screen-code {
  display: inline-flex;
  width: auto;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(214, 164, 74, 0.16);
  border: 1px solid rgba(235, 196, 118, 0.28);
  color: #ffe6b5;
}

body.display-screen-page .display-runtime-status {
  background:
    linear-gradient(135deg, rgba(7, 27, 50, 0.56) 0%, rgba(13, 45, 84, 0.46) 100%);
  border-color: rgba(206, 225, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.display-screen-page .display-stage {
  background:
    radial-gradient(620px circle at 50% 0%, rgba(91, 160, 255, 0.16), transparent 42%),
    linear-gradient(160deg, rgba(9, 30, 54, 0.92), rgba(6, 22, 40, 0.96));
}

.tv-brand-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-right: 6px;
}

.tv-brand-meta img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  padding: 4px;
  border: 1px solid rgba(194, 214, 243, 0.9);
  box-shadow: 0 10px 24px rgba(8, 20, 39, 0.18);
}

.tv-brand-meta div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.tv-brand-meta strong,
.tv-brand-meta span {
  display: block;
}

.tv-brand-meta strong {
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tv-brand-meta span {
  color: rgba(222, 235, 255, 0.82);
  font-size: 11px;
}

body.display-embed-page .screen-brand-chip {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(244, 248, 255, 0.94) 100%);
}

body.display-embed-page .tv-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 2px 0;
}

body.display-embed-page .tv-meta > span {
  color: rgba(223, 236, 255, 0.88);
  font-size: 14px;
  line-height: 1.35;
}

@media (max-width: 1120px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-hero-panel {
    min-height: auto;
  }

  body.login-page main {
    display: block;
    min-height: 0;
    padding-top: 18px;
    padding-bottom: 24px;
  }
}

@media (max-width: 760px) {
  header {
    padding: 12px 14px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .brand-lockup {
    gap: 10px;
  }

  .brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .brand-kicker {
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .brand-title {
    font-size: 15px;
  }

  .screen-brand-chip {
    width: 100%;
    align-items: flex-start;
  }

  .screen-brand-chip img {
    width: 48px;
    height: 48px;
  }

  .login-hero-panel {
    padding: 20px;
    gap: 22px;
    background:
      radial-gradient(500px circle at 86% 12%, rgba(196, 223, 255, 0.34), transparent 42%),
      linear-gradient(180deg, #0d2f6a 0%, #1a57b1 48%, #dfeafc 48.3%, #f7fbff 100%);
  }

  .login-feature-grid {
    grid-template-columns: 1fr;
  }

  .login-lead {
    font-size: 17px;
  }

  .tv-brand-meta {
    width: 100%;
  }

  .tv-brand-meta strong,
  .tv-brand-meta span {
    white-space: normal;
  }
}

/* BAG visual simplification */
body {
  background:
    radial-gradient(860px circle at 0% 0%, rgba(31, 86, 175, 0.18), transparent 46%),
    radial-gradient(760px circle at 100% 2%, rgba(214, 164, 74, 0.16), transparent 34%),
    radial-gradient(920px circle at 92% 100%, rgba(120, 183, 255, 0.16), transparent 44%),
    linear-gradient(145deg, #fbfdff 0%, #f1f6ff 50%, #eef4ff 100%);
}

header {
  padding: 16px 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 251, 255, 0.86) 100%);
  box-shadow: 0 14px 34px rgba(21, 53, 103, 0.08);
}

.brand-lockup {
  gap: 16px;
}

.brand-mark {
  position: relative;
  overflow: hidden;
  width: 82px;
  height: 82px;
  padding: 8px;
  border-radius: 22px;
  box-shadow:
    0 16px 30px rgba(31, 75, 143, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(232, 242, 255, 0.26) 48%, transparent 76%);
  filter: blur(6px);
  pointer-events: none;
}

.brand-mark img {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 8px 18px rgba(31, 75, 143, 0.18));
}

.brand-kicker {
  font-size: 12px;
  letter-spacing: 0.12em;
}

.brand-title {
  font-size: 19px;
}

.screen-brand-chip {
  gap: 14px;
  padding: 10px 16px;
  border-radius: 20px;
}

.screen-brand-chip img {
  width: 68px;
  height: 68px;
  filter: drop-shadow(0 8px 16px rgba(38, 82, 142, 0.18));
}

.screen-brand-chip strong {
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: none;
}

.screen-brand-chip span {
  font-size: 14px;
}

body.login-page {
  background:
    radial-gradient(920px circle at 0% 0%, rgba(28, 86, 180, 0.2), transparent 48%),
    radial-gradient(720px circle at 100% 0%, rgba(214, 164, 74, 0.14), transparent 34%),
    linear-gradient(140deg, #fbfdff 0%, #eef4ff 54%, #f8fbff 100%);
}

.login-hero-panel {
  background:
    radial-gradient(560px circle at 84% 14%, rgba(255, 255, 255, 0.18), transparent 36%),
    radial-gradient(720px circle at 100% 100%, rgba(214, 164, 74, 0.18), transparent 42%),
    linear-gradient(135deg, #0d326f 0%, #1a58b2 58%, #edf4ff 100%);
}

.screen-brand-chip-hero img {
  width: 100px;
  height: 100px;
  filter:
    drop-shadow(0 0 16px rgba(255, 255, 255, 0.24))
    drop-shadow(0 12px 26px rgba(8, 23, 46, 0.28));
}

.screen-brand-chip-hero {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(242, 247, 255, 0.9) 34%, rgba(129, 171, 232, 0.38) 100%);
  border-color: rgba(215, 229, 251, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 18px 34px rgba(4, 16, 34, 0.16);
}

.screen-brand-chip-hero strong {
  color: #143f79;
}

.screen-brand-chip-hero span {
  color: #4f6990;
}

body.board-page.board-wall-mode .screen-brand-chip {
  padding: 8px;
  border-radius: 22px;
}

body.board-page.board-wall-mode .screen-brand-chip > div {
  display: none;
}

body.board-page.board-wall-mode .screen-brand-chip img {
  width: 74px;
  height: 74px;
}

body.display-screen-page {
  background:
    radial-gradient(1040px circle at 0% -8%, rgba(58, 127, 224, 0.3), transparent 56%),
    radial-gradient(840px circle at 100% 2%, rgba(215, 164, 74, 0.14), transparent 44%),
    linear-gradient(160deg, #07172c 0%, #0d2850 52%, #123b73 100%);
}

body.display-screen-page .display-screen-topbar {
  justify-content: space-between;
  align-items: flex-start;
}

body.display-screen-page .display-screen-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(238, 245, 255, 0.88) 46%, rgba(105, 154, 225, 0.26) 100%);
  border: 1px solid rgba(225, 237, 255, 0.3);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

body.display-screen-page .display-screen-logo img {
  width: clamp(82px, 7vw, 118px);
  height: clamp(82px, 7vw, 118px);
  object-fit: contain;
  filter:
    drop-shadow(0 0 16px rgba(255, 255, 255, 0.2))
    drop-shadow(0 12px 28px rgba(3, 14, 28, 0.28));
}

body.display-screen-page .display-screen-code {
  display: none;
}

body.display-screen-page .display-runtime-status {
  display: none;
}

body.display-screen-page .display-stage {
  background:
    radial-gradient(620px circle at 50% 0%, rgba(91, 160, 255, 0.12), transparent 42%),
    linear-gradient(160deg, rgba(9, 30, 54, 0.92), rgba(6, 22, 40, 0.96));
}

body.display-embed-page .screen-brand-chip {
  padding: 8px;
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(238, 245, 255, 0.88) 52%, rgba(105, 154, 225, 0.24) 100%);
}

body.display-embed-page .screen-brand-chip > div {
  display: none;
}

body.display-embed-page .screen-brand-chip img {
  width: 74px;
  height: 74px;
  filter:
    drop-shadow(0 0 14px rgba(255, 255, 255, 0.18))
    drop-shadow(0 10px 24px rgba(6, 18, 34, 0.24));
}

body.display-embed-page .tv-meta {
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 2px 0;
}

body.display-embed-page .tv-meta > span {
  color: rgba(223, 236, 255, 0.88);
  font-size: 14px;
  line-height: 1.35;
}

@media (max-width: 760px) {
  header {
    padding: 12px 14px;
  }

  .brand-mark {
    width: 66px;
    height: 66px;
    border-radius: 16px;
  }

  .brand-title {
    font-size: 16px;
  }

  .screen-brand-chip img {
    width: 58px;
    height: 58px;
  }

  .login-hero-panel {
    background:
      radial-gradient(420px circle at 84% 14%, rgba(255, 255, 255, 0.16), transparent 40%),
      linear-gradient(180deg, #0d326f 0%, #1a58b2 54%, #edf4ff 100%);
  }

  .screen-brand-chip-hero img {
    width: 86px;
    height: 86px;
  }

  body.display-screen-page .display-screen-logo img {
    width: 72px;
    height: 72px;
  }
}

/* Login composition refinement */
body.login-page main {
  max-width: 1500px;
  padding: 28px 18px 34px;
}

.login-shell {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 0;
  padding: 20px;
  border-radius: 38px;
  border: 1px solid rgba(194, 212, 241, 0.72);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.46) 0%, rgba(241, 247, 255, 0.42) 100%);
  box-shadow: 0 28px 80px rgba(23, 60, 118, 0.14);
  backdrop-filter: blur(10px);
  isolation: isolate;
}

.login-shell::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 32px;
  background:
    radial-gradient(560px circle at 78% 24%, rgba(255, 255, 255, 0.18), transparent 44%),
    radial-gradient(620px circle at 18% 72%, rgba(91, 160, 255, 0.12), transparent 48%);
  pointer-events: none;
}

.login-hero-panel {
  min-height: 720px;
  padding: 34px 112px 34px 34px;
  border-radius: 32px;
  box-shadow:
    0 24px 50px rgba(16, 43, 87, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.login-hero-copy {
  max-width: 700px;
}

.login-feature-grid {
  max-width: 760px;
}

.login-auth-card {
  position: relative;
  z-index: 2;
  margin: 28px 0 28px -68px;
  padding: 28px;
  border: 1px solid rgba(205, 221, 244, 0.92);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 255, 0.98) 100%);
  box-shadow:
    0 26px 60px rgba(25, 63, 119, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.login-auth-head {
  margin-bottom: 18px;
}

body.login-page .login-auth-card .row {
  gap: 14px;
}

@media (max-width: 1320px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 410px);
    padding: 16px;
  }

  .login-hero-panel {
    min-height: 680px;
    padding: 30px 72px 30px 30px;
  }

  .login-auth-card {
    margin-left: -40px;
    padding: 24px;
  }
}

@media (max-width: 1120px) {
  body.login-page main {
    display: block;
    min-height: 0;
    padding: 18px 14px 24px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 16px;
  }

  .login-hero-panel {
    min-height: auto;
    padding: 28px 28px 124px;
  }

  .login-auth-card {
    margin: -104px 26px 0;
  }
}

@media (max-width: 820px) {
  .login-shell {
    padding: 12px;
    gap: 12px;
    border-radius: 28px;
  }

  .login-shell::before {
    inset: 12px;
    border-radius: 24px;
  }

  .login-hero-panel {
    padding: 22px;
    border-radius: 24px;
  }

  .login-auth-card {
    margin: 0;
    padding: 22px;
    border-radius: 24px;
  }

  .login-hero-copy h1 {
    font-size: clamp(36px, 8vw, 58px);
  }

  .login-feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body.login-page main {
    padding: 10px 10px 20px;
  }

  .login-shell {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .login-shell::before {
    display: none;
  }

  .login-hero-panel {
    padding: 18px;
  }

  .login-hero-copy h1 {
    font-size: clamp(34px, 11vw, 48px);
    line-height: 1.02;
  }

  .login-lead {
    font-size: 16px;
  }

  .login-auth-card {
    padding: 18px;
  }
}
