.redball-page {
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 208, 76, 0.18), transparent 22%),
    radial-gradient(circle at 82% 14%, rgba(66, 214, 111, 0.18), transparent 25%),
    linear-gradient(135deg, #12202d 0%, #173726 54%, #17191f 100%);
}

.redball-logo {
  background: linear-gradient(180deg, #ff9d91, #ef2f2f 65%, #9f171f);
  color: #fff;
}

.redball-wrap {
  background: #89d7ff;
  touch-action: none;
}

.redball-controls {
  display: grid;
  gap: 10px;
  grid-template-columns: 0.82fr 1.2fr 0.82fr;
}

.redball-controls button {
  min-height: 54px;
  padding: 0 10px;
  touch-action: none;
  transition: filter 140ms ease, transform 140ms ease;
  user-select: none;
}

.redball-controls button:active {
  filter: saturate(1.16) brightness(1.04);
  transform: translateY(3px);
}

.redball-sound-button {
  min-height: 42px;
}

.redball-sound-button[aria-pressed="true"] {
  background: linear-gradient(180deg, #fff, #e3e9e3);
  color: #617070;
}

.redball-progress-card,
.redball-recap,
.redball-briefing,
.redball-mission {
  background: #fff;
  border: 2px solid #dde7df;
  border-radius: 8px;
  color: #172017;
  display: grid;
  gap: 8px;
  padding: 13px;
}

.redball-progress-card span,
.redball-recap strong,
.redball-briefing strong,
.redball-mission strong {
  color: #ef2f2f;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.redball-progress-card strong {
  font-size: 18px;
}

.redball-progress-card small,
.redball-briefing p,
.redball-mission p {
  color: #617070;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
}

.redball-briefing {
  border-color: #ffd04c;
  box-shadow: inset 0 0 0 3px rgba(255, 208, 76, 0.12);
}

.redball-briefing-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.redball-briefing-grid span {
  background: linear-gradient(180deg, #fff8d4, #f3f8f1);
  border: 1px solid #e5dfb8;
  border-radius: 8px;
  color: #617070;
  display: grid;
  font-size: 10px;
  font-weight: 900;
  gap: 2px;
  min-height: 42px;
  padding: 7px;
  text-transform: uppercase;
}

.redball-briefing-grid b {
  color: #172017;
  font-size: 14px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.redball-briefing.is-running {
  border-color: #72d9ff;
  box-shadow: inset 0 0 0 3px rgba(114, 217, 255, 0.14);
}

.redball-briefing.is-running strong {
  color: #226e8d;
}

.redball-progress-card .redball-time-line {
  color: #226e8d;
  transition: color 160ms ease, text-shadow 160ms ease;
}

.redball-progress-card .redball-time-line.is-pace-hot {
  color: #b76d00;
  text-shadow: 0 1px 0 rgba(255, 235, 153, 0.6);
}

.redball-progress-card .redball-time-line.is-pace-late {
  color: #b3252a;
  text-shadow: 0 1px 0 rgba(255, 192, 196, 0.6);
}

.redball-level-path {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.redball-level-path button {
  align-items: center;
  background: #14202a;
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: grid;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  min-height: 58px;
  padding: 6px;
}

.redball-level-path button strong {
  font-size: 16px;
  line-height: 1;
}

.redball-level-path .redball-level-medal {
  color: rgba(255, 255, 255, 0.64);
  font-size: 9px;
  letter-spacing: 0;
  line-height: 1;
}

.redball-level-path .redball-level-time {
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  line-height: 1;
}

.redball-level-path button[data-medal="1"] .redball-level-medal {
  color: #f0b078;
}

.redball-level-path button[data-medal="2"] .redball-level-medal {
  color: #dce7ef;
}

.redball-level-path button[data-medal="3"] .redball-level-medal {
  color: #ffd04c;
}

.redball-level-path button.is-active {
  background: linear-gradient(180deg, #ff8e80, #e32732);
}

.redball-level-path button:disabled {
  background: #dfe7df;
  color: #7c8a86;
  cursor: not-allowed;
}

.redball-level-path button:disabled .redball-level-medal,
.redball-level-path button:disabled .redball-level-time {
  color: #7c8a86;
}

.redball-recap-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.redball-recap-grid span {
  background: #f0f6f2;
  border: 1px solid #dde7df;
  border-radius: 8px;
  color: #617070;
  display: grid;
  font-size: 10px;
  font-weight: 900;
  gap: 2px;
  min-height: 42px;
  padding: 7px;
  text-transform: uppercase;
}

.redball-recap-grid span:last-child {
  grid-column: 1 / -1;
}

.redball-recap-grid b {
  color: #172017;
  font-size: 14px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.redball-recap p {
  color: #226e8d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
}

.redball-recap.is-new-record {
  animation: redball-record-pop 680ms ease both;
  border-color: #ffd04c;
  box-shadow: 0 0 0 4px rgba(255, 208, 76, 0.2);
}

.redball-recap.is-new-record strong,
.redball-recap.is-new-record p {
  color: #b76d00;
}

@keyframes redball-record-pop {
  0% {
    transform: scale(0.98);
  }

  45% {
    transform: scale(1.025);
  }

  100% {
    transform: scale(1);
  }
}

.redball-mini-map {
  background: #15202a;
  border: 3px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  height: 18px;
  overflow: hidden;
  position: relative;
}

.redball-mini-map span {
  background: linear-gradient(90deg, #ef2f2f, #ffd04c);
  display: block;
  height: 100%;
  transition: width 160ms ease;
  width: 0%;
}

.redball-tile .tile-action {
  background: linear-gradient(180deg, #ff8e80, #e32732);
  color: #fff;
}

.redball-touch-dock {
  align-items: end;
  bottom: 12px;
  display: none;
  gap: 12px;
  grid-template-columns: 64px minmax(82px, 112px) 64px;
  justify-content: center;
  left: 12px;
  pointer-events: none;
  position: absolute;
  right: 12px;
  z-index: 4;
}

.redball-touch-dock button {
  align-items: center;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.86);
  border: 3px solid rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  box-shadow: 0 8px 0 rgba(20, 32, 42, 0.35);
  color: #14202a;
  cursor: pointer;
  display: grid;
  font: inherit;
  font-size: 26px;
  font-weight: 900;
  height: 58px;
  justify-content: center;
  pointer-events: auto;
  touch-action: none;
  transition: filter 140ms ease, transform 140ms ease;
  user-select: none;
}

.redball-touch-dock [data-redball-jump] {
  background: linear-gradient(180deg, #ffe88a, #ffd04c 58%, #e7a821);
  box-shadow: 0 8px 0 rgba(185, 131, 25, 0.75);
}

.redball-touch-dock button:active {
  filter: saturate(1.15) brightness(1.04);
  transform: translateY(4px);
}

@media (hover: none), (pointer: coarse) {
  .redball-touch-dock {
    display: grid;
  }

  .redball-wrap {
    padding-bottom: 0;
  }
}

@media (max-width: 620px) {
  .redball-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .redball-touch-dock {
    bottom: 10px;
    display: grid;
    grid-template-columns: 52px 96px 52px;
    justify-content: space-between;
    left: 2px;
    right: 2px;
  }

  .redball-touch-dock button {
    font-size: 24px;
    height: 52px;
  }
}
