.editor-shell {
  --wf-accent: #6366f1;
  --wf-bg: #ffffff;
  --wf-text: #111827;
  --wf-accent-soft: color-mix(in srgb, var(--wf-accent) 18%, transparent);
  --wf-accent-border: color-mix(in srgb, var(--wf-accent) 42%, transparent);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.editor-shell.is-busy {
  pointer-events: none;
  opacity: 0.92;
}

.editor-shell.is-busy .wireframe-feed {
  filter: saturate(0.88);
}

.wireframe-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-bottom: 12px;
  padding: 14px 16px;
  background:
    linear-gradient(135deg, var(--wf-accent-soft), transparent 58%),
    #18181b;
  border-color: color-mix(in srgb, var(--wf-accent) 28%, #27272a);
}

.wireframe-toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wireframe-toolbar-title {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: #fafafa;
}

.wireframe-toolbar-hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #a1a1aa;
}

.toolbar-swatches {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--wf-accent) 22%, #27272a);
}

.toolbar-swatches > .label {
  display: block;
  margin-bottom: 8px;
}

.toolbar-swatches-row {
  display: flex;
  gap: 8px;
}

.toolbar-swatches .swatch {
  flex: 1;
  min-width: 0;
  opacity: 0.55;
  filter: saturate(0.75) brightness(0.92);
}

.toolbar-swatches .swatch:not(.selected):hover {
  opacity: 0.78;
  filter: saturate(0.9) brightness(0.98);
}

.toolbar-swatches .swatch.selected {
  opacity: 1;
  filter: none;
}

.toolbar-swatches .swatch-preview {
  height: 24px;
}

.toolbar-swatches .swatch-label {
  color: #0a0a0a;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.wireframe-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}

.wf-page-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wf-page-group.is-collapsed .wf-page-body {
  display: none;
}

.wf-page-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wf-page-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--site-radius-shell);
  border: 1px solid color-mix(in srgb, var(--wf-accent) 28%, #27272a);
  background:
    linear-gradient(135deg, var(--wf-accent-soft), transparent 58%),
    #18181b;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.wf-page-divider:hover {
  border-color: var(--wf-accent-border);
}

.wf-page-divider:focus-visible {
  outline: 2px solid var(--wf-accent-border);
  outline-offset: 2px;
}

.wf-page-divider.has-errors {
  border-color: #f87171;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #f87171 45%, transparent);
}

.wf-page-error-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  flex-shrink: 0;
}

.wf-page-error-badge.hidden {
  display: none;
}

.wf-page-group:not(.is-collapsed) .wf-page-divider {
  border-color: var(--wf-accent-border);
}

.wf-page-divider-icon {
  font-size: 14px;
  line-height: 1;
}

.wf-page-divider-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wf-page-chevron {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1;
  color: #a1a1aa;
}

.wf-page-divider-title {
  font-size: 14px;
  font-weight: 600;
  color: #fafafa;
}

.wf-page-divider-hint {
  font-size: 12px;
  color: #a1a1aa;
}

.wf-block-card {
  border: 1px solid #27272a;
  border-radius: var(--site-radius-card);
  background: #111113;
  overflow: hidden;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.wf-block-card::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--wf-accent), transparent);
}

.wf-block-card.is-disabled {
  opacity: 0.58;
  border-style: dashed;
}

.wf-block-card.is-disabled .wf-block-body {
  display: none;
}

.wf-block-card.is-disabled .wf-block-head {
  border-bottom: none;
}

.wf-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #27272a;
}

.wf-block-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 12rem;
  min-width: 0;
}

.wf-block-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--wf-accent-soft);
  color: var(--wf-accent);
  font-size: 15px;
  flex-shrink: 0;
}

.wf-block-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.wf-block-copy {
  min-width: 0;
}

.wf-block-desc {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #a1a1aa;
  overflow-wrap: anywhere;
}

.wf-block-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}

.wf-toggle-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.wf-toggle-label {
  font-size: 11px;
  color: #71717a;
  white-space: nowrap;
}

.wf-mandatory-badge {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wf-accent);
  white-space: nowrap;
}

