:root {
  color-scheme: light;
  --ink: #0a0a0a;
  --paper: #ffffff;
  --signal: #e10600;
  --muted: rgba(10, 10, 10, 0.55);
  --line: rgba(10, 10, 10, 0.14);
  --line-strong: rgba(10, 10, 10, 0.32);
  --surface: #ffffff;
  --canvas: #ffffff;
  --chrome: #0a0a0a;
  --on-chrome: #ffffff;
  --wash: rgba(10, 10, 10, 0.045);
  --good: var(--ink);
  --bad: var(--signal);
  --warn: var(--signal);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ffffff;
  --paper: #0a0a0a;
  --muted: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.4);
  --surface: #0a0a0a;
  --canvas: #0a0a0a;
  --chrome: #ffffff;
  --on-chrome: #0a0a0a;
  --wash: rgba(255, 255, 255, 0.06);
}

::selection {
  background: var(--signal);
  color: #fff;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
}

html {
  overflow-x: clip;
}

body {
  color: var(--ink);
  background: var(--canvas);
  overflow-x: clip;
}

body,
header,
footer,
.card,
.panel,
.live-now,
.live-panel,
.theme-toggle {
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.2rem 0.65rem 0.2rem 0.28rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1;
}

header .theme-toggle {
  border-color: color-mix(in srgb, var(--on-chrome) 35%, transparent);
  background: transparent;
  color: var(--on-chrome);
}

.theme-toggle-track {
  position: relative;
  width: 1.7rem;
  height: 1rem;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 22%, transparent);
}

.theme-toggle-knob {
  position: absolute;
  top: 0.1rem;
  left: 0.12rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: currentColor;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

html[data-theme="dark"] .theme-toggle-knob {
  transform: translateX(0.66rem);
  background: var(--signal);
}

.theme-label-dark { display: none; }

html[data-theme="dark"] .theme-label-light { display: none; }
html[data-theme="dark"] .theme-label-dark { display: inline; }

@media (max-width: 640px) {
  header .theme-toggle-text,
  .home-toolbar .theme-toggle-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  header .theme-toggle,
  .home-toolbar .theme-toggle { padding-right: 0.28rem; }
}

.home-main {
  position: relative;
  width: 100%;
  padding: 0;
}

.home-toolbar {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.home-main:has(.home-hero) .home-toolbar .theme-toggle,
.home-main:has(.home-hero) .home-toolbar .lang-switch,
.home-main:has(.auth-login) .home-toolbar .theme-toggle,
.home-main:has(.auth-login) .home-toolbar .lang-switch {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(8, 8, 8, 0.45);
  color: #fff;
  backdrop-filter: blur(10px);
}

.home-main:has(.home-hero) .home-toolbar .lang-switch-btn,
.home-main:has(.auth-login) .home-toolbar .lang-switch-btn {
  color: #fff;
}

.home-main:has(.home-hero) .home-toolbar .lang-switch-btn.is-active,
.home-main:has(.auth-login) .home-toolbar .lang-switch-btn.is-active {
  background: var(--signal);
  color: #fff;
}

.auth-login {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding:
    max(4.5rem, calc(env(safe-area-inset-top, 0px) + 3.5rem))
    max(1rem, env(safe-area-inset-right, 0px))
    max(2rem, calc(env(safe-area-inset-bottom, 0px) + 1.5rem))
    max(1rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  background-color: #070707;
  background-image: var(--auth-login-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.auth-login-veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.45) 40%, rgba(0, 0, 0, 0.72) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.2) 55%, rgba(0, 0, 0, 0.45) 100%);
}

.auth-login-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
}

.auth-login-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.auth-login-brand-mark {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  flex-shrink: 0;
  background: var(--signal);
}

.auth-login .kicker {
  color: rgba(255, 255, 255, 0.72);
}

