/* ==========================================================================
   Shared replay chrome — controls, status, move list (all games)
   Loaded before css/replay/{game}.css on match pages with replay=true.
   ========================================================================== */

.retro-match-replay {
  margin: 1rem 0 1.4rem;
  min-width: 0;
  max-width: 100%;
}

.retro-match-replay .retro-match-replay__panel {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
}

.retro-match-replay .retro-match-replay__title {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.retro-match-replay .retro-match-replay__controls {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
}

.retro-match-replay .retro-match-replay__nav-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.retro-match-replay .retro-match-replay__controls button,
.retro-match-replay .retro-match-replay__controls select {
  border: 1px solid var(--retro-line);
  background: var(--retro-surface-highlight);
  color: var(--retro-ink);
  font-family: var(--retro-sans);
  cursor: pointer;
}

.retro-match-replay .retro-match-replay__controls .retro-match-replay__control-btn,
.retro-match-replay .retro-match-replay__controls .retro-match-replay__speed-select {
  border-width: 2px;
  border-style: solid;
  border-color: var(--retro-line);
  border-radius: 0.35rem;
  box-shadow: 2px 2px 0 rgba(30, 25, 20, 0.2);
  background: var(--retro-surface-highlight);
  color: var(--retro-ink);
  min-height: 2.85rem;
}

.retro-match-replay .retro-match-replay__controls .retro-match-replay__control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.85rem;
  padding: 0.35rem 0.55rem;
  text-transform: none;
  letter-spacing: 0;
  position: relative;
}

/* Playback icons via CSS mask (same approach as explore chrome). */
.retro-match-replay .retro-match-replay__nav-btns .retro-match-replay__control-btn::before {
  content: "";
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.retro-match-replay .retro-match-replay__nav-btns [data-action="start"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M7%206.5H9.5V17.5H7V6.5ZM17%206.5L12%2012L17%2017.5V6.5Z%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M7%206.5H9.5V17.5H7V6.5ZM17%206.5L12%2012L17%2017.5V6.5Z%22%2F%3E%3C%2Fsvg%3E");
}

.retro-match-replay .retro-match-replay__nav-btns [data-action="prev"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M11.5%206.5L7.5%2012L11.5%2017.5V6.5ZM16.5%206.5L12.5%2012L16.5%2017.5V6.5Z%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M11.5%206.5L7.5%2012L11.5%2017.5V6.5ZM16.5%206.5L12.5%2012L16.5%2017.5V6.5Z%22%2F%3E%3C%2Fsvg%3E");
}

.retro-match-replay .retro-match-replay__nav-btns [data-action="play"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M9%206.5V17.5L17.5%2012L9%206.5Z%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M9%206.5V17.5L17.5%2012L9%206.5Z%22%2F%3E%3C%2Fsvg%3E");
}

.retro-match-replay .retro-match-replay__nav-btns [data-action="play"].is-playing::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M7%206.5H10V17.5H7V6.5ZM14%206.5H17V17.5H14V6.5Z%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M7%206.5H10V17.5H7V6.5ZM14%206.5H17V17.5H14V6.5Z%22%2F%3E%3C%2Fsvg%3E");
}

.retro-match-replay .retro-match-replay__nav-btns [data-action="next"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12.5%206.5L16.5%2012L12.5%2017.5V6.5ZM7.5%206.5L11.5%2012L7.5%2017.5V6.5Z%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12.5%206.5L16.5%2012L12.5%2017.5V6.5ZM7.5%206.5L11.5%2012L7.5%2017.5V6.5Z%22%2F%3E%3C%2Fsvg%3E");
}

.retro-match-replay .retro-match-replay__nav-btns [data-action="end"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M7%206.5L12%2012L7%2017.5V6.5ZM14.5%206.5H17V17.5H14.5V6.5Z%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M7%206.5L12%2012L7%2017.5V6.5ZM14.5%206.5H17V17.5H14.5V6.5Z%22%2F%3E%3C%2Fsvg%3E");
}

.retro-match-replay .retro-match-replay__speed-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0 0.35rem;
  font-family: var(--retro-sans);
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--retro-ink);
}

.retro-match-replay .retro-match-replay__controls .retro-match-replay__speed-select {
  padding: 0 1.85rem 0 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
  background-size: 0.85rem;
}

.retro-match-replay .retro-match-replay__controls button:disabled,
.retro-match-replay .retro-match-replay__controls .retro-match-replay__speed-select:disabled,
.retro-match-replay .retro-match-replay__move-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Fixed-height status row above the board. Status text is absolute so a long
   nowrap string cannot widen the panel (and thus grow the square board). */
