:root {
  --ink: #27234f;
  --ink-strong: #171432;
  --ink-soft: #68627f;
  --ink-muted: #8b849d;
  --canvas: #fbf6ee;
  --canvas-deep: #f2eadb;
  --canvas-warm: #fff9ef;
  --panel: #fffdfa;
  --panel-strong: #ffffff;
  --line: #e7dcc8;
  --line-strong: #d8cbb5;
  --coral: #fb6a48;
  --coral-deep: #dc4d30;
  --coral-soft: #ffe2d6;
  --coral-faint: #fff1eb;
  --teal: #129d8e;
  --teal-deep: #087c70;
  --teal-soft: #e3faf4;
  --yellow: #ffc84e;
  --yellow-soft: #fff2be;
  --lavender: #ddd8eb;
  --lavender-soft: #f2eff8;
  --danger: #d83e31;
  --danger-soft: #fff0ee;
  --shadow: 0 18px 48px rgba(73, 52, 34, 0.09);
  --shadow-small: 0 10px 28px rgba(73, 52, 34, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --topbar: 68px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 12% 0%, rgba(251, 106, 72, 0.16), transparent 38%),
    radial-gradient(ellipse at 88% 8%, rgba(18, 157, 142, 0.13), transparent 36%),
    linear-gradient(180deg, var(--canvas-warm) 0%, var(--canvas) 48%, #f8efe4 100%);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

body.dragging {
  cursor: grabbing;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
.display-font {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

code,
.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

svg {
  display: block;
}

::selection {
  background: var(--coral-soft);
  color: var(--ink-strong);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d8cbb6;
  border: 2px solid transparent;
  border-radius: 10px;
  background-clip: padding-box;
}

:focus-visible {
  outline: 3px solid rgba(251, 106, 72, 0.35);
  outline-offset: 2px;
}

#app {
  min-height: 100vh;
}

.noscript {
  max-width: 560px;
  margin: 80px auto;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-small);
}

.scene {
  min-height: 100vh;
  position: relative;
}

.scene::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(39, 35, 79, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 35, 79, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.topbar {
  min-height: var(--topbar);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 22px;
  border-bottom: 1px solid rgba(231, 220, 200, 0.88);
  background: rgba(255, 253, 250, 0.95);
  backdrop-filter: blur(14px);
}

.topbar-left,
.topbar-right,
.button-row,
.inline-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-right {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 11px;
  color: #ffffff;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.26), transparent 34%),
    linear-gradient(135deg, var(--coral) 0%, var(--yellow) 100%);
  box-shadow: 0 10px 22px rgba(251, 106, 72, 0.26);
}

.brand-name {
  margin: 0;
  color: var(--ink-strong);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-subtitle {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.2;
}

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink);
  background: var(--panel-strong);
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke-width: 2.2;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #ffffff;
  border-color: rgba(220, 77, 48, 0.2);
  background: linear-gradient(180deg, #ff7856 0%, var(--coral) 100%);
  box-shadow: 0 10px 22px rgba(251, 106, 72, 0.28);
}

.button.primary:hover {
  box-shadow: 0 14px 30px rgba(251, 106, 72, 0.34);
}

.button.secondary {
  color: var(--ink);
  border-color: var(--line);
  background: var(--panel);
}

.button.secondary:hover,
.button.ghost:hover {
  border-color: rgba(251, 106, 72, 0.5);
  background: var(--coral-faint);
  color: var(--coral-deep);
}

.button.ghost {
  color: var(--ink-soft);
  border-color: transparent;
  background: transparent;
}

.button.dark {
  color: #ffffff;
  border-color: var(--ink-strong);
  background: var(--ink);
}

.button.active {
  color: #ffffff;
  border-color: var(--ink);
  background: var(--ink);
}

.button.small {
  min-height: 34px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.icon-button,
.tool-button {
  display: inline-grid;
  place-items: center;
  border: 0;
  line-height: 1;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  background: var(--panel-strong);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.icon-button:hover {
  color: var(--coral-deep);
  border-color: rgba(251, 106, 72, 0.5);
  background: var(--coral-faint);
}

.tool-button {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: #ffffff;
  background: transparent;
}

.tool-button svg {
  width: 15px;
  height: 15px;
}

.tool-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.tool-button.danger {
  color: #ffb0a6;
}

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 99px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.badge.live,
.pill.live {
  color: var(--teal-deep);
  border-color: rgba(18, 157, 142, 0.22);
  background: var(--teal-soft);
}

.badge.draft,
.pill.draft {
  color: var(--ink-soft);
  border-color: var(--line);
  background: var(--canvas-deep);
}

.badge.demo,
.pill.demo {
  color: #8a5a00;
  border-color: rgba(255, 200, 78, 0.45);
  background: var(--yellow-soft);
}

.badge.design,
.pill.design {
  color: #5c5280;
  border-color: #d6cfe8;
  background: var(--lavender-soft);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.auth-scene {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px 18px;
}

.auth-card,
.setup-card,
.state-card {
  position: relative;
  width: min(100%, 400px);
  border: 1px solid rgba(231, 220, 200, 0.95);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 253, 250, 0.98)),
    var(--panel);
  box-shadow: var(--shadow);
}

.auth-card {
  padding: 34px;
}

.setup-card {
  width: min(100%, 940px);
  overflow: hidden;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 0;
}

.setup-copy {
  padding: 42px;
  background:
    radial-gradient(ellipse at 16% 18%, rgba(251, 106, 72, 0.18), transparent 42%),
    radial-gradient(ellipse at 86% 88%, rgba(18, 157, 142, 0.14), transparent 40%),
    linear-gradient(140deg, #fffaf1, #fff6ec);
}

.setup-form-panel {
  padding: 42px;
  border-left: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.9);
}

.auth-card .brand,
.setup-card .brand {
  margin-bottom: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--coral-deep);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--coral);
}

.auth-title,
.setup-title,
.dashboard-title,
.system-title {
  margin: 0;
  color: var(--ink-strong);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

.auth-title {
  font-size: 28px;
  line-height: 1.08;
}

.setup-title {
  max-width: 540px;
  font-size: 42px;
  line-height: 1.02;
}

.auth-subtitle,
.setup-subtitle,
.dashboard-subtitle,
.muted {
  color: var(--ink-soft);
}

.auth-subtitle {
  margin: 10px 0 24px;
}

.setup-subtitle {
  max-width: 560px;
  margin: 16px 0 28px;
  font-size: 16px;
}

.setup-steps {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
}

.setup-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.step-index {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: #ffffff;
  background: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.setup-step strong {
  display: block;
  color: var(--ink);
}

.setup-step span {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 13px;
}

.form {
  display: grid;
  gap: 15px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label,
.field-label {
  color: var(--ink-muted);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.field-hint {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.input,
.textarea,
.editable-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--panel-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.input,
.editable-input {
  height: 42px;
  padding: 0 12px;
}

.textarea {
  min-height: 96px;
  padding: 11px 12px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
.editable-input:focus {
  outline: none;
  border-color: rgba(251, 106, 72, 0.78);
  box-shadow: 0 0 0 4px rgba(251, 106, 72, 0.13);
}

.config-snippet {
  margin: 20px 0 0;
  padding: 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: #544e67;
  background: #fff8eb;
  font-size: 12px;
  line-height: 1.6;
}

.alert,
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: var(--radius-md);
  font-size: 13px;
}

.alert {
  padding: 12px;
  border: 1px solid transparent;
}

.alert.error {
  color: var(--danger);
  border-color: #f0beb7;
  background: var(--danger-soft);
}

.alert.note {
  color: var(--teal-deep);
  border-color: rgba(18, 157, 142, 0.26);
  background: var(--teal-soft);
}

.alert svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.auth-switch {
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

.link-button {
  display: inline;
  padding: 0;
  border: 0;
  color: var(--coral-deep);
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.link-button:hover {
  text-decoration: underline;
}

.dashboard-main,
.system-main {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 44px 24px 72px;
}

.dashboard-header,
.system-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.dashboard-title {
  font-size: 34px;
  line-height: 1.08;
}

.dashboard-subtitle {
  margin: 7px 0 0;
}

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

.project-card,
.new-project-tile,
.system-panel,
.token-card,
.state-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 250, 0.94);
  box-shadow: var(--shadow-small);
}

.project-card,
.new-project-tile {
  min-height: 252px;
  padding: 16px;
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.project-card {
  display: grid;
  grid-template-rows: 132px auto;
  gap: 15px;
  color: inherit;
  text-decoration: none;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 106, 72, 0.58);
  box-shadow: 0 22px 46px rgba(96, 63, 37, 0.12);
}

.project-thumb {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(231, 220, 200, 0.78);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(251, 106, 72, 0.18), rgba(18, 157, 142, 0.16)),
    var(--canvas-deep);
}

.project-thumb::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 10px;
  background:
    linear-gradient(90deg, var(--panel-strong) 0 54%, transparent 54%),
    linear-gradient(180deg, rgba(39, 35, 79, 0.14) 0 16px, transparent 16px),
    linear-gradient(180deg, rgba(251, 106, 72, 0.3) 0 100%);
  box-shadow: 0 12px 24px rgba(56, 42, 27, 0.08);
}

.project-thumb::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 20px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.45), transparent),
    var(--teal);
}

.project-thumb.theme-shop {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 200, 78, 0.44), transparent 34%),
    linear-gradient(135deg, #ffe0d3, #dff8f1);
}

.project-thumb.theme-portfolio {
  background:
    radial-gradient(circle at 72% 18%, rgba(221, 216, 235, 0.88), transparent 34%),
    linear-gradient(135deg, #fff4da, #f3ebe1);
}

.project-thumb.theme-studio {
  background:
    radial-gradient(circle at 24% 76%, rgba(18, 157, 142, 0.32), transparent 34%),
    linear-gradient(135deg, #ffe3d7, #fff7e7);
}

.project-info {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.project-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-title {
  margin: 0;
  color: var(--ink-strong);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink-muted);
  font-size: 12px;
}

.new-project-tile {
  display: grid;
  place-items: center;
  border: 2px dashed #d7cab5;
  color: var(--ink-soft);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.78), rgba(255, 246, 235, 0.94)),
    var(--panel);
}

.new-project-tile:hover {
  transform: translateY(-4px);
  border-color: var(--coral);
  color: var(--coral-deep);
  box-shadow: 0 22px 46px rgba(96, 63, 37, 0.12);
}

.new-project-inner {
  display: grid;
  justify-items: center;
  gap: 9px;
  text-align: center;
}

.new-project-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: var(--coral);
  box-shadow: 0 12px 26px rgba(251, 106, 72, 0.26);
}