.auth-login .card {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.home-main:has(.auth-login) .flash-slot {
  position: relative;
  z-index: 20;
  max-width: 26rem;
  margin-left: auto;
  margin-right: auto;
}

.flash-slot {
  width: 100%;
  margin-bottom: 1rem;
}

.flash-slot--chrome-free {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  padding:
    max(4.35rem, calc(env(safe-area-inset-top, 0px) + 3.6rem))
    max(1rem, env(safe-area-inset-right, 0px))
    0
    max(1rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.flash-slot .flash-alert {
  margin-bottom: 0;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 0.85rem;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--ink) 8%, transparent);
}

.flash-alert-main {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: 0;
  flex: 1;
}

.flash-alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.flash-alert-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.flash-alert-text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.flash-alert-close {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  margin: -0.1rem -0.2rem 0 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0.55;
  cursor: pointer;
}

.flash-alert-close:hover {
  opacity: 1;
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.flash-alert.alert-success {
  border-color: color-mix(in srgb, #1f7a45 28%, var(--line));
  border-left: 4px solid #1f7a45;
  background: color-mix(in srgb, #1f7a45 8%, var(--paper));
  color: var(--ink);
}

.flash-alert.alert-success .flash-alert-icon {
  background: #1f7a45;
  color: #fff;
}

.flash-alert.alert-danger {
  border-color: color-mix(in srgb, var(--signal) 45%, var(--line));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--signal) 18%, transparent);
}

.flash-alert.alert-danger .flash-alert-icon {
  background: #fff;
  color: var(--signal);
}

.flash-alert.alert-warning {
  border-color: color-mix(in srgb, var(--signal) 35%, var(--line));
  background: color-mix(in srgb, var(--signal) 8%, var(--paper));
}

.home-main:has(.flash-slot--chrome-free) .reg-page {
  padding-top: 1.1rem;
}

.app-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding:
    max(1rem, env(safe-area-inset-top, 0px))
    max(1rem, env(safe-area-inset-right, 0px))
    max(1rem, env(safe-area-inset-bottom, 0px))
    max(1rem, env(safe-area-inset-left, 0px));
  background: rgba(8, 8, 8, 0.58);
  backdrop-filter: blur(6px);
  overflow: auto;
}

.app-modal {
  width: min(24rem, 100%);
  padding: 1.6rem 1.35rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  animation: app-modal-in 0.22s ease-out;
}

@keyframes app-modal-in {
  from {
    opacity: 0;
    transform: translateY(0.6rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.app-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  margin: 0 auto 1rem;
  border-radius: 999px;
  font-size: 1.35rem;
  font-weight: 700;
}

.app-modal-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.app-modal-icon--success {
  background: color-mix(in srgb, #1f7a45 14%, var(--paper));
  color: #1f7a45;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #1f7a45 28%, transparent);
}

.app-modal-icon--danger {
  background: color-mix(in srgb, var(--signal) 14%, var(--paper));
  color: var(--signal);
}

.app-modal-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.2rem, 4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.app-modal-text {
  margin: 0 0 1.35rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--ink) 78%, transparent);
}

.app-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.app-modal-actions--row {
  flex-direction: row;
}

.app-modal-actions--row .app-modal-cta {
  flex: 1;
}

.app-modal-form {
  text-align: left;
}

.app-modal-form .field-label {
  display: block;
  margin-bottom: 0.35rem;
}

.app-modal-cta {
  width: 100%;
  justify-content: center;
  min-height: 2.85rem;
}

.app-modal-backdrop.hidden {
  display: none;
}

body:has(.app-modal-backdrop:not(.hidden)) {
  overflow: hidden;
}

@media (min-width: 640px) {
  .flash-slot--chrome-free {
    padding-top: max(4.6rem, calc(env(safe-area-inset-top, 0px) + 3.85rem));
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
  }

  .flash-alert-text {
    font-size: 1rem;
  }
}

.home-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  min-height: min(92vh, 52rem);
  min-height: min(92svh, 52rem);
  padding:
    max(5rem, calc(env(safe-area-inset-top, 0px) + 4rem))
    max(1rem, env(safe-area-inset-right, 0px))
    max(2.5rem, env(safe-area-inset-bottom, 0px))
    max(1rem, env(safe-area-inset-left, 0px));
  overflow: hidden;
  color: #fff;
  background-color: #070707;
  background-image: var(--home-hero-image);
  background-position: 58% center;
  background-size: cover;
  background-repeat: no-repeat;
}

.home-hero-veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.55) 42%, rgba(0, 0, 0, 0.28) 68%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.15) 35%, rgba(0, 0, 0, 0.88) 100%);
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  height: 4rem;
  background: linear-gradient(180deg, transparent, var(--canvas));
  pointer-events: none;
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
}

