:root {
  --black: #050505;
  --ink: #111111;
  --muted: #6a6a6a;
  --line: #dfdfdf;
  --paper: #ffffff;
  --soft: #f5f5f2;
  --yellow: #ffd400;
  --yellow-dark: #d8aa00;
  --danger: #c92727;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body.modal-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(255, 212, 0, 0.12) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), transparent 340px),
    var(--paper);
  background-size: 56px 56px, auto, auto;
}

.hero {
  min-height: 34vh;
  color: var(--paper);
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.58) 48%, rgba(0, 0, 0, 0.9)),
    url("./assets/hero-house-movement-bw.jpg") center center / cover no-repeat,
    var(--black);
  padding: 28px clamp(18px, 4vw, 64px) 54px;
}

.compact-hero {
  min-height: 30vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  max-width: 1240px;
  margin: 0 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: min(219px, 55vw);
  min-height: 58px;
  padding: 0;
  background: transparent;
  border: 0;
  opacity: 0.94;
}

.brand-mark img {
  width: 100%;
  height: auto;
  display: block;
  filter: invert(1) brightness(1.9) contrast(1.08);
}

.event-pill {
  display: grid;
  gap: 2px;
  text-align: center;
  border: 1px solid rgba(255, 212, 0, 0.72);
  color: var(--yellow);
  padding: 10px 14px;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 800;
  font-size: 0.78rem;
}

.hero-grid {
  max-width: 1240px;
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
}

.hero-events {
  max-width: 760px;
}

.eyebrow,
.section-heading p {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 7.5rem);
  line-height: 0.85;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-text {
  max-width: 620px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.45;
}

.dates-panel {
  display: grid;
  width: min(100%, 500px);
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.events-title {
  color: rgba(255, 212, 0, 0.82);
  font-size: 0.64rem;
  font-weight: 950;
  text-transform: uppercase;
}

.events-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(126px, 1fr);
  gap: 5px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.events-carousel::-webkit-scrollbar {
  display: none;
}

.date-card {
  display: grid;
  min-height: 54px;
  align-content: center;
  gap: 5px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(72, 72, 72, 0.52);
  scroll-snap-align: start;
  cursor: default;
}

.date-card.has-event-photo {
  cursor: pointer;
}

.date-card.has-event-photo:hover,
.date-card.has-event-photo:focus-visible {
  border-color: rgba(255, 212, 0, 0.68);
  background: rgba(92, 92, 92, 0.62);
  outline: none;
}

.date-card span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.date-card strong {
  display: inline-grid;
  place-items: center;
  justify-self: start;
  min-height: 22px;
  border: 1px solid rgba(255, 212, 0, 0.42);
  color: var(--yellow);
  padding: 0 9px;
  font-size: 0.7rem;
}

.date-card em,
.event-photo-link {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 850;
  line-height: 1.15;
  text-decoration: none;
}

.event-photo-link {
  color: var(--yellow);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.event-note,
.event-photo-note {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.62rem;
  font-weight: 750;
  line-height: 1.35;
}

.event-photo-note {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.58rem;
  text-transform: lowercase;
}

.event-photo-modal[hidden] {
  display: none;
}

.event-photo-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}

.event-photo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(7px);
}

.event-photo-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(100%, 520px);
  max-height: calc(100vh - 36px);
  padding: 10px;
  border: 1px solid rgba(255, 212, 0, 0.48);
  background: #050505;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
  overflow: auto;
}

.event-photo-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 42px 2px 2px;
}

.event-photo-dialog-header span,
.event-photo-dialog-header strong {
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.event-photo-dialog-header span {
  color: rgba(255, 255, 255, 0.6);
}

.event-photo-dialog-header strong {
  color: var(--yellow);
}

.event-photo-dialog img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 110px);
  object-fit: contain;
}

.event-photo-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 212, 0, 0.46);
  background: rgba(255, 212, 0, 0.1);
  color: var(--yellow);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.app-nav {
  max-width: 1240px;
  margin: -28px auto 0;
  padding: 0 clamp(18px, 4vw, 64px);
  display: flex;
  gap: 10px;
  overflow-x: auto;
  position: relative;
  z-index: 2;
}

.landing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(14px, 4vw, 28px);
}

.landing-card {
  align-content: start;
}