.retro-match-replay .retro-match-replay__status-slot {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 1.25rem;
  height: 1.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow: visible;
  contain: inline-size;
}

/* Default in-flow status (DVONN / YINSH and any game without a status-slot). */
.retro-match-replay .retro-match-replay__status {
  position: relative;
  box-sizing: border-box;
  font-family: var(--retro-sans);
  color: var(--retro-ink);
  margin: 0;
  line-height: 1.25rem;
  height: 1.25rem;
  max-height: 1.25rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Absolute only inside the reserved slot (GIPF / TZAAR explore chrome). */
.retro-match-replay .retro-match-replay__status-slot .retro-match-replay__status {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: auto;
  max-width: none;
}

.retro-match-replay .retro-match-replay__status-text {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  line-height: 1.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.retro-match-replay .retro-match-replay__status.is-expandable {
  cursor: pointer;
}

.retro-match-replay .retro-match-replay__status.is-expandable .retro-match-replay__status-text {
  padding-right: 1rem;
  box-sizing: border-box;
}

.retro-match-replay .retro-match-replay__status.is-expandable::after {
  content: "";
  position: absolute;
  right: 0.1rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
  opacity: 0.55;
  pointer-events: none;
  z-index: 1;
}

.retro-match-replay .retro-match-replay__status-slot.is-open .retro-match-replay__status.is-expandable::after {
  transform: translateY(-20%) rotate(225deg);
}

/* Overlay sits in the slot (sibling of clipped status) so it is not cropped */
.retro-match-replay .retro-match-replay__status-popup {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 8;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--retro-line);
  border-radius: 0.35rem;
  box-shadow: 2px 2px 0 rgba(30, 25, 20, 0.18);
  background: var(--retro-surface-highlight);
  color: var(--retro-ink);
  font-family: var(--retro-sans);
  font-size: 0.92em;
  line-height: 1.35;
  white-space: normal;
  pointer-events: auto;
}

.retro-match-replay .retro-match-replay__status-slot.is-open .retro-match-replay__status-popup {
  display: block;
}

.retro-match-replay .retro-match-replay__move-list {
  position: relative;
  margin-top: 0;
  max-height: 10rem;
  overflow-y: auto;
  border: 1px solid var(--retro-line);
  background: var(--retro-surface-inset);
}

.retro-match-replay .retro-match-replay__move-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px dashed var(--retro-border-soft);
  background: transparent;
  padding: 0.3rem 0.45rem;
  cursor: pointer;
  font-family: var(--retro-sans);
  font-size: 1rem;
  line-height: 1.35;
  color: var(--retro-ink);
}

.retro-match-replay .retro-match-replay__move-item:last-child {
  border-bottom: none;
}

.retro-match-replay .retro-match-replay__move-item.is-active {
  background: var(--retro-surface-highlight);
  font-weight: 700;
}

.retro-match-replay .retro-match-replay__error {
  color: #8e1d1d;
  margin: 0.5rem 0;
  font-family: var(--retro-sans);
}

