.lf-app {
  --lf-blue: var(--accent);
  --lf-navy: var(--foreground);
  --lf-surface: var(--surface);
  --lf-bg: var(--background);
  --lf-border: var(--border);
  --lf-muted: var(--muted);
  --lf-success: var(--success);
  --lf-danger: var(--destructive);
  color: var(--foreground);
}

.lf-app *,
.lf-wizard * { box-sizing: border-box; }

.lf-app button,
.lf-app a,
.lf-wizard button,
.lf-wizard label { touch-action: manipulation; }

.lf-app button,
.lf-wizard button { cursor: pointer; }

.lf-app svg,
.lf-wizard svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lf-topbar {
  position: sticky;
  z-index: 18;
  top: var(--topbar-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-height: 68px;
  align-items: center;
  gap: 24px;
  margin: -26px -30px 28px;
  padding: 10px 30px;
  border-bottom: 1px solid var(--lf-border);
  background: color-mix(in srgb, var(--lf-bg) 92%, transparent);
  backdrop-filter: blur(16px);
}

.lf-topbar-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.lf-logo {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--lf-blue), #7c3aed);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .04em;
}

.lf-topbar-identity > div {
  display: grid;
  line-height: 1.2;
}

.lf-topbar-identity strong { font-size: 14px; }
.lf-topbar-identity small { color: var(--lf-muted); font-size: 10px; }

.lf-view-tabs {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.lf-view-tabs button,
.lf-editor-tabs button,
.lf-device-switch button,
.lf-filter-pills button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--lf-muted);
  font-size: 12px;
  font-weight: 750;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.lf-view-tabs button:hover,
.lf-editor-tabs button:hover,
.lf-device-switch button:hover,
.lf-filter-pills button:hover {
  color: var(--foreground);
  background: var(--accent-soft);
}

.lf-view-tabs button.is-active,
.lf-editor-tabs button.is-active,
.lf-device-switch button.is-active,
.lf-filter-pills button.is-active {
  border-color: color-mix(in srgb, var(--lf-blue) 45%, var(--lf-border));
  background: var(--accent-soft);
  color: var(--lf-blue);
}

.lf-readiness,
.lf-status,
.lf-save-state {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--lf-success) 30%, var(--lf-border));
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--lf-success);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.lf-readiness i,
.lf-status i,
.lf-save-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.lf-page { padding-bottom: 46px; }

.lf-heading,
.lf-editor-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 26px;
}

.lf-heading h1,
.lf-editor-heading h1 {
  max-width: 900px;
  margin: 4px 0 10px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: .98;
  letter-spacing: -.055em;
}

.lf-heading > div:first-child > p:last-child,
.lf-editor-heading > div > p:last-child {
  max-width: 820px;
  margin: 0;
  color: var(--lf-muted);
  font-size: 14px;
  line-height: 1.55;
}

.lf-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.lf-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
  border: 1px solid var(--lf-border);
  background: var(--lf-surface);
}

.lf-summary article {
  display: grid;
  min-height: 118px;
  align-content: center;
  padding: 20px 22px;
  border-right: 1px solid var(--lf-border);
}

.lf-summary article:last-child { border-right: 0; }
.lf-summary span { color: var(--lf-muted); font-size: 11px; font-weight: 700; }
.lf-summary strong { margin: 3px 0; color: var(--lf-navy); font-size: 29px; line-height: 1; font-variant-numeric: tabular-nums; }
.lf-summary small { color: var(--muted-2); font-size: 9px; }

.lf-domain-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -4px 0 24px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--lf-success) 24%, var(--lf-border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--success-soft) 72%, var(--lf-surface));
  color: var(--foreground);
}

.lf-domain-strip > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.lf-domain-icon {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--lf-success);
  color: white;
}

.lf-domain-icon svg { width: 17px; height: 17px; }
.lf-domain-strip strong { display: block; font-size: 13px; }
.lf-domain-strip p {
  margin: 2px 0 0;
  color: var(--lf-muted);
  font-size: 12px;
}

.lf-domain-strip > span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--lf-border);
  border-radius: 999px;
  background: var(--lf-surface);
  color: var(--lf-muted);
  font-size: 11px;
  font-weight: 800;
}