.new-project-icon svg {
  width: 22px;
  height: 22px;
}

.new-project-title {
  color: var(--ink);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
}

.new-project-copy {
  max-width: 220px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
}

.editor-shell {
  min-height: 100vh;
}

.editor-topbar {
  align-items: center;
}

.editor-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.site-title-input {
  width: min(300px, 34vw);
  height: 40px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink-strong);
  background: transparent;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.site-title-input:hover,
.site-title-input:focus {
  border-color: var(--line);
  background: var(--panel-strong);
}

.published-banner {
  position: sticky;
  top: var(--topbar);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 22px;
  border-bottom: 1px solid rgba(18, 157, 142, 0.22);
  color: var(--teal-deep);
  background:
    radial-gradient(ellipse at 28% 0%, rgba(18, 157, 142, 0.16), transparent 52%),
    var(--teal-soft);
}

.published-banner svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.published-banner-text {
  font-weight: 700;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 52vw;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid rgba(18, 157, 142, 0.24);
  border-radius: 10px;
  color: var(--teal-deep);
  background: var(--panel-strong);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.published-banner .icon-button {
  margin-left: auto;
  border-color: rgba(18, 157, 142, 0.24);
  color: var(--teal-deep);
}

.editor-workspace {
  display: grid;
  grid-template-columns: 252px minmax(380px, 1fr) 310px;
  min-height: calc(100vh - var(--topbar));
}

.editor-shell.has-banner .editor-workspace {
  min-height: calc(100vh - var(--topbar) - 48px);
}

.editor-shell.preview-mode .editor-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.block-sidebar,
.settings-panel {
  position: sticky;
  top: var(--topbar);
  height: calc(100vh - var(--topbar));
  overflow: auto;
  background: rgba(255, 253, 250, 0.95);
}

.editor-shell.has-banner .block-sidebar,
.editor-shell.has-banner .settings-panel {
  top: calc(var(--topbar) + 48px);
  height: calc(100vh - var(--topbar) - 48px);
}

.block-sidebar {
  border-right: 1px solid var(--line);
  padding: 18px 14px;
}

.settings-panel {
  border-left: 1px solid var(--line);
  padding: 18px;
}

.sidebar-title,
.settings-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--ink-muted);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.block-library {
  display: grid;
  gap: 8px;
}

