:root {
  --bg: #f7f1e8;
  --panel: rgba(255, 252, 246, 0.9);
  --panel-strong: #fffdf8;
  --ink: #2a2018;
  --muted: #6f6254;
  --line: rgba(77, 56, 33, 0.12);
  --brand: #a24f2d;
  --brand-dark: #703521;
  --accent: #d6b16d;
  --ok: #2f7a4e;
  --warn: #c27d19;
  --danger: #9e3b35;
  --shadow: 0 20px 50px rgba(82, 55, 18, 0.09);
  --radius: 18px;
  --font: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(214, 177, 109, 0.28), transparent 30%),
    radial-gradient(circle at bottom right, rgba(162, 79, 45, 0.16), transparent 22%),
    linear-gradient(180deg, #fbf7f0 0%, var(--bg) 100%);
}

.launcher-body {
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.launcher-shell {
  width: min(1180px, 100%);
  display: grid;
  gap: 1.5rem;
}

.launcher-hero {
  padding: 2.2rem;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(214, 177, 109, 0.22), transparent 32%),
    linear-gradient(135deg, rgba(255, 252, 246, 0.98), rgba(250, 237, 214, 0.92)),
    var(--panel-strong);
  box-shadow: var(--shadow);
}

.launcher-hero .event-title {
  font-size: clamp(1.95rem, 3.9vw, 3rem);
  line-height: 0.97;
}

.launcher-hero h1 {
  margin: 0.2rem 0 0.45rem;
  font-size: clamp(1.55rem, 2.45vw, 2.15rem);
  line-height: 1;
}

.launcher-hero .subtle {
  max-width: 780px;
  margin: 0;
  font-size: 1.08rem;
}

.launcher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.launcher-card {
  display: grid;
  gap: 0.9rem;
  padding: 1.6rem;
  border-radius: 26px;
  border: 1px solid rgba(77, 56, 33, 0.09);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 236, 0.9));
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.launcher-card:hover {
  transform: translateY(-3px);
  border-color: rgba(162, 79, 45, 0.25);
  box-shadow: 0 28px 60px rgba(82, 55, 18, 0.12);
}

.launcher-card.judge {
  background:
    linear-gradient(160deg, rgba(255, 252, 246, 0.97), rgba(240, 247, 242, 0.92));
}

.launcher-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(162, 79, 45, 0.1);
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.launcher-card h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1;
}

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

.launcher-action {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.4rem;
  color: var(--brand);
  font-weight: 800;
}

.launcher-action::after {
  content: "->";
}

.hidden {
  display: none !important;
}

.auth-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 251, 242, 0.9);
  z-index: 20;
}

.auth-panel {
  width: min(520px, calc(100% - 2rem));
  padding: 2rem;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: var(--panel-strong);
}

.auth-panel .panel-heading h2 {
  margin-bottom: 0.5rem;
}

.auth-panel .subtle {
  margin-top: 1rem;
}

button,
input,
select,
textarea,
.button-like {
  font: inherit;
}

button,
.button-like {
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: white;
  padding: 0.8rem 1.1rem;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

button:hover,
.button-like:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

button.secondary {
  background: #e8d6bf;
  color: var(--ink);
}

button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

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

button.mini {
  padding: 0.55rem 0.75rem;
}

.icon-button {
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  flex: 0 0 2.5rem;
}

.icon-button svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.82);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.9rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 0.84rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-tabs-shell {
  margin-top: 0.75rem;
  border: 1px solid rgba(77, 56, 33, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(255, 255, 255, 0.92));
  box-shadow: 0 14px 32px rgba(82, 55, 18, 0.06);
  overflow: hidden;
}

.dashboard-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.75rem;
  border-bottom: 1px solid rgba(77, 56, 33, 0.08);
  background: linear-gradient(180deg, rgba(162, 79, 45, 0.06), rgba(255, 255, 255, 0.65));
}

.dashboard-tabs-body {
  padding: 1rem;
  min-width: 0;
}

