.snippet-stage {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.snippet-form,
.snippet-result {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.035);
  min-width: 0;
}
.snippet-form h2,
.snippet-result h2 {
  margin: 0.35rem 0 1rem;
  font-size: 1.5rem;
  color: #fff;
}
.snippet-form label {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
  color: #c9d2ce;
  font-size: 0.92rem;
}
.snippet-form label > span {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.snippet-form output {
  color: #8fa09a;
  font-variant-numeric: tabular-nums;
}
.snippet-form input,
.snippet-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font: inherit;
}
.snippet-form textarea {
  min-height: 112px;
  resize: vertical;
}
.snippet-form input:focus-visible,
.snippet-form textarea:focus-visible,
.snippet-toggle button:focus-visible,
.snippet-copy:focus-visible {
  outline: 2px solid #b49cff;
  outline-offset: 2px;
}
.snippet-hint {
  margin: 0;
  color: #8fa09a;
  font-size: 0.85rem;
  line-height: 1.5;
}
.snippet-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 1rem;
}
.snippet-toggle button {
  min-height: 44px;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #c9d2ce;
  font: inherit;
  cursor: pointer;
}
.snippet-toggle button[aria-pressed="true"] {
  background: #fff;
  color: #101314;
  font-weight: 700;
}
.snippet-card {
  border-radius: 12px;
  padding: 18px 16px;
  background: #fff;
  color: #202124;
  font-family: Arial, sans-serif;
  overflow: hidden;
  max-width: 632px;
}
.snippet-card[data-device="mobile"] {
  max-width: 360px;
}
.snippet-card-source {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  min-width: 0;
}
.snippet-card-source i {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8eaed;
}
.snippet-card-source div {
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #4d5156;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.snippet-card-source strong {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: #202124;
}
.snippet-card-title {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 400;
  color: #1a0dab;
  overflow-wrap: anywhere;
}
.snippet-card[data-device="mobile"] .snippet-card-title {
  font-size: 18px;
}
.snippet-card-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.58;
  color: #4d5156;
  overflow-wrap: anywhere;
}
.snippet-checks {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.snippet-checks li {
  padding: 0.65rem 0.8rem 0.65rem 2.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #dfe6e2;
  font-size: 0.92rem;
  line-height: 1.5;
  position: relative;
}
.snippet-checks li::before {
  position: absolute;
  left: 0.75rem;
  top: 0.65rem;
  font-weight: 700;
}
.snippet-checks li[data-state="ok"]::before { content: "✓"; color: #7ee0a8; }
.snippet-checks li[data-state="warn"]::before { content: "!"; color: #ffcf6b; }
.snippet-checks li[data-state="info"]::before { content: "i"; color: #9cc7ff; }
.snippet-code {
  margin: 1.1rem 0 0.6rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  color: #dfe6e2;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.snippet-copy {
  min-height: 44px;
}
.snippet-copy-note {
  display: inline-block;
  margin-left: 0.75rem;
  color: #8fa09a;
  font-size: 0.85rem;
}
@media (max-width: 860px) {
  .snippet-stage {
    grid-template-columns: minmax(0, 1fr);
  }
}
