.copy-command {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 26px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.copy-command code {
  flex: 1;
  min-width: 0;
}

.copy-button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.copy-button:hover {
  opacity: .86;
}

.copy-button.copied {
  background: var(--deep);
}

.key-format-note {
  margin: 30px 0 20px;
}

.key-format-note code {
  font-weight: 700;
}

.demo-notice {
  padding: 11px max(24px, calc((100vw - 1180px) / 2));
  background: var(--deep);
  color: #fff;
  text-align: center;
}

.demo-notice code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .14);
  color: inherit;
}

@media (max-width: 760px) {
  .copy-command {
    align-items: stretch;
    flex-direction: column;
  }

  .copy-button {
    align-self: flex-start;
  }
}

.demo-page {
  max-width: 1180px;
  margin: 0 auto;
}

.demo-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.demo-toolbar h1 {
  margin: 8px 0 12px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1;
}

.demo-frame {
  display: block;
  width: 100%;
  height: min(75vh, 820px);
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.demo-fallback { text-align: right; }

.demo-state {
  display: grid;
  place-items: center;
  min-height: 480px;
  padding: 48px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.demo-state h2 { margin-bottom: 0; }

.demo-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: demo-spin .8s linear infinite;
}

.release-with-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.release-summary { min-width: 0; }

.release-actions {
  display: grid;
  justify-items: end;
  gap: 14px;
}

.shared-preview {
  grid-column: 1 / -1;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.shared-preview-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
}

.shared-preview-label strong { color: var(--ink); }

.shared-preview-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8f7f2;
}

.shared-preview-intro strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.shared-preview-intro p {
  max-width: 680px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.shared-preview-intro form {
  display: grid;
  justify-items: start;
  gap: 7px;
  max-width: 310px;
}

.shared-preview-intro small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.shared-preview-frame {
  display: block;
  width: 100%;
  height: min(68vh, 680px);
  min-height: 460px;
  border: 0;
  background: #fff;
}

.preview-body {
  min-height: 100vh;
  background: #fff;
}

.preview-inner-frame {
  display: block;
  width: 100vw;
  height: 100vh;
  border: 0;
  background: #fff;
}

.preview-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  min-height: 100vh;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.preview-state strong {
  color: var(--ink);
  font-size: 20px;
}

.calm-error {
  max-width: 760px;
  margin: clamp(46px, 9vh, 110px) auto;
  padding: clamp(28px, 6vw, 58px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.calm-error h1 {
  max-width: 680px;
  margin-bottom: 18px;
}

.calm-error-lead {
  max-width: 650px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(17px, 2.3vw, 21px);
  line-height: 1.55;
}

.calm-error-note {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@keyframes demo-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .demo-toolbar { display: block; }
  .demo-toolbar form { margin-top: 18px; }
  .demo-frame { min-height: 65vh; }
  .release-with-demo { grid-template-columns: 1fr; }
  .release-actions { justify-items: start; }
  .shared-preview { grid-column: 1; }
  .shared-preview-label { align-items: flex-start; flex-direction: column; }
  .shared-preview-intro { grid-template-columns: 1fr; gap: 16px; }
  .shared-preview-frame { min-height: 65vh; }
}
