/* Wireframe tool — independent of estimate */
.ae-wf-section {
  --wf-accent: var(--ae-primary, #3075f0);
  --wf-accent-soft: #e8eef8;
  --wf-accent-mid: #c8d6ec;
  --wf-accent-rgb: 48, 117, 240;
  --wf-text: var(--ae-text, #111827);
  --wf-sub: var(--ae-text-sub, #6b7280);
  --wf-border: var(--ae-border, #e5e7eb);
  --wf-muted: #f3f4f6;
  --wf-block: #e5e7eb;
  --wf-line: #d1d5db;
  padding: 40px 0 96px;
  background: #fff;
  color: var(--wf-text);
  overflow-x: clip;
}

.ae-wf-compose,
.ae-wf-sections,
.ae-wf-stack-list,
.ae-wf-canvas,
.ae-wf-add-list {
  scrollbar-width: thin;
  scrollbar-color: #c5cad3 transparent;
}
.ae-wf-compose::-webkit-scrollbar,
.ae-wf-sections::-webkit-scrollbar,
.ae-wf-stack-list::-webkit-scrollbar,
.ae-wf-canvas::-webkit-scrollbar,
.ae-wf-add-list::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.ae-wf-compose::-webkit-scrollbar-track,
.ae-wf-sections::-webkit-scrollbar-track,
.ae-wf-stack-list::-webkit-scrollbar-track,
.ae-wf-canvas::-webkit-scrollbar-track,
.ae-wf-add-list::-webkit-scrollbar-track {
  background: transparent;
}
.ae-wf-compose::-webkit-scrollbar-thumb,
.ae-wf-sections::-webkit-scrollbar-thumb,
.ae-wf-stack-list::-webkit-scrollbar-thumb,
.ae-wf-canvas::-webkit-scrollbar-thumb,
.ae-wf-add-list::-webkit-scrollbar-thumb {
  background: #c5cad3;
  border-radius: 999px;
}
.ae-wf-compose::-webkit-scrollbar-thumb:hover,
.ae-wf-sections::-webkit-scrollbar-thumb:hover,
.ae-wf-stack-list::-webkit-scrollbar-thumb:hover,
.ae-wf-canvas::-webkit-scrollbar-thumb:hover,
.ae-wf-add-list::-webkit-scrollbar-thumb:hover {
  background: #9aa3af;
}
.ae-wf-compose::-webkit-scrollbar-button,
.ae-wf-sections::-webkit-scrollbar-button,
.ae-wf-stack-list::-webkit-scrollbar-button,
.ae-wf-canvas::-webkit-scrollbar-button,
.ae-wf-add-list::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.ae-wf-pagehead {
  margin: 0 auto 32px;
}
.ae-wf-pagehead .ae-kicker {
  margin-bottom: 12px;
}
.ae-wf-pagehead .ae-h2 {
  margin: 0;
}

.ae-wf-tabs {
  display: none;
}

.ae-wf-layout {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(720px, 1fr) minmax(220px, 280px);
  gap: 20px 20px;
  align-items: start;
  max-width: min(1680px, 100%);
  width: 100%;
  box-sizing: border-box;
}

.ae-wf-sidebar__title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--wf-sub);
  text-transform: uppercase;
}
.ae-wf-sidebar__meta {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--wf-sub);
}

.ae-wf-compose {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: min(70vh, 720px);
  overflow-x: visible;
  overflow-y: auto;
  padding-right: 2px;
  width: 100%;
  box-sizing: border-box;
}
.ae-wf-sidebar {
  min-width: 0;
  width: 100%;
  overflow: visible;
  box-sizing: border-box;
}

.ae-wf-build {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--wf-border);
  width: 100%;
  box-sizing: border-box;
}
.ae-wf-build__label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--wf-sub);
  letter-spacing: -0.01em;
}
.ae-wf-build__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ae-wf-build__btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--wf-border);
  border-radius: 8px;
  background: #fff;
  color: var(--wf-text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.ae-wf-build__btn:hover {
  border-color: rgba(var(--wf-accent-rgb), 0.45);
  background: rgba(var(--wf-accent-rgb), 0.04);
}
.ae-wf-build__btn.is-active {
  border-color: var(--wf-accent);
  background: rgba(var(--wf-accent-rgb), 0.1);
  color: var(--wf-accent);
}

.ae-wf-color {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--wf-border);
  width: 100%;
  box-sizing: border-box;
}
.ae-wf-color__label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--wf-sub);
  letter-spacing: -0.01em;
}
.ae-wf-color__row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}
.ae-wf-color__trigger {
  position: relative;
  flex: 0 0 auto;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}