.home-hero-kicker,
.home-hero-title,
.home-hero-lead,
.home-hero-actions,
.home-hero-disciplines {
  animation: home-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-hero-kicker { animation-delay: 0.05s; }
.home-hero-title { animation-delay: 0.12s; }
.home-hero-lead { animation-delay: 0.2s; }
.home-hero-actions { animation-delay: 0.28s; }
.home-hero-disciplines { animation-delay: 0.36s; }

@keyframes home-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-kicker,
  .home-hero-title,
  .home-hero-lead,
  .home-hero-actions,
  .home-hero-disciplines,
  .home-hero-disciplines-list li {
    animation: none !important;
  }
}

.home-hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.7rem;
  margin: 0 0 1rem;
  max-width: 38rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.home-hero-date {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.home-hero-kicker-sep {
  width: 1.4rem;
  height: 2px;
  background: var(--signal);
}

.home-hero-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.85rem;
  font-size: clamp(2.35rem, 9vw, 4.35rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: #fff;
}

.home-hero-brand-mark {
  display: inline-block;
  width: 0.55rem;
  height: clamp(1.7rem, 6vw, 2.8rem);
  flex-shrink: 0;
  background: var(--signal);
  box-shadow: 0 0 0 1px rgba(225, 6, 0, 0.25);
}

.home-hero-lead {
  margin: 0 0 1.4rem;
  max-width: 34rem;
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.84);
  text-wrap: pretty;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.home-hero-cta {
  min-width: 9.5rem;
  box-shadow: 0 10px 28px rgba(225, 6, 0, 0.28);
}

.home-hero .home-hero-btn-ghost {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
}

.home-hero-disciplines {
  margin-top: 1.65rem;
  max-width: 44rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 8, 8, 0.42);
  backdrop-filter: blur(14px);
}

.home-hero-disciplines-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.home-hero-disciplines-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
}

.home-hero-disciplines-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.35rem;
  border: 1px solid rgba(225, 6, 0, 0.45);
  background: rgba(225, 6, 0, 0.12);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.home-hero-disciplines-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.home-hero-disciplines-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.55rem;
  padding: 0.55rem 0.75rem;
  border-left: 3px solid var(--signal);
  background: rgba(255, 255, 255, 0.05);
  animation: home-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0.42s + (var(--i, 0) * 0.05s));
}

.home-hero-disciplines-num {
  flex-shrink: 0;
  min-width: 1.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--signal);
}

.home-hero-disciplines-name {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.94);
}

@media (min-width: 640px) {
  .home-hero-disciplines {
    padding: 1.15rem 1.2rem;
  }

  .home-hero-disciplines-list {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }
}

.home-body {
  position: relative;
  z-index: 1;
  padding-top: 1.75rem;
  padding-bottom: 2.5rem;
}

.home-info-card {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.home-info-card:hover {
  transform: translateY(-2px);
}

.home-day-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-day-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.home-day-list li > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  border: 1px solid color-mix(in srgb, var(--signal) 55%, transparent);
  color: var(--signal);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.home-page footer {
  margin-top: 0;
}

@media (max-width: 640px) {
  .home-hero {
    min-height: auto;
    align-items: flex-end;
    background-position: 68% 28%;
  }

  .home-hero-veil {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 28%, rgba(0, 0, 0, 0.72) 58%, rgba(0, 0, 0, 0.94) 100%);
  }

  .home-hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .home-hero-actions .home-hero-cta {
    grid-column: 1 / -1;
  }

  .home-hero-actions > * {
    width: 100%;
    justify-content: center;
    min-height: 2.7rem;
  }

  .home-hero-disciplines {
    margin-top: 1.25rem;
    padding: 0.85rem;
  }

  .home-hero-disciplines-list li {
    min-height: 2.35rem;
    padding: 0.45rem 0.65rem;
  }

  .home-hero-disciplines-name {
    font-size: 0.86rem;
  }

  .home-body {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
  }

  .home-cards .card-body {
    padding: 1rem 1.05rem;
  }

  .home-page footer .mx-auto {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
}

@media (min-width: 768px) {
  .home-hero {
    align-items: center;
    padding: 6.5rem 1.5rem 7.5rem;
    background-position: center 18%;
  }

  .home-hero-inner {
    margin-top: -2.5rem;
  }

  .home-hero-lead {
    margin-bottom: 1.75rem;
  }

  .home-body {
    padding-top: 2.5rem;
    padding-bottom: 3rem;
  }

  .home-hero::after {
    height: 5rem;
  }
}

@media (max-height: 700px) and (max-width: 640px) {
  .home-hero {
    padding-top: max(4.25rem, calc(env(safe-area-inset-top, 0px) + 3.25rem));
    padding-bottom: 1.75rem;
  }

  .home-hero-lead {
    margin-bottom: 1rem;
  }
}

.reg-page {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding:
    max(4.5rem, calc(env(safe-area-inset-top, 0px) + 3.75rem))
    max(1rem, env(safe-area-inset-right, 0px))
    max(2rem, calc(env(safe-area-inset-bottom, 0px) + 1.5rem))
    max(1rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.reg-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.45rem 0.85rem 0.45rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 6%, transparent);
}

.reg-back::before {
  content: "←";
  font-weight: 700;
  color: var(--signal);
}

.reg-back:hover {
  border-color: var(--signal);
  color: var(--ink);
}

.reg-page-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.reg-page-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4.5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.reg-page-lead {
  margin: 0;
  max-width: 36rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--ink) 80%, transparent);
}

