/* Final Crowndoku result: the standings may scroll, but the next action must never be below the fold. */
.crowndoku-victory .crowndoku-victory-actions {
  position: fixed;
  z-index: 42;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(470px, calc(100vw - 28px));
  margin: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border: 1px solid rgba(245, 211, 121, .74);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(25, 56, 75, .98), rgba(10, 28, 43, .98));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .52), inset 0 1px rgba(255, 255, 255, .12);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

.crowndoku-victory[data-result-phase="standings"] .crowndoku-victory-actions {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.crowndoku-victory .crowndoku-victory-actions .action-button,
.crowndoku-victory .crowndoku-victory-actions .subtle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 8px 7px;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

.crowndoku-victory .crowndoku-victory-actions .subtle-button:first-child {
  color: #fff2bd;
  border-color: #e4b84f;
  background: linear-gradient(135deg, #8a6518, #4e3410);
  box-shadow: inset 0 1px rgba(255, 255, 255, .16), 0 5px 13px rgba(0, 0, 0, .24);
}

.crowndoku-victory .crowndoku-victory-actions .subtle-button:last-child {
  color: #e4f4f5;
  border-color: rgba(120, 174, 188, .68);
  background: linear-gradient(135deg, #174355, #0b2737);
}

/* The final footer overlays only the settled standings screen; reserve room so no row is hidden beneath it. */
.crowndoku-victory[data-result-phase="standings"] .result-ceremony-details {
  padding-bottom: 78px;
}

@media (max-width: 380px) {
  .crowndoku-victory .crowndoku-victory-actions {
    width: calc(100vw - 20px);
    bottom: max(8px, env(safe-area-inset-bottom));
    padding: 8px 9px calc(8px + env(safe-area-inset-bottom));
    gap: 6px;
    border-radius: 13px;
  }

  .crowndoku-victory .crowndoku-victory-actions .action-button,
  .crowndoku-victory .crowndoku-victory-actions .subtle-button {
    min-height: 43px;
    padding-inline: 5px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .crowndoku-victory .crowndoku-victory-actions { transition: none; }
}