.ae-wf-color__trigger input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  opacity: 0;
  cursor: pointer;
}
.ae-wf-color__preview {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}
.ae-wf-color__hex {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--wf-border);
  background: #fff;
  color: var(--wf-text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.ae-wf-color__hex:focus {
  outline: none;
  border-color: var(--wf-accent);
  box-shadow: 0 0 0 2px rgba(var(--wf-accent-rgb), 0.18);
}

.ae-wf-page-row {
  display: flex;
  align-items: stretch;
  gap: 2px;
  cursor: grab;
  user-select: none;
  border: 1px solid transparent;
}
.ae-wf-page-row:active {
  cursor: grabbing;
}
.ae-wf-page-row.is-dragging {
  opacity: 0.45;
}
.ae-wf-page-row.is-drag-over {
  border-color: var(--wf-accent);
  background: rgba(var(--wf-accent-rgb), 0.06);
}
.ae-wf-page-row__handle {
  flex: 0 0 14px;
  width: 14px;
  align-self: center;
  height: 18px;
  margin-left: 2px;
  background:
    radial-gradient(circle, var(--wf-sub) 1.2px, transparent 1.4px) 0 0 / 6px 6px,
    radial-gradient(circle, var(--wf-sub) 1.2px, transparent 1.4px) 6px 0 / 6px 6px;
  background-repeat: repeat-y;
  opacity: 0.5;
  cursor: grab;
}
.ae-wf-page-row.is-active .ae-wf-page {
  background: rgba(var(--wf-accent-rgb), 0.08);
  border-left-color: var(--wf-accent);
  color: var(--wf-accent);
  font-weight: 600;
}

.ae-wf-page {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  border: none;
  border-left: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--wf-text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ae-wf-page--sub {
  flex: 1;
  min-width: 0;
}
.ae-wf-page__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
  white-space: nowrap;
}
.ae-wf-page__badge {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--wf-sub);
  font-variant-numeric: tabular-nums;
}
.ae-wf-page.is-active .ae-wf-page__badge,
.ae-wf-page-row.is-active .ae-wf-page__badge {
  color: var(--wf-accent);
}
.ae-wf-page:hover {
  background: var(--wf-muted);
}
.ae-wf-page.is-active {
  background: rgba(var(--wf-accent-rgb), 0.08);
  border-left-color: var(--wf-accent);
  color: var(--wf-accent);
  font-weight: 600;
}

.ae-wf-page-del {
  flex: 0 0 32px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--wf-sub);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.ae-wf-page-del:hover {
  color: #b91c1c;
  background: #fef2f2;
}

.ae-wf-add-toggle {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px dashed var(--wf-border);
  background: transparent;
  color: var(--wf-accent);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ae-wf-add-toggle:hover,
.ae-wf-add-toggle.is-open {
  background: rgba(var(--wf-accent-rgb), 0.06);
  border-color: #bfdbfe;
}

.ae-wf-add-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0 0;
  padding: 6px;
  background: var(--wf-muted);
  max-height: 240px;
  overflow: auto;
}
.ae-wf-add-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--wf-text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.ae-wf-add-item:hover {
  background: #fff;
  color: var(--wf-accent);
}

.ae-wf-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(70vh, 720px);
  overflow: hidden;
  padding-right: 0;
}

.ae-wf-stack-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(34vh, 300px);
  overflow: auto;
  padding-right: 4px;
}

.ae-wf-stack-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 8px;
  border: 1px solid var(--wf-border);
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: var(--wf-text);
  cursor: grab;
  user-select: none;
  transition: border-color 0.12s ease, background 0.12s ease, opacity 0.12s ease;
}
.ae-wf-stack-item:active {
  cursor: grabbing;
}
.ae-wf-stack-item.is-dragging {
  opacity: 0.45;
}
.ae-wf-stack-item.is-drag-over {
  border-color: var(--wf-accent);
  background: rgba(var(--wf-accent-rgb), 0.06);
}
.ae-wf-stack-item__handle {
  flex: 0 0 14px;
  width: 14px;
  height: 18px;
  background:
    radial-gradient(circle, var(--wf-sub) 1.2px, transparent 1.4px) 0 0 / 6px 6px,
    radial-gradient(circle, var(--wf-sub) 1.2px, transparent 1.4px) 6px 0 / 6px 6px;
  background-repeat: repeat-y;
  opacity: 0.55;
}
.ae-wf-stack-item__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ae-wf-stack-item__actions {
  display: inline-flex;
  gap: 2px;
  flex-shrink: 0;
}

.ae-wf-icon-btn {
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: none;
  background: var(--wf-muted);
  color: var(--wf-text);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.ae-wf-icon-btn:hover:not(:disabled) {
  background: #e0edff;
  color: var(--wf-accent);
}
.ae-wf-icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.ae-wf-icon-btn--danger:hover:not(:disabled) {
  background: #fef2f2;
  color: #b91c1c;
}

.ae-wf-add-toggle.is-disabled,
.ae-wf-add-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  color: var(--wf-sub);
}
.ae-wf-lib {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 1 auto;
  min-height: 0;
}
.ae-wf-lib-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
  padding: 2px 0 0;
}
.ae-wf-lib-cat {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--wf-border);
  background: #fff;
  color: var(--wf-sub);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.ae-wf-lib-cat:hover {
  border-color: #bfdbfe;
  color: var(--wf-accent);
  background: rgba(var(--wf-accent-rgb), 0.04);
}
.ae-wf-lib-cat.is-active {
  border-color: var(--wf-accent);
  background: rgba(var(--wf-accent-rgb), 0.08);
  color: var(--wf-accent);
}
.ae-wf-add-list--sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  flex: 0 1 auto;
  max-height: min(42vh, 420px);
  overflow: auto;
  padding: 8px;
  background: var(--wf-muted);
  border: 1px solid var(--wf-border);
}