.reg-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reg-card .card-body {
  padding: 1.15rem 1.2rem;
}

.reg-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.reg-card-hint {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink) 80%, transparent);
}

.reg-field {
  margin-bottom: 1rem;
  position: relative;
}

.reg-field--last {
  margin-bottom: 0;
}

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

.reg-gender,
.reg-disciplines {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reg-gender {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.reg-choice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--paper);
  cursor: pointer;
  user-select: none;
}

.reg-choice:has(:checked) {
  border-color: color-mix(in srgb, var(--signal) 70%, var(--line));
  background: color-mix(in srgb, var(--signal) 10%, var(--paper));
}

.reg-choice .check {
  flex-shrink: 0;
}

.reg-choice span {
  line-height: 1.3;
}

.reg-choice.is-taken {
  opacity: 0.62;
  cursor: not-allowed;
  background: color-mix(in srgb, var(--ink) 4%, var(--paper));
}

.reg-choice.is-taken .check {
  pointer-events: none;
}

.reg-choice-taken {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--signal);
  white-space: nowrap;
}

.reg-disciplines-taken-hint {
  color: var(--signal);
}

.reg-page .field {
  min-height: 2.75rem;
  font-size: 1rem;
}

.reg-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.reg-actions > * {
  width: 100%;
  justify-content: center;
  min-height: 2.75rem;
}

@media (min-width: 480px) {
  .reg-gender {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 640px) {
  .reg-page {
    padding-top: max(4.75rem, calc(env(safe-area-inset-top, 0px) + 4rem));
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
    padding-bottom: 2.5rem;
  }

  .reg-page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  .reg-page-lead {
    font-size: 1rem;
  }

  .reg-form {
    gap: 1.1rem;
  }

  .reg-card .card-body {
    padding: 1.35rem 1.4rem;
  }

  .reg-card-title {
    font-size: 1.125rem;
  }

  .reg-grid {
    grid-template-columns: 1fr 1fr;
  }

  .reg-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .reg-actions > * {
    width: auto;
    min-width: 9rem;
  }
}

@media (min-width: 768px) {
  .reg-page {
    padding-top: 5rem;
    padding-bottom: 3rem;
  }

  .reg-disciplines {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }
}

.lang-switch {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper);
  line-height: 1;
}

.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  opacity: 0.55;
}

.lang-switch-btn:hover {
  opacity: 0.9;
}

.lang-switch-btn.is-active {
  background: var(--signal);
  color: #fff;
  opacity: 1;
}

header .lang-switch {
  border-color: color-mix(in srgb, var(--on-chrome) 35%, transparent);
  background: transparent;
}

header .lang-switch-btn {
  color: var(--on-chrome);
}

header .lang-switch-btn.is-active {
  background: var(--signal);
  color: #fff;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 1.25rem 1.35rem;
}

