* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--site-bg);
  color: var(--site-text);
  font: 0.875rem/1.7 var(--site-font);
  -webkit-font-smoothing: antialiased;
}
.preview-shell {
  max-width: 1200px;
  margin: auto;
  padding: 16px 28px;
}
.preview-shell > .ecosystem-link {
  display: none;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--site-line);
  padding-bottom: 18px;
}
h1 {
  font-size: 0.9375rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
}
h1 > span {
  font-size: 0.75rem;
  color: var(--site-muted);
  border-left: 1px solid var(--site-line);
  padding-left: 14px;
  font-weight: 400;
}
.preview-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
nav {
  display: flex;
  gap: 22px;
  font-size: 0.75rem;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--site-muted);
}
a:hover {
  color: var(--site-accent);
}
:focus-visible {
  outline: 3px solid var(--site-accent);
  outline-offset: 3px;
}
.intro {
  color: var(--site-muted);
  margin: 24px 0 18px;
  font-size: 1rem;
}
.controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px 16px;
}
label {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--site-muted);
}
select,
button {
  font: inherit;
  font-size: 0.875rem;
  color: var(--site-text);
  background: var(--site-surface);
  border: 1px solid var(--site-line-strong);
  border-radius: var(--site-radius-sm);
  padding: 7px 10px;
  min-height: 36px;
  max-width: 100%;
}
select {
  -webkit-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--site-muted) 50%),
    linear-gradient(135deg, var(--site-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 10px) 50%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  padding-inline-end: 28px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 1;
  background: var(--site-disabled-bg);
  color: var(--site-disabled-text);
}
#sample {
  min-width: 190px;
}
#flip {
  background: var(--site-accent-solid);
  color: var(--site-on-accent);
  padding-inline: 20px;
  margin-left: auto;
}
.preview-stage {
  margin: 14px auto 0;
  max-width: 1144px;
  background: var(--site-soft);
  border-radius: var(--site-radius);
  padding: 24px;
  min-width: 0;
}
#preview {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: auto;
  border: 0;
  border-radius: var(--site-radius-sm);
  min-height: 530px;
  height: calc(100dvh - 320px);
  background: var(--site-surface);
}
body[data-viewport="phone"] #preview {
  width: 390px;
}
#status {
  font-size: 0.75rem;
  color: var(--site-muted);
  margin: 0;
}
#retry {
  margin-top: 12px;
}
.ecosystem-footer {
  font-size: 0.75rem;
  padding: 12px 0;
}
.ecosystem-footer a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
[hidden] {
  display: none !important;
}
.preview-loading {
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--site-muted);
  font-size: 0.8125rem;
}
.loading-card {
  width: 220px;
  height: 130px;
  background: var(--site-surface);
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.loading-card i {
  height: 8px;
  background: var(--site-line);
  border-radius: 2px;
  width: 90%;
  animation: loading 1.5s ease-in-out infinite alternate;
}
.loading-card i:last-child {
  width: 60%;
}
@keyframes loading {
  to {
    opacity: 0.4;
  }
}
#flip:disabled {
  background: var(--site-disabled-bg);
  color: var(--site-disabled-text);
  border-color: var(--site-line);
}
@media (max-width: 760px) {
  .preview-shell {
    padding: 14px 18px;
  }
  header {
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 14px;
  }
  h1 {
    font-size: 0.875rem;
  }
  h1 > span {
    font-size: 0.75rem;
  }
  nav {
    gap: 16px;
    font-size: 0.75rem;
  }
  nav a {
    min-height: 32px;
  }
  .intro {
    font-size: 1rem;
    margin: 18px 0;
  }
  .controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
  }
  .controls label {
    font-size: 0.75rem;
  }
  .controls select {
    width: 100%;
    font-size: 0.8125rem;
    min-height: 40px;
  }
  #sample {
    min-width: 0;
  }
  #flip {
    margin: 0;
    min-height: 40px;
    width: 100%;
    font-size: 0.875rem;
    grid-column: 1/-1;
    background: var(--site-accent-solid);
    color: var(--site-on-accent);
  }
  .preview-stage {
    margin: 6px 0 0;
    padding: 14px;
  }
  #preview {
    min-height: 480px;
    height: 65dvh;
  }
  .ecosystem-footer {
    gap: 20px;
  }
  .ecosystem-footer a {
    font-size: 0.75rem;
    min-height: 40px;
  }
}
@media (max-width: 360px) {
  .preview-shell {
    padding-inline: 14px;
  }
  h1 {
    gap: 10px;
  }
  h1 > span {
    padding-left: 10px;
  }
  .controls {
    gap: 12px 10px;
  }
  .controls select {
    font-size: 0.875rem;
  }
  .preview-stage {
    padding: 10px;
  }
}