.ae-wf-lib-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--wf-border);
  background: #fff;
  color: var(--wf-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.ae-wf-lib-card:hover {
  border-color: #bfdbfe;
  background: rgba(var(--wf-accent-rgb), 0.04);
  color: var(--wf-accent);
}
.ae-wf-lib-card__label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.ae-wf-thumb {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  padding: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  pointer-events: none;
}
.ae-wf-thumb-live {
  width: 100%;
  padding: 10px 12px;
  box-sizing: border-box;
  background: #fff;
  zoom: 0.48;
}
@supports not (zoom: 1) {
  .ae-wf-thumb {
    aspect-ratio: 2.8 / 1;
  }
  .ae-wf-thumb-live {
    position: absolute;
    left: 0;
    top: 0;
    width: 208.33%;
    zoom: normal;
    transform: scale(0.48);
    transform-origin: top left;
    padding: 10px 12px;
  }
}
.ae-wf-thumb-live .ae-wf-stack {
  gap: 6px;
}
.ae-wf-thumb-live .ae-wf-row {
  gap: 8px;
}
.ae-wf-thumb-live .ae-wf-box--hero-full {
  min-height: 140px;
}
.ae-wf-thumb-live .ae-wf-box--hero-half,
.ae-wf-thumb-live .ae-wf-box--hero {
  min-height: 84px;
}
.ae-wf-thumb-live .ae-wf-box--map {
  min-height: 84px;
}
.ae-wf-thumb-live .ae-wf-box--tall {
  min-height: 64px;
}
.ae-wf-thumb-live .ae-wf-history {
  gap: 8px;
}
.ae-wf-thumb__hero {
  height: 36px;
  background: #d1d5db;
  border-radius: 2px;
}
.ae-wf-thumb__hero--full {
  flex: 1;
  height: auto;
  min-height: 100%;
}
.ae-wf-thumb__hero--half {
  flex: 0 0 auto;
  height: 42%;
  min-height: 28px;
  max-height: 48px;
  margin: auto 0;
}
.ae-wf-thumb__hero.media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
}
.ae-wf-thumb__hero.media span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #c4c9d1;
}
.ae-wf-thumb__hero.map { height: 28px; }
.ae-wf-thumb__row {
  display: flex;
  gap: 3px;
  align-items: stretch;
  width: 100%;
  flex: 1;
  min-height: 0;
}
.ae-wf-thumb__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ae-wf-thumb__box {
  flex: 1;
  min-height: 22px;
  background: #d1d5db;
  border-radius: 2px;
}
.ae-wf-thumb__box.grow { flex: 1; min-height: 28px; }
.ae-wf-thumb__box.flat { min-height: 18px; }
.ae-wf-thumb__card {
  flex: 1;
  min-height: 28px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 2px;
}
.ae-wf-thumb__card.tall { min-height: 36px; }
.ae-wf-thumb__field {
  height: 8px;
  width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1px;
}
.ae-wf-thumb__field.grow { flex: 1; height: auto; min-height: 10px; }
.ae-wf-thumb__field.tall { height: 16px; }
.ae-wf-thumb__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  flex: 1;
}
.ae-wf-thumb__grid span {
  aspect-ratio: 1;
  background: #e5e7eb;
  border-radius: 1px;
}
.ae-wf-thumb__grid.port {
  grid-template-columns: 1fr 1fr;
}
.ae-wf-thumb__grid.port span {
  aspect-ratio: 4 / 3;
}
.ae-wf-thumb__row.dots span,
.ae-wf-thumb__row.team span {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.ae-wf-thumb__row.dots span::before,
.ae-wf-thumb__row.team span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e5e7eb;
}
.ae-wf-thumb__row.team span::before {
  width: 14px;
  height: 14px;
}
.ae-wf-thumb__row.dots span::after,
.ae-wf-thumb__row.team span::after {
  content: "";
  width: 70%;
  height: 2px;
  background: #d1d5db;
}
.ae-wf-thumb__row.stats span {
  flex: 1;
  height: 18px;
  background: #e5e7eb;
  border-radius: 1px;
}
.ae-wf-thumb__row.logos span {
  flex: 1;
  height: 12px;
  background: #e5e7eb;
  border-radius: 1px;
}
.ae-wf-thumb__row.tabs span {
  width: 22px;
  height: 8px;
  flex: none;
  background: #e5e7eb;
  border-radius: 1px;
}
.ae-wf-thumb__row.tabs span:first-child {
  background: #c4c9d1;
}
.ae-wf-thumb__row.pager {
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.ae-wf-thumb__row.pager span {
  width: 10px;
  height: 10px;
  flex: none;
  background: #e5e7eb;
  border-radius: 1px;
}
.ae-wf-thumb__table,
.ae-wf-thumb__faq,
.ae-wf-thumb__timeline,
.ae-wf-thumb__list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.ae-wf-thumb__table span {
  height: 8px;
  background: #e5e7eb;
}
.ae-wf-thumb__table span:nth-child(even) {
  background: #f3f4f6;
}
.ae-wf-thumb__faq span {
  height: 10px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(#d1d5db, #d1d5db) 0 3px / 55% 3px no-repeat;
}
.ae-wf-thumb__timeline span,
.ae-wf-thumb__list span {
  height: 10px;
  background:
    radial-gradient(circle, #e5e7eb 4px, transparent 4.5px) 0 50% / 10px 10px no-repeat,
    linear-gradient(#d1d5db, #d1d5db) 14px 3px / 60% 3px no-repeat;
}
.ae-wf-thumb__cta {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.ae-wf-preview-wrap {
  min-width: 0;
  position: sticky;
  top: calc(var(--ae-header-h, 60px) + 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ae-wf-preview-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  width: 100%;
  max-width: 1440px;
}
.ae-wf-preview-bar__label {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--wf-text);
  justify-self: start;
}
.ae-wf-preview-bar__count {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--wf-sub);
  justify-self: end;
  text-align: right;
}

.ae-wf-device {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 40px;
  padding: 4px;
  border-radius: 999px;
  background: #e8eaed;
  box-sizing: border-box;
}
.ae-wf-device__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.ae-wf-device__btn svg {
  display: block;
  width: 16px;
  height: 16px;
}
.ae-wf-device__btn:hover {
  color: #202124;
}
.ae-wf-device__btn.is-active,
.ae-wf-device__btn[aria-pressed="true"] {
  background: #fff;
  color: #202124;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.18),
    0 1px 3px 1px rgba(60, 64, 67, 0.08);
}

.ae-wf-canvas {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  background: #eceef1;
  border: 1px solid var(--wf-border);
  border-radius: 10px;
  min-height: 720px;
  max-height: min(78vh, 900px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0;
  display: block;
  box-sizing: border-box;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  transition: max-width 0.2s ease, min-height 0.2s ease, border-radius 0.2s ease, box-shadow 0.2s ease;
}

/* Desktop device: homepage viewport (~1440) */
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-preview-bar {
  max-width: 1440px;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-canvas {
  max-width: 1440px;
  min-height: 720px;
  max-height: min(78vh, 900px);
  border-radius: 10px;
  border: 1px solid #d1d5db;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.1);
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-site-header {
  height: 60px;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-site-header__inner {
  height: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.5vw, 36px);
  gap: 16px;
  box-sizing: border-box;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-site-logo {
  flex: 0 0 min(96px, 28%);
  height: 16px;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-site-nav {
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  overflow: visible;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-site-nav__link {
  font-size: 12px;
  padding: 6px 10px;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  flex-shrink: 0;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-site-cta {
  flex: 0 0 88px;
  height: 32px;
  border-radius: 8px;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-site-menu {
  display: none;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-block {
  padding: 36px clamp(16px, 2.5vw, 36px) 36px calc(clamp(16px, 2.5vw, 36px) + 14px);
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-block > .ae-wf-stack,
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-block > .ae-wf-row,
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-block > .ae-wf-promo,
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-block > .ae-wf-form,
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-block > .ae-wf-history {
  max-width: 1360px;
  margin-left: auto;
  margin-right: auto;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-block:has(> .ae-wf-box--hero-full),
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-block:has(> .ae-wf-box--hero-half) {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-block:has(> .ae-wf-box--hero-full) .ae-wf-block__handle,
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-block:has(> .ae-wf-box--hero-half) .ae-wf-block__handle {
  left: 12px;
  z-index: 1;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-block:has(> .ae-wf-box--hero-full) .ae-wf-block__tag,
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-block:has(> .ae-wf-box--hero-half) .ae-wf-block__tag {
  position: absolute;
  top: 12px;
  left: 28px;
  z-index: 1;
  margin: 0;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 4px;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-box--hero {
  min-height: 280px;
  border-radius: 0;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-box--hero-full {
  min-height: 420px;
  border-radius: 0;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-box--hero-half {
  min-height: 320px;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-site-footer {
  padding: 40px clamp(16px, 2.5vw, 36px) 24px;
}
.ae-wf-preview-wrap[data-device="desktop"] .ae-wf-site-footer__grid {
  max-width: 1360px;
  margin: 0 auto 20px;
}

.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-preview-bar {
  max-width: 375px;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-canvas {
  width: 100%;
  max-width: 375px;
  min-height: 667px;
  max-height: min(78vh, 812px);
  border: 10px solid #111827;
  border-radius: 32px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 12px 40px rgba(15, 23, 42, 0.18);
  background: #eceef1;
}

/* Mobile device: header */
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-site-header__inner {
  flex-wrap: nowrap;
  gap: 12px;
  padding: 14px 16px;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-site-nav,
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-site-cta {
  display: none;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-site-menu {
  display: block;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-site-logo {
  flex: 0 0 64px;
}

/* Mobile device: blocks & heroes */
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-block {
  padding: 18px 14px 18px 26px;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-box--hero-half {
  min-height: 200px;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-box--hero-full {
  min-height: 240px;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-box--hero {
  min-height: 180px;
}

/* Mobile device: multi-column → stack (phone layout) */
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-row {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 14px;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-row > * {
  width: 100% !important;
  max-width: none !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
/* 갤러리·포트폴리오만 2열 유지 */
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-row--wrap {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-row--wrap > .ae-wf-box,
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-row--wrap > .ae-wf-box--sq,
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-row--wrap > .ae-wf-stack {
  flex: 1 1 calc(50% - 4px) !important;
  width: calc(50% - 4px) !important;
  max-width: calc(50% - 4px) !important;
  min-width: calc(50% - 4px) !important;
}
/* 리스트형(썸네일/필드 + 텍스트)만 가로 유지 */
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-row:has(> .ae-wf-box--thumb),
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-row:has(> .ae-wf-field),
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-row:has(> .ae-wf-box + .ae-wf-stack) {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-row:has(> .ae-wf-box--thumb) > .ae-wf-box--thumb,
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-row:has(> .ae-wf-field) > .ae-wf-field,
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-row:has(> .ae-wf-box + .ae-wf-stack) > .ae-wf-box {
  width: auto !important;
  flex: 0 0 auto !important;
  max-width: none !important;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-row:has(> .ae-wf-box--thumb) > .ae-wf-stack,
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-row:has(> .ae-wf-field) > .ae-wf-bar,
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-row:has(> .ae-wf-box + .ae-wf-stack) > .ae-wf-stack {
  width: auto !important;
  flex: 1 1 auto !important;
  max-width: none !important;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-form__row {
  flex-direction: column;
}

/* Mobile device: history zigzag → left rail */
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-history--zigzag {
  padding-left: 0;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-history--zigzag::before {
  left: 10px;
  margin-left: 0;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-history__item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: start;
  gap: 0 12px;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-history__dot {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  margin-top: 4px;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-history__slot:empty {
  display: none;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-history__slot:not(:empty) {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  justify-content: flex-start;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-history__item.is-left .ae-wf-history__slot--left,
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-history__item.is-right .ae-wf-history__slot--right {
  justify-content: flex-start;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-history__body {
  align-items: flex-start !important;
  max-width: none;
  width: 100%;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-history__item.is-left .ae-wf-history__body .ae-wf-bar--sm,
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-history__item.is-right .ae-wf-history__body .ae-wf-bar--sm {
  width: 78%;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-history__item.is-left .ae-wf-history__body .ae-wf-bar--xs,
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-history__item.is-right .ae-wf-history__body .ae-wf-bar--xs {
  width: 56%;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-history--vert {
  flex-direction: column;
  gap: 12px;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-history--vert .ae-wf-history__col:not(:last-child)::after {
  display: none;
}

/* Mobile device: promo + footer */
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-promo {
  flex-direction: column;
  align-items: flex-start;
  min-height: 140px;
  padding: 20px 18px;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-promo__copy {
  max-width: none;
  width: 100%;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-site-footer {
  padding: 16px 12px 12px;
}
.ae-wf-preview-wrap[data-device="mobile"] .ae-wf-site-footer__grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.ae-wf-canvas:empty::before {
  content: none;
}

.ae-wf-site {
  background: #fff;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.ae-wf-site-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  padding: 0;
}
.ae-wf-site-empty {
  padding: 64px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--wf-sub);
}

.ae-wf-site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid var(--wf-line);
}
.ae-wf-site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}
.ae-wf-site-logo {
  flex: 0 0 72px;
  height: 14px;
  margin: 0;
  padding: 0;
  border: none;
  background: var(--wf-block);
  border-radius: 2px;
  cursor: pointer;
}
.ae-wf-site-logo:hover {
  background: var(--wf-accent-mid);
}
.ae-wf-site-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}
.ae-wf-site-nav__link {
  margin: 0;
  padding: 4px 8px;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: var(--wf-sub);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  cursor: pointer;
  flex-shrink: 0;
}
.ae-wf-site-nav__link:hover {
  color: var(--wf-text);
  background: var(--wf-muted);
}
.ae-wf-site-nav__link.is-active {
  color: var(--wf-accent);
  font-weight: 700;
  background: rgba(var(--wf-accent-rgb), 0.08);
}
.ae-wf-site-cta {
  flex: 0 0 64px;
  height: 22px;
  background: var(--wf-accent);
  border-radius: 2px;
  opacity: 0.9;
}
.ae-wf-site-menu {
  display: none;
  flex: 0 0 22px;
  width: 22px;
  height: 16px;
  margin-left: auto;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  color: var(--wf-text);
}

.ae-wf-site-footer {
  margin-top: auto;
  background: #f9fafb;
  border-top: 1px solid var(--wf-line);
  padding: 20px 16px 14px;
}
.ae-wf-site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.ae-wf-site-footer__bottom {
  padding-top: 12px;
  border-top: 1px solid var(--wf-line);
}

@media (max-width: 640px) {
  .ae-wf-site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Wireframe blocks */
.ae-wf-block {
  position: relative;
  background: #fff;
  border: none;
  border-bottom: 1px solid var(--wf-line);
  padding: 20px 16px 20px 28px;
  cursor: grab;
  user-select: none;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.ae-wf-block:active {
  cursor: grabbing;
}
.ae-wf-block.is-dragging {
  opacity: 0.45;
}
.ae-wf-block.is-drag-over {
  background: rgba(var(--wf-accent-rgb), 0.06);
  box-shadow: inset 0 2px 0 0 var(--wf-accent);
}
.ae-wf-block__handle {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 16px;
  background:
    radial-gradient(circle, var(--wf-sub) 1.1px, transparent 1.3px) 0 0 / 5px 5px,
    radial-gradient(circle, var(--wf-sub) 1.1px, transparent 1.3px) 5px 0 / 5px 5px;
  background-repeat: repeat-y;
  opacity: 0.4;
  pointer-events: none;
}
.ae-wf-block__tag {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--wf-sub);
  text-transform: uppercase;
}
.ae-wf-bar {
  display: block;
  height: 10px;
  background: var(--wf-block);
  border-radius: 2px;
}
.ae-wf-bar--lg { height: 16px; width: 42%; background: var(--wf-accent-mid); }
.ae-wf-bar--md { height: 12px; width: 58%; }
.ae-wf-bar--sm { height: 8px; width: 72%; }
.ae-wf-bar--xs { height: 6px; width: 48%; }
.ae-wf-bar--full { width: 100%; }
.ae-wf-bar--btn {
  width: 96px;
  height: 28px;
  background: var(--wf-accent);
  opacity: 0.82;
}
.ae-wf-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ae-wf-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.ae-wf-row--wrap { flex-wrap: wrap; }
.ae-wf-box {
  background: var(--wf-block);
  border-radius: 2px;
  flex: 1;
  min-height: 64px;
}
.ae-wf-box--hero,
.ae-wf-box--hero-full,
.ae-wf-box--hero-half {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 88% 18%, rgba(255, 255, 255, 0.28) 0%, transparent 52%),
    radial-gradient(90% 70% at 72% 92%, rgba(var(--wf-accent-rgb), 0.35) 0%, transparent 55%),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--wf-accent) 72%, #0f172a) 0%,
      var(--wf-accent) 48%,
      color-mix(in srgb, var(--wf-accent) 55%, #7dd3fc) 100%
    );
}
.ae-wf-box--hero::after,
.ae-wf-box--hero-full::after,
.ae-wf-box--hero-half::after {
  content: "";
  position: absolute;
  width: 130%;
  height: 55%;
  right: -18%;
  bottom: -22%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.28));
  transform: rotate(-8deg);
  pointer-events: none;
}
.ae-wf-box--hero {
  min-height: 140px;
  width: 100%;
}
.ae-wf-box--media {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(160deg, var(--wf-accent-soft), #e8eaee 70%);
}
.ae-wf-play {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  background: var(--wf-accent);
  box-shadow: 0 2px 10px rgba(var(--wf-accent-rgb), 0.28);
  z-index: 1;
}
.ae-wf-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent #fff;
}
.ae-wf-box--hero-full {
  min-height: 280px;
  width: 100%;
}
.ae-wf-box--hero-half {
  min-height: 140px;
  width: 100%;
}
.ae-wf-box--sq {
  aspect-ratio: 1;
  min-height: 0;
  flex: 1 1 calc(33.33% - 8px);
  max-width: calc(33.33% - 8px);
  background: linear-gradient(160deg, var(--wf-accent-soft), var(--wf-block));
}
.ae-wf-box--tall {
  min-height: 100px;
  background: linear-gradient(160deg, var(--wf-accent-soft), var(--wf-block));
}
.ae-wf-box--map {
  min-height: 160px;
  background:
    linear-gradient(135deg, rgba(var(--wf-accent-rgb), 0.08) 25%, transparent 25%) -8px 0 / 16px 16px,
    linear-gradient(225deg, rgba(var(--wf-accent-rgb), 0.08) 25%, transparent 25%) -8px 0 / 16px 16px,
    #e8eaee;
}
.ae-wf-promo {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 160px;
  padding: 28px 32px;
  overflow: hidden;
  border-radius: 2px;
  background:
    radial-gradient(120% 80% at 85% 20%, rgba(255, 255, 255, 0.35) 0%, transparent 55%),
    radial-gradient(90% 70% at 70% 90%, rgba(var(--wf-accent-rgb), 0.45) 0%, transparent 50%),
    linear-gradient(
      125deg,
      color-mix(in srgb, var(--wf-accent) 78%, #0f172a) 0%,
      var(--wf-accent) 45%,
      color-mix(in srgb, var(--wf-accent) 50%, #7dd3fc) 100%
    );
}
.ae-wf-promo::before,
.ae-wf-promo::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.ae-wf-promo::before {
  width: 140%;
  height: 90px;
  right: -20%;
  bottom: -28px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.35));
  transform: rotate(-8deg);
}
.ae-wf-promo::after {
  width: 120%;
  height: 70px;
  right: -10%;
  top: -24px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.22));
  transform: rotate(6deg);
}
.ae-wf-promo__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: 420px;
}
.ae-wf-promo__title {
  width: 78%;
  height: 14px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 2px;
}
.ae-wf-promo__desc {
  width: 92%;
  height: 8px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 2px;
}
.ae-wf-promo__btn {
  display: block;
  width: 128px;
  height: 32px;
  margin-top: 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}
.ae-wf-thumb-live .ae-wf-promo {
  min-height: 100px;
  padding: 18px 20px;
}
.ae-wf-box--thumb {
  width: 72px;
  flex: 0 0 72px;
  min-height: 56px;
}
.ae-wf-history {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 0;
}
.ae-wf-history--zigzag {
  gap: 16px;
  padding: 4px 0;
}
.ae-wf-history--zigzag::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--wf-border);
}
.ae-wf-history__item {
  display: grid;
  grid-template-columns: 1fr 12px 1fr;
  align-items: start;
  gap: 0 10px;
  position: relative;
  z-index: 1;
}
.ae-wf-history__slot {
  min-width: 0;
}
.ae-wf-history__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 200px;
}
.ae-wf-history__item.is-left .ae-wf-history__slot--left {
  display: flex;
  justify-content: flex-end;
}
.ae-wf-history__item.is-left .ae-wf-history__body {
  align-items: flex-end;
}
.ae-wf-history__item.is-right .ae-wf-history__slot--right {
  display: flex;
  justify-content: flex-start;
}
.ae-wf-history__item.is-right .ae-wf-history__body {
  align-items: flex-start;
}
.ae-wf-history__year-lg {
  width: 48px !important;
  height: 12px !important;
  background: var(--wf-block) !important;
  border-radius: 2px;
}
.ae-wf-history__item.is-left .ae-wf-history__body .ae-wf-bar--sm {
  width: 78%;
}
.ae-wf-history__item.is-left .ae-wf-history__body .ae-wf-bar--xs {
  width: 56%;
}
.ae-wf-history__item.is-right .ae-wf-history__body .ae-wf-bar--sm {
  width: 78%;
}
.ae-wf-history__item.is-right .ae-wf-history__body .ae-wf-bar--xs {
  width: 56%;
}
.ae-wf-history__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
}
.ae-wf-history__year {
  flex: 0 0 52px;
  height: 10px;
  margin-top: 4px;
  background: var(--wf-block);
  border-radius: 2px;
}
.ae-wf-history__dot {
  width: 10px;
  height: 10px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--wf-block);
  box-shadow: inset 0 0 0 1.5px rgba(var(--wf-accent-rgb), 0.22), 0 0 0 3px #fff;
  position: relative;
  z-index: 1;
  justify-self: center;
  flex: none;
}
.ae-wf-history__dot.is-on {
  background: var(--wf-accent);
  box-shadow: 0 0 0 3px #fff;
}
.ae-wf-history__row:not(:last-child)::before {
  content: none;
}
.ae-wf-history--vert {
  flex-direction: row;
  gap: 10px;
}
.ae-wf-history__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  position: relative;
}
.ae-wf-history--vert .ae-wf-history__col:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 5px;
  left: calc(50% + 8px);
  right: calc(-50% + 8px);
  height: 2px;
  background: #e5e7eb;
}
.ae-wf-history--vert .ae-wf-history__dot {
  margin-top: 0;
  background: #d1d5db;
  border: none;
}
.ae-wf-thumb__history {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.ae-wf-thumb__history span {
  height: 8px;
  background:
    linear-gradient(#c5cdd8, #c5cdd8) 0 50% / 18% 4px no-repeat,
    radial-gradient(circle, var(--wf-accent) 2px, transparent 2.5px) 22% 50% / 6px 6px no-repeat,
    linear-gradient(#d1d5db, #d1d5db) 32% 50% / 55% 3px no-repeat;
}
.ae-wf-thumb__history span:first-child {
  background:
    linear-gradient(#c5cdd8, #c5cdd8) 0 50% / 18% 4px no-repeat,
    radial-gradient(circle, var(--wf-accent) 2.5px, transparent 3px) 22% 50% / 6px 6px no-repeat,
    linear-gradient(#d1d5db, #d1d5db) 32% 50% / 55% 3px no-repeat;
}
.ae-wf-thumb__row.history-alt span {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.ae-wf-thumb__row.history-alt span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d1d5db;
}
.ae-wf-thumb__row.history-alt span:first-child::before {
  background: var(--wf-accent);
}
.ae-wf-thumb__row.history-alt span::after {
  content: "";
  width: 70%;
  height: 2px;
  background: #d1d5db;
}
.ae-wf-box[style*="border-radius:50%"],
.ae-wf-box[style*="border-radius: 50%"] {
  background: var(--wf-accent-soft);
  box-shadow: inset 0 0 0 1.5px rgba(var(--wf-accent-rgb), 0.28);
}
.ae-wf-field {
  height: 32px;
  background: var(--wf-muted);
  border: 1px solid var(--wf-line);
  border-radius: 2px;
}
.ae-wf-field--area { height: 72px; }
.ae-wf-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 520px;
}
.ae-wf-form__row {
  display: flex;
  gap: 10px;
}
.ae-wf-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.ae-wf-form__label {
  width: 28%;
  max-width: 72px;
  height: 6px;
  background: #b8bfc9;
}
.ae-wf-form__actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 4px;
}
.ae-wf-form__submit {
  width: 110px;
  height: 34px;
}

@media (max-width: 1280px) {
  .ae-wf-layout {
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) minmax(200px, 240px);
    gap: 16px 14px;
  }
}

@media (max-width: 1100px) {
  .ae-wf-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "preview preview"
      "compose sections";
    gap: 20px 16px;
  }
  .ae-wf-sidebar:not(.ae-wf-sidebar--sections) {
    grid-area: compose;
  }
  .ae-wf-preview-wrap {
    grid-area: preview;
    position: static;
  }
  .ae-wf-sidebar--sections {
    grid-area: sections;
  }
  .ae-wf-compose,
  .ae-wf-sections {
    max-height: min(52vh, 480px);
  }
  .ae-wf-canvas {
    max-height: min(58vh, 640px);
  }
}

@media (max-width: 760px) {
  .ae-wf-section {
    padding: 20px 0 96px;
  }
  .ae-wf-pagehead {
    margin-bottom: 14px;
  }
  .ae-wf-pagehead .ae-h2 {
    font-size: clamp(22px, 6vw, 28px);
  }

  .ae-wf-tabs {
    display: flex;
    position: sticky;
    top: var(--ae-header-h, 60px);
    z-index: 20;
    gap: 0;
    margin: 0 auto 16px;
    padding: 0;
    border: 1px solid var(--wf-border);
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  }
  .ae-wf-tabs__btn {
    flex: 1 1 0;
    margin: 0;
    padding: 12px 8px;
    min-height: 48px;
    border: none;
    border-right: 1px solid var(--wf-border);
    background: #fff;
    color: var(--wf-sub);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .ae-wf-tabs__btn:last-child {
    border-right: none;
  }
  .ae-wf-tabs__btn.is-active,
  .ae-wf-tabs__btn[aria-selected="true"] {
    color: var(--wf-accent);
    background: rgba(var(--wf-accent-rgb), 0.08);
    box-shadow: inset 0 -2px 0 var(--wf-accent);
  }

  .ae-wf-layout {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    gap: 0;
  }
  .ae-wf-layout > [data-wf-panel] {
    display: none;
    min-width: 0;
  }
  .ae-wf-layout[data-wf-tab="compose"] > [data-wf-panel="compose"],
  .ae-wf-layout[data-wf-tab="preview"] > [data-wf-panel="preview"],
  .ae-wf-layout[data-wf-tab="sections"] > [data-wf-panel="sections"] {
    display: block;
  }

  .ae-wf-sidebar,
  .ae-wf-compose,
  .ae-wf-sections {
    min-width: 0;
  }
  .ae-wf-compose,
  .ae-wf-sections {
    max-height: none;
    overflow: visible;
  }
  .ae-wf-stack-list {
    max-height: min(42vh, 320px);
  }
  .ae-wf-add-list--sections {
    max-height: min(52vh, 400px);
  }
  .ae-wf-preview-wrap {
    position: static;
    width: 100%;
  }
  .ae-wf-preview-bar {
    max-width: none;
    margin-bottom: 10px;
  }
  .ae-wf-preview-bar__label {
    font-size: 15px;
  }
  .ae-wf-canvas {
    max-width: none;
    min-height: min(62vh, 520px);
    max-height: min(72vh, 640px);
  }
  .ae-wf-color__hex {
    font-size: 16px;
    padding: 12px;
  }
  .ae-wf-color__preview {
    width: 40px;
    height: 40px;
  }
  .ae-wf-page,
  .ae-wf-add-toggle,
  .ae-wf-stack-item,
  .ae-wf-lib-cat,
  .ae-wf-lib-card {
    min-height: 44px;
  }
  .ae-wf-lib-cat {
    padding: 10px 12px;
    font-size: 13px;
  }
  .ae-wf-add-toggle {
    white-space: normal;
  }
  .ae-wf-site-header__inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }
  .ae-wf-site-nav {
    order: 3;
    flex: 1 1 100%;
    justify-content: flex-start;
  }
  .ae-wf-site-cta {
    margin-left: auto;
  }
  .ae-wf-site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .ae-wf-block {
    padding: 16px 12px 16px 24px;
  }
  .ae-wf-row {
    flex-wrap: wrap;
  }
  .ae-wf-form__row {
    flex-direction: column;
  }
  .ae-wf-history--zigzag::before {
    left: 4px;
    margin-left: 0;
  }
  .ae-wf-history__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }
  .ae-wf-history__slot:empty {
    display: none;
  }
  .ae-wf-history__item.is-left .ae-wf-history__slot--left,
  .ae-wf-history__item.is-right .ae-wf-history__slot--right {
    justify-content: flex-start;
  }
  .ae-wf-history__body {
    align-items: flex-start !important;
    max-width: none;
  }
}

@media (max-width: 420px) {
  .ae-wf-section {
    padding: 16px 0 96px;
  }
  .ae-wf-tabs__btn {
    font-size: 13px;
    padding: 12px 4px;
  }
  .ae-wf-color__hex {
    font-size: 15px;
    letter-spacing: -0.01em;
  }
  .ae-wf-site-footer__grid {
    grid-template-columns: 1fr;
  }
  .ae-wf-site-nav__link {
    max-width: none;
    font-size: 10px;
    padding: 4px 6px;
  }
  .ae-wf-canvas {
    min-height: min(58vh, 420px);
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ae-wf-page,
  .ae-wf-stack-item,
  .ae-wf-lib-card,
  .ae-wf-lib-cat,
  .ae-wf-block,
  .ae-wf-color__swatch {
    transition: none;
  }
}

/* Touch-friendly hit targets */
@media (hover: none) and (pointer: coarse) {
  .ae-wf-page,
  .ae-wf-add-toggle,
  .ae-wf-stack-item,
  .ae-wf-lib-card,
  .ae-wf-add-item,
  .ae-wf-lib-cat {
    min-height: 44px;
  }
  .ae-wf-stack-item__actions button,
  .ae-wf-page-del {
    min-width: 40px;
    min-height: 40px;
  }
}