/* Shared explore / sandbox chrome (all games) — overlays board top-right */
.retro-match-replay .retro-match-replay__board-wrap {
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.retro-match-replay .retro-match-replay__explore-bar {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  margin: 0;
  pointer-events: none;
}

.retro-match-replay .retro-match-replay__explore-bar .retro-match-replay__control-btn {
  pointer-events: auto;
  border: 2px solid var(--retro-line);
  border-radius: 0.35rem;
  box-shadow: 2px 2px 0 rgba(30, 25, 20, 0.2);
  background: var(--retro-surface-highlight);
  color: var(--retro-ink);
  font-family: var(--retro-sans);
  font-size: 0.85rem;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

.retro-match-replay .retro-match-replay__explore-bar .retro-match-replay__explore-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  position: relative;
}

/* Icon via CSS mask — same approach as site nav icons; color follows currentColor. */
.retro-match-replay .retro-match-replay__explore-bar .retro-match-replay__explore-icon-btn::before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.retro-match-replay .retro-match-replay__explore-bar .retro-match-replay__explore-toggle::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M4%2C18%20C5.1045695%2C18%206%2C18.8954305%206%2C20%20C6%2C21.1045695%205.1045695%2C22%204%2C22%20C2.8954305%2C22%202%2C21.1045695%202%2C20%20C2%2C18.8954305%202.8954305%2C18%204%2C18%20Z%20M9.5%2C15%20C10.8807119%2C15%2012%2C16.1192881%2012%2C17.5%20C12%2C18.8807119%2010.8807119%2C20%209.5%2C20%20C8.11928813%2C20%207%2C18.8807119%207%2C17.5%20C7%2C16.1192881%208.11928813%2C15%209.5%2C15%20Z%20M12%2C2%20C14.6592222%2C2%2016.8838018%2C3.92259542%2017.3302255%2C6.47059089%20L17.4117647%2C6.47058824%20C19.4909544%2C6.47058824%2021.1764706%2C8.15610447%2021.1764706%2C10.2352941%20C21.1764706%2C12.3144838%2019.4909544%2C14%2017.4117647%2C14%20L6.58823529%2C14%20C4.50904565%2C14%202.82352941%2C12.3144838%202.82352941%2C10.2352941%20C2.82352941%2C8.15610447%204.50904565%2C6.47058824%206.58825824%2C6.47058824%20L6.66977451%2C6.47059089%20C7.11619821%2C3.92259542%209.34077777%2C2%2012%2C2%20Z%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M4%2C18%20C5.1045695%2C18%206%2C18.8954305%206%2C20%20C6%2C21.1045695%205.1045695%2C22%204%2C22%20C2.8954305%2C22%202%2C21.1045695%202%2C20%20C2%2C18.8954305%202.8954305%2C18%204%2C18%20Z%20M9.5%2C15%20C10.8807119%2C15%2012%2C16.1192881%2012%2C17.5%20C12%2C18.8807119%2010.8807119%2C20%209.5%2C20%20C8.11928813%2C20%207%2C18.8807119%207%2C17.5%20C7%2C16.1192881%208.11928813%2C15%209.5%2C15%20Z%20M12%2C2%20C14.6592222%2C2%2016.8838018%2C3.92259542%2017.3302255%2C6.47059089%20L17.4117647%2C6.47058824%20C19.4909544%2C6.47058824%2021.1764706%2C8.15610447%2021.1764706%2C10.2352941%20C21.1764706%2C12.3144838%2019.4909544%2C14%2017.4117647%2C14%20L6.58823529%2C14%20C4.50904565%2C14%202.82352941%2C12.3144838%202.82352941%2C10.2352941%20C2.82352941%2C8.15610447%204.50904565%2C6.47058824%206.58825824%2C6.47058824%20L6.66977451%2C6.47059089%20C7.11619821%2C3.92259542%209.34077777%2C2%2012%2C2%20Z%22%2F%3E%3C%2Fsvg%3E");
}

.retro-match-replay.is-exploring .retro-match-replay__explore-bar .retro-match-replay__explore-toggle::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3C%2Fsvg%3E");
}

.retro-match-replay .retro-match-replay__explore-bar [data-action="explore-undo"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12.5%208c-2.65%200-5.05.99-6.9%202.6L2%207v9h9l-3.62-3.62C8.77%2011.22%2010.54%2010.5%2012.5%2010.5c3.54%200%206.55%202.31%207.6%205.5l2.37-.78C21.08%2011.03%2017.15%208%2012.5%208z%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12.5%208c-2.65%200-5.05.99-6.9%202.6L2%207v9h9l-3.62-3.62C8.77%2011.22%2010.54%2010.5%2012.5%2010.5c3.54%200%206.55%202.31%207.6%205.5l2.37-.78C21.08%2011.03%2017.15%208%2012.5%208z%22%2F%3E%3C%2Fsvg%3E");
}

.retro-match-replay .retro-match-replay__explore-bar [data-action="explore-copy"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M9%203.5h6v2h3.5A1.5%201.5%200%200%201%2020%207v13.5A1.5%201.5%200%200%201%2018.5%2022h-13A1.5%201.5%200%200%201%204%2020.5V7A1.5%201.5%200%200%201%205.5%205.5H9v-2zm2%200v2h2v-2h-2zM6%209v11h12V9H6z%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M9%203.5h6v2h3.5A1.5%201.5%200%200%201%2020%207v13.5A1.5%201.5%200%200%201%2018.5%2022h-13A1.5%201.5%200%200%201%204%2020.5V7A1.5%201.5%200%200%201%205.5%205.5H9v-2zm2%200v2h2v-2h-2zM6%209v11h12V9H6z%22%2F%3E%3C%2Fsvg%3E");
}