.block-tile {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--ink);
  background: transparent;
  text-align: left;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.block-tile:hover {
  transform: translateX(3px);
  border-color: var(--line);
  background: var(--canvas-warm);
}

.block-tile:active {
  cursor: grabbing;
}

.block-swatch,
.settings-swatch,
.block-icon-chip {
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--swatch, var(--coral));
  background: color-mix(in srgb, var(--swatch, var(--coral)) 14%, white);
}

.block-swatch {
  width: 38px;
  height: 38px;
}

.block-swatch svg,
.settings-swatch svg,
.block-icon-chip svg {
  width: 18px;
  height: 18px;
}

.block-tile-label {
  display: block;
  color: var(--ink);
  font-weight: 800;
}

.block-tile-desc {
  display: block;
  margin-top: 1px;
  color: var(--ink-muted);
  font-size: 12px;
}

.canvas-region {
  min-width: 0;
  padding: 30px 24px 72px;
  overflow: auto;
}

.page-canvas {
  width: min(100%, 760px);
  margin: 0 auto;
}

.canvas-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  color: var(--ink-muted);
  font-size: 12px;
}

.canvas-url {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-surface {
  min-height: 520px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 253, 250, 0.96)),
    var(--panel);
  box-shadow: var(--shadow);
}

.preview-mode .canvas-region {
  padding-top: 36px;
}

