/* Optional wallet and token activity. A reserved strip keeps every game button clear. */
.phone-page.has-game-wallet {
  --wallet-strip: calc(44px + env(safe-area-inset-top, 0px));
}
.phone-page.has-game-wallet #stage {
  padding-top: calc(var(--wallet-strip) + 8px);
}
.phone-page.has-game-wallet #game-pad {
  top: var(--wallet-strip);
}
.phone-wallet-bar {
  box-sizing: border-box;
  position: absolute;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  height: calc(44px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px)
    max(10px, env(safe-area-inset-right, 0px)) 0
    max(10px, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(#2e7ce9, #0b4eb9);
  border-bottom: 1px solid #073783;
  color: white;
  font:
    12px/1.2 Tahoma,
    sans-serif;
}
.phone-wallet-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  padding: 0 5px;
  min-height: 44px;
  min-width: 0;
  background: transparent;
  color: white;
  font:
    700 12px/1.2 Tahoma,
    sans-serif;
  cursor: pointer;
}
.wallet-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffd45e;
  box-shadow: 0 0 0 2px #ffffff28;
  flex: none;
}
.phone-wallet-chip[data-status="ready"] .wallet-dot {
  background: #9eed93;
}
.phone-wallet-caption {
  font-size: 9px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0.9;
}
.reward-notices {
  box-sizing: border-box;
  position: fixed;
  z-index: 10000;
  top: max(18px, env(safe-area-inset-top, 0px));
  right: max(18px, env(safe-area-inset-right, 0px));
  width: min(370px, calc(100% - 36px));
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 28px;
  gap: 7px 10px;
  padding: 15px;
  border: 1px solid #6c86ad;
  border-top: 4px solid #2468cf;
  border-radius: 6px;
  background: #ffffe8;
  color: #142e52;
  box-shadow: 0 6px 24px #122a4d40;
  font:
    13px/1.35 Tahoma,
    sans-serif;
  animation: reward-arrive 0.2s ease-out;
}
.reward-notice-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  overflow-wrap: anywhere;
}
.reward-notice-copy strong {
  font-size: 16px;
  line-height: 1.2;
}
.reward-notice-copy span {
  font-size: 12px;
  color: #496078;
}
.reward-coin {
  display: grid;
  place-items: center;
  align-self: center;
  width: 32px;
  height: 32px;
  border: 1px solid #b88b13;
  border-radius: 50%;
  background: linear-gradient(#fff0a3, #f6ca42);
  color: #684910;
  font:
    700 20px/1 Tahoma,
    sans-serif;
  box-shadow: inset 0 0 0 3px #fff4ba;
}
.reward-explorer {
  grid-column: 2;
  color: #124fa9;
  text-decoration: underline;
  text-underline-offset: 2px;
  min-height: 24px;
  display: flex;
  align-items: center;
  font-size: 12px;
}
.reward-dismiss {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  border: 1px solid #b6bfca;
  background: #fff;
  border-radius: 3px;
  color: #415571;
  font:
    20px/1 Tahoma,
    sans-serif;
  min-width: 28px;
  min-height: 28px;
  cursor: pointer;
}
.reward-notices--phone {
  position: static;
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
  color: white;
  grid-template-columns: 22px minmax(0, 1fr) 36px 32px;
  gap: 7px;
  align-items: center;
}
.reward-notices--phone .reward-notice-copy {
  gap: 1px;
}
.reward-notices--phone .reward-notice-copy strong {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reward-notices--phone .reward-notice-copy span {
  color: #e1edff;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reward-notices--phone .reward-coin {
  width: 21px;
  height: 21px;
  font-size: 13px;
  box-shadow: none;
}
.reward-notices--phone .reward-explorer {
  grid-column: 3;
  grid-row: 1;
  justify-content: center;
  color: white;
  font-size: 23px;
  min-height: 44px;
  text-decoration: none;
}
.reward-notices--phone .reward-dismiss {
  grid-column: 4;
  grid-row: 1;
  border: 0;
  background: transparent;
  color: white;
  align-self: stretch;
  min-height: 44px;
}
.wallet-dialog {
  box-sizing: border-box;
  width: min(400px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  padding: 0;
  border: 2px solid #174ca9;
  border-radius: 6px;
  background: #ece9d8;
  color: #182d4a;
  font:
    14px/1.45 Tahoma,
    sans-serif;
}
.wallet-dialog::backdrop {
  background: #10234499;
}
.wallet-dialog header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px 6px 12px;
  background: linear-gradient(#4192ff, #0756cf);
  color: white;
}
.wallet-dialog h2 {
  margin: 0;
  font:
    700 16px/1.3 Tahoma,
    sans-serif;
}
.wallet-close {
  width: 34px;
  min-height: 34px;
  border: 1px solid #fff;
  border-radius: 3px;
  background: linear-gradient(#ec947c, #c83825);
  color: white;
  font-size: 24px;
}
.wallet-dialog-body {
  padding: 16px;
}
.wallet-testnet {
  font-size: 10px;
  color: #49617d;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.wallet-detail-status {
  margin: 8px 0 12px;
}
.wallet-full-address {
  display: block;
  overflow-wrap: anywhere;
  padding: 10px;
  border: 1px solid #bac2ca;
  background: #fff;
  font: 12px/1.5 monospace;
  user-select: text;
  -webkit-user-select: text;
}
.wallet-actions {
  display: flex;
  gap: 8px;
  margin: 10px 0 16px;
  flex-wrap: wrap;
}
.wallet-action {
  box-sizing: border-box;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid #7c8f9f;
  border-radius: 3px;
  background: linear-gradient(#fff, #e7e4d6);
  color: #184783;
  font:
    12px/1.2 Tahoma,
    sans-serif;
  text-decoration: none;
}
.wallet-table-name {
  overflow-wrap: anywhere;
  color: #315b92;
  font-size: 12px;
}
.wallet-dialog h3 {
  margin: 12px 0 4px;
  font-size: 14px;
}
.wallet-activity {
  list-style: none;
  padding: 0;
  margin: 0;
}
.wallet-activity li {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid #d0d1c8;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.wallet-activity li span,
.wallet-footnote {
  color: #56636e;
}
.wallet-activity a {
  color: #1452a2;
  min-height: 30px;
  display: flex;
  align-items: center;
}
.wallet-footnote {
  font-size: 11px;
  margin: 14px 0 0;
}
.wallet-action:focus-visible,
.phone-wallet-chip:focus-visible,
.reward-explorer:focus-visible,
.reward-dismiss:focus-visible {
  outline: 2px solid #ffcc46;
  outline-offset: -2px;
}
.phone-wallet-bar[hidden],
.phone-wallet-chip[hidden],
.phone-wallet-caption[hidden],
.reward-notices[hidden],
.wallet-dialog [hidden] {
  display: none;
}
@keyframes reward-arrive {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .reward-notices {
    animation: none;
  }
}

/* Popover defaults otherwise centre the TV toast behind/over the wrong region. */
.reward-notices[popover] {
  margin: 0;
  left: auto;
  bottom: auto;
}
.reward-notices--phone.reward-notices--expanded {
  position: absolute;
  top: calc(100% + 8px);
  left: 8px;
  right: 8px;
  width: calc(100% - 16px);
  height: auto;
  min-height: 86px;
  padding: 12px;
  grid-template-columns: 26px minmax(0, 1fr) 36px 32px;
  border: 1px solid #8cabc9;
  border-top: 4px solid #2b7cda;
  border-radius: 5px;
  background: #ffffe8;
  box-shadow: 0 5px 20px #112c564d;
  color: #16345a;
}
.reward-notices--expanded .reward-notice-copy strong {
  white-space: normal;
  font-size: 15px;
  line-height: 1.25;
}
.reward-notices--expanded .reward-notice-copy span {
  white-space: normal;
  font-size: 11px;
  line-height: 1.4;
  color: #496078;
}
.reward-notices--expanded :is(.reward-explorer, .reward-dismiss) {
  color: #174fa1;
}
.wallet-round-result {
  padding: 10px;
  background: #fff7c9;
  border: 1px solid #d4bd60;
  border-radius: 3px;
  font-size: 12px;
}

.reward-notices--phone[data-link="false"] {
  grid-template-columns: 22px minmax(0, 1fr) 32px;
}
.reward-notices--phone[data-link="false"] .reward-dismiss {
  grid-column: 3;
}