.retro-match-replay .retro-match-replay__explore-bar [data-action="explore-pass"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M6%206v12l8.5-6L6%206zm9.5%200h2v12h-2V6z%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M6%206v12l8.5-6L6%206zm9.5%200h2v12h-2V6z%22%2F%3E%3C%2Fsvg%3E");
}

.retro-match-replay .retro-match-replay__explore-bar [data-action="explore-confirm"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z%22%2F%3E%3C%2Fsvg%3E");
}

.retro-match-replay .retro-match-replay__explore-bar .retro-match-replay__explore-pass-btn,
.retro-match-replay .retro-match-replay__explore-bar .retro-match-replay__explore-confirm-btn {
  background:rgb(214, 157, 32);
}

.retro-match-replay .retro-match-replay__explore-bar .retro-match-replay__control-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.retro-match-replay .retro-match-replay__explore-tools {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
}

/* `display: flex` on tools would otherwise override the HTML hidden attribute */
.retro-match-replay .retro-match-replay__explore-tools[hidden] {
  display: none !important;
}

/* Same for icon buttons (`display: inline-flex` beats bare [hidden]). */
.retro-match-replay .retro-match-replay__explore-bar .retro-match-replay__control-btn[hidden] {
  display: none !important;
}

.retro-match-replay.is-exploring .retro-match-replay__controls,
.retro-match-replay.is-exploring .retro-match-replay__move-list {
  opacity: 0.45;
  pointer-events: none;
}

/* Explore copy confirmation — snackbar at viewport bottom */
.retro-match-replay__explore-snackbar {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: auto;
  z-index: 100;
  box-sizing: border-box;
  width: max-content;
  max-width: min(calc(100vw - 2rem), 28rem);
  padding: 0.55rem 0.75rem;
  border: 2px solid var(--retro-line);
  border-radius: 0.35rem;
  box-shadow: 2px 2px 0 rgba(30, 25, 20, 0.22);
  background: var(--retro-surface-highlight);
  color: var(--retro-ink);
  font-family: var(--retro-sans);
  pointer-events: none;
  opacity: 0;
  transform: translateY(calc(100% + 1rem));
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.retro-match-replay__explore-snackbar.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.retro-match-replay__explore-snackbar-title {
  margin: 0 0 0.2rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.retro-match-replay__explore-snackbar-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  word-break: break-word;
  font-family: var(--retro-mono, ui-monospace, "Cascadia Code", "Consolas", monospace);
}

@media (prefers-reduced-motion: reduce) {
  .retro-match-replay__explore-snackbar {
    transition: none;
  }
}

@media (max-width: 720px) {
  .retro-match-replay__explore-snackbar {
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }
}

/* Shared by flight animations in game stylesheets. */
@property --fly-lift {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@media (max-width: 720px) {
  .retro-match-replay .retro-match-replay__controls {
    flex-wrap: nowrap;
    gap: 0.25rem;
    width: 100%;
  }

  .retro-match-replay .retro-match-replay__nav-btns {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 0.2rem;
    min-width: 0;
  }

  .retro-match-replay .retro-match-replay__controls .retro-match-replay__control-btn,
  .retro-match-replay .retro-match-replay__controls .retro-match-replay__speed-select {
    min-height: 2.35rem;
    box-shadow: 1px 1px 0 rgba(30, 25, 20, 0.2);
  }

  .retro-match-replay .retro-match-replay__controls .retro-match-replay__control-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.25rem;
  }

  .retro-match-replay .retro-match-replay__nav-btns .retro-match-replay__control-btn::before {
    width: 1.35rem;
    height: 1.35rem;
  }

  .retro-match-replay .retro-match-replay__speed-label {
    flex: 0 0 auto;
    gap: 0;
    font-size: 0;
    margin: 0;
  }

  .retro-match-replay .retro-match-replay__controls .retro-match-replay__speed-select {
    min-width: 3.1rem;
    padding: 0 1.45rem 0 0.4rem;
    font-size: 0.8rem;
  }
  .retro-match-replay .retro-match-replay__explore-bar {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    gap: 0.2rem;
  }
  
  .retro-match-replay .retro-match-replay__explore-tools {
    gap: 0.2rem;
  }
 
}

@media print {
  .retro-match-replay .retro-match-replay__controls,
  .retro-match-replay .retro-match-replay__status,
  .retro-match-replay .retro-match-replay__status-slot,
  .retro-match-replay .retro-match-replay__move-list,
  .retro-match-replay .retro-match-replay__explore-bar {
    display: none !important;
  }
}