.table-ag {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table-ag th,
.table-ag td {
  padding: 0.6rem 0.55rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.table-ag thead th {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

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

.table-ag tbody tr:hover td {
  background: var(--wash);
}

.table-ag.table-sm th,
.table-ag.table-sm td {
  padding: 0.35rem 0.4rem;
  font-size: 0.85rem;
}

.place-1 { color: var(--signal); font-weight: 700; }
.place-2 { color: var(--ink); font-weight: 700; }
.place-3 { color: var(--muted); font-weight: 700; }

.attempt-input { max-width: 6.5rem; }

.badge-status {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}
.badge-status--pending { background: var(--paper); color: var(--ink); border: 1px solid var(--line-strong); }
.badge-status--approved { background: var(--ink); color: var(--paper); }
.badge-status--rejected { background: var(--signal); color: #fff; }

a.disabled,
span.disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Name suggestions */
[data-name-suggest] { position: relative; }

.reg-name-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  max-height: 14rem;
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.reg-name-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.reg-name-item:hover,
.reg-name-item.is-active {
  background: var(--wash);
}

.reg-name-match { color: var(--ink); font-weight: 600; }

/* Weigh-in */
.weigh-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

a.weigh-cat-card,
a.weigh-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 1rem 1.1rem;
  color: inherit;
  text-decoration: none;
}

a.weigh-cat-card:hover,
a.weigh-card:hover {
  border-color: var(--ink);
}

a.weigh-cat-card.is-empty { opacity: 0.55; }

.weigh-cat-name,
.weigh-name {
  font-weight: 600;
  margin: 0;
}

.weigh-cat-count,
.weigh-cat-count-sub,
.weigh-card-gender,
.weigh-meta,
.weigh-card-cta {
  color: var(--muted);
  font-size: 0.875rem;
}

.weigh-card-cta { font-weight: 600; }

.weigh-list { display: flex; flex-direction: column; gap: 0.75rem; }

.weigh-card-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

a.weigh-card.is-done { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--signal); }

.weigh-cat-current { font-size: 1.05rem; font-weight: 600; }

.weigh-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.55);
  overflow: auto;
}

.weigh-modal {
  width: min(40rem, 100%);
  background: var(--paper);
  border-radius: 0.5rem;
  border: 1px solid var(--line);
}

.weigh-modal-head,
.weigh-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
}

.weigh-modal-head { border-bottom: 1px solid var(--line); }
.weigh-modal-actions { border-top: 1px solid var(--line); }

.weigh-modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.weigh-modal-gender,
.weigh-hint,
.weigh-opening-hint,
.weigh-opening-cat { color: var(--muted); font-size: 0.875rem; }

.weigh-modal-close {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.15rem 0.4rem;
}

.weigh-modal-body { padding: 1rem 1.15rem 0.25rem; }

.weigh-field { margin-bottom: 1rem; }

.weigh-label,
.weigh-openings-title {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.weigh-bw-row,
.weigh-opening-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.weigh-bw-input,
.weigh-opening-input,
.weigh-note {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 0.375rem;
  padding: 0.5rem 0.7rem;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}

.weigh-bw-input { max-width: 10rem; font-size: 1.25rem; }
.weigh-opening-input { max-width: 7rem; }
.weigh-note { min-height: 5rem; resize: vertical; }

.weigh-bw-input:focus,
.weigh-opening-input:focus,
.weigh-note:focus {
  border-color: var(--signal);
  outline: 2px solid rgba(225, 6, 0, 0.25);
  outline-offset: 0;
}

.weigh-bw-unit,
.weigh-opening-unit { color: var(--muted); font-weight: 600; }

.weigh-openings { margin-bottom: 1rem; }
.weigh-openings-list { display: flex; flex-direction: column; gap: 0.65rem; }

.weigh-opening-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: center;
}

.weigh-opening-name { font-weight: 600; }
.weigh-check { margin-right: 0.25rem; }

@media (max-width: 576px) {
  .weigh-opening-row { grid-template-columns: 1fr; }
  .weigh-modal-actions { flex-direction: column; }
  .weigh-modal-actions > * { width: 100%; }
}

/* Platform */
.platform-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.platform-main,
.platform-timer,
.platform-queue {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 1rem 1.1rem;
}

.platform-main { padding: 1.15rem 1.25rem 1.25rem; }

.platform-disc-form select { min-width: 14rem; width: auto; }

.platform-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.platform-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.platform-attempt-badge {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8rem;
  font-weight: 600;
}

.platform-meta,
.platform-sub,
.platform-weight-label,
.platform-upcoming,
.platform-hotkeys,
.platform-lights-hint,
.platform-queue-meta { color: var(--muted); }

.platform-meta,
.platform-sub,
.platform-upcoming,
.platform-hotkeys,
.platform-lights-hint { margin: 0 0 0.35rem; }

.platform-name {
  margin: 0 0 0.25rem;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  line-height: 1.15;
}