.preview-mode .page-canvas {
  width: min(100%, 920px);
}

.preview-mode .page-surface {
  min-height: auto;
  padding: 30px;
}

.empty-canvas {
  display: grid;
  min-height: 430px;
  place-items: center;
  border: 2px dashed #d7cab5;
  border-radius: 18px;
  color: var(--ink-soft);
  background:
    radial-gradient(ellipse at 22% 20%, rgba(251, 106, 72, 0.12), transparent 44%),
    radial-gradient(ellipse at 80% 88%, rgba(18, 157, 142, 0.12), transparent 42%),
    rgba(255, 249, 240, 0.64);
}

.empty-canvas-inner {
  display: grid;
  justify-items: center;
  max-width: 330px;
  padding: 26px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 16px;
  color: #ffffff;
  background: var(--coral);
  box-shadow: 0 14px 30px rgba(251, 106, 72, 0.25);
}

.empty-icon svg {
  width: 25px;
  height: 25px;
}

.empty-canvas h2 {
  margin: 0 0 8px;
  color: var(--ink-strong);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 23px;
}

.empty-canvas p {
  margin: 0;
  color: var(--ink-soft);
}

.drop-slot {
  position: relative;
  height: 12px;
  margin: 4px 0;
  border-radius: 8px;
  transition: height 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.drop-slot::before {
  content: "";
  position: absolute;
  inset: 5px 16px;
  border-radius: 99px;
  background: transparent;
}

.drop-slot.over,
.empty-canvas.over {
  background: rgba(251, 106, 72, 0.11);
  box-shadow: inset 0 0 0 2px rgba(251, 106, 72, 0.42);
}

.drop-slot.over {
  height: 22px;
}

.drop-slot.over::before {
  background: var(--coral);
}

.builder-block {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.builder-block:hover {
  border-color: rgba(251, 106, 72, 0.38);
}

.builder-block.selected {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(251, 106, 72, 0.14);
}

.builder-block.dragging {
  opacity: 0.38;
}

.builder-block.read-only {
  border-color: transparent;
  border-radius: 0;
  background: transparent;
}

.block-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: var(--swatch, var(--coral));
}

.builder-block.read-only .block-accent,
.builder-block.read-only .drag-handle,
.builder-block.read-only .floating-toolbar {
  display: none;
}

.drag-handle {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 2;
  display: grid;
  width: 26px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--ink-muted);
  background: transparent;
  transform: translateY(-50%);
  opacity: 0.45;
}

