:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --line: #dde3ea;
  --muted: #5f6d7d;
  --text: #1f2936;
  --brown: #5d433c;
  --light-brown: #8a6a62;
  --orange: #cc6f33;
  --brand: var(--orange);
  --brand-2: var(--light-brown);
  --panel-w: 430px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font: 14px/1.4 "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.st-topbar,
.st-panel,
.st-canvas-toolbar,
.st-topbar button,
.st-panel button,
.st-panel input,
.st-panel select,
.st-panel textarea {
  font-family: "Segoe UI", "Trebuchet MS", sans-serif !important;
}

.st-topbar {
  height: 100px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.st-topbar__inner {
  width: 100%;
  padding: 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.st-brand img {
  width: 500px !important;
  display: block;
}

.st-top-actions {
  display: flex;
  gap: 10px;
}

.st-app {
  height: 100vh;
  padding-top: 100px;
  display: block;
}

.st-canvas-wrap {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  height: calc(100vh - 100px);
  margin-right: var(--panel-w);
}

.st-canvas-toolbar {
  min-height: 44px;
  background: #f9fbfd;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
}

.st-canvas-toolbar__right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.st-canvas {
  flex: 1;
  overflow: auto;
  padding: 18px;
  background: linear-gradient(180deg, #eef2f6, #f6f8fa);
}

.st-preview-page {
  background: #fff;
  border: 1px solid #cfd7e2;
  box-shadow: 0 20px 56px rgba(20, 30, 41, 0.15);
}

.st-section {
  width: 100%;
  margin: 0;
  position: relative;
}

.st-section__inner {
  max-width: 1200px;
  width: 96%;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #d8dfe8;
  border-radius: 12px;
  padding: 24px;
}

.st-section.is-selected::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid var(--brand);
  pointer-events: none;
}

.st-preview-page :where(.st-section, .st-section__inner, .st-section *) {
  transition: outline-color 0.12s ease;
}

.st-preview-page :where(.st-section, .st-section__inner, .st-section *):hover {
  outline: 1px solid rgba(47, 111, 237, 0.35);
  outline-offset: 1px;
}

.st-node-selected {
  outline: 2px dashed #2f6fed;
  outline-offset: 2px;
}

.st-preview-page.st-node-selected {
  outline: 3px solid #2f6fed;
  outline-offset: -3px;
}

body.st-guides-hidden .st-section.is-selected::after,
body.st-guides-hidden .st-node-selected,
body.st-guides-hidden .st-preview-page :where(.st-section, .st-section__inner, .st-section *):hover {
  outline: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.st-social {
  min-height: 30px;
  background: #0f1720;
  color: #dde5f1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.st-social .st-section__inner {
  min-height: 24px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding-top: 0;
  padding-bottom: 0;
  color: inherit;
}

.st-social__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.st-social__group {
  display: flex;
  gap: 12px;
}

.st-hero {
  min-height: 700px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.st-hero .st-section__inner {
  min-height: 640px;
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: space-between;
  background: transparent;
  border: 0;
  color: inherit;
  position: relative;
  z-index: 2;
}

.st-hero .st-hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  border-radius: 0;
  border: 0;
  margin: 0;
}

.st-hero .st-hero-media img {
  height: 100%;
}

.st-hero .st-hero-media .st-image-overlay {
  background: rgba(8, 12, 18, 0.45);
  mix-blend-mode: multiply;
}

.st-logo-pill {
  border: 2px solid rgba(255, 255, 255, 0.75);
  width: fit-content;
  padding: 10px 20px;
  font-weight: 700;
}

.st-hero-copy {
  text-align: center;
  align-self: center;
}

.st-menu {
  min-height: 90px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.st-menu .st-section__inner {
  border: 0;
  border-radius: 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-weight: 700;
}

.st-main {
  min-height: 600px;
  background: #eaf0f6;
}

.st-center {
  min-height: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.st-center--mid {
  min-height: 240px;
}

.st-center--short {
  min-height: 160px;
}

.st-grid-2,
.st-grid-3,
.st-grid-4,
.st-grid-tri {
  display: grid;
  gap: 16px;
}

.st-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.st-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.st-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.st-grid-tri {
  grid-template-columns: 1fr 1.15fr 1fr;
}

.st-divider-line {
  border: 0;
  border-top: 1px solid #d6dbe3;
}

.st-divider-empty {
  height: 60px;
}

.st-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.st-card__txt {
  padding: 12px;
}

.st-image-slot {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  min-height: 220px;
  border: 1px solid #cfd8e2;
  background: #dde4ec;
}

.st-image-slot.is-image-selected {
  outline: 2px dashed var(--orange);
  outline-offset: 2px;
  animation: stImageDropPulse 1.9s ease-in-out infinite;
}

img.st-image-selected-node {
  outline: 2px dashed var(--orange);
  outline-offset: 2px;
  animation: stImageDropPulse 1.9s ease-in-out infinite;
}

.st-image-slot:hover,
.st-section img:hover {
  outline: 2px dashed rgba(207, 61, 1, 0.35);
  outline-offset: 2px;
}

.st-image-slot.is-image-dragover,
img.is-image-dragover {
  outline: 2px dashed var(--orange);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(207, 61, 1, 0.22);
}

.st-image-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.st-image-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.st-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.st-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
}

.st-form .full {
  grid-column: 1 / -1;
}

.st-form input,
.st-form textarea,
.st-panel input,
.st-panel textarea,
.st-panel select {
  width: 100%;
  font: inherit;
  border: 1px solid #cad4e1;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}

.st-btn {
  border: 1px solid var(--line);
  background: var(--light-brown);
  border-color: var(--brown);
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

.st-btn--tiny {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 12px;
}

.st-btn:hover {
  background: var(--brown);
  border-color: var(--brown);
}

.st-btn--primary {
  background: var(--orange);
  border-color: transparent;
  color: #fff;
}

.st-btn--primary:hover {
  background: var(--brown);
}

.st-btn--danger {
  color: #bd1e24;
}

.st-btn--lilac {
  border-color: #a98adf;
  background: #b899ec;
  color: #fff;
}

.st-btn--lilac:hover {
  background: #a884e8;
  border-color: #9a77db;
}

.st-btn.is-armed {
  background: var(--orange);
  border-color: transparent;
  color: #fff;
}

body.st-dark {
  --bg: #0f141b;
  --surface: #161d26;
  --line: #2a3644;
  --muted: #9fb0c3;
  --text: #ecf2fa;
}

body.st-dark .st-canvas-toolbar {
  background: #121922;
}

body.st-dark .st-canvas {
  background: linear-gradient(180deg, #0d131b, #141c26);
}

body.st-dark .st-preview-page {
  border-color: #2e3b4c;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
}

body.st-dark .st-group,
body.st-dark .st-subcard,
body.st-dark .st-section-item,
body.st-dark .st-breakpoint-tab,
body.st-dark .st-width-preset,
body.st-dark .st-panel-tab,
body.st-dark .st-panel input,
body.st-dark .st-panel textarea,
body.st-dark .st-panel select {
  background: #1b2430;
  color: var(--text);
  border-color: #334457;
}

body.st-dark .st-section-item.is-selected,
body.st-dark .st-width-preset.is-active {
  background: #2a3442;
}

body.st-dark .st-panel-tabs {
  background: rgba(22, 29, 38, 0.95);
}

body.st-dark .st-panel-tab.is-active {
  background: var(--orange);
  color: #fff;
}

body.st-dark .st-help,
body.st-dark .st-label,
body.st-dark #selectionMeta {
  color: #a8b7c8;
}

body.st-dark .st-dropzone {
  background: #1a2330;
  border-color: #37506a;
  color: #b9c8d8;
}

.st-panel {
  background: var(--surface);
  overflow-y: auto;
  height: calc(100vh - 100px);
  width: var(--panel-w);
  position: fixed;
  top: 100px;
  right: 0;
  bottom: 0;
  z-index: 1001;
  border-left: 1px solid var(--line);
}

.st-panel__inner {
  min-height: 100%;
  overflow: visible;
  padding: 14px;
}

.st-panel-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -14px -14px 12px;
  padding: 10px 10px 8px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  backdrop-filter: blur(6px);
}

.st-panel-tab {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.st-panel-tab.is-active {
  border-color: transparent;
  background: var(--orange);
  color: #fff;
}

.st-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  margin-bottom: 12px;
}

.st-group.is-disabled {
  opacity: 0.55;
}

.st-group h2 {
  margin: 0 0 8px;
  font-size: 14px;
}

.st-label {
  display: block;
  margin: 8px 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.st-help {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.st-row-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.st-add-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.st-subcard {
  margin-top: 12px;
  border: 1px solid #d7deea;
  border-radius: 10px;
  padding: 10px;
  background: #fafbfd;
}

.st-subcard h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.st-dropzone {
  border: 2px dashed #c7d1df;
  border-radius: 10px;
  background: #fff;
  min-height: 68px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px;
  cursor: pointer;
  color: #59687a;
}

.st-dropzone.is-dragover {
  border-color: var(--orange);
  background: #fff6f1;
  animation: stDropzonePulse 1.6s ease-in-out infinite;
}

.st-dropzone.is-image-mode {
  border-color: var(--orange);
  background: #fff7f1;
}

@keyframes stImageDropPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(207, 61, 1, 0.08);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(207, 61, 1, 0.16);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(207, 61, 1, 0.08);
  }
}

@keyframes stDropzonePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(207, 61, 1, 0.08);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(207, 61, 1, 0.16);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(207, 61, 1, 0.08);
  }
}

.st-breakpoints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.st-breakpoint-tab {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
}

.st-breakpoint-tab.is-active {
  background: var(--brown);
  border-color: var(--brown);
  color: #fff;
}

.st-width-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.st-width-preset {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
}

.st-width-preset.is-active {
  background: #fff1eb;
  border-color: var(--orange);
}

.st-palette {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.st-swatch {
  border: 1px solid #c8d2df;
  border-radius: 8px;
  min-height: 28px;
  cursor: pointer;
  position: relative;
}

.st-swatch--transparent {
  background-image:
    linear-gradient(135deg, transparent 47%, #d72626 47%, #d72626 53%, transparent 53%),
    linear-gradient(#ffffff, #ffffff) !important;
}

.st-swatch__delete {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: #d72626;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
}

.st-swatch:hover .st-swatch__delete {
  opacity: 1;
}

.st-swatch.is-selected::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid #111;
  border-radius: 6px;
}

.st-stops {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.st-stop {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.st-stop button {
  border: 0;
  background: transparent;
  color: #a52d2d;
  cursor: pointer;
}

.st-gradient-preview {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid #ced7e4;
  background: #eef2f7;
  margin-bottom: 8px;
}

.st-section-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.st-section-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  background: #fafbfd;
  cursor: grab;
}

.st-section-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 8px;
}

.st-section-item.is-selected {
  border-color: var(--brand);
  background: #fff1eb;
}

.st-pill-actions {
  display: inline-flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}

.st-section-item:hover .st-pill-actions,
.st-section-item.is-selected .st-pill-actions {
  opacity: 1;
}

.st-pill-actions button {
  border: 1px solid #cdd6e4;
  background: #fff;
  border-radius: 999px;
  font-size: 11px;
  padding: 3px 7px;
  cursor: pointer;
}

.st-option-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.st-advanced-grid {
  display: grid;
  gap: 8px;
}

.st-advanced-grid label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.st-content-editor {
  display: grid;
  gap: 8px;
}

.st-content-row {
  display: grid;
  gap: 4px;
}

.st-content-row label {
  font-size: 12px;
  color: var(--muted);
}

.st-sortable-item {
  cursor: grab;
}

.st-sortable-item.is-dragging {
  opacity: 0.45;
}

.st-sortable-item.is-drag-over {
  outline: 2px dashed var(--orange);
  outline-offset: 2px;
}

.st-preview-root .is-drag-over-before {
  box-shadow: inset 0 3px 0 var(--orange);
}

.st-preview-root .is-drag-over-after {
  box-shadow: inset 0 -3px 0 var(--orange);
}

.st-hidden {
  display: none !important;
}

.st-be-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
}

.st-be-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 13, 19, 0.62);
}

.st-be-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, 92vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #d2dbe7;
}

.st-be-modal__head,
.st-be-modal__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.st-be-modal__actions {
  justify-content: flex-end;
  margin-top: 10px;
  margin-bottom: 0;
}

.st-code-modal__dialog {
  width: min(1360px, 94vw);
  max-height: 90vh;
}

.st-code-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.st-code-col {
  display: grid;
  gap: 8px;
}

.st-code-area {
  width: 100%;
  min-height: 480px;
  resize: vertical;
  border: 1px solid #cfd7e2;
  border-radius: 10px;
  padding: 10px;
  font: 12px/1.45 "SFMono-Regular", Menlo, Consolas, monospace;
  background: #f9fbfd;
  color: #152031;
}

.st-code-area--sm {
  min-height: 150px;
}

.st-footerline {
  min-height: 20px;
  background: #0f1720;
  color: #d7dee8;
  display: flex;
  align-items: center;
  font-size: 12px;
}

@media (max-width: 1240px) {
  .st-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .st-grid-3,
  .st-grid-2,
  .st-grid-tri,
  .st-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .st-code-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .st-app {
    padding-top: 100px;
  }

  .st-canvas-wrap {
    margin-right: 0;
  }

  .st-panel {
    width: min(100vw, var(--panel-w));
  }
}