.lf-catalog-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.lf-search {
  display: flex;
  width: min(100%, 440px);
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--lf-border);
  border-radius: 7px;
  background: var(--lf-surface);
  color: var(--lf-muted);
}

.lf-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--foreground);
  font-size: 13px;
}

.lf-search:focus-within {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 15%, transparent);
}

.lf-filter-pills {
  display: flex;
  gap: 5px;
}

.lf-project-grid,
.lf-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.lf-project-card,
.lf-template-card,
.lf-panel,
.lf-order-card {
  border: 1px solid var(--lf-border);
  border-radius: 8px;
  background: var(--lf-surface);
}

.lf-project-card {
  min-width: 0;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.lf-project-card:hover {
  border-color: color-mix(in srgb, var(--lf-blue) 52%, var(--lf-border));
  box-shadow: 0 12px 28px rgba(6, 46, 104, .08);
}

.lf-project-cover {
  position: relative;
  display: grid;
  min-height: 178px;
  align-content: space-between;
  padding: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--card-accent) 35%, transparent), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--card-surface) 88%, white), var(--card-surface));
  color: color-mix(in srgb, var(--card-accent) 42%, var(--foreground));
}

.lf-project-cover::after {
  position: absolute;
  right: -28px;
  bottom: -44px;
  width: 138px;
  height: 138px;
  border: 18px solid color-mix(in srgb, var(--card-accent) 14%, transparent);
  border-radius: 50%;
  content: "";
}

.lf-project-cover span {
  position: relative;
  z-index: 1;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.lf-project-cover strong {
  position: relative;
  z-index: 1;
  max-width: 88%;
  font-size: clamp(21px, 2.2vw, 32px);
  line-height: .98;
  letter-spacing: -.045em;
}

.lf-project-cover small {
  position: relative;
  z-index: 1;
  color: color-mix(in srgb, var(--card-accent) 55%, var(--muted));
  font-size: 10px;
}

.lf-project-card-body { padding: 18px; }

.lf-card-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lf-status { min-height: 26px; padding: 4px 8px; }
.lf-status-draft { border-color: color-mix(in srgb, var(--warning) 32%, var(--lf-border)); background: var(--warning-soft); color: var(--warning); }
.lf-status-archived { border-color: var(--lf-border); background: var(--background); color: var(--lf-muted); }
.lf-card-status-row > small { color: var(--lf-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.lf-project-card h3 { margin: 15px 0 3px; font-size: 17px; letter-spacing: -.025em; }
.lf-project-card-body > p { margin: 0; color: var(--lf-muted); font-size: 11px; }

.lf-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 17px 0;
  padding: 14px 0;
  border-top: 1px solid var(--lf-border);
  border-bottom: 1px solid var(--lf-border);
}

.lf-card-metrics span {
  display: grid;
  color: var(--lf-muted);
  font-size: 9px;
}

.lf-card-metrics strong {
  color: var(--foreground);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.lf-card-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.lf-icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--lf-border);
  border-radius: 6px;
  background: transparent;
  color: var(--lf-muted);
}

.lf-icon-button:hover { border-color: var(--lf-blue); color: var(--lf-blue); }
.lf-icon-danger:hover { border-color: var(--lf-danger); color: var(--lf-danger); }

.lf-empty,
.lf-api-error {
  grid-column: 1 / -1;
  display: grid;
  min-height: 320px;
  place-items: center;
  align-content: center;
  padding: 40px;
  border: 1px dashed var(--lf-border);
  border-radius: 8px;
  background: var(--lf-surface);
  text-align: center;
}

.lf-empty strong { font-size: 22px; }
.lf-empty p,
.lf-api-error p { max-width: 640px; margin: 6px 0 20px; color: var(--lf-muted); }

.lf-template-card {
  min-width: 0;
  overflow: hidden;
}

.lf-template-preview {
  position: relative;
  display: grid;
  min-height: 250px;
  place-items: center;
  background:
    linear-gradient(90deg, transparent 0 61%, color-mix(in srgb, var(--template-accent) 16%, transparent) 61%),
    linear-gradient(145deg, color-mix(in srgb, var(--template-surface) 88%, white), var(--template-surface));
}

.lf-template-preview > span {
  position: absolute;
  top: 18px;
  left: 18px;
  color: var(--template-accent);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.lf-template-preview strong {
  color: color-mix(in srgb, var(--template-accent) 48%, var(--foreground));
  font-family: Georgia, serif;
  font-size: 82px;
  letter-spacing: -.08em;
}

.lf-template-preview i {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 70px;
  height: 12px;
  border-radius: 999px;
  background: var(--template-accent);
}

.lf-template-card > div:last-child { padding: 21px; }
.lf-template-card h3 { margin: 4px 0 8px; font-size: 22px; }
.lf-template-card p:not(.eyebrow) { min-height: 66px; margin: 0 0 18px; color: var(--lf-muted); font-size: 12px; }

.lf-table-wrap {
  overflow: auto;
  border: 1px solid var(--lf-border);
  background: var(--lf-surface);
}

.lf-orders-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.lf-orders-table th,
.lf-orders-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--lf-border);
  text-align: left;
  font-size: 12px;
}