.builder-block:hover .drag-handle,
.builder-block.selected .drag-handle {
  opacity: 1;
  background: var(--canvas-deep);
}

.drag-handle svg {
  width: 16px;
  height: 16px;
}

.block-inner {
  min-height: 38px;
  padding: 12px 18px 12px 48px;
}

.builder-block.read-only .block-inner {
  padding: 4px 0;
}

.floating-toolbar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: flex;
  gap: 3px;
  padding: 4px;
  border-radius: 10px;
  background: var(--ink);
  box-shadow: 0 12px 26px rgba(23, 20, 50, 0.22);
}

.block-render h1,
.block-render h2,
.block-render p {
  overflow-wrap: anywhere;
}

.hero-block {
  padding: 28px 0;
}

.hero-block h1 {
  max-width: 640px;
  margin: 0;
  color: var(--ink-strong);
  font-size: 42px;
  line-height: 1.06;
}

.hero-block p {
  max-width: 560px;
  margin: 13px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
}

.heading-block h2 {
  margin: 18px 0 14px;
  color: var(--ink-strong);
  font-size: 28px;
  line-height: 1.14;
}

.text-block p {
  margin: 12px 0;
  color: #3f395d;
  font-size: 16px;
  line-height: 1.72;
}

.editable-text {
  border-radius: 8px;
  outline: none;
}

.editable-text:focus {
  box-shadow: 0 0 0 4px rgba(251, 106, 72, 0.12);
  background: rgba(255, 242, 235, 0.58);
}

.image-placeholder,
.gallery-placeholder {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed #d7cab5;
  border-radius: var(--radius-md);
  color: var(--ink-muted);
  background:
    radial-gradient(ellipse at 18% 18%, rgba(255, 200, 78, 0.38), transparent 34%),
    radial-gradient(ellipse at 82% 80%, rgba(18, 157, 142, 0.18), transparent 38%),
    linear-gradient(135deg, #fff5e6, #fffdf9);
}

.image-placeholder-inner,
.gallery-placeholder-inner {
  display: grid;
  justify-items: center;
  gap: 9px;
  text-align: center;
}

.image-placeholder svg,
.gallery-placeholder svg {
  width: 24px;
  height: 24px;
}

.image-block img,
.gallery-cell img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.image-block img {
  max-height: 420px;
  border-radius: var(--radius-md);
}

.image-caption {
  margin-top: 9px;
  color: var(--ink-muted);
  font-size: 13px;
  text-align: center;
}

.button-block {
  padding: 14px 0;
  text-align: center;
}

.published-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 11px;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  text-decoration: none;
}

.published-button.solid {
  color: #ffffff;
  background: var(--coral);
  box-shadow: 0 12px 24px rgba(251, 106, 72, 0.23);
}

