/* The frame is used for the desktop spin-history sidebar. */
.slotStage .recentPanel.spinPanel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1077 / 1461;
  margin: 0;
  padding: 32% 13% 29%;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #4d1738f2, #120d1cf2);
  box-shadow: none;
  overflow: hidden;
}

.slotStage .spinPanel > .ledgerCrest {
  display: none;
}

.slotStage .spinPanel h2 {
  flex: 0 0 auto;
  margin: 0 0 5px;
  color: #ffd16d;
  font-size: clamp(15px, 1.35vw, 20px);
  line-height: 1.2;
}

.slotStage .spinPanel .ledgerLiveStatus {
  flex: 0 0 auto;
  margin: 0 0 6px;
  font-size: 11px;
  line-height: 1.35;
}

.slotStage .spinPanel .ledgerLiveEmpty {
  margin: auto 0;
  padding: 4px 0;
  font-size: 12px;
  line-height: 1.45;
}

.slotStage .spinPanel .ledgerLiveTotals {
  flex: 0 0 auto;
  padding: 5px 0;
}

.slotStage .spinPanel .ledgerLiveTotals strong {
  margin: 2px 0;
  font-size: 18px;
}

.slotStage .spinPanel .ledgerLiveRows {
  flex: 1 1 auto;
  min-height: 0;
  margin: 3px 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #a66126 #130e0c;
}

.slotStage .spinPanel .ledgerLiveRows li {
  gap: 3px;
  padding: 5px 0;
}

.slotStage .spinPanel .ledgerLink {
  position: absolute;
  left: 15%;
  bottom: 9.5%;
  width: 70%;
  height: 12%;
  min-height: 0;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fff4dc;
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 800;
  cursor: pointer;
}

.slotStage .spinPanel .ledgerLink:hover,
.slotStage .spinPanel .ledgerLink:focus-visible {
  color: #fff;
  text-shadow: 0 0 10px #ffb54a;
}

.slotStage .spinPanel .ledgerLink:focus-visible {
  outline: 2px solid #fff4dc;
  outline-offset: -2px;
}

/* The sidebar is intentionally absent in compact layouts. */
@media (max-width: 1180px), (pointer: coarse) and (max-width: 1366px) {
  .slotStage .recentPanel.spinPanel {
    display: none;
  }
}

/* Full spin-history popup artwork. */
@media (min-width: 601px) {
  .ledgerModal .ledgerCard {
    box-sizing: border-box;
    width: min(940px, 94vw);
    max-height: calc(100dvh - 28px);
    aspect-ratio: 1512 / 1040;
    padding: 21% 9% 11%;
    border: 0;
    border-radius: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #4d1738f2, #120d1cf2);
    box-shadow: none;
    scrollbar-color: #a66126 #130e0c;
  }

  .ledgerModal .ledgerCard::before,
  .ledgerModal .ledgerCard > .ledgerCrest,
  .ledgerModal .ledgerCard > .ledgerKicker {
    display: none;
  }

  .ledgerModal .ledgerCard h2 {
    margin: 0 13% 5px;
    color: #ffd16d;
    font-family: var(--ui-font);
    font-size: clamp(24px, 3vw, 36px);
    text-shadow: 0 0 14px #ff8f274d;
  }

  .ledgerModal .ledgerStatus {
    margin: 4px 0 10px;
    color: #d6e2f0;
  }

  .ledgerModal .ledgerClose {
    right: 6.2%;
    top: 18.5%;
    width: 7%;
    min-width: 44px;
    height: auto;
    min-height: 44px;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #fff;
    font-size: clamp(28px, 3.2vw, 42px);
    text-shadow: 0 0 9px #fff8;
  }

  .ledgerModal .ledgerNavigation,
  .ledgerModal .ledgerBalance,
  .ledgerModal .ledgerLiveTotals,
  .ledgerModal .ledgerStats,
  .ledgerModal .ledgerNet {
    border-color: #9a5928;
    background: #071426b3;
  }

  .ledgerModal .ledgerTableWrap {
    max-height: min(27dvh, 236px);
    margin-top: 10px;
    border: 1px solid #9a5928;
    background: #071426c9;
  }

  .ledgerModal .ledgerTable thead th {
    background: #10233ad9;
  }

  .ledgerModal .ledgerActions button {
    border-color: #ce812e;
    background: linear-gradient(#17395b, #071426);
    color: #fff4dc;
  }

  .ledgerModal .ledgerClose:focus-visible,
  .ledgerModal .ledgerActions button:focus-visible {
    outline: 2px solid #fff4dc;
    outline-offset: 2px;
  }
}