.dashboard-switch-button {
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  padding: 0.7rem 1rem;
  border: 1px solid rgba(77, 56, 33, 0.16);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.dashboard-switch-button:hover,
.dashboard-switch-button:focus-visible {
  background: rgba(162, 79, 45, 0.1);
  color: var(--ink);
  border-color: rgba(162, 79, 45, 0.26);
}

.dashboard-switch-button.active {
  background: linear-gradient(180deg, rgba(162, 79, 45, 0.92), rgba(112, 53, 33, 0.94));
  color: white;
  border-color: rgba(112, 53, 33, 0.26);
  box-shadow: none;
}

.dashboard-view {
  display: none;
}

.dashboard-view.active {
  display: block;
  min-width: 0;
}

.standings-board {
  display: grid;
  gap: 1.1rem;
  margin-top: 1rem;
  min-width: 0;
}

.event-standings-card {
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(77, 56, 33, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(255, 255, 255, 0.9));
  box-shadow: 0 12px 28px rgba(82, 55, 18, 0.05);
  min-width: 0;
}

.event-standings-head {
  margin-bottom: 0.8rem;
}

.standings-wrap {
  margin-top: 0;
  border: 1px solid rgba(77, 56, 33, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.standings-table thead th {
  background: rgba(255, 250, 241, 0.88);
}

.event-section-title {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(162, 79, 45, 0.1), rgba(162, 79, 45, 0.06));
  color: var(--brand-dark);
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: 1rem;
}

.standing-row td {
  background: rgba(255, 255, 255, 0.52);
}

.standing-participant {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.standing-rank {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
}

.standing-name {
  font-weight: 700;
}

.standing-total {
  font-weight: 800;
}

.standing-judges,
.standing-comments {
  white-space: pre-line;
  color: var(--muted);
  font-size: 0.92rem;
}

.standing-judges {
  min-width: 180px;
}

.standing-comments {
  min-width: 260px;
}

.student-results-shell {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.student-result-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(77, 56, 33, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(255, 255, 255, 0.9));
  box-shadow: 0 12px 28px rgba(82, 55, 18, 0.05);
}

.medal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
}

.standing-medal-1 td {
  background: linear-gradient(90deg, rgba(255, 243, 201, 0.9), rgba(255, 255, 255, 0.7));
}

.standing-medal-2 td {
  background: linear-gradient(90deg, rgba(234, 238, 242, 0.96), rgba(255, 255, 255, 0.7));
}

.standing-medal-3 td {
  background: linear-gradient(90deg, rgba(244, 224, 205, 0.92), rgba(255, 255, 255, 0.7));
}

label span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.94rem;
  color: var(--muted);
}

.workspace-shell {
  width: min(1440px, calc(100% - 2rem));
  margin: 1rem auto 2rem;
}

.top-strip-layout {
  display: block;
}

.hero h1 {
  margin: 0.2rem 0 0.4rem;
}

.mini-header {
  margin-bottom: 1rem;
  padding: 1.2rem 1.4rem;
  border-radius: 24px;
  position: relative;
  min-height: 170px;
  padding-right: clamp(300px, 34vw, 460px);
  background:
    linear-gradient(135deg, rgba(255, 252, 246, 0.96), rgba(250, 237, 214, 0.9)),
    var(--panel-strong);
  box-shadow: var(--shadow);
}

.mini-header h1 {
  margin: 0.2rem 0 0.35rem;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 0.98;
}

.mini-header .subtle {
  margin: 0;
  font-size: 1rem;
}

.mini-header-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  max-width: calc(100% - 2.8rem);
}

.mini-header-signout {
  white-space: nowrap;
}

