:root {
  --onsite-match-room-release: "20260726-onsite-match-room-os-1120";
}

.onsite-match-room-ready .match-console {
  scroll-margin-top: 130px;
}

.onsite-match-room-os {
  display: grid;
  gap: 13px;
  margin: 14px auto 0;
  border: 1px solid rgba(226, 92, 157, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 246, 251, 0.96), rgba(255, 249, 240, 0.9)),
    rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(106, 32, 66, 0.1);
  color: #2b1722;
  padding: 14px;
}

.onsite-match-room-os[hidden] {
  display: none;
}

.onsite-match-room-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.onsite-match-room-kicker,
.onsite-match-fact span,
.onsite-match-step span,
.onsite-match-safety span {
  color: #a77425;
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-transform: uppercase;
}

.onsite-match-room-head h3 {
  margin: 3px 0 6px;
  color: #24131c;
  font-size: clamp(21px, 2.8vw, 31px);
  font-weight: 560;
  line-height: 1.08;
}

.onsite-match-room-head p,
.onsite-match-step p,
.onsite-match-safety p {
  margin: 0;
  color: #705765;
  line-height: 1.42;
}

.onsite-match-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid rgba(226, 92, 157, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: #8d2f60;
  padding: 0 11px;
  white-space: nowrap;
}

.onsite-match-status-pill svg {
  width: 16px;
  height: 16px;
}

.onsite-match-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.onsite-match-fact,
.onsite-match-step,
.onsite-match-safety {
  min-width: 0;
  border: 1px solid rgba(199, 124, 157, 0.17);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.onsite-match-fact {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.onsite-match-fact strong,
.onsite-match-step strong {
  color: #2b1722;
  font-weight: 540;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.onsite-match-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.onsite-match-step {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 6px;
  padding: 10px;
}

.onsite-match-step[data-state="done"] {
  border-color: rgba(64, 151, 97, 0.26);
  background: linear-gradient(135deg, rgba(64, 151, 97, 0.07), rgba(255, 255, 255, 0.76));
}

.onsite-match-step[data-state="active"] {
  border-color: rgba(226, 92, 157, 0.3);
  background: linear-gradient(135deg, rgba(255, 101, 168, 0.11), rgba(255, 255, 255, 0.78));
}

.onsite-match-step-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 104, 170, 0.12);
  color: #bd386f;
}

.onsite-match-step-icon svg {
  width: 17px;
  height: 17px;
}

.onsite-match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.onsite-match-actions a,
.onsite-match-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 540;
  line-height: 1.15;
  text-align: center;
}

.onsite-match-actions a {
  min-width: min(100%, 220px);
}

.onsite-match-actions button {
  min-width: min(100%, 185px);
}

.onsite-match-safety {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
}

.onsite-match-safety > svg,
.onsite-match-safety i {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(244, 91, 150, 0.18), rgba(222, 174, 92, 0.16));
  color: #c39031;
}

body[data-theme="dark"] .onsite-match-room-os,
body[data-theme="dark"] .onsite-match-fact,
body[data-theme="dark"] .onsite-match-step,
body[data-theme="dark"] .onsite-match-safety,
body[data-theme="dark"] .onsite-match-status-pill {
  border-color: rgba(246, 119, 177, 0.22);
  background:
    linear-gradient(135deg, rgba(49, 18, 35, 0.96), rgba(38, 18, 30, 0.94)),
    #20101a;
  color: #fff4f8;
}

body[data-theme="dark"] .onsite-match-room-head h3,
body[data-theme="dark"] .onsite-match-fact strong,
body[data-theme="dark"] .onsite-match-step strong {
  color: #fff8fb;
}

body[data-theme="dark"] .onsite-match-room-head p,
body[data-theme="dark"] .onsite-match-step p,
body[data-theme="dark"] .onsite-match-safety p {
  color: rgba(255, 232, 241, 0.78);
}

@media (max-width: 980px) {
  .onsite-match-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  .onsite-match-room-head,
  .onsite-match-facts,
  .onsite-match-steps {
    grid-template-columns: 1fr;
  }

  .onsite-match-status-pill {
    width: 100%;
  }

  .onsite-match-actions a,
  .onsite-match-actions button {
    width: 100%;
  }
}