.landing-copy {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.pricing-card {
  display: grid;
  gap: 4px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--ink);
  background: var(--black);
  color: var(--paper);
}

.pricing-card span,
.pricing-card small {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.pricing-card strong {
  color: var(--yellow);
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  line-height: 0.95;
}

.feature-list {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--ink);
}

.form-hint {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.settings-builder {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fafafa;
}

.settings-builder h3 {
  margin: 0;
  font-size: 0.9rem;
  text-transform: uppercase;
}

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

.settings-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.settings-item span {
  color: var(--muted);
  font-size: 0.8rem;
}

.settings-item button {
  border: 1px solid var(--danger);
  background: transparent;
  color: var(--danger);
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.nav-button {
  flex: 0 0 auto;
  min-height: 48px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 0 18px;
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.12);
}

.nav-button span {
  display: block;
}

.nav-button.active {
  border-color: var(--black);
  background: var(--black);
  color: var(--yellow);
}

.page-section {
  display: none;
  max-width: 1240px;
  margin: 22px auto 0;
  padding: 0 clamp(18px, 4vw, 64px) 58px;
  position: relative;
}

.page-section.active {
  display: block;
}

.page-section.active::after {
  content: "";
  position: absolute;
  top: 18px;
  right: clamp(24px, 5vw, 78px);
  width: 74px;
  height: 28px;
  background: url("./assets/hom-logo.png") center / contain no-repeat;
  filter: grayscale(1);
  opacity: 0.08;
  pointer-events: none;
}

.page-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.single-panel {
  max-width: 520px;
}

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

.entry-panel,
.ranking-panel,
.schedule-register,
.schedule-board,
.guide-panel,
.admin-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.09);
}

.entry-panel,
.schedule-register,
.admin-panel {
  padding: 24px;
  border-top: 8px solid var(--yellow);
}

.ranking-panel,
.guide-panel,
.schedule-board {
  padding: 24px;
}

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

.guide-media-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  gap: 14px;
  margin-bottom: 14px;
}

.guide-media,
.guide-video {
  position: relative;
  min-height: 190px;
  margin: 0;
  overflow: hidden;
  background: var(--black);
  color: var(--paper);
}

.guide-media img,
.guide-video img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  display: block;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}

.guide-media figcaption,
.guide-video span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 9px 10px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--paper);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
}

.guide-video {
  display: block;
  text-decoration: none;
}

.guide-video::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 212, 0, 0.92);
  z-index: 1;
}

.guide-video::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-38%, -50%);
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 20px solid var(--black);
  z-index: 2;
}

.guide-card {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.guide-card + .guide-card,
.guide-grid + .guide-card {
  margin-top: 14px;
}

.guide-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  text-transform: uppercase;
}

.guide-card p,
.guide-list,
.station-list,
.guide-note {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.5;
}

.station-list,
.guide-list {
  margin: 0;
  padding-left: 20px;
}

.station-list li,
.guide-list li {
  margin-bottom: 7px;
}

.guide-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper);
}

.guide-table {
  min-width: 760px;
}

.guide-table td:first-child {
  font-weight: 950;
}

.guide-note {
  margin: 12px 0 0;
  font-size: 0.82rem;
}

.guide-source {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.section-heading h2 {
  margin: 0 0 22px;
  font-size: 1.65rem;
  line-height: 1;
  text-transform: uppercase;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.registration-form {
  display: grid;
  gap: 14px;
}

.portal-panel {
  max-width: 520px;
  margin-inline: auto;
}

.portal-login-form {
  display: grid;
  gap: 14px;
}

.portal-login-form .primary-action {
  width: 100%;
}

.registration-release-card {
  display: grid;
  gap: 9px;
  margin: 0 0 16px;
  padding: 13px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-left: 4px solid var(--yellow);
  background: #111111;
  color: var(--paper);
}

.registration-release-card strong {
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.registration-release-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
  line-height: 1.35;
}

.registration-release-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.registration-release-card li {
  display: grid;
  gap: 3px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.registration-release-card span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.registration-release-card b {
  color: var(--paper);
  font-size: 0.82rem;
  font-weight: 950;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--soft);
  color: var(--ink);
  padding: 0 13px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.55);
}

.primary-action {
  min-height: 52px;
  border: 0;
  background: var(--yellow);
  color: var(--black);
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
}

.primary-action:hover {
  background: var(--yellow-dark);
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.form-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.athlete-gate {
  display: none;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--black);
  color: var(--paper);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.35;
}

.athlete-gate.visible {
  display: block;
}

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

.auth-tab {
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 0 8px;
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-tab.active {
  border-color: var(--black);
  background: var(--black);
  color: var(--yellow);
}

.auth-logout {
  width: 100%;
  margin-top: 12px;
}

.waiver-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--black);
  background: var(--paper);
}