.event-title {
  margin: 0;
  color: var(--brand);
  font-weight: 800;
  font-size: clamp(1.45rem, 3.2vw, 2.35rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
}

.tab-button {
  justify-content: center;
  background: transparent;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 0;
  padding: 0.8rem 1rem 1rem;
  position: relative;
}

.tab-button.active {
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}

.content-shell {
  min-width: 0;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.top-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.top-tabs-bar {
  align-items: center;
  padding: 0 0.6rem;
  border-bottom: 1px solid rgba(77, 56, 33, 0.14);
}

.top-tabs .tab-button {
  width: auto;
  justify-content: center;
}

.top-tabs .tab-button::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0.22rem;
  height: 4px;
  border-radius: 999px;
  background: transparent;
}

.top-tabs .tab-button.active::after {
  background: var(--brand);
}

.top-tabs .tab-button:hover {
  background: transparent;
  transform: none;
  color: var(--brand-dark);
}

.top-tabs-action {
  margin-left: auto;
  border-radius: 12px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 252, 246, 0.96), rgba(250, 237, 214, 0.9)),
    var(--panel-strong);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.judge-body {
  background:
    radial-gradient(circle at top right, rgba(162, 79, 45, 0.12), transparent 28%),
    linear-gradient(180deg, #fbf7f0 0%, var(--bg) 100%);
}

.judge-shell {
  width: min(1440px, calc(100% - 2rem));
  margin: 1rem auto 2rem;
}

.judge-hero {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1rem;
  position: relative;
}

.judge-hero-header,
.judge-toolbar {
  display: block;
  width: 100%;
}

.judge-hero-header {
  min-height: 3rem;
  padding-right: clamp(280px, 34vw, 460px);
}

.judge-hero-copy h1 {
  margin: 0.25rem 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.02;
}

.judge-hero-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  position: absolute;
  top: 2rem;
  right: 2rem;
  max-width: calc(100% - 4rem);
}

.judge-selects {
  min-width: 0;
}

.judge-toolbar-actions {
  justify-content: flex-end;
}

.judge-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}

.judge-signout {
  white-space: nowrap;
}

.judge-main-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.judge-flow,
.panel {
  margin-bottom: 1rem;
}

.panel {
  padding: 1.25rem;
  border: 1px solid rgba(77, 56, 33, 0.08);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel-heading h2,
.panel-heading h3 {
  margin: 0;
}

.panel-heading p {
  margin: 0.3rem 0 1rem;
  color: var(--muted);
}

.panel-heading.compact {
  margin-bottom: 0.6rem;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
}

.hero-copy,
.subtle,
.note-list {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 1rem;
}

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

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

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

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

.judge-grid {
  grid-template-columns: 340px minmax(0, 1fr);
}

.hero-stats,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  width: min(520px, 100%);
}

.stack {
  display: flex;
  flex-direction: column;
}

.gap-sm {
  gap: 0.6rem;
}

.gap-md {
  gap: 1rem;
}

.list-block,
.card-grid,
.queue-list {
  display: grid;
  gap: 0.75rem;
}