.lf-orders-table th {
  position: sticky;
  top: 0;
  background: var(--background);
  color: var(--lf-muted);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lf-orders-table td:first-child {
  display: grid;
}

.lf-orders-table td small { color: var(--lf-muted); font-size: 9px; }
.lf-order-cards { display: none; }

.lf-team-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 18px;
}

.lf-team-layout-single {
  grid-template-columns: minmax(0, .9fr) minmax(280px, .7fr);
}

.lf-account-note .lf-side-body {
  min-height: 72px;
  display: grid;
  align-content: center;
}

.lf-panel-head {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--lf-border);
}

.lf-panel-head h2 { margin: 0; font-size: 16px; }
.lf-panel-head p { margin: 2px 0 0; color: var(--lf-muted); font-size: 10px; }

.lf-member-list { display: grid; }

.lf-member {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--lf-border);
}

.lf-member:last-child { border-bottom: 0; }
.lf-member-avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--lf-blue); font-size: 11px; font-weight: 850; }
.lf-member > div { display: grid; }
.lf-member > div strong { font-size: 13px; }
.lf-member > div small { color: var(--lf-muted); font-size: 10px; }
.lf-role { padding: 5px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--lf-blue); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.lf-member-status { color: var(--lf-muted); font-size: 10px; }

.lf-invite { padding-bottom: 18px; }

.lf-invite > label {
  display: grid;
  gap: 6px;
  margin: 14px 17px;
  color: var(--lf-muted);
  font-size: 11px;
  font-weight: 750;
}

.lf-invite input,
.lf-invite select,
.lf-field input,
.lf-field select,
.lf-field textarea,
.lf-wizard input,
.lf-wizard select,
.lf-wizard textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--lf-border);
  border-radius: 6px;
  outline: 0;
  background: var(--lf-surface);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
}

.lf-invite input:focus,
.lf-invite select:focus,
.lf-field input:focus,
.lf-field select:focus,
.lf-field textarea:focus,
.lf-wizard input:focus,
.lf-wizard select:focus,
.lf-wizard textarea:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 15%, transparent);
}

.lf-invite > button { margin: 4px 17px 0; }
.lf-note { margin: 15px 17px 0; color: var(--lf-muted); font-size: 10px; line-height: 1.55; }
.lf-note strong { color: var(--foreground); }

.lf-editor-heading {
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 36px;
}

.lf-back {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--lf-blue);
  font-size: 11px;
  font-weight: 750;
}

.lf-back svg { transform: rotate(180deg); }

.lf-editor-heading h1 {
  max-width: 680px;
  font-size: clamp(28px, 3.2vw, 44px);
}

.lf-editor-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 16px;
  color: var(--lf-muted);
  font-size: 10px;
}

.lf-editor-shell {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(420px, 1fr) minmax(250px, 290px);
  gap: 14px;
  align-items: start;
}

.lf-editor-panel {
  position: sticky;
  top: calc(var(--topbar-height) + 82px);
  max-height: calc(100dvh - var(--topbar-height) - 100px);
  overflow: hidden;
}

.lf-editor-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  padding: 8px;
  border-bottom: 1px solid var(--lf-border);
}

.lf-editor-tabs button {
  min-height: 40px;
  padding: 7px 5px;
  font-size: 9px;
}

.lf-editor-form {
  max-height: calc(100dvh - var(--topbar-height) - 278px);
  overflow-y: auto;
  padding: 15px;
  scrollbar-width: thin;
}

