[data-s1-presentation-open] svg {
  flex: 0 0 20px;
}

.s1-presentation-dialog {
  width: min(1600px, calc(100vw - 2rem));
  height: calc(100vh - 2rem);
  height: calc(100dvh - 2rem);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 0;
  background: var(--color-surface);
  color: var(--color-copy);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.3);
}

.s1-presentation-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.s1-presentation-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.s1-presentation-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-line);
}

.s1-presentation-dialog__header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}

.s1-presentation-dialog__header [data-s1-presentation-close] {
  flex-shrink: 0;
  margin-left: auto;
}

.s1-presentation-dialog__frame {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: #edf0f7;
}

@media (max-width: 640px) {
  .s1-presentation-dialog {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding-bottom: env(safe-area-inset-bottom);
    border: 0;
  }

  .s1-presentation-dialog__header {
    padding: max(0.75rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.75rem max(1rem, env(safe-area-inset-left));
  }

  .s1-presentation-dialog__header h2 {
    font-size: 1rem;
  }
}
