#deck-preview-modal {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  width: min(100%, 960px);
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid #e2e4e7;
  border-radius: 0;
  background: #fff;
  color: #29333b;
  font: 400 14px/21px Inter, sans-serif;
}
#deck-preview-modal[open] { display: flex; }
#deck-preview-modal::backdrop { background: rgba(41,51,59,.13); }
#deck-preview-modal .deck-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 62px;
  padding: 0 16px;
  border-bottom: 1px solid #e2e4e7;
  background: #f6f7f8;
}
#deck-preview-modal .deck-preview-header h2 {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #29333b;
  font: 500 20px/30px Inter, sans-serif;
}
#deck-preview-modal .deck-preview-close {
  position: static;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
}
#deck-preview-modal .deck-preview-close img { display: block; }
#deck-preview-modal .deck-preview-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  text-align: center;
  background: #f6f7f8;
}
#deck-preview-modal .deck-preview-stage canvas {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
}
#deck-preview-modal .deck-preview-status { margin: 20px 0; color: #626d76; }
#deck-preview-modal .deck-preview-status[hidden] { display: none; }
#deck-preview-modal .deck-preview-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  flex: 0 0 58px;
  gap: 12px;
  padding: 0 16px;
  border-top: 1px solid #e2e4e7;
  background: #fff;
}
#deck-preview-modal .deck-preview-controls button {
  min-width: 82px;
  min-height: 40px;
  border: 1px solid #e2e4e7;
  border-radius: 3px;
  background: #fff;
  color: #29333b;
  font: 500 14px/21px Inter, sans-serif;
}
#deck-preview-modal .deck-preview-controls button:disabled { color: #9ba6af; }
#deck-preview-modal .deck-preview-next { justify-self: end; }
#deck-preview-modal .deck-preview-page { color: #626d76; white-space: nowrap; }
@media (max-width: 600px) {
  #deck-preview-modal { width: 100%; }
  #deck-preview-modal .deck-preview-header h2 { font-size: 18px; }
  #deck-preview-modal .deck-preview-stage { padding: 12px; }
  #deck-preview-modal .deck-preview-controls {
    flex-basis: calc(58px + env(safe-area-inset-bottom));
    padding: 0 12px env(safe-area-inset-bottom);
  }
}