.lf-form-stack { display: grid; gap: 14px; }

.lf-field {
  display: grid;
  gap: 6px;
  color: var(--foreground);
  font-size: 11px;
  font-weight: 750;
}

.lf-field > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.lf-field small {
  color: var(--lf-muted);
  font-size: 8px;
  font-weight: 600;
  text-align: right;
}

.lf-field textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.45;
}

.lf-color-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.lf-color-grid input[type="color"] {
  padding: 5px;
  cursor: pointer;
}

.lf-ethics,
.lf-provider-state {
  display: grid;
  gap: 3px;
  padding: 13px;
  border-left: 3px solid var(--warning);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 10px;
}

.lf-ethics strong,
.lf-provider-state strong { font-size: 11px; }
.lf-provider-state { border-color: var(--lf-blue); background: var(--accent-soft); color: var(--lf-blue); }

.lf-editor-actions {
  display: flex;
  gap: 7px;
  padding: 11px 15px;
  border-top: 1px solid var(--lf-border);
}

.lf-save-state {
  min-height: 26px;
  border: 0;
  background: transparent;
}

.lf-save-state.is-saving { color: var(--lf-blue); }
.lf-save-state.is-saving i { animation: lf-pulse .8s ease-in-out infinite alternate; }
.lf-save-state.is-error { color: var(--lf-danger); }
@keyframes lf-pulse { to { opacity: .25; } }

.lf-section-list { display: grid; gap: 7px; }

.lf-section-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 7px;
  border: 1px solid var(--lf-border);
  border-radius: 6px;
}

.lf-section-grip {
  display: grid;
  width: 30px;
  height: 40px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--lf-muted);
}

.lf-section-row > div:nth-child(2) { display: grid; }
.lf-section-row strong { font-size: 11px; }
.lf-section-row small { color: var(--lf-muted); font-size: 8px; }

.lf-switch {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 0;
  background: transparent;
  color: var(--lf-muted);
  font-size: 8px;
}

.lf-switch span {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: var(--border-strong);
}

.lf-switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  content: "";
  transition: transform .2s ease;
}

.lf-switch.is-on { color: var(--lf-success); }
.lf-switch.is-on span { background: var(--lf-success); }
.lf-switch.is-on span::after { transform: translateX(12px); }

.lf-section-move { display: flex; }
.lf-section-move button {
  display: grid;
  width: 32px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--lf-border);
  background: transparent;
  color: var(--lf-muted);
}
.lf-section-move button:first-child { border-radius: 5px 0 0 5px; }
.lf-section-move button:last-child { border-left: 0; border-radius: 0 5px 5px 0; }
.lf-section-move button:disabled { cursor: not-allowed; opacity: .35; }

.lf-upload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px dashed var(--border-strong);
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent-soft) 35%, var(--lf-surface));
}

.lf-upload > div { display: grid; }
.lf-upload strong { font-size: 11px; }
.lf-upload small { color: var(--lf-muted); font-size: 8px; }

.lf-assets { display: grid; gap: 7px; }

.lf-asset {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 30px;
  gap: 9px;
  align-items: center;
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--lf-border);
  border-radius: 6px;
}

.lf-asset > span { display: grid; width: 32px; height: 36px; place-items: center; border-radius: 4px; background: var(--destructive-soft); color: var(--lf-danger); font-size: 8px; font-weight: 850; }
.lf-asset > div { display: grid; min-width: 0; }
.lf-asset strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.lf-asset small { color: var(--lf-muted); font-size: 8px; }
.lf-asset a { color: var(--lf-blue); font-size: 9px; }
.lf-asset button { width: 30px; height: 34px; border: 0; background: transparent; color: var(--lf-danger); }

.lf-empty-small {
  padding: 22px 12px;
  border: 1px dashed var(--lf-border);
  border-radius: 6px;
  color: var(--lf-muted);
  font-size: 10px;
  text-align: center;
}

.lf-preview-panel {
  min-width: 0;
  overflow: hidden;
}

.lf-preview-toolbar {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--lf-border);
}