.platform-weight-value {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.platform-weight-value span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

.platform-hero-weight { text-align: right; }

.platform-bar-block,
.live-bar {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.platform-bar-head,
.live-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.platform-bar,
.live-bar-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 4.25rem;
  overflow-x: auto;
}

.platform-bar-shaft {
  width: min(28%, 9rem);
  height: 0.5rem;
  background: var(--ink);
  border-radius: 999px;
}

.platform-bar-sleeve {
  width: 0.5rem;
  height: 1.35rem;
  background: var(--ink);
  border-radius: 0.15rem;
}

.platform-bar-side-plates { display: flex; align-items: center; gap: 0.2rem; }

.plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  height: 3.4rem;
  padding: 0 0.2rem;
  border-radius: 0.2rem;
  background: var(--plate-color, #ca8a04);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.platform-lights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.platform-light {
  padding: 0.65rem;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

.platform-light.is-white { border-color: #0a0a0a; background: #fff; color: #0a0a0a; }
.platform-light.is-red { border-color: var(--signal); background: var(--paper); box-shadow: inset 0 0 0 2px var(--signal); }

.platform-light-label {
  margin-bottom: 0.45rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.platform-light-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }

.platform-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 3.5rem;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.platform-choice-orb {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--paper);
}

.platform-choice--white.is-active {
  border-color: var(--ink);
  color: var(--ink);
}
.platform-choice--white.is-active .platform-choice-orb {
  background: #fff;
  border-color: #0a0a0a;
}
.platform-choice--red.is-active {
  border-color: var(--signal);
  color: #fff;
  background: var(--signal);
}
.platform-choice--red.is-active .platform-choice-orb {
  background: #fff;
  border-color: #fff;
}

.platform-verdict {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.375rem;
  text-align: center;
  font-weight: 600;
  background: var(--canvas);
  border: 1px solid var(--line);
  color: var(--muted);
}
.platform-verdict.is-wait { color: var(--ink); background: var(--wash); border-color: var(--line-strong); }
.platform-verdict.is-good { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.platform-verdict.is-bad { color: #fff; background: var(--signal); border-color: var(--signal); }

.platform-actions {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 0.6rem;
}

.platform-btn-confirm,
.platform-btn-order,
.platform-btn-defer,
.platform-timer-start,
.platform-timer-pause,
.platform-timer-reset {
  width: 100%;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  padding: 0.8rem 0.7rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.platform-btn-confirm { background: var(--wash); color: var(--muted); cursor: not-allowed; }
.platform-btn-confirm.is-good { background: var(--ink); color: var(--paper); cursor: pointer; }
.platform-btn-confirm.is-bad { background: var(--signal); color: #fff; cursor: pointer; }
.platform-btn-confirm.is-busy { opacity: 0.65; }

.platform-btn-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  color: var(--ink);
  border-color: var(--ink);
  text-decoration: none;
}
.platform-btn-order:hover { background: var(--canvas); color: var(--ink); }

.platform-btn-defer {
  margin-top: 0.6rem;
  background: var(--paper);
  color: var(--signal);
  border-color: var(--signal);
}
.platform-btn-defer.is-back {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.platform-side { display: flex; flex-direction: column; gap: 1rem; }
.platform-side-title { margin: 0 0 0.75rem; font-size: 1rem; font-weight: 600; }

.platform-timer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.platform-autostart {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.platform-timer-display {
  font-size: 4rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  margin-bottom: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.platform-timer-display.is-low { color: var(--warn); }
.platform-timer-display.is-zero { color: var(--bad); }

.platform-timer-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
.platform-timer-start { background: var(--signal); color: #fff; }
.platform-timer-pause { background: var(--ink); color: var(--paper); }
.platform-timer-reset { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }

.platform-queue { max-height: min(32rem, 70vh); overflow: auto; }
.platform-queue-list,
.live-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }

.platform-queue-item,
.live-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  border-radius: 0.375rem;
  background: var(--canvas);
  border: 1px solid transparent;
  color: inherit;
  text-decoration: none;
}
.platform-queue-item.is-current,
.live-queue-item.is-next { border-color: var(--signal); background: var(--paper); box-shadow: inset 3px 0 0 var(--signal); }
.platform-queue-item.is-deferred,
.live-queue-item.is-deferred { opacity: 0.6; }
.platform-queue-name,
.live-queue-name { font-weight: 600; }
.platform-queue-weight,
.live-queue-w {
  flex-shrink: 0;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.25rem 0.45rem;
  border-radius: 0.25rem;
  white-space: nowrap;
}

.platform-pill {
  display: inline-block;
  margin-right: 0.3rem;
  padding: 0.05rem 0.35rem;
  border-radius: 0.2rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.7rem;
  font-weight: 600;
}
.platform-pill--next { background: var(--signal); }
.platform-pill--defer { background: var(--paper); color: var(--signal); border: 1px solid var(--signal); }

.platform-order-quick { display: flex; flex-direction: column; gap: 0.65rem; }
.platform-order-stepper { display: flex; align-items: center; gap: 0.45rem; }
.platform-order-input {
  width: 8rem;
  max-width: 8rem;
  text-align: center;
  font-weight: 600;
  font-size: 1.35rem;
}
.platform-step {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 0.375rem;
  background: var(--canvas);
  border: 1px solid var(--line);
  font-size: 1.25rem;
  cursor: pointer;
}
.platform-order-unit { color: var(--muted); font-weight: 600; }
.platform-order-presets,
.platform-order-banner-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.platform-order-banner-actions > * { flex: 1; min-width: 8rem; }
.platform-order-banner { border-left: 3px solid var(--ink); }
.platform-upcoming {
  padding: 0.5rem 0.7rem;
  border-radius: 0.375rem;
  background: var(--canvas);
}
.platform-upcoming strong { color: var(--ink); }
.platform-hotkeys kbd {
  padding: 0.05rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: 0.2rem;
  background: var(--canvas);
  font-size: 0.75rem;
}

dialog {
  margin: auto;
  color: var(--ink);
  background: var(--paper);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

@media (max-width: 992px) {
  .platform-grid { grid-template-columns: 1fr; }
  .platform-actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    grid-template-columns: 1fr;
    padding-top: 0.5rem;
    background: var(--paper);
  }
  .platform-hero-weight { text-align: left; }
  .platform-lights { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
  .platform-timer-btns { grid-template-columns: 1fr; }
}

/* Live board */
.live-body {
  margin: 0;
  min-height: 100dvh;
  background: var(--canvas);
  color: var(--ink);
}

.live-board {
  min-height: 100dvh;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.live-top,
.live-brand,
.live-top-right,
.live-now-head,
.live-brand-live {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.live-top { justify-content: space-between; flex-wrap: wrap; }
.live-top-right { flex: 1; justify-content: flex-end; min-width: 0; flex-wrap: wrap; }

.live-brand-mark { font-weight: 600; font-size: 1.15rem; }
.live-brand-mark em { font-style: normal; color: var(--signal); }

.live-brand-live {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--bad);
}

.live-brand-live-dot,
.live-pulse-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
}
.live-pulse.is-ok .live-pulse-dot { background: var(--ink); }
.live-pulse.is-err .live-pulse-dot { background: var(--bad); }

.live-disc-pick { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.live-disc-chip,
.live-exit {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 0.375rem;
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}
.live-disc-chip.is-active { background: var(--signal); color: #fff; border-color: var(--signal); }

.live-pulse {
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
}

.live-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.85fr);
  gap: 1rem;
  min-height: 0;
}

.live-now,
.live-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 1.15rem 1.25rem;
  min-height: 0;
}

.live-now { display: flex; flex-direction: column; }
.live-side { display: flex; flex-direction: column; gap: 1rem; min-height: 0; }
.live-panel { display: flex; flex-direction: column; flex: 1; }

.live-now-badge {
  background: var(--signal);
  color: #fff;
  border-radius: 0.25rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.live-name {
  margin: 0.35rem 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.05;
}

.live-sub,
.live-meta,
.live-weight-label,
.live-arm-meta,
.live-arm-side,
.live-empty,
.live-side-title { color: var(--muted); }

.live-sub,
.live-meta,
.live-empty { margin: 0; }
.live-side-title { margin: 0 0 0.7rem; font-size: 1rem; font-weight: 600; }

.live-stage {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.live-weight {
  font-size: clamp(3.5rem, 10vw, 6.5rem);
  font-weight: 600;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.live-weight span {
  font-size: 1.1rem;
  margin-left: 0.25rem;
  color: var(--muted);
  font-weight: 600;
}

.live-queue,
.live-rank-wrap { overflow: auto; flex: 1; min-height: 0; }

.live-rank { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.live-rank th,
.live-rank td { padding: 0.45rem 0.35rem; text-align: left; border-bottom: 1px solid var(--line); }
.live-rank th { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.live-rank td:last-child,
.live-rank th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

.live-arm {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: stretch;
  margin-top: 0.5rem;
}
.live-arm-fighter {
  text-align: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--canvas);
}
.live-arm-fighter--left { border-top: 3px solid var(--signal); }
.live-arm-fighter--right { border-top: 3px solid var(--ink); }
.live-arm-name { font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 600; }
.live-arm-vs { align-self: center; font-weight: 700; color: var(--muted); }

@media (max-width: 992px) {
  .live-grid { grid-template-columns: 1fr; }
  .live-queue { max-height: 14rem; }
}

@media (max-width: 720px) {
  .live-top { align-items: flex-start; }
  .live-top-right { flex: 1 1 100%; justify-content: flex-start; }
}
@media (max-width: 700px) {
  .live-arm { grid-template-columns: 1fr; }
  .live-arm-vs { text-align: center; }
}

/* Protocol */
.protocol-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.protocol-disc { color: var(--muted); font-size: 0.875rem; }

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}
.podium-card {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 1rem 0.8rem;
  text-align: center;
}
.podium-card--1 { order: 2; background: var(--signal); color: #fff; border-color: var(--signal); }
.podium-card--2 { order: 1; border-top: 4px solid var(--ink); }
.podium-card--3 { order: 3; border-top: 4px solid rgba(10, 10, 10, 0.28); }
.podium-card.is-empty { opacity: 0.55; }
.podium-place { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.podium-card--1 .podium-place,
.podium-card--1 .podium-name,
.podium-card--1 .podium-result,
.podium-card--1 .podium-medal,
.podium-card--1 .podium-meta,
.podium-card--1 .podium-result span { color: #fff; }
.podium-card--2 .podium-place { color: var(--ink); }
.podium-card--3 .podium-place { color: var(--muted); }
.podium-medal { margin: 0.35rem 0 0.6rem; color: var(--muted); font-size: 0.8rem; }
.podium-name { margin: 0 0 0.35rem; font-size: 1.05rem; font-weight: 600; }
.podium-result { font-size: 1.4rem; font-weight: 600; }
.podium-result span,
.podium-meta { color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.protocol-row-1 { box-shadow: inset 3px 0 0 var(--signal); }
.protocol-row-2 { box-shadow: inset 3px 0 0 var(--ink); }
.protocol-row-3 { box-shadow: inset 3px 0 0 rgba(10, 10, 10, 0.28); }

@media (max-width: 768px) {
  .podium { grid-template-columns: 1fr; }
  .podium-card--1,
  .podium-card--2,
  .podium-card--3 { order: 0; }
}

/* Armwrestling pairs */
.arm-roster { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.arm-roster-chip {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: var(--canvas);
  font-size: 0.9rem;
}
.arm-round-title { margin: 1rem 0 0.6rem; font-size: 1rem; font-weight: 600; }
.arm-matches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}
.arm-match {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.85rem;
  background: var(--canvas);
}
.arm-match.is-current { border-color: var(--signal); background: var(--paper); box-shadow: inset 3px 0 0 var(--signal); }
.arm-match-meta {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.arm-badge {
  background: var(--ink);
  color: var(--paper);
  border-radius: 0.2rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.75rem;
}
.arm-badge--bye { background: var(--paper); color: var(--ink); border: 1px solid var(--line-strong); }
.arm-fighters {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.4rem;
  align-items: start;
}
.arm-fighter { text-align: center; padding: 0.35rem; border-radius: 0.375rem; }
.arm-fighter.is-winner { background: var(--ink); color: var(--paper); }
.arm-fighter.is-winner .arm-fighter-sub,
.arm-fighter.is-winner .arm-win-label { color: var(--paper); }
.arm-fighter-name { font-weight: 600; }
.arm-fighter-sub,
.arm-win-label { color: var(--muted); font-size: 0.8rem; }
.arm-win-label { margin-top: 0.4rem; color: var(--signal); font-weight: 600; }
.arm-vs { align-self: center; font-weight: 700; color: var(--muted); font-size: 0.8rem; }
.arm-match-actions { display: flex; justify-content: center; gap: 0.4rem; margin-top: 0.7rem; }

@media (max-width: 700px) {
  .arm-fighters { grid-template-columns: 1fr; }
  .arm-vs { text-align: center; }
}