.published-button.outline {
  color: var(--coral-deep);
  border: 2px solid var(--coral);
  background: transparent;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.gallery-cell,
.gallery-gradient-cell {
  min-height: 132px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 24% 26%, rgba(251, 106, 72, 0.44), transparent 34%),
    linear-gradient(135deg, #fff1dc, #daf7f0);
}

.gallery-gradient-cell:nth-child(2) {
  background:
    radial-gradient(circle at 72% 30%, rgba(221, 216, 235, 0.9), transparent 34%),
    linear-gradient(135deg, #fff8e4, #ffe1d6);
}

.gallery-gradient-cell:nth-child(3) {
  background:
    radial-gradient(circle at 40% 80%, rgba(18, 157, 142, 0.34), transparent 38%),
    linear-gradient(135deg, #fff7e8, #f1edf8);
}

.gallery-cell img {
  height: 132px;
}

.contact-box {
  display: grid;
  gap: 10px;
  max-width: 420px;
  padding: 18px 0;
}

.contact-box h3 {
  margin: 0 0 2px;
  color: var(--ink-strong);
  font-size: 22px;
}

.fake-input {
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-muted);
  background: var(--canvas-warm);
}

.fake-input.message {
  min-height: 82px;
}

.divider-line {
  height: 1px;
  margin: 22px 0;
  background:
    linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.settings-section {
  padding: 0 0 18px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.settings-section:last-child {
  border-bottom: 0;
}

.settings-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.settings-swatch {
  width: 34px;
  height: 34px;
}

.settings-heading h3 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 16px;
}

.settings-heading p {
  margin: 1px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.settings-empty {
  padding: 18px;
  border: 1px dashed #d7cab5;
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  background: var(--canvas-warm);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--canvas-deep);
}

.segment {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  color: var(--ink-soft);
  background: transparent;
  font-weight: 800;
}

.segment.active {
  color: #ffffff;
  background: var(--ink);
}

.slug-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 40px));
  padding: 13px 14px;
  border: 1px solid rgba(39, 35, 79, 0.12);
  color: var(--ink);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.toast.success {
  border-color: rgba(18, 157, 142, 0.26);
}

.toast.error {
  border-color: #f0beb7;
}

.toast svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--teal);
}

.toast.error svg {
  color: var(--danger);
}

.published-shell {
  min-height: 100vh;
}

.published-top {
  min-height: 58px;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.94);
  backdrop-filter: blur(12px);
}

.published-page {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 48px 24px 90px;
}

.public-page-surface {
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.public-error,
.loading-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.state-card {
  width: min(100%, 460px);
  padding: 30px;
}

.state-card h1 {
  margin: 0 0 10px;
  color: var(--ink-strong);
  font-size: 28px;
}

.state-card p {
  margin: 0 0 20px;
  color: var(--ink-soft);
}

.loader {
  width: 38px;
  height: 38px;
  border: 4px solid var(--line);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.system-title {
  font-size: 34px;
  line-height: 1.08;
}

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

.system-panel {
  padding: 20px;
}

.system-panel.wide {
  grid-column: 1 / -1;
}

.system-panel h2 {
  margin: 0 0 16px;
  color: var(--ink-strong);
  font-size: 20px;
}

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

.token-card {
  min-height: 98px;
  overflow: hidden;
}

.token-swatch {
  height: 46px;
  background: var(--token-color);
}

.token-info {
  padding: 10px;
}

.token-name {
  color: var(--ink-strong);
  font-weight: 800;
}

.token-value {
  color: var(--ink-muted);
  font-size: 12px;
}

.type-scale {
  display: grid;
  gap: 14px;
}

.type-sample strong {
  display: block;
  color: var(--ink-strong);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}

.type-sample span {
  display: block;
  color: var(--ink-muted);
  font-size: 12px;
}

.sample-h1 {
  font-size: 42px;
  line-height: 1.06;
}

.sample-h2 {
  font-size: 28px;
  line-height: 1.12;
}

.sample-body {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.component-row,
.badge-row,
.block-icon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.block-icon-chip {
  min-width: 116px;
  grid-template-columns: 30px minmax(0, auto);
  display: inline-grid;
  gap: 8px;
  align-items: center;
  justify-content: start;
  padding: 9px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel-strong);
  font-weight: 800;
}

.block-icon-chip .mini-swatch {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--swatch);
  background: color-mix(in srgb, var(--swatch) 14%, white);
}

.reveal {
  animation: rise 420ms ease both;
}

.delay-1 {
  animation-delay: 70ms;
}

.delay-2 {
  animation-delay: 140ms;
}

.delay-3 {
  animation-delay: 210ms;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(251, 106, 72, 0.3); }
  50% { box-shadow: 0 0 28px rgba(18, 157, 142, 0.5); }
}

/* ==========================================================================
   WATERMARK (BOTTOM-LEFT)
   ========================================================================== */