.lf-preview-toolbar > div:first-child { display: grid; }
.lf-preview-toolbar strong { font-size: 13px; }
.lf-preview-toolbar small { color: var(--lf-muted); font-size: 9px; }
.lf-device-switch { display: flex; gap: 3px; }
.lf-device-switch button { min-height: 38px; padding: 7px 10px; font-size: 9px; }

.lf-preview-stage {
  display: grid;
  min-height: 720px;
  place-items: start center;
  padding: 14px;
  overflow: hidden;
  background:
    linear-gradient(45deg, color-mix(in srgb, var(--border) 35%, transparent) 25%, transparent 25%) 0 0/18px 18px,
    linear-gradient(-45deg, color-mix(in srgb, var(--border) 35%, transparent) 25%, transparent 25%) 0 0/18px 18px,
    var(--background);
}

.lf-preview-frame {
  width: 100%;
  height: 700px;
  border: 1px solid var(--lf-border);
  border-radius: 6px;
  background: white;
  box-shadow: 0 14px 38px rgba(6, 46, 104, .13);
  transition: width .25s ease;
}

.lf-preview-frame.is-mobile { width: min(100%, 390px); }

.lf-editor-side {
  display: grid;
  gap: 14px;
}

.lf-side-body { padding: 14px; }
.lf-score { color: var(--lf-blue); font-size: 22px; font-variant-numeric: tabular-nums; }
.lf-checks { display: grid; gap: 6px; }

.lf-check {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  color: var(--warning);
}

.lf-check > span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: var(--warning-soft); }
.lf-check svg { width: 14px; height: 14px; }
.lf-check strong { font-size: 10px; }
.lf-check.is-ok { color: var(--lf-success); }
.lf-check.is-ok > span { background: var(--success-soft); }

.lf-progress {
  height: 6px;
  margin: 15px 0;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border);
}

.lf-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lf-blue), var(--lf-success)); }
.lf-editor-side .lf-note { margin: 0; }

.lf-version-list { display: grid; gap: 8px; }
.lf-version { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--lf-border); }
.lf-version:last-child { padding-bottom: 0; border-bottom: 0; }
.lf-version > div { display: grid; }
.lf-version strong { font-size: 10px; }
.lf-version small { color: var(--lf-muted); font-size: 8px; }

.lf-conflict {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--warning) 50%, var(--lf-border));
  border-radius: 7px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 10px;
}

.lf-conflict button { min-height: 38px; padding: 7px 10px; border: 1px solid currentColor; border-radius: 5px; background: transparent; color: inherit; font-size: 9px; font-weight: 750; }

.lf-loader {
  display: grid;
  min-height: 58dvh;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--lf-muted);
}

.lf-loader span {
  width: 38px;
  height: 38px;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--lf-blue);
  border-radius: 50%;
  animation: lf-spin .8s linear infinite;
}

.lf-loader small { font-size: 10px; }
@keyframes lf-spin { to { transform: rotate(360deg); } }

.lf-api-error h1 { margin: 4px 0; }
.lf-api-error code { padding: 2px 5px; border-radius: 4px; background: var(--accent-soft); color: var(--lf-blue); }
.lf-api-error small { margin-top: 14px; color: var(--lf-danger); }

.lf-toast {
  position: fixed;
  z-index: 2000;
  right: 22px;
  bottom: 22px;
  max-width: min(90vw, 520px);
  padding: 13px 18px;
  border-radius: 7px;
  background: var(--foreground);
  color: var(--surface);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  font-weight: 700;
}