.wf-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.wf-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.wf-toggle-track {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #3f3f46;
  transition: background 0.15s ease;
  cursor: pointer;
}

.wf-toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fafafa;
  transition: transform 0.15s ease;
}

.wf-toggle-input:checked + .wf-toggle-track {
  background: var(--wf-accent);
}

.wf-toggle-input:checked + .wf-toggle-track::after {
  transform: translateX(18px);
}

.wf-toggle-input:focus-visible + .wf-toggle-track {
  outline: 2px solid var(--wf-accent);
  outline-offset: 2px;
}

.wf-block-body {
  padding: 16px;
}

.wf-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wf-editor-hero,
.wf-editor-about {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.wf-site-surface {
  padding: 16px;
  border-radius: var(--site-radius-shell);
  background: var(--color-background, #ffffff);
  color: var(--color-text, #111827);
  border: 1px solid var(--color-border, #e4e4e7);
}

.wf-about-image-badge {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed var(--wf-accent-border);
  background: color-mix(in srgb, var(--wf-accent) 8%, #09090b);
  font-size: 12px;
  line-height: 1.4;
  color: #a1a1aa;
}

.wf-editor-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.wf-editor-media-slot {
  position: relative;
  display: block;
  width: 100%;
  cursor: pointer;
}

.wf-editor-media-slot.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.wf-editor-media-slot.is-disabled .wf-editor-media-input {
  pointer-events: none;
}

.wf-media-hint {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-text-muted, #71717a);
}

.wf-editor-media-slot.is-invalid .wf-editor-media-frame {
  border-color: #f87171;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #f87171 45%, transparent);
}

.wf-media-error {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #fca5a5;
}

.wf-editor-media-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 140px;
  border: 1px dashed var(--wf-accent-border);
  background: var(--wf-bg, #fafaf9);
}

.wf-editor-media-slot.has-preview .wf-editor-media-frame {
  min-height: 0;
  border: none;
  background: transparent;
}

.wf-editor-media-input {
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.wf-editor-media-cta {
  position: absolute;
  inset: auto 10px 10px;
  z-index: 1;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, #09090b 72%, transparent);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  color: #d4d4d8;
  pointer-events: none;
}

.wf-editor-media-slot.has-preview .wf-editor-media-cta {
  display: none;
}

.wf-editor-media-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--site-radius-photo);
  background:
    linear-gradient(135deg, var(--wf-accent-soft), transparent),
    repeating-linear-gradient(
      -45deg,
      #18181b,
      #18181b 8px,
      #111113 8px,
      #111113 16px
    );
}

.wf-editor-media-preview {
  position: relative;
  z-index: 1;
  width: 100%;
}

.wf-editor-media-slot.has-preview .wf-editor-media-placeholder {
  display: none;
}

.wf-editor-banner {
  padding: 12px;
  border: 1px dashed var(--wf-accent-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--wf-accent) 6%, #09090b);
}

.wf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.wf-field-label {
  font-size: 13px;
  font-weight: 500;
  color: #d4d4d8;
}

.wf-field-hint {
  font-size: 12px;
  line-height: 1.4;
  color: #71717a;
}

.wf-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid #3f3f46;
  border-radius: 10px;
  background: #09090b;
  color: #fafafa;
  padding: 10px 12px;
  font: inherit;
  line-height: 1.4;
}

.wf-input[type="file"] {
  padding: 8px 10px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wf-input::placeholder {
  color: #52525b;
}

.wf-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #a1a1aa 50%),
    linear-gradient(135deg, #a1a1aa 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.wf-social-links {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #27272a;
}

.wf-social-links-intro {
  margin: 0 0 12px;
}

.wf-input:focus {
  outline: 2px solid var(--wf-accent-border);
  outline-offset: 1px;
  border-color: var(--wf-accent);
}

textarea.wf-input {
  resize: vertical;
  min-height: 72px;
}

.wf-block-empty,
.wf-list-empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px dashed var(--wf-accent-border);
  border-radius: var(--site-radius-control);
  background: color-mix(in srgb, var(--wf-accent) 5%, #09090b);
}

.wf-block-empty-title,
.wf-list-empty-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #fafafa;
}

.wf-block-empty-hint,
.wf-list-empty-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #a1a1aa;
}

.wf-fill-example {
  width: 100%;
}

.wf-list-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wf-list-item {
  border: 1px solid #27272a;
  border-radius: 12px;
  padding: 12px;
  background: #0d0d0f;
}

.wf-list-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.wf-list-item-head-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.wf-list-item-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #d4d4d8;
}

.wf-drag-handle {
  appearance: none;
  flex-shrink: 0;
  width: 28px;
  height: 32px;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  background: #18181b;
  color: #71717a;
  cursor: grab;
  touch-action: none;
  font: inherit;
  font-size: 15px;
  line-height: 1;
}

.wf-drag-handle:active {
  cursor: grabbing;
}

.wf-list-item.is-dragging {
  opacity: 0.58;
  border-color: #52525b;
}

.wf-list-item.is-drop-target {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
}

.wf-list-actions {
  display: flex;
  gap: 4px;
}

.wf-list-action {
  appearance: none;
  min-width: 32px;
  height: 32px;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  background: #18181b;
  color: #d4d4d8;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.wf-list-action:hover {
  background: #27272a;
}

.wf-list-action.danger {
  color: #fca5a5;
  border-color: #7f1d1d;
}

.wf-add-item {
  align-self: flex-start;
}

.wf-skeleton {
  border: 1px dashed #3f3f46;
  border-radius: 14px;
  background: #09090b;
}

.wf-skeleton-hero {
  display: grid;
  gap: 12px;
}

.wf-skeleton-media {
  height: 120px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, var(--wf-accent-soft), transparent),
    repeating-linear-gradient(
      -45deg,
      #18181b,
      #18181b 8px,
      #111113 8px,
      #111113 16px
    );
}