.nuvio-watermark {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(231, 220, 200, 0.9);
  background: rgba(255, 253, 250, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(39, 35, 79, 0.12);
  font-size: 12px;
  color: var(--ink);
  transition: all 200ms ease;
  user-select: none;
}

.nuvio-watermark:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(39, 35, 79, 0.18);
  border-color: var(--coral);
}

.watermark-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: var(--ink-strong);
}

.watermark-logo {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--coral), var(--yellow));
  color: white;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}

.watermark-remove-btn {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--coral-soft);
  background: var(--coral-faint);
  color: var(--coral-deep);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 150ms ease;
}

.watermark-remove-btn:hover {
  background: var(--coral);
  color: white;
}

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 20, 50, 0.55);
  backdrop-filter: blur(8px);
  animation: fadeIn 200ms ease;
}

.modal-card {
  position: relative;
  width: min(100%, 640px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: var(--panel-strong);
  box-shadow: 0 28px 60px rgba(23, 20, 50, 0.25);
  overflow: hidden;
  animation: modalSlide 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card.large {
  width: min(100%, 860px);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlide {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--canvas-warm);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-strong);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--canvas-warm);
}

/* ==========================================================================
   NIEO AI ASSISTANT
   ========================================================================== */
.nieo-ai-header {
  background: linear-gradient(135deg, rgba(251, 106, 72, 0.12), rgba(18, 157, 142, 0.15), rgba(139, 92, 246, 0.12));
}

.nieo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--coral), #9333ea);
  color: white;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-prompt-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(251, 106, 72, 0.3);
  background: rgba(251, 106, 72, 0.03);
  margin-bottom: 20px;
}

.ai-textarea {
  min-height: 80px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  resize: vertical;
}

.ai-prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-chip {
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 150ms ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ai-chip:hover {
  border-color: var(--coral);
  color: var(--coral-deep);
  background: var(--coral-faint);
}

.ai-generated-box {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--teal);
  background: var(--teal-soft);
  margin-top: 16px;
}

.ai-generated-box h4 {
  margin: 0 0 8px;
  color: var(--teal-deep);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   FIGMA / WORDPRESS STYLE INSPECTOR & MODAL EDITING
   ========================================================================== */
.figma-inspector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.figma-prop-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--canvas-warm);
}

.figma-prop-group.full-width {
  grid-column: 1 / -1;
}

.figma-prop-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-swatch-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-input-swatch {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.image-preview-thumb {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
  margin-top: 8px;
}

.unsplash-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* ==========================================================================
   PREMIUM SUBSCRIPTION & CONNECT DOMAIN
   ========================================================================== */
.premium-hero-banner {
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #171432 0%, #27234f 50%, #4c1d95 100%);
  color: white;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.premium-hero-banner::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(251, 106, 72, 0.4), transparent 70%);
  pointer-events: none;
}

.price-tag {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 14px 0;
}

.price-currency {
  font-size: 24px;
  font-weight: 700;
  color: var(--yellow);
}

.price-amount {
  font-size: 42px;
  font-weight: 800;
  font-family: "Space Grotesk", sans-serif;
  color: #ffffff;
}

.price-period {
  font-size: 14px;
  color: #d1d5db;
}

.feature-check-list {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.feature-item svg {
  color: var(--teal);
  flex-shrink: 0;
}

.dns-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 13px;
}

.dns-table th, .dns-table td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.dns-table th {
  background: var(--canvas-deep);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--ink-strong);
}

.dns-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
}

.dns-status.verified {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.dns-status.pending {
  background: var(--yellow-soft);
  color: #8a5a00;
}

/* ==========================================================================
   PLUGINS & THEMES
   ========================================================================== */
.plugins-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.plugin-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  transition: all 160ms ease;
}

.plugin-card:hover {
  border-color: var(--coral-soft);
  box-shadow: var(--shadow-small);
}

.plugin-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.plugin-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--coral-faint);
  color: var(--coral-deep);
  flex-shrink: 0;
}

.plugin-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-strong);
}

.plugin-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}

