:root {
  --ink: #111713;
  --muted: #64706a;
  --line: #111713;
  --green: #c7f23b;
  --cream: #f4efe4;
  --panel: #ffffff;
  --red: #df3528;
}

.status-ok {
  color: #167534;
  font-weight: 900;
}

.status-pill {
  border: 2px solid currentColor;
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 5px 8px;
}

.status-published { color: #167534; }
.status-locked { color: #b35c00; }
.status-retired { color: #68706c; }

.consent-record {
  align-items: center;
  border-top: 2px solid #dfe5e1;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 16px 0;
}

.consent-record span:not(.status-ok) {
  color: var(--muted);
}

.route-page .topbar {
  display: none;
}

.route-page .route-banner {
  margin-bottom: 24px;
}

.route-page .route-hero h1 span {
  color: var(--kl-orange);
}

.route-version {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 22px 0;
}

.route-version div {
  background: #161513;
  border-left: 6px solid var(--kl-orange);
  color: #f8f3e7;
  padding: 16px;
}

.route-version span,
.route-version strong {
  display: block;
}

.route-version span {
  color: #b9b09f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.route-version strong {
  font-size: 20px;
  margin-top: 6px;
}

.route-check {
  align-items: center;
  background: #f8f3e7;
  border: 3px solid var(--kl-orange);
  color: #121212 !important;
  display: flex !important;
  gap: 14px;
  letter-spacing: 0 !important;
  padding: 16px;
  text-transform: none !important;
}

.klayapan-page .route-check input {
  flex: 0 0 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  width: 28px;
}

.route-check span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.notice.warning {
  background: #fff0bd;
  border-color: #b35c00;
}

@media (max-width: 720px) {
  .route-version {
    grid-template-columns: 1fr;
  }

  .consent-record {
    align-items: stretch;
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eef4ef;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

.danger-button {
  background: #df3528;
  border-color: #111713;
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: #101816;
  color: white;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 48px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand span {
  color: var(--green);
  display: block;
  font-size: 12px;
  letter-spacing: 2px;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.topbar nav a {
  border: 2px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  padding: 8px 10px;
}

.topbar nav a.active,
.topbar nav a:hover {
  border-color: var(--green);
  color: var(--green);
}

.page {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(18px, 4vw, 44px);
}

.panel,
.card {
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: 8px 8px 0 #113f32;
  margin-bottom: 28px;
  padding: clamp(18px, 4vw, 32px);
}

h1,
h2,
h3 {
  line-height: 1;
  margin: 0 0 18px;
}

h1 {
  font-size: clamp(38px, 7vw, 74px);
  font-weight: 900;
}

h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.eyebrow {
  color: var(--red);
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
}

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

.stat {
  background: #f7faf7;
  border: 2px solid #d8e0db;
  border-radius: 8px;
  padding: 18px;
}

.stat strong {
  display: block;
  font-size: 36px;
  font-weight: 900;
}

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  font-size: 14px;
  font-weight: 900;
  gap: 7px;
  text-transform: uppercase;
}

input,
select,
textarea,
button,
.button {
  border: 3px solid var(--line);
  border-radius: 6px;
  font: inherit;
  min-height: 48px;
  padding: 10px 12px;
}

button,
.button {
  background: var(--green);
  box-shadow: 5px 5px 0 var(--line);
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  text-align: center;
}

.button.secondary,
button.secondary {
  background: white;
}

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

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  border-bottom: 1px solid #dbe2de;
  padding: 13px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

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

.notice {
  background: #e7f9dc;
  border: 2px solid #85b76d;
  border-radius: 6px;
  color: #155b2b;
  font-weight: 800;
  padding: 14px 16px;
}

.lead {
  color: var(--muted);
  font-size: clamp(18px, 2.5vw, 24px);
  max-width: 760px;
}

.registration-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 24px;
}

.registration-summary div {
  background: #f2f7f3;
  border: 2px solid #d6dfd9;
  border-radius: 8px;
  padding: 16px;
}

.registration-summary span,
.registration-summary strong {
  display: block;
}

.registration-summary strong {
  font-size: clamp(24px, 5vw, 40px);
}

.public-registration-form {
  max-width: 720px;
}

.bib-print-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.bib-print-card {
  background: #050505;
  border: 3px solid #f4f4f4;
  color: #fff;
  padding: 14px;
  text-align: center;
}

.bib-print-card p,
.bib-print-card small {
  display: block;
  font-weight: 900;
  margin: 0;
}

.bib-print-card strong {
  display: block;
  font-size: 46px;
  line-height: 1;
  margin: 8px 0;
}

.bib-print-card img {
  display: block;
  margin: 0 auto 8px;
  max-width: 150px;
  width: 100%;
}

.bib-download {
  background: var(--green);
  border: 2px solid #f4f4f4;
  color: #101010;
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-top: 10px;
  padding: 8px 6px;
  text-transform: uppercase;
}

.error {
  background: #ffe0dc;
  border: 2px solid #d33;
  color: #8c1c13;
}

.scan-box {
  background: #0f1514;
  border: 3px solid var(--line);
  border-radius: 8px;
  min-height: 280px;
  overflow: hidden;
}

video {
  display: block;
  min-height: 280px;
  object-fit: cover;
  width: 100%;
}

.qr-card {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 180px 1fr;
}

.qr-card img {
  border: 2px solid var(--line);
  max-width: 180px;
  width: 100%;
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar nav {
    justify-content: flex-start;
  }

  .panel,
  .card {
    box-shadow: 5px 5px 0 #113f32;
  }

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

  .registration-summary {
    grid-template-columns: 1fr;
  }
}

/* Public live race board */
.live-race-page {
  --live-orange: #f5a900;
  --live-red: #c82b16;
  --live-cream: #f7f0e2;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 11px),
    #080808;
  color: var(--live-cream);
}

.live-race-page .topbar {
  display: none;
}

.live-race-page .page {
  max-width: 1500px;
  padding: clamp(14px, 2.5vw, 34px);
}

.live-masthead {
  background: #000;
  border: 3px solid var(--live-orange);
  display: grid;
  grid-template-columns: minmax(320px, 1.35fr) minmax(300px, .65fr);
  margin-bottom: 18px;
  min-height: 220px;
  overflow: hidden;
  position: relative;
}

.live-masthead img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.live-masthead-copy {
  align-content: center;
  background: linear-gradient(120deg, #19110d, #080808);
  display: grid;
  padding: clamp(20px, 4vw, 48px);
  position: relative;
}

.live-masthead-copy::before {
  background: var(--live-orange);
  content: "";
  height: 140%;
  left: -3px;
  position: absolute;
  top: -20%;
  transform: skewX(-8deg);
  width: 6px;
}

.live-masthead-copy p {
  color: var(--live-orange);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 3px;
  margin: 14px 0 8px;
  text-transform: uppercase;
}

.live-masthead-copy h1 {
  font-size: clamp(42px, 6vw, 82px);
  letter-spacing: -3px;
  margin: 0;
  text-transform: uppercase;
}

.live-masthead-copy h1 span {
  color: var(--live-orange);
  text-shadow: 4px 4px 0 var(--live-red);
}

.live-badge {
  align-items: center;
  color: white;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  gap: 8px;
  letter-spacing: 2px;
}

.live-badge i {
  animation: live-pulse 1.2s infinite;
  background: #ff3425;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(255,52,37,.18);
  height: 10px;
  width: 10px;
}

@keyframes live-pulse { 50% { opacity: .35; transform: scale(.78); } }

.live-toolbar {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 18px;
}

.live-toolbar > div {
  background: #171717;
  border: 2px solid #3c352c;
  padding: 13px 16px;
}

.live-toolbar span,
.live-toolbar strong {
  display: block;
}

.live-toolbar span {
  color: #9e9689;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.live-toolbar strong {
  color: var(--live-orange);
  font-size: clamp(19px, 2.4vw, 30px);
  line-height: 1.1;
  margin-top: 4px;
}

.live-refresh strong {
  color: var(--live-cream);
}

.race-screen-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.race-screen-nav a {
  background: #171717;
  border: 2px solid #4a4135;
  color: #aca397;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 11px 16px;
  text-transform: uppercase;
}

.race-screen-nav a.active,
.race-screen-nav a:hover {
  background: var(--live-orange);
  border-color: var(--live-orange);
  color: #080808;
}

.live-board {
  background: #111;
  border: 3px solid var(--live-orange);
  box-shadow: 8px 8px 0 var(--live-red);
  padding: clamp(14px, 2.5vw, 28px);
}

.live-board-title {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.live-board-title p {
  color: var(--live-orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  margin: 0 0 5px;
  text-transform: uppercase;
}

.live-board-title h2 {
  font-size: clamp(28px, 4vw, 50px);
  margin: 0;
  text-transform: uppercase;
}

.live-board-title > span {
  background: var(--live-orange);
  color: #080808;
  font-weight: 900;
  padding: 8px 12px;
  text-transform: uppercase;
}

.live-table {
  min-width: 980px;
}

.live-table th {
  background: #211b15;
  border-bottom: 2px solid var(--live-orange);
  color: var(--live-orange);
}

.live-table td {
  border-bottom-color: #342e27;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.live-table tr.is-finished td {
  background: rgba(245,169,0,.08);
}

.live-position {
  color: var(--live-orange);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
  width: 62px;
}

.live-rider strong {
  color: var(--live-orange);
  display: inline-block;
  font-size: 26px;
  margin-right: 12px;
}

.live-rider span {
  font-size: 17px;
  font-weight: 800;
}

.live-cp {
  background: #2a251e;
  border: 1px solid #544b3e;
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 8px;
  text-transform: uppercase;
}

.is-finished .live-cp {
  background: var(--live-orange);
  color: #090909;
}

.live-duration {
  color: var(--live-orange);
  font-size: 19px;
  font-weight: 900;
}

.live-empty {
  border: 2px dashed #544b3e;
  color: #aaa196;
  font-size: 18px;
  padding: 50px 20px;
  text-align: center;
}

.live-footer {
  align-items: center;
  color: #928b81;
  display: flex;
  font-size: 11px;
  justify-content: space-between;
  letter-spacing: 2px;
  padding: 24px 4px 10px;
}

.live-footer strong {
  color: var(--live-orange);
}

/* Full-HD compact race screen: 101 riders without manual scrolling */
.live-race-page .page {
  max-width: none;
}

.compact-masthead {
  display: block;
  height: 150px;
  min-height: 150px;
}

.compact-masthead img {
  display: block;
  height: 100%;
  margin: 0 auto;
  max-width: 100%;
  min-width: 0;
  object-fit: contain;
  object-position: center;
  width: 100%;
}

.compact-masthead .live-masthead-copy {
  display: none;
}

.compact-masthead .live-masthead-copy p {
  font-size: 10px;
  margin: 6px 0 3px;
}

.compact-masthead .live-masthead-copy h1 {
  font-size: clamp(24px, 2.7vw, 42px);
  letter-spacing: -1px;
  white-space: nowrap;
}

.live-toolbar-all {
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  margin-bottom: 8px;
}

.live-toolbar-all > div {
  padding: 7px 10px;
}

.live-toolbar-all span {
  font-size: 9px;
}

.live-toolbar-all strong {
  font-size: clamp(16px, 1.7vw, 23px);
  margin-top: 1px;
}

.live-race-page .race-screen-nav {
  gap: 6px;
  margin-bottom: 8px;
}

.live-race-page .race-screen-nav a {
  font-size: 10px;
  padding: 7px 12px;
}

.live-race-page .live-board {
  box-shadow: none;
  padding: 9px 12px 12px;
}

.compact-board-title {
  margin-bottom: 7px;
}

.compact-board-title p {
  font-size: 8px;
  margin-bottom: 1px;
}

.compact-board-title h2 {
  font-size: clamp(20px, 2.2vw, 30px);
}

.compact-board-title > span {
  font-size: 10px;
  padding: 5px 8px;
}

.compact-standings {
  display: grid;
  gap: 3px 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.compact-rider {
  align-items: center;
  background: #191919;
  border-left: 3px solid #51483c;
  display: grid;
  font-variant-numeric: tabular-nums;
  gap: 5px;
  grid-template-columns: 22px 38px minmax(0, 1fr) 42px 54px;
  min-height: 22px;
  padding: 2px 5px;
}

.compact-rider.is-finished {
  background: rgba(245,169,0,.11);
  border-left-color: var(--live-orange);
}

.compact-position {
  color: var(--live-orange);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.compact-bib {
  color: var(--live-orange);
  font-size: 12px;
}

.compact-name {
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.compact-cp {
  background: #34302a;
  color: #d4cec4;
  font-size: 9px;
  font-weight: 1000;
  padding: 3px 2px;
  text-align: center;
  text-transform: uppercase;
}

.compact-cp.cp-cp1 { background: #d7b400; color: #090909; }
.compact-cp.cp-cp2 { background: #ec7a18; color: #090909; }
.compact-cp.cp-cp3 { background: #d73b25; color: #fff; }
.compact-cp.cp-finish { background: #49b765; color: #07170b; }

.compact-rider time {
  color: #ded7ca;
  font-size: 9px;
  font-weight: 800;
  text-align: right;
}

@media (min-width: 1000px) {
  .live-race-page .page {
    padding: 10px 18px;
  }

  .live-race-page .live-footer {
    display: none;
  }
}

.checkpoint-live-section {
  margin-top: 34px;
}

.checkpoint-live-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.checkpoint-live-card {
  background: #111;
  border: 2px solid #4b4236;
  min-width: 0;
}

.checkpoint-live-card header {
  align-items: center;
  background: #201a14;
  border-bottom: 2px solid var(--live-orange);
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.checkpoint-live-card header span {
  color: var(--live-orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
}

.checkpoint-live-card h3 {
  font-size: 22px;
  margin: 3px 0 0;
  text-transform: uppercase;
}

.checkpoint-live-card header > strong {
  color: var(--live-orange);
  font-size: 34px;
}

.checkpoint-live-card ol {
  list-style: none;
  margin: 0;
  max-height: 420px;
  overflow-y: auto;
  padding: 0;
}

.checkpoint-live-card li {
  align-items: center;
  border-bottom: 1px solid #322c25;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px 52px 1fr auto;
  padding: 11px 14px;
}

.checkpoint-live-card li em {
  color: #81786d;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.checkpoint-live-card li b {
  color: var(--live-orange);
  font-size: 18px;
}

.checkpoint-live-card li span {
  font-weight: 800;
}

.checkpoint-live-card time {
  color: #afa69a;
  font-variant-numeric: tabular-nums;
}

.checkpoint-empty {
  color: #8f887e;
  margin: 0;
  padding: 28px 16px;
  text-align: center;
}

.arrival-masthead {
  align-items: stretch;
  background: #111;
  border: 3px solid var(--live-orange);
  display: block;
  height: 150px;
  margin-bottom: 8px;
  overflow: hidden;
  position: relative;
}

.arrival-masthead img {
  display: block;
  height: 100%;
  margin: 0 auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  width: 100%;
}

.arrival-live-label {
  background: rgba(10,10,10,.9);
  border-left: 4px solid var(--live-orange);
  bottom: 8px;
  left: 8px;
  padding: 7px 10px;
  position: absolute;
}

.arrival-toolbar {
  grid-template-columns: repeat(3, 1fr);
}

.arrival-page-section {
  background: #111;
  border: 3px solid var(--live-orange);
  box-shadow: none;
  padding: clamp(14px, 2.5vw, 28px);
}

@media (max-width: 760px) {
  .live-race-page .page {
    overflow-x: hidden;
    padding: 10px;
  }

  .live-masthead {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .live-masthead img {
    aspect-ratio: 1600/650;
    object-fit: contain;
  }

  .live-masthead-copy {
    padding: 12px 16px;
  }

  .live-masthead-copy::before {
    height: 5px;
    left: 0;
    top: 0;
    transform: none;
    width: 100%;
  }

  .live-masthead-copy h1 {
    display: none;
  }

  .live-masthead-copy p {
    display: none;
  }

  .live-toolbar {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .compact-rider {
    grid-template-columns: 28px 46px minmax(0, 1fr) 48px 62px;
    min-height: 34px;
  }

  .race-screen-nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .race-screen-nav a {
    text-align: center;
  }

  .live-toolbar > div:first-child {
    grid-column: 1 / -1;
  }

  .live-board {
    box-shadow: none;
    padding: 14px;
  }

  .live-board-title {
    align-items: flex-start;
    gap: 12px;
  }

  .live-board-title > span {
    font-size: 11px;
    white-space: nowrap;
  }

  .live-table-wrap {
    overflow: visible;
  }

  .live-table,
  .live-table tbody,
  .live-table tr,
  .live-table td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .live-table thead {
    display: none;
  }

  .live-table tr {
    background: #191919;
    border: 2px solid #3f382e;
    margin-bottom: 12px;
    padding: 12px;
  }

  .live-table tr.is-finished {
    border-color: var(--live-orange);
  }

  .live-table td {
    align-items: center;
    border: 0;
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    text-align: right;
  }

  .live-table td::before {
    color: #91897e;
    content: attr(data-label);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
  }

  .live-position {
    color: var(--live-orange);
    font-size: 22px;
  }

  .live-rider {
    align-items: flex-end !important;
    flex-direction: column;
  }

  .live-rider::before {
    align-self: flex-start;
  }

  .live-rider strong {
    font-size: 25px;
    margin: 0;
  }

  .live-rider span {
    font-size: 15px;
  }

  .live-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .checkpoint-live-grid {
    grid-template-columns: 1fr;
  }

  .checkpoint-live-card li {
    grid-template-columns: 24px 48px 1fr;
  }

  .checkpoint-live-card time {
    grid-column: 3;
  }

  .arrival-masthead {
    height: 120px;
  }

  .arrival-masthead img {
    height: 100%;
    object-fit: contain;
    width: 100%;
  }

  .arrival-toolbar {
    grid-template-columns: repeat(3, 1fr);
  }

  .arrival-toolbar > div:first-child {
    grid-column: auto;
  }

  .arrival-toolbar > div {
    padding: 10px 8px;
  }

  .arrival-toolbar strong {
    font-size: 17px;
  }

  .arrival-toolbar span {
    font-size: 8px;
    letter-spacing: .5px;
  }

  .arrival-live-label {
    padding: 8px 10px;
  }
}

/* Race pack collection */
.racepack-hero h1 {
  font-size: clamp(38px, 6vw, 68px);
}

.racepack-stats {
  margin-top: 22px;
}

.racepack-layout {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
}

.racepack-camera {
  margin-top: 18px;
  min-height: 180px;
}

.racepack-result-panel {
  align-self: start;
}

.racepack-empty {
  border: 2px dashed #bcc8c1;
  border-radius: 8px;
  color: #66736c;
  padding: 42px 20px;
  text-align: center;
}

.racepack-result {
  background: #101816;
  border: 4px solid var(--green);
  border-radius: 10px;
  color: #fff;
  padding: 24px;
  text-align: center;
}

.racepack-result-label {
  color: var(--green);
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.racepack-result > strong {
  color: var(--green);
  display: block;
  font-size: clamp(58px, 9vw, 100px);
  line-height: 1;
  margin: 10px 0;
}

.racepack-result h3 {
  font-size: clamp(24px, 3vw, 38px);
  margin-bottom: 8px;
}

.racepack-result button {
  margin-top: 18px;
  width: 100%;
}

.racepack-history-title {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.racepack-history-title h2 {
  margin-bottom: 0;
}

.racepack-undo {
  min-height: 36px;
  padding: 5px 9px;
}

@media (max-width: 820px) {
  .racepack-layout {
    gap: 0;
    grid-template-columns: 1fr;
  }

  .racepack-history-title {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  .topbar,
  .no-print {
    display: none !important;
  }

  body,
  .page {
    background: white;
    margin: 0;
    max-width: none;
    padding: 0;
  }

  .bib-print-grid {
    gap: 6mm;
    grid-template-columns: repeat(3, 1fr);
  }

  .bib-print-card {
    border-color: #111;
    break-inside: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* Klayapan x Kustomfest registration theme */
.klayapan-page {
  --kl-orange: #f5a900;
  --kl-red: #c82b16;
  --kl-yellow: #ffd23a;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 10px),
    #070707;
  color: #f8f3e7;
}

.klayapan-page .topbar {
  display: none;
}

.klayapan-page .brand span,
.klayapan-page .topbar nav a.active,
.klayapan-page .topbar nav a:hover {
  color: var(--kl-orange);
}

.klayapan-page .topbar nav a.active,
.klayapan-page .topbar nav a:hover {
  border-color: var(--kl-orange);
}

.klayapan-page .page {
  max-width: 1040px;
}

.klayapan-banner {
  background: #000;
  border: 4px solid var(--kl-orange);
  box-shadow: 10px 10px 0 var(--kl-red);
  height: clamp(190px, 40vw, 400px);
  margin-bottom: 36px;
  overflow: hidden;
  position: relative;
}

.klayapan-banner::after {
  background: linear-gradient(180deg, transparent 68%, rgba(0,0,0,.75));
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.klayapan-banner img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.klayapan-page .panel {
  background: #111;
  border-color: var(--kl-orange);
  border-radius: 0;
  box-shadow: 10px 10px 0 var(--kl-red);
  color: #f8f3e7;
}

.klayapan-page .registration-hero {
  background:
    linear-gradient(115deg, rgba(200,43,22,.2), transparent 55%),
    #111;
  overflow: hidden;
  position: relative;
}

.klayapan-page .registration-hero::after {
  color: rgba(245,169,0,.1);
  content: "100";
  font-size: clamp(130px, 25vw, 300px);
  font-weight: 900;
  line-height: .7;
  position: absolute;
  right: -20px;
  top: 25px;
  transform: rotate(-8deg);
}

.klayapan-page .registration-hero > * {
  position: relative;
  z-index: 1;
}

.klayapan-page .eyebrow {
  color: var(--kl-orange);
}

.klayapan-page h1 {
  font-size: clamp(42px, 8vw, 86px);
  letter-spacing: -3px;
  text-transform: uppercase;
}

.klayapan-page h1 span {
  color: var(--kl-orange);
  text-shadow: 4px 4px 0 var(--kl-red);
}

.klayapan-page .lead,
.klayapan-page .muted {
  color: #c8c1b4;
}

.klayapan-page .registration-summary div {
  background: #1d1d1d;
  border-color: #4a4031;
  border-radius: 0;
  position: relative;
}

.klayapan-page .registration-summary div::before {
  background: var(--kl-orange);
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 7px;
}

.klayapan-page .registration-summary span {
  color: #b9b09f;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.klayapan-page .registration-summary strong {
  color: var(--kl-yellow);
}

.klayapan-page label {
  color: var(--kl-orange);
  font-size: 15px;
  letter-spacing: 1px;
}

.klayapan-page input,
.klayapan-page select {
  background: #f8f3e7;
  border-color: var(--kl-orange);
  border-radius: 0;
  color: #101010;
  min-height: 58px;
}

.klayapan-page button,
.klayapan-page .button {
  background: var(--kl-orange);
  border-color: #f8f3e7;
  border-radius: 0;
  box-shadow: 6px 6px 0 var(--kl-red);
  color: #080808;
  min-height: 58px;
  text-transform: uppercase;
}

.klayapan-page button:hover,
.klayapan-page .button:hover {
  background: var(--kl-yellow);
  transform: translate(-2px, -2px);
}

.klayapan-page .button.secondary {
  background: #f8f3e7;
}

.klayapan-page .notice {
  border-radius: 0;
}

/* Klayapan public homepage */
.klayapan-home .page {
  max-width: 1180px;
}

.klayapan-home .home-banner {
  height: auto;
  margin-bottom: 28px;
}

.klayapan-home .home-banner img {
  height: auto;
  object-fit: contain;
}

.klayapan-home .home-hero {
  background:
    linear-gradient(115deg, rgba(200,43,22,.2), transparent 58%),
    #111;
  overflow: hidden;
  position: relative;
}

.klayapan-home .home-hero::after {
  color: rgba(245,169,0,.08);
  content: "100 KM";
  font-size: clamp(80px, 18vw, 210px);
  font-weight: 1000;
  line-height: .8;
  position: absolute;
  right: -18px;
  top: 34px;
  transform: rotate(-7deg);
}

.klayapan-home .home-hero > * {
  position: relative;
  z-index: 1;
}

.rider-name-heading {
  align-items: end;
  border-bottom: 3px solid var(--kl-orange);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
}

.rider-name-heading .eyebrow,
.rider-name-heading h2 {
  margin-bottom: 0;
}

.rider-name-heading h2 {
  font-size: clamp(32px, 5vw, 54px);
  text-transform: uppercase;
}

.rider-count {
  background: var(--kl-orange);
  color: #080808;
  font-size: 16px;
  padding: 10px 14px;
  text-transform: uppercase;
  white-space: nowrap;
}

.rider-name-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.rider-name-list li {
  align-items: center;
  background: #1b1a18;
  border: 1px solid #4a4031;
  display: flex;
  gap: 14px;
  min-width: 0;
  padding: 16px;
}

.rider-name-list li span {
  font-size: 19px;
  font-weight: 900;
  min-width: 0;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.rider-bib {
  background: var(--kl-orange);
  color: #080808;
  flex: 0 0 auto;
  font-size: 13px;
  letter-spacing: .5px;
  padding: 6px 8px;
  white-space: nowrap;
}

.rider-empty {
  background: #1b1a18;
  border-left: 7px solid var(--kl-orange);
  display: grid;
  gap: 4px;
  padding: 22px;
}

.rider-empty span {
  color: #c8c1b4;
}

@media (max-width: 640px) {
  .klayapan-home .page {
    padding: 14px;
  }

  .klayapan-home .home-banner {
    border-width: 3px;
    box-shadow: 6px 6px 0 var(--kl-red);
    margin-bottom: 20px;
  }

  .klayapan-home .panel {
    box-shadow: 6px 6px 0 var(--kl-red);
    padding: 20px;
  }

  .klayapan-home h1 {
    font-size: clamp(38px, 13vw, 58px);
    letter-spacing: -2px;
    line-height: .94;
  }

  .klayapan-home .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .klayapan-home .actions .button {
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .rider-name-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .rider-name-list {
    grid-template-columns: 1fr;
  }

  .rider-name-list li {
    padding: 14px;
  }

  .rider-name-list li span {
    font-size: 17px;
  }
}

.consent-open {
  overflow: hidden;
}

.consent-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 1000;
}

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

.consent-backdrop {
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,.82);
  inset: 0;
  position: absolute;
}

.consent-dialog {
  background: #f7f5f0;
  border: 5px solid #494949;
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0,0,0,.65);
  color: #121212;
  max-height: calc(100vh - 36px);
  max-width: 760px;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  width: 100%;
  z-index: 1;
}

.consent-close {
  align-items: center;
  background: #333;
  border-radius: 50%;
  color: white;
  display: flex;
  font-size: 42px;
  font-weight: 400;
  height: 58px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 58px;
  z-index: 2;
}

.consent-banner {
  background: #000;
  display: block;
  height: auto;
  width: 100%;
}

.consent-mandatory {
  background: #f8b609;
  color: #050505;
  font-size: clamp(26px, 5vw, 44px);
  font-weight: 1000;
  letter-spacing: 8px;
  padding: 8px 14px;
  text-align: center;
  text-transform: uppercase;
}

.consent-content {
  padding: clamp(20px, 4vw, 38px);
  text-align: center;
}

.consent-content h2 {
  font-size: clamp(27px, 4vw, 40px);
  margin-bottom: 18px;
  text-transform: uppercase;
}

.consent-content p {
  font-size: clamp(15px, 2.2vw, 19px);
  line-height: 1.55;
  margin: 0 auto 13px;
  max-width: 650px;
}

.consent-ride {
  background: #ffc514;
  color: #050505;
  font-size: clamp(27px, 5vw, 48px);
  font-style: italic;
  font-weight: 1000;
  margin: 24px -10px;
  padding: 13px 10px;
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.consent-check {
  align-items: center;
  background: #e9e9e9;
  border-radius: 16px;
  color: #191919;
  display: flex;
  font-size: 17px;
  gap: 14px;
  padding: 16px 18px;
  text-align: left;
  text-transform: none;
}

.klayapan-page .consent-check {
  color: #191919;
  display: flex;
  letter-spacing: 0;
  text-transform: none;
}

.consent-check input {
  accent-color: #f8b609;
  flex: 0 0 auto;
  height: 30px;
  min-height: 0;
  width: 30px;
}

.klayapan-page .consent-check input {
  border: 2px solid #8a8a8a;
  flex: 0 0 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  width: 30px;
}

.klayapan-page .consent-check span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.consent-content button {
  background: #ffc514;
  border: 0;
  border-radius: 15px;
  box-shadow: 0 10px 28px rgba(255,197,20,.36);
  color: #090909;
  margin-top: 18px;
  min-height: 64px;
  width: 100%;
}

.consent-content button:disabled {
  box-shadow: none;
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: .45;
}

.consent-content button span {
  font-size: 38px;
  line-height: 0;
  margin-left: 18px;
}

.consent-cancel {
  border: 2px solid #888;
  border-radius: 14px;
  color: #666;
  display: block;
  font-size: 18px;
  font-weight: 900;
  margin-top: 16px;
  padding: 13px;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .klayapan-page .page {
    overflow-x: hidden;
    padding: 12px;
  }

  .klayapan-banner {
    aspect-ratio: 1600 / 650;
    border-width: 3px;
    box-shadow: 5px 5px 0 var(--kl-red);
    height: auto;
    margin-bottom: 22px;
  }

  .klayapan-banner img {
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  .klayapan-page .panel {
    box-shadow: 5px 5px 0 var(--kl-red);
    margin-bottom: 22px;
    padding: 22px 16px;
  }

  .klayapan-page h1 {
    font-size: clamp(34px, 10.5vw, 44px);
    letter-spacing: -1.5px;
    line-height: .94;
    margin-bottom: 18px;
  }

  .klayapan-page .registration-hero::after {
    display: none;
  }

  .klayapan-page .eyebrow {
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 14px;
  }

  .klayapan-page .lead {
    font-size: 17px;
    line-height: 1.5;
    margin-bottom: 0;
  }

  .klayapan-page .registration-summary {
    gap: 10px;
    margin-bottom: 18px;
  }

  .klayapan-page .registration-summary div {
    padding: 13px 14px 13px 20px;
  }

  .klayapan-page .registration-summary strong {
    font-size: 28px;
  }

  .klayapan-page input,
  .klayapan-page select,
  .klayapan-page button,
  .klayapan-page .button {
    max-width: 100%;
    min-height: 54px;
    width: 100%;
  }

  .consent-modal {
    align-items: stretch;
    padding: 8px;
  }

  .consent-dialog {
    border-radius: 18px;
    max-height: calc(100vh - 16px);
  }

  .consent-close {
    font-size: 32px;
    height: 44px;
    right: 10px;
    top: 10px;
    width: 44px;
  }

  .consent-mandatory {
    font-size: 22px;
    letter-spacing: 5px;
  }

  .consent-content {
    padding: 18px 14px 20px;
  }

  .consent-content h2 {
    font-size: 25px;
  }

  .consent-content p {
    font-size: 15px;
  }

  .consent-ride {
    font-size: 27px;
    margin: 20px -4px;
  }

  .consent-check {
    font-size: 15px;
    padding: 13px;
  }

  .klayapan-page .consent-check input {
    flex-basis: 26px;
    height: 26px;
    min-height: 26px;
    width: 26px;
  }
}
