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

.rift-online-button {
  min-width: 170px;
  padding: 13px 20px;
  border: 1px solid rgba(148, 216, 255, 0.42);
  background: rgba(255, 255, 255, 0.055);
  color: #dff6ff;
  font-weight: 900;
  letter-spacing: .16em;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 13px 100%, 0 calc(100% - 13px));
}

.rift-online-button:hover,
.rift-online-button:focus-visible {
  filter: brightness(1.18);
  background: rgba(64, 198, 255, 0.14);
}

.stage-select-screen,
.leaderboard-screen {
  z-index: 21;
}

.stage-select-panel,
.leaderboard-panel {
  width: min(760px, calc(100vw - 36px));
  padding: clamp(28px, 5vw, 58px);
}

.rift-back-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.weekly-run-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 22px 0 16px;
}

.weekly-refresh-button {
  margin-top: 0;
  padding: 11px 0;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  width: min(520px, 100%);
  margin: 18px 0 8px;
}

.stage-card {
  text-align: left;
  border: 1px solid rgba(125, 216, 255, 0.34);
  border-left: 3px solid rgba(40, 168, 255, 0.9);
  background: linear-gradient(135deg, rgba(4, 12, 28, 0.9), rgba(23, 9, 42, 0.65));
  color: #eaf8ff;
  padding: 16px;
  cursor: pointer;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
}

.stage-card span,
.stage-card small {
  display: block;
  color: rgba(210, 238, 255, 0.66);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.stage-card strong {
  display: block;
  margin: 7px 0;
  font-size: 1.3rem;
  letter-spacing: 0.12em;
}

.stage-card.active {
  background: linear-gradient(135deg, rgba(7, 43, 82, 0.92), rgba(23, 9, 42, 0.72));
  border-color: rgba(104, 223, 255, 0.72);
}

.weekly-board-wrap {
  width: min(520px, 100%);
}

.solo-online-mount {
  position: static;
  z-index: auto;
  width: min(520px, 100%);
  pointer-events: auto;
  display: none;
  transform: none;
}

.solo-online-mount.is-open {
  display: block;
}

.solo-card {
  border: 1px solid rgba(125, 216, 255, 0.32);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(4, 12, 28, 0.96), rgba(23, 9, 42, 0.9)), rgba(1, 5, 15, 0.94);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.45), inset 0 0 24px rgba(72, 195, 255, 0.08);
  color: #eaf8ff;
  padding: 14px;
  backdrop-filter: blur(14px);
}

.solo-head,
.solo-seed,
.solo-best {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.solo-head small,
.solo-best span,
.solo-seed span {
  display: block;
  color: rgba(210, 238, 255, 0.66);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.solo-head strong {
  display: block;
  font-size: 1.02rem;
  letter-spacing: 0.08em;
}

.solo-close {
  display: none;
}

.solo-publish {
  display: flex;
  justify-content: flex-end;
  margin: 10px 0;
}

.solo-ok,
.solo-warn {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.solo-ok {
  background: rgba(72, 255, 188, 0.12);
  color: #91ffd7;
}

.solo-warn {
  background: rgba(255, 190, 72, 0.12);
  color: #ffd994;
}

.solo-seed {
  border-top: 1px solid rgba(148, 216, 255, 0.14);
  border-bottom: 1px solid rgba(148, 216, 255, 0.14);
  padding: 8px 0;
  font-size: 0.75rem;
}

.solo-best {
  padding: 10px 0 8px;
  font-size: 0.78rem;
}

.solo-board {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  padding-right: 2px;
}

.solo-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(148, 216, 255, 0.12);
  border-radius: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.78rem;
}

.solo-row small {
  grid-column: 2 / 4;
  color: rgba(222, 242, 255, 0.6);
}

.solo-rank {
  color: #75dcff;
  font-weight: 800;
}

.solo-player {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.solo-empty,
.solo-error,
.solo-status {
  border-radius: 12px;
  padding: 9px;
  margin: 6px 0;
  font-size: 0.76rem;
}

.solo-empty {
  color: rgba(231, 244, 255, 0.66);
  background: rgba(255, 255, 255, 0.04);
}

.solo-error {
  color: #ffd0d0;
  background: rgba(255, 82, 82, 0.12);
}

.solo-status {
  color: #bff5ff;
  background: rgba(75, 202, 255, 0.12);
}

@media (max-width: 760px) {
  .rift-menu-actions,
  .weekly-run-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .rift-menu-actions .primary-button,
  .rift-online-button,
  .weekly-run-actions .primary-button {
    width: 100%;
  }

  .stage-select-panel,
  .leaderboard-panel {
    width: calc(100vw - 28px);
    padding: 24px;
  }

  .solo-online-mount,
  .weekly-board-wrap {
    width: 100%;
  }

  .solo-card {
    padding: 11px;
  }

  .solo-board {
    max-height: 150px;
  }
}
