.playground-hero {
  margin-top: 18px;
}

.playground-page main.container {
  max-width: none;
}

.playground-shell {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 16px;
  margin-top: 16px;
  position: relative;
  align-items: stretch;
  --playground-divider-position: calc(52% + 8px);
}

.playground-shell::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: var(--playground-divider-position);
  transform: translateX(-50%);
  width: 14px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.04)),
    linear-gradient(180deg, rgba(139,92,246,.22), rgba(139,92,246,.08));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 0 0 1px rgba(0,0,0,.08), inset 0 0 0 1px rgba(255,255,255,.03);
  cursor: col-resize;
  z-index: 3;
}

.playground-shell::after {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--playground-divider-position);
  transform: translate(-50%, -50%);
  width: 4px;
  height: 64px;
  border-radius: 999px;
  background: rgba(255,255,255,.38);
  box-shadow: 0 14px 32px rgba(0,0,0,.18);
  pointer-events: none;
  z-index: 4;
}

.playground-shell.is-resizing,
.playground-shell.is-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

.playground-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 620px;
}

.playground-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.playground-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.playground-select,
.playground-editor {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  border-radius: 16px;
}

.playground-select {
  padding: 10px 12px;
  font: inherit;
}

.playground-select option {
  color: #111827;
  background: #ffffff;
}

.playground-editor {
  flex: 1;
  min-height: 420px;
  padding: 16px;
  resize: vertical;
  font: 14px/1.7 "Cascadia Code", Consolas, "Courier New", monospace;
  tab-size: 2;
}

.playground-editor:focus,
.playground-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255,255,255,.04), 0 0 0 5px rgba(191,32,32,.14);
}

.playground-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.playground-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.playground-btn.primary {
  border-color: rgba(139,92,246,.45);
  background: rgba(139,92,246,.12);
}

.playground-btn:hover {
  opacity: .95;
}

.playground-btn:focus {
  outline: none;
  border-color: var(--brand);
}

.playground-preview-frame {
  flex: 1;
  min-height: 470px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.playground-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.playground-status strong {
  color: var(--text);
}

.playground-hint {
  border: 1px dashed rgba(255,255,255,.2);
  background: rgba(255,255,255,.02);
  border-radius: 16px;
  padding: 14px;
  color: var(--muted);
  line-height: 1.8;
}

.playground-hint b,
.playground-hint strong {
  color: var(--text);
}

.playground-snippets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.playground-snippet {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.playground-snippet:hover {
  border-color: var(--brand);
}

@media (max-width: 920px) {
  .playground-shell {
    grid-template-columns: 1fr;
  }

  .playground-shell::before,
  .playground-shell::after {
    display: none;
  }

  .playground-card {
    min-height: auto;
  }

  .playground-preview-frame {
    min-height: 360px;
  }
}
