:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: #070c12;
  color: #f5f2e9;
}
* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  display: grid;
  grid-template-rows: 64px 1fr;
  background: #070c12;
}
.preview-bar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(217, 170, 74, 0.28);
  background: rgba(6, 14, 25, 0.98);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}
.preview-brand {
  display: inline-flex;
}
.preview-brand img {
  width: 150px;
  height: auto;
  display: block;
}
.preview-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.preview-title strong {
  color: #f2d27f;
  font-size: 0.86rem;
}
.preview-title span {
  overflow: hidden;
  color: rgba(235, 239, 246, 0.62);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(217, 170, 74, 0.48);
  border-radius: 999px;
  color: #f2d27f;
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}
.preview-back:hover,
.preview-back:focus-visible {
  background: #e0bd65;
  color: #07101b;
  outline: none;
}
.preview-stage {
  position: relative;
  min-height: 0;
  background: #101311;
}
.preview-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #101311;
}
.preview-loading,
.preview-error {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  background: #101311;
  color: rgba(244, 241, 232, 0.7);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}
.preview-loading.hidden {
  opacity: 0;
  visibility: hidden;
  transition: 0.35s ease;
}
.preview-loading span {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(224, 189, 101, 0.25);
  border-top-color: #e0bd65;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}
@media (max-width: 640px) {
  body {
    grid-template-rows: 58px 1fr;
  }
  .preview-bar {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 0 12px;
  }
  .preview-brand img {
    width: 125px;
  }
  .preview-title {
    display: none;
  }
  .preview-back {
    min-height: 34px;
    padding: 0 11px;
    font-size: 0.68rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .preview-loading span {
    animation: none;
  }
}