.theme-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.theme-card {
  padding: 14px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--panel-strong);
  cursor: pointer;
  transition: all 160ms ease;
  text-align: center;
}

.theme-card:hover, .theme-card.active {
  border-color: var(--coral);
  box-shadow: 0 8px 20px rgba(251, 106, 72, 0.15);
}

.theme-swatches {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Dynamic theme classes for Page Surface */
.page-surface.theme-dark {
  background: #12131c !important;
  color: #f3f4f6 !important;
}
.page-surface.theme-dark h1, 
.page-surface.theme-dark h2, 
.page-surface.theme-dark h3 {
  color: #ffffff !important;
}

.page-surface.theme-cyber {
  background: #090d16 !important;
  color: #a5f3fc !important;
}
.page-surface.theme-cyber h1, 
.page-surface.theme-cyber h2, 
.page-surface.theme-cyber h3 {
  color: #22d3ee !important;
}

.page-surface.theme-sunset {
  background: #fff8f5 !important;
  color: #431407 !important;
}

.page-surface.theme-forest {
  background: #064e3b !important;
  color: #ecfdf5 !important;
}
.page-surface.theme-forest h1, 
.page-surface.theme-forest h2, 
.page-surface.theme-forest h3 {
  color: #a7f3d0 !important;
}

.page-surface.theme-royal {
  background: #0f172a !important;
  color: #f1f5f9 !important;
}
.page-surface.theme-royal h1, 
.page-surface.theme-royal h2, 
.page-surface.theme-royal h3 {
  color: #fde047 !important;
}

.logo-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
  border-radius: 12px;
}

.custom-logo-img {
  max-height: 48px;
  object-fit: contain;
}

/* Responsive adjustments for modals */
@media (max-width: 768px) {
  .figma-inspector-grid,
  .plugins-grid,
  .theme-presets-grid {
    grid-template-columns: 1fr;
  }
}

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

  .editor-workspace {
    grid-template-columns: 226px minmax(360px, 1fr) 288px;
  }

  .site-title-input {
    width: 240px;
  }
}

@media (max-width: 920px) {
  :root {
    --topbar: 86px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-left,
  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .topbar-right {
    justify-content: flex-start;
  }

  .setup-grid,
  .system-grid {
    grid-template-columns: 1fr;
  }

  .setup-form-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .dashboard-header,
  .system-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-workspace,
  .editor-shell.preview-mode .editor-workspace {
    display: block;
  }

  .block-sidebar,
  .settings-panel {
    position: static;
    height: auto;
    border-left: 0;
  }

  .block-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .settings-panel {
    border-top: 1px solid var(--line);
  }

  .site-title-input {
    width: min(100%, 280px);
  }
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .auth-card,
  .setup-copy,
  .setup-form-panel {
    padding: 24px;
  }

  .setup-title {
    font-size: 32px;
  }

  .dashboard-main,
  .system-main {
    padding: 28px 16px 54px;
  }

  .dashboard-title,
  .system-title {
    font-size: 28px;
  }

  .project-grid,
  .token-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .new-project-tile {
    min-height: 224px;
  }

  .topbar {
    padding: 12px 14px;
  }

  .button {
    min-height: 38px;
    padding: 9px 11px;
  }

  .editor-title-group {
    width: 100%;
  }

  .site-title-input {
    flex: 1;
    min-width: 0;
  }

  .published-banner {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 10px 14px;
  }

  .link-pill {
    max-width: calc(100vw - 28px);
  }

  .canvas-region {
    padding: 18px 12px 40px;
  }

  .page-surface,
  .preview-mode .page-surface,
  .public-page-surface {
    padding: 16px;
    border-radius: 16px;
  }

  .block-library {
    grid-template-columns: 1fr;
  }

  .block-inner {
    padding: 12px 12px 12px 42px;
  }

  .hero-block h1 {
    font-size: 31px;
  }

  .heading-block h2 {
    font-size: 24px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-cell,
  .gallery-gradient-cell,
  .gallery-cell img {
    min-height: 150px;
    height: 150px;
  }

  .slug-field {
    grid-template-columns: 1fr;
  }

  .published-page {
    padding: 28px 12px 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