.waiver-box > strong {
  color: var(--black);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.25;
  text-transform: uppercase;
}

.waiver-scroll {
  max-height: 180px;
  overflow: auto;
  padding: 12px;
  background: var(--soft);
  border-left: 5px solid var(--yellow);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.45;
}

.waiver-scroll p {
  margin: 0 0 10px;
}

.waiver-scroll p:last-child {
  margin-bottom: 0;
}

.waiver-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.35;
  text-transform: none;
}

.waiver-check input {
  width: 20px;
  min-height: 20px;
  margin: 1px 0 0;
  accent-color: var(--yellow);
}

.partner-fields {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--black);
  background: var(--soft);
  border-left: 6px solid var(--yellow);
}

.partner-fields[hidden] {
  display: none !important;
}

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

.schedule-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.schedule-tab {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 0 14px;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}

.schedule-tab.active {
  border-color: var(--black);
  background: var(--black);
  color: var(--yellow);
}

.heat-blocks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.heat-block {
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 12px;
}

.heat-block span {
  display: block;
  color: var(--yellow-dark);
  font-size: 0.78rem;
  font-weight: 950;
}

.heat-block strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.35;
}

.heat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.heat-card {
  border: 1px solid var(--line);
  background: var(--paper);
}

.heat-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--black);
  color: var(--paper);
}

.heat-time strong {
  color: var(--yellow);
  font-size: 1rem;
}

.heat-time span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lane-list {
  display: grid;
}

.lane-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
}

.lane-item + .lane-item {
  border-top: 1px solid var(--line);
}

.lane-number {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  background: var(--yellow);
  color: var(--black);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.lane-details {
  min-width: 0;
}

.lane-category,
.lane-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lane-category {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.lane-name {
  margin-top: 3px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
}

.lane-empty {
  color: var(--muted);
}

.lane-remove {
  border: 1px solid var(--danger);
  background: transparent;
  color: var(--danger);
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
}

.ranking-toolbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.admin-box {
  width: min(100%, 520px);
  display: grid;
  gap: 8px;
}

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

.admin-login input {
  min-height: 40px;
  background: var(--paper);
}

.admin-login button,
.admin-session button {
  min-height: 40px;
  border: 1px solid var(--black);
  background: var(--black);
  color: var(--paper);
  padding: 0 14px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

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

.admin-session span {
  color: var(--black);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
}

.admin-menu {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.admin-menu-button {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 0 13px;
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
}

.admin-menu-button.active {
  border-color: var(--black);
  background: var(--black);
  color: var(--yellow);
}

.admin-edit-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.admin-edit-actions {
  display: flex;
  gap: 10px;
  align-items: end;
}

.athlete-detail-form {
  grid-template-columns: 1fr;
}

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

.admin-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: var(--black);
  color: var(--paper);
}

.admin-detail-head span {
  display: block;
  color: var(--yellow);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-detail-head strong {
  display: block;
  margin-top: 4px;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.admin-detail-head p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 750;
}

.athlete-waiver-panel {
  display: grid;
  gap: 10px;
  padding-top: 8px;
}

.compact-heading h2 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

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

.admin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.admin-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1rem;
}

.admin-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

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

.master-note {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  padding: 13px;
  border-left: 4px solid var(--yellow);
  background: #111111;
  color: var(--paper);
}

.master-note strong {
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.master-note p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
  line-height: 1.35;
}

.master-note b {
  color: var(--paper);
}

.compact-action {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.72rem;
}

.document-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--black);
  background: var(--black);
  color: var(--yellow);
  padding: 0 12px;
  font-size: 0.72rem;
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.report-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.secondary-action {
  min-height: 52px;
  border: 1px solid var(--black);
  background: var(--paper);
  color: var(--black);
  padding: 0 14px;
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
}

.filter-board {
  display: grid;
  gap: 12px;
  margin: 4px 0 18px;
}

.filter-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.filter-row > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.filter-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 1px 8px;
  scrollbar-width: thin;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 0 14px;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}

.filter-chip.active {
  border-color: var(--black);
  background: var(--black);
  color: var(--yellow);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--black);
  margin-bottom: 18px;
}