.wf-skeleton-stack,
.wf-skeleton-text,
.wf-skeleton-contacts,
.wf-skeleton-list,
.wf-skeleton-banner {
  padding: 14px;
}

.wf-skeleton-banner {
  border-color: var(--wf-accent-border);
  background: color-mix(in srgb, var(--wf-accent) 8%, #09090b);
}

.wf-skeleton-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wf-skeleton-pill,
.wf-skeleton-button,
.wf-skeleton-line {
  display: block;
  border-radius: 999px;
  background: #27272a;
}

.wf-skeleton-pill {
  width: 88px;
  height: 18px;
}

.wf-skeleton-button {
  width: 132px;
  height: 34px;
  border-radius: 10px;
  margin-top: 4px;
  background: color-mix(in srgb, var(--wf-accent) 36%, #27272a);
}

.wf-skeleton-line {
  height: 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.wf-skeleton-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #27272a;
}

.wf-skeleton-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.wf-skeleton-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--wf-accent);
  flex-shrink: 0;
}

.wf-skeleton-row-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.wf-skeleton-row-body strong,
.wf-preview-title {
  font-size: 14px;
  font-weight: 600;
}

.wf-skeleton-row-body span,
.wf-preview-copy,
.wf-preview-meta {
  font-size: 13px;
  line-height: 1.45;
  color: #a1a1aa;
}

.wf-preview-meta {
  margin: 8px 0 0;
}

.wf-hero-upload {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  color: #a1a1aa;
}

.wf-hero-upload input {
  font: inherit;
  color: #fafafa;
}

.wireframe-actions {
  margin-top: 12px;
}

@media (min-width: 480px) {
  .wf-skeleton-hero {
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: start;
  }

  .wf-skeleton-media {
    min-height: 160px;
  }
}

.wireframe-feed,
.editor-shell,
.wf-block-body {
  max-width: 100%;
  overflow-x: hidden;
}

.wf-field.is-invalid .wf-input {
  border-color: #f87171;
  outline-color: color-mix(in srgb, #f87171 40%, transparent);
}

.wf-field-error {
  font-size: 12px;
  line-height: 1.35;
  color: #fecaca;
}