.list-item,
.event-card,
.stat-card,
.criterion-row,
.judge-criterion,
.group-entry-block,
.queue-item {
  padding: 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.event-card {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.event-card.active {
  border-color: rgba(162, 79, 45, 0.62);
  background: linear-gradient(180deg, rgba(255, 245, 232, 0.96), rgba(255, 255, 255, 0.88));
  box-shadow:
    inset 0 0 0 2px rgba(162, 79, 45, 0.22),
    0 14px 30px rgba(162, 79, 45, 0.08);
  transform: translateY(-1px);
}

.fused-events-layout {
  align-items: stretch;
}

.fused-events-layout .panel:first-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.fused-events-layout .panel:last-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.editor-linked {
  box-shadow:
    inset 3px 0 0 rgba(162, 79, 45, 0.8),
    var(--shadow);
}

.group-student-block {
  padding: 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.event-card h3,
.stat-card h3,
.list-item h3 {
  margin: 0;
}

.actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

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

.button-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.button-group > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button-group > .secondary,
.button-group > .icon-button {
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  flex: 0 0 2.5rem;
}

.section-form {
  margin-bottom: 1rem;
}

.student-inline-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: inherit;
  text-align: left;
  justify-content: flex-start;
  border-radius: 0;
}

.student-inline-button:hover,
.student-inline-button:focus-visible {
  background: transparent;
  transform: none;
  color: var(--brand);
  text-decoration: underline;
}

.student-inline-meta {
  font-weight: 500;
}

.student-inline-input {
  min-width: 0;
}

.student-inline-input-short {
  max-width: 9rem;
}

.student-inline-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.readonly-banner {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(193, 145, 56, 0.2);
  background: linear-gradient(180deg, rgba(255, 247, 225, 0.96), rgba(255, 255, 255, 0.92));
  color: #8a6220;
  font-weight: 700;
}

.account-card {
  display: grid;
  gap: 0.9rem;
}

.account-card-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease;
}

.account-card-toggle:hover,
.account-card-toggle:focus-visible {
  background: rgba(162, 79, 45, 0.08);
  color: var(--ink);
}

.account-card-toggle:hover .account-card-toggle-icon {
  border-color: rgba(162, 79, 45, 0.28);
  background: rgba(162, 79, 45, 0.08);
}

.account-card-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  border: 1px solid rgba(77, 56, 33, 0.1);
  color: var(--brand-dark);
  font-size: 1.05rem;
  font-weight: 800;
  flex: 0 0 auto;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.account-card-head,
.account-card-foot {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  justify-content: space-between;
}

.account-card-head {
  padding-top: 0.1rem;
}

.account-card-head .subtle,
.account-card-foot .subtle {
  margin: 0.2rem 0 0;
}

.account-card-delete {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.account-card-note {
  color: var(--warn);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: right;
}

.account-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
}

.admin-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.inline-field {
  display: grid;
  gap: 0.35rem;
}

.inline-field span {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}

.check-item,
.inline-check {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.check-item input,
.inline-check input {
  width: auto;
}

.criterion-row {
  display: grid;
  grid-template-columns: 1.8fr 0.8fr auto;
  gap: 0.7rem;
}

.queue-item {
  width: 100%;
  justify-content: space-between;
  text-align: left;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
}

.queue-item .queue-item-title {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.queue-status {
  display: inline-flex;
  width: 1.4rem;
  height: 1.4rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.queue-status.done {
  background: rgba(88, 170, 96, 0.18);
  color: #2d7831;
}

.queue-status.pending {
  background: transparent;
  color: transparent;
  border: 1px solid rgba(77, 56, 33, 0.1);
}

.queue-item.active {
  border-color: rgba(162, 79, 45, 0.4);
  background: rgba(255, 241, 228, 0.96);
}

.judge-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.9rem 0.45rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(77, 56, 33, 0.08);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-weight: 700;
}

.judge-badge-icon {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white;
  font-size: 0.85rem;
  font-weight: 800;
}

.judge-badge-name {
  white-space: nowrap;
}

.badge-role {
  display: inline-flex;
  margin-left: 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.score-summary {
  min-width: 168px;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(47, 122, 78, 0.14);
  background: linear-gradient(180deg, rgba(237, 247, 241, 0.95), rgba(255, 255, 255, 0.94));
  text-align: right;
}

.score-summary-value,
.score-summary-label,
.score-summary-meta {
  display: block;
}

.score-summary-value {
  color: var(--ok);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}

.score-summary-label {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.score-summary-meta {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.save-feedback {
  color: var(--ok);
  font-weight: 800;
  font-size: 0.96rem;
}

.read-only-admin input:disabled,
.read-only-admin select:disabled,
.read-only-admin textarea:disabled,
.read-only-admin button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

button:disabled {
  background: rgba(158, 59, 53, 0.26);
  color: rgba(255, 255, 255, 0.92);
  cursor: not-allowed;
  box-shadow: none;
}

.judge-main .summary-grid {
  width: 100%;
  margin-bottom: 1rem;
}

.judge-main.panel-focus-flash {
  animation: judgePanelForwardPulse 0.95s ease;
}

@keyframes judgePanelForwardPulse {
  0% {
    transform: translateX(0) scale(1);
    box-shadow: var(--shadow);
    border-color: rgba(77, 56, 33, 0.12);
  }
  35% {
    transform: translateY(-10px) scale(1.02);
    box-shadow:
      0 34px 68px rgba(82, 55, 18, 0.18),
      0 0 0 4px rgba(162, 79, 45, 0.16);
    border-color: rgba(162, 79, 45, 0.34);
    background: linear-gradient(180deg, rgba(255, 249, 241, 0.98), rgba(255, 255, 255, 0.95));
  }
  100% {
    transform: translateX(0) scale(1);
    box-shadow: var(--shadow);
    border-color: rgba(77, 56, 33, 0.12);
  }
}

.judge-selection-cue {
  display: inline-flex;
  margin-top: 0.55rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(162, 79, 45, 0.1);
  color: var(--brand-dark);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.judge-selection-cue-show {
  animation: judgeSelectionCuePulse 1.2s ease;
}

@keyframes judgeSelectionCuePulse {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  20% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.judge-criteria {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.judge-criterion {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr;
  gap: 1rem;
  align-items: center;
}

.judge-criterion h3 {
  margin: 0 0 0.2rem;
}

.marking-controls {
  display: grid;
  grid-template-columns: auto 120px auto auto auto;
  gap: 0.6rem;
  align-items: center;
}

.mark-step {
  min-width: 46px;
  padding: 0.85rem 0.8rem;
  font-size: 1.1rem;
}

.mark-input {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(214, 177, 109, 0.22);
  color: #714823;
  font-size: 0.82rem;
}

.pill.warn {
  background: rgba(194, 125, 25, 0.16);
  color: #8c5d10;
}

.pill.ok {
  background: rgba(47, 122, 78, 0.14);
  color: var(--ok);
}

.cloud-status {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(77, 56, 33, 0.08);
  color: var(--muted);
  font-size: 0.92rem;
}

.cloud-status .dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  display: inline-block;
  background: var(--danger);
}

.cloud-status.online {
  background: rgba(230, 244, 234, 0.92);
  color: var(--ok);
  border-color: rgba(47, 122, 78, 0.18);
}

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

.cloud-status.offline {
  background: rgba(222, 199, 193, 0.92);
  color: var(--danger);
  border-color: rgba(158, 59, 53, 0.18);
}

.metric {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin: 0.4rem 0;
}

.mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
  width: 100%;
  max-width: 100%;
  touch-action: pan-x pan-y;
  min-width: 0;
}

.table-scroll-track {
  display: inline-block;
  min-width: 100%;
}

.table-scroll-track-medium {
  min-width: 820px;
}

.event-standings-table {
  width: 1000px !important;
  min-width: 1000px;
  table-layout: fixed;
}

.student-results-table {
  width: 990px !important;
  min-width: 990px;
  table-layout: fixed;
}

.standings-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.2rem;
}

.student-results-shell .table-wrap table {
  width: 990px !important;
  min-width: 990px;
}

.overall-standings-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  cursor: grab;
  min-width: 0;
}

.overall-standings-wrap table {
  width: 1000px !important;
  min-width: 1000px;
}

.overall-standings-wrap.drag-scrolling,
#studentResultBody .standings-wrap.drag-scrolling {
  cursor: grabbing;
  user-select: none;
}

.event-standings-table .col-participant {
  width: 260px;
}

.event-standings-table .col-chest {
  width: 110px;
}

.event-standings-table .col-total {
  width: 130px;
}

.event-standings-table .col-judges {
  width: 220px;
}

.event-standings-table .col-comments {
  width: 280px;
}

.student-results-table .col-event {
  width: 220px;
}

.student-results-table .col-rank {
  width: 140px;
}

.student-results-table .col-total {
  width: 130px;
}

.student-results-table .col-judges {
  width: 220px;
}

.student-results-table .col-comments {
  width: 280px;
}

.empty {
  padding: 1rem;
  border-radius: 14px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.note-list {
  margin: 0;
  padding-left: 1.2rem;
}

@media (max-width: 980px) {
  .hero,
  .launcher-grid,
  .grid.two,
  .grid.three,
  .grid.four,
  .grid.five,
  .judge-grid,
  .judge-criterion {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 1.4rem;
  }

  .mini-header {
    min-height: 0;
    padding-right: 1.4rem;
  }

  .mini-header-status {
    position: static;
    max-width: none;
    justify-content: flex-start;
    margin-top: 1rem;
  }

  .judge-hero-header,
  .judge-toolbar {
    align-items: stretch;
  }

  .judge-hero-status,
  .judge-toolbar-actions {
    justify-content: flex-start;
  }

  .judge-hero-header {
    min-height: 0;
    padding-right: 0;
  }

  .judge-hero-status {
    position: static;
    max-width: none;
  }

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

  .judge-main-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .score-summary {
    text-align: left;
  }

  .top-tabs-action {
    margin-left: 0;
  }

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

  .standings-wrap {
    margin-left: -0.15rem;
    margin-right: -0.15rem;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }

  .event-standings-table,
  .overall-standings-wrap table {
    width: 1000px !important;
    min-width: 1000px;
  }

  .student-results-table,
  .student-results-shell .table-wrap table,
  .table-scroll-track-medium {
    width: 990px !important;
    min-width: 990px;
  }
}