.stats-strip div {
  padding: 14px;
  background: var(--black);
  color: var(--paper);
}

.stats-strip div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.stats-strip span {
  display: block;
  color: var(--yellow);
  font-size: 1.55rem;
  font-weight: 950;
}

.stats-strip p {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 850;
}

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

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  background: var(--soft);
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

td {
  font-weight: 750;
}

.rank-number {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--black);
  color: var(--yellow);
  font-weight: 950;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  background: var(--yellow);
  color: var(--black);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.delete-button,
.edit-button {
  border: 1px solid var(--danger);
  background: transparent;
  color: var(--danger);
  padding: 8px 10px;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.edit-button {
  border-color: var(--black);
  color: var(--black);
  margin-right: 8px;
}

.locked-cell {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.empty-state {
  display: none;
  margin-top: 14px;
  padding: 18px;
  background: var(--soft);
  color: var(--muted);
  font-weight: 800;
}

.empty-state.visible {
  display: block;
}

.app-footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px clamp(18px, 4vw, 64px) 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.app-footer a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--yellow);
}

@media (max-width: 960px) {
  .hero-grid,
  .page-grid,
  .landing-layout,
  .admin-edit-form {
    grid-template-columns: 1fr;
  }

  .ranking-toolbar {
    display: grid;
  }

  .schedule-topline {
    display: grid;
  }

  .admin-box {
    width: 100%;
  }

  .admin-status {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .hero {
    min-height: auto;
    padding-bottom: 42px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-mark {
    width: 110px;
  }

  .hero-grid {
    margin-top: 34px;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 22vw, 5rem);
  }

  .stats-strip {
    grid-template-columns: 1fr;
  }

  .heat-blocks,
  .heat-grid {
    grid-template-columns: 1fr;
  }

  .settings-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-login,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .stats-strip div + div {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
  }
}

/* Mobile app experience */
@media (max-width: 760px) {
  html {
    background: var(--black);
  }

  body {
    background: var(--black);
    -webkit-tap-highlight-color: transparent;
  }

  .app-shell {
    width: 100%;
    max-width: 480px;
    min-height: 100dvh;
    margin: 0 auto;
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
    background: var(--paper);
    background-size: 44px 44px, auto, auto;
  }

  .hero,
  .compact-hero {
    min-height: 0;
    padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
    background-position: center center;
  }

  .topbar {
    align-items: center;
    gap: 8px;
  }

  .brand-mark {
    width: 143px;
    min-height: 36px;
  }

  .event-pill {
    padding: 7px 10px;
    font-size: 0.66rem;
  }

  .hero-grid {
    display: grid;
    margin-top: 14px;
  }

  .eyebrow {
    margin-bottom: 7px;
    font-size: 0.66rem;
  }

  .hero h1 {
    font-size: 2.25rem;
    line-height: 0.9;
  }

  .hero-text {
    display: none;
  }

  .dates-panel {
    gap: 5px;
    margin-top: 0;
    padding: 0;
    border-left-width: 1px;
    background: transparent;
  }

  .events-carousel {
    grid-auto-columns: minmax(112px, 58%);
    gap: 5px;
  }

  .date-card {
    gap: 4px;
    min-height: 52px;
    padding: 8px 9px;
    background: rgba(72, 72, 72, 0.54);
  }

  .events-title {
    margin-bottom: 2px;
    font-size: 0.58rem;
  }

  .date-card span {
    font-size: 0.52rem;
    line-height: 1.1;
  }

  .date-card strong {
    min-height: 22px;
    padding: 0 6px;
    font-size: 0.64rem;
    white-space: nowrap;
  }

  .date-card em,
  .event-photo-link {
    font-size: 0.5rem;
  }

  .event-note {
    margin-top: 4px;
    font-size: 0.54rem;
    line-height: 1.25;
  }

  .event-photo-dialog {
    width: min(100%, 390px);
    max-height: calc(100dvh - 24px);
  }

  .event-photo-dialog img {
    max-height: calc(100dvh - 96px);
  }

  .app-nav {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 0;
    z-index: 20;
    width: 100%;
    max-width: 480px;
    margin: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.16);
    overflow: visible;
  }

  .nav-button {
    min-height: 48px;
    padding: 0 3px;
    font-size: 0.48rem;
    line-height: 1.05;
    white-space: normal;
    box-shadow: none;
    overflow: hidden;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .nav-button[data-page-target="resultados"] {
    font-size: 0.46rem;
    line-height: 1;
  }

  .page-section {
    margin-top: 0;
    padding: 14px 12px 24px;
  }

  .page-grid,
  .admin-layout {
    gap: 12px;
  }

  .single-panel {
    max-width: none;
  }

  .entry-panel,
  .ranking-panel,
  .schedule-register,
  .schedule-board,
  .guide-panel,
  .admin-panel {
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  .entry-panel,
  .schedule-register,
  .admin-panel,
  .ranking-panel,
  .guide-panel,
  .schedule-board {
    padding: 16px;
  }

  .page-section.active::after {
    top: 22px;
    right: 22px;
    width: 54px;
    height: 22px;
    opacity: 0.07;
  }

  .guide-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .guide-media-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .guide-media,
  .guide-video,
  .guide-media img,
  .guide-video img {
    min-height: 170px;
  }

  .guide-card {
    padding: 14px;
  }

  .guide-table {
    min-width: 660px;
  }

  .app-footer {
    padding: 18px 16px calc(104px + env(safe-area-inset-bottom));
    font-size: 0.68rem;
  }

  .section-heading h2 {
    margin-bottom: 16px;
    font-size: 1.32rem;
  }

  label {
    font-size: 0.72rem;
  }

  input,
  select,
  .primary-action,
  .secondary-action {
    min-height: 52px;
    font-size: 16px;
  }

  .schedule-topline,
  .ranking-toolbar {
    gap: 8px;
    margin-bottom: 10px;
  }

  .schedule-tabs,
  .filter-carousel {
    margin-left: -2px;
    margin-right: -2px;
    padding-bottom: 6px;
  }

  .schedule-tab,
  .filter-chip {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.68rem;
  }

  .heat-blocks,
  .heat-grid,
  .stats-strip,
  .admin-login,
  .admin-edit-form,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .heat-grid {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .heat-card {
    border-radius: 0;
  }

  .lane-item {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    padding: 10px;
  }

  .lane-category {
    font-size: 0.66rem;
  }

  .lane-name {
    font-size: 0.88rem;
  }

  .filter-board {
    gap: 10px;
  }

  .filter-row {
    gap: 5px;
  }

  .stats-strip {
    border: 0;
    gap: 6px;
  }

  .stats-strip div {
    padding: 12px;
  }

  .table-wrap {
    margin-left: -16px;
    margin-right: -16px;
    border-left: 0;
    border-right: 0;
  }

  table {
    min-width: 560px;
  }

  th,
  td {
    padding: 12px 10px;
  }

  .admin-edit-form {
    margin-left: -16px;
    margin-right: -16px;
    padding: 14px;
  }

  .admin-edit-actions {
    display: grid;
  }

  .edit-button,
  .delete-button {
    min-height: 34px;
  }

  [data-page="admin"] .admin-layout {
    gap: 12px;
  }

  [data-page="admin"] .admin-panel {
    padding: 14px;
    border-top-width: 5px;
  }

  [data-page="admin"] .section-heading h2 {
    font-size: 1.16rem;
  }

  [data-page="admin"] .table-wrap {
    display: none;
  }

  [data-page="admin"] .admin-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    background: var(--soft);
  }

  [data-page="admin"] .admin-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  [data-page="admin"] .edit-button,
  [data-page="admin"] .delete-button {
    width: 100%;
    min-height: 42px;
    margin-right: 0;
  }

  [data-page="admin"] .admin-edit-form {
    margin-left: 0;
    margin-right: 0;
    padding: 12px;
    border: 0;
  }

  [data-page="admin"] .admin-login {
    gap: 8px;
  }

  [data-page="admin"] .admin-menu {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  [data-page="admin"] .admin-menu-button {
    min-height: 42px;
    padding: 0 6px;
    font-size: 0.54rem;
  }

  [data-page="admin"] .admin-edit-grid {
    grid-template-columns: 1fr;
  }

  [data-page="admin"] .admin-detail-head {
    display: grid;
  }

  [data-page="admin"] .report-controls {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