.lf-toast[data-tone="success"] { background: #087c66; color: #fff; }
.lf-toast[data-tone="error"] { background: #a7193a; color: #fff; }

.lf-wizard {
  width: min(960px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  color: var(--foreground);
  box-shadow: 0 30px 100px rgba(3, 23, 55, .35);
}

.lf-wizard::backdrop {
  background: rgba(3, 18, 42, .66);
  backdrop-filter: blur(10px);
}

.lf-wizard-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 630px;
}

.lf-wizard-aside {
  display: grid;
  align-content: start;
  padding: 36px 30px;
  background:
    radial-gradient(circle at 80% 20%, rgba(124, 92, 245, .34), transparent 28%),
    linear-gradient(155deg, #062e68, #0c438d);
  color: white;
}

.lf-wizard-aside .lf-logo { margin-bottom: 44px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); }
.lf-wizard-aside .eyebrow { color: #8fc5ff; }
.lf-wizard-aside h2 { margin: 3px 0 32px; font-size: 32px; line-height: .98; letter-spacing: -.05em; }
.lf-wizard-aside ol { display: grid; gap: 17px; margin: 0 0 32px; padding: 0; list-style: none; }
.lf-wizard-aside li { display: flex; align-items: center; gap: 11px; color: rgba(255,255,255,.56); font-size: 11px; }
.lf-wizard-aside li > span { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; }
.lf-wizard-aside li.is-current,
.lf-wizard-aside li.is-done { color: white; }
.lf-wizard-aside li.is-current > span { border-color: #fff; background: #fff; color: #062e68; }
.lf-wizard-aside li.is-done > span { border-color: #5bd2b5; background: #5bd2b5; color: #062e68; }
.lf-wizard-aside li svg { width: 14px; height: 14px; }
.lf-wizard-progress { height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.16); }
.lf-wizard-progress span { display: block; height: 100%; border-radius: inherit; background: #5bd2b5; transition: width .25s ease; }
.lf-wizard-aside > small { margin-top: 8px; color: rgba(255,255,255,.58); font-size: 9px; }

.lf-wizard-main {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  padding: 42px;
  overflow-y: auto;
}

.lf-wizard-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 24px;
}

.lf-wizard-title { margin-bottom: 26px; }
.lf-wizard-title h3 { margin: 3px 0; font-size: 30px; letter-spacing: -.045em; }
.lf-wizard-fields { display: grid; align-content: start; gap: 18px; }
.lf-wizard-fields label { display: grid; gap: 7px; color: var(--foreground); font-size: 11px; font-weight: 750; }
.lf-wizard-fields label small { color: var(--muted); font-size: 9px; font-weight: 500; }
.lf-wizard textarea { resize: vertical; line-height: 1.45; }
.lf-wizard-review { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px; border: 1px solid var(--border); border-radius: 7px; background: var(--background); }
.lf-wizard-review strong { grid-column: 1/-1; font-size: 12px; }
.lf-wizard-review span { color: var(--muted); font-size: 10px; }
.lf-wizard-review span::before { margin-right: 5px; color: var(--success); content: "✓"; }

.lf-wizard-templates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.lf-wizard-templates legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.lf-wizard-template {
  position: relative;
  display: grid;
  min-height: 220px;
  align-content: end;
  padding: 16px;
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 25%, color-mix(in srgb, var(--template-accent) 35%, transparent), transparent 30%),
    var(--template-surface);
  color: color-mix(in srgb, var(--template-accent) 50%, #172b4d);
  cursor: pointer;
}

.lf-wizard-template::before {
  position: absolute;
  top: 30px;
  left: 18px;
  font-family: Georgia, serif;
  font-size: 58px;
  font-weight: 700;
  letter-spacing: -.07em;
  content: "Aa";
}

.lf-wizard-template input { position: absolute; opacity: 0; pointer-events: none; }
.lf-wizard-template > span { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border: 2px solid color-mix(in srgb, var(--template-accent) 40%, #fff); border-radius: 50%; }
.lf-wizard-template.is-selected { border-color: var(--template-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--template-accent) 15%, transparent); }
.lf-wizard-template.is-selected > span { border: 5px solid var(--template-accent); background: #fff; }
.lf-wizard-template strong { position: relative; z-index: 1; font-size: 14px; }
.lf-wizard-template small { position: relative; z-index: 1; font-size: 9px; }

.lf-wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

@media (max-width: 1280px) {
  .lf-project-grid,
  .lf-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lf-editor-shell { grid-template-columns: 340px minmax(420px, 1fr); }
  .lf-editor-side { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .lf-editor-panel { position: static; max-height: none; }
  .lf-editor-form { max-height: 620px; }
}

@media (max-width: 940px) {
  .lf-topbar { grid-template-columns: 1fr auto; }
  .lf-view-tabs { grid-column: 1 / -1; grid-row: 2; justify-content: stretch; }
  .lf-view-tabs button { flex: 1; }
  .lf-summary { grid-template-columns: repeat(2, 1fr); }
  .lf-summary article:nth-child(2) { border-right: 0; }
  .lf-summary article:nth-child(-n+2) { border-bottom: 1px solid var(--lf-border); }
  .lf-team-layout { grid-template-columns: 1fr; }
  .lf-editor-shell { grid-template-columns: 1fr; }
  .lf-editor-side { grid-column: auto; }
  .lf-preview-stage { min-height: 650px; }
  .lf-preview-frame { height: 630px; }
}

@media (max-width: 720px) {
  .lf-topbar {
    position: static;
    grid-template-columns: 1fr;
    gap: 9px;
    margin: -18px -14px 20px;
    padding: 10px 14px;
  }
  .lf-topbar-identity { display: none; }
  .lf-readiness { justify-self: start; }
  .lf-view-tabs {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .lf-view-tabs button { flex: 0 0 auto; }
  .lf-heading,
  .lf-editor-heading { grid-template-columns: 1fr; align-items: start; gap: 18px; }
  .lf-heading-actions { justify-content: stretch; }
  .lf-heading-actions .button,
  .lf-heading-actions .lf-readiness { flex: 1; }
  .lf-heading h1,
  .lf-editor-heading h1 { font-size: 34px; }
  .lf-summary { grid-template-columns: 1fr 1fr; }
  .lf-domain-strip { align-items: flex-start; flex-direction: column; }
  .lf-domain-strip > span { align-self: flex-start; }
  .lf-summary article { min-height: 94px; padding: 14px; }
  .lf-summary strong { font-size: 24px; }
  .lf-catalog-tools { align-items: stretch; flex-direction: column; }
  .lf-search { width: 100%; }
  .lf-filter-pills { overflow-x: auto; }
  .lf-project-grid,
  .lf-template-grid { grid-template-columns: 1fr; }
  .lf-project-cover { min-height: 190px; }
  .lf-card-actions { flex-wrap: wrap; }
  .lf-card-actions .button { flex: 1; }
  .lf-table-wrap { display: none; }
  .lf-order-cards { display: grid; gap: 10px; }
  .lf-order-card { padding: 15px; }
  .lf-order-card > div { display: flex; justify-content: space-between; gap: 12px; }
  .lf-order-card p { margin: 8px 0; color: var(--lf-muted); font-size: 11px; }
  .lf-order-card small { color: var(--lf-muted); font-size: 9px; }
  .lf-member { grid-template-columns: 42px 1fr auto; }
  .lf-member-status { grid-column: 2; }
  .lf-editor-side { grid-template-columns: 1fr; }
  .lf-editor-tabs { overflow-x: auto; grid-template-columns: repeat(4, minmax(86px, 1fr)); }
  .lf-editor-form { max-height: none; }
  .lf-preview-stage { min-height: 600px; padding: 8px; }
  .lf-preview-frame { height: 580px; }
  .lf-preview-frame.is-mobile { width: 100%; }
  .lf-color-grid { grid-template-columns: 1fr; }
  .lf-section-row { grid-template-columns: 30px 1fr auto; }
  .lf-section-move { grid-column: 2 / -1; justify-self: end; }
  .lf-upload { align-items: stretch; flex-direction: column; }
  .lf-conflict { grid-template-columns: 1fr; }
  .lf-wizard { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .lf-wizard-shell { grid-template-columns: 1fr; min-height: 0; }
  .lf-wizard-aside { display: none; }
  .lf-wizard-main { min-height: calc(100dvh - 16px); padding: 32px 20px 20px; }
  .lf-wizard-templates { grid-template-columns: 1fr; }
  .lf-wizard-template { min-height: 150px; }
  .lf-wizard-review { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .lf-summary { grid-template-columns: 1fr; }
  .lf-summary article { border-right: 0; border-bottom: 1px solid var(--lf-border); }
  .lf-summary article:last-child { border-bottom: 0; }
  .lf-card-metrics { grid-template-columns: 1fr 1fr; }
  .lf-card-metrics span:last-child { grid-column: 1 / -1; }
  .lf-editor-heading .button { width: 100%; }
  .lf-preview-toolbar { align-items: stretch; flex-direction: column; }
  .lf-device-switch { display: grid; grid-template-columns: 1fr 1fr; }
  .lf-asset { grid-template-columns: 32px minmax(0, 1fr) 30px; }
  .lf-asset a { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lf-app *,
  .lf-wizard * { animation: none !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
