:root {
  --bg: #0d0d10;
  --top: #101012;
  --rail: #111114;
  --panel: #151518;
  --panel-2: #1b1b20;
  --stage: #272727;
  --surface: #202026;
  --surface-soft: #2a2a31;
  --line: #35353c;
  --line-soft: #2a2a2f;
  --ink: #f6f3f8;
  --muted: #a8a4ad;
  --subtle: #76717c;
  --accent: #e64bef;
  --accent-2: #d85cb9;
  --accent-deep: #74306f;
  --success: #77df9d;
  --danger: #ff7777;
  --warning: #f3bd5b;
}

@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/Manrope-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/Manrope-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/Manrope-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/Manrope-800.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/Manrope-800.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-width: 320px;
  font-family: "Manrope", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a { color: inherit; }

h1, h2, h3, p { margin-top: 0; }

h1 { font-size: 46px; line-height: 1.02; letter-spacing: 0; }
h2 { font-size: 30px; line-height: 1.12; letter-spacing: 0; }
h3 { font-size: 18px; line-height: 1.25; letter-spacing: 0; }
p { line-height: 1.55; }

.topbar {
  height: 72px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(16, 16, 18, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 28px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 18px;
  font-weight: 900;
}

.brand-pro {
  color: var(--accent);
}

.nav,
.brand,
.top-search {
  min-width: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav a,
.link-button {
  color: var(--muted);
  text-decoration: none;
  font: inherit;
  font-weight: 750;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav a:hover,
.link-button:hover {
  color: #fff;
}

.top-spacer { flex: 1; }

.subscribe-button,
.nav-cta,
.primary {
  color: #111 !important;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-color: transparent !important;
}

.subscribe-button {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  font: inherit;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}

.top-search {
  width: min(100%, 310px);
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050506;
  color: var(--subtle);
  overflow: hidden;
  white-space: nowrap;
}

.top-search span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav form { margin: 0; }

.nav-cta {
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

.avatar-dot {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #efeff3;
  color: #111;
  font-weight: 900;
}

.flash-wrap {
  position: fixed;
  top: 86px;
  left: 50%;
  z-index: 50;
  width: min(720px, calc(100% - 32px));
  transform: translateX(-50%);
}

.flash {
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(22, 22, 26, .96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

.flash.error { border-color: rgba(255, 119, 119, .45); color: #ffd0d0; }
.flash.success { border-color: rgba(119, 223, 157, .45); color: #caffdb; }
.flash.info { border-color: rgba(230, 75, 239, .4); }

.modal-open { overflow: hidden; }

.subscription-modal[hidden] { display: none; }

.subscription-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  padding: 10px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(8px);
}

.subscription-dialog {
  width: min(960px, 100%);
  max-height: calc(100vh - 20px);
  position: relative;
  overflow: auto;
  padding: 24px min(3vw, 42px) 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111113;
  box-shadow: 0 32px 120px rgba(0, 0, 0, .58);
}

.modal-close {
  width: 34px;
  height: 34px;
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #2a2a2d;
  color: #fff;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.subscription-head {
  max-width: 590px;
  margin: 0 auto 18px;
  text-align: center;
}

.subscription-head h2 {
  margin-bottom: 9px;
  color: #fff;
  font-size: clamp(30px, 3.4vw, 43px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0;
}

.subscription-head p {
  color: var(--muted);
  font-size: clamp(14px, 1.4vw, 19px);
  font-weight: 750;
  line-height: 1.35;
}

.billing-toggle {
  width: min(260px, 100%);
  min-height: 42px;
  margin: 14px auto 0;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101012;
  color: var(--muted);
  font-weight: 850;
}

.billing-toggle button {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.billing-toggle .active {
  color: #fff;
  background: #28282b;
}

.plan-panel[hidden] { display: none; }
.plan-panel.active { display: block; }

.subscription-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.subscription-card {
  --plan-color: #8c8794;
  --plan-color-soft: rgba(140, 135, 148, .18);
  --plan-color-line: rgba(140, 135, 148, .5);
  --plan-ink: #fff;
  --plan-button-ink: #fff;
  position: relative;
  padding-top: 24px;
  border-radius: 8px;
  background: var(--plan-color);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .26);
}

.subscription-card.tier-entry {
  --plan-color: #5d5a65;
  --plan-color-soft: rgba(112, 108, 121, .18);
  --plan-color-line: rgba(134, 128, 145, .45);
  --plan-button-ink: #fff;
}

.subscription-card.tier-growth {
  --plan-color: #b292f4;
  --plan-color-soft: rgba(178, 146, 244, .18);
  --plan-color-line: rgba(178, 146, 244, .62);
  --plan-button-ink: #111;
}

.subscription-card.tier-best {
  --plan-color: #3f918b;
  --plan-color-soft: rgba(63, 145, 139, .2);
  --plan-color-line: rgba(89, 185, 171, .64);
  --plan-button-ink: #fff;
}

.subscription-card.pro,
.subscription-card.ultra {
  background: var(--plan-color);
}

.card-ribbon {
  position: absolute;
  inset: 0 0 auto;
  min-height: 24px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  color: var(--plan-button-ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.subscription-card-body {
  min-height: 310px;
  margin: 0 4px 4px;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-radius: 8px;
  background: #111113;
  border: 1px solid rgba(255, 255, 255, .04);
}

.subscription-card form {
  margin: 0;
}

.subscription-card .plan-button {
  min-height: 39px;
  margin-top: 1px;
  border-radius: 999px;
  color: var(--plan-button-ink) !important;
  background: var(--plan-color);
  font-size: 12px;
}

.subscription-card h3 {
  margin: 0;
  color: var(--plan-color);
  font-size: clamp(30px, 2.8vw, 38px);
  font-weight: 900;
  line-height: 1.1;
}

.plan-label-row {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.plan-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.value-pill {
  min-height: 20px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--plan-color);
  background: var(--plan-color-soft);
  border: 1px solid var(--plan-color-line);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.plan-copy {
  min-height: 34px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.subscription-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  color: #fff;
  line-height: 1.12;
}

.subscription-price strong {
  font-size: clamp(30px, 2.7vw, 39px);
  font-weight: 900;
  line-height: 1.12;
}

.subscription-price span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 850;
}

.old-price {
  text-decoration: line-through;
  color: var(--subtle) !important;
}

.unit-price {
  width: fit-content;
  min-height: 23px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--plan-color-line);
  border-radius: 999px;
  color: #fff;
  background: var(--plan-color-soft);
  font-size: 11px;
  font-weight: 900;
}

.plan-economy {
  min-height: 36px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  border: 1px solid var(--plan-color-line);
  border-radius: 8px;
  color: #e9e5ee;
  background: rgba(255, 255, 255, .035);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.plan-features {
  margin: 2px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 720;
  font-size: 12px;
  list-style: none;
}

.plan-features li::before {
  content: "✦";
  margin-right: 9px;
  color: var(--plan-color);
}

.site-main {
  min-height: calc(100vh - 72px);
}

.button {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .58; cursor: wait; transform: none; }
.button.primary {
  color: #111 !important;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-color: transparent !important;
}
.ghost { background: transparent; color: var(--ink); border-color: var(--accent-2); }
.wide { width: 100%; margin-top: 10px; }

.editor-hero,
.workspace {
  height: calc(100vh - 72px);
  min-height: 620px;
  display: grid;
  grid-template-columns: 56px minmax(300px, 474px) minmax(0, 1fr);
  overflow: hidden;
  background: var(--stage);
}

.icon-rail {
  padding: 18px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: var(--rail);
  border-right: 1px solid var(--line);
}

.rail-icon {
  width: 38px;
  height: 38px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  font-size: 18px;
  font-weight: 850;
  text-decoration: none;
}

.rail-icon.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(230, 75, 239, .95), rgba(82, 118, 255, .9));
  box-shadow: 0 10px 30px rgba(230, 75, 239, .28);
}

.rail-icon:hover,
.rail-icon:focus-visible {
  color: #fff;
  background: var(--surface);
  outline: none;
}

.rail-icon.active:hover,
.rail-icon.active:focus-visible {
  background: linear-gradient(135deg, rgba(230, 75, 239, .95), rgba(82, 118, 255, .9));
}

.rail-icon.locked {
  opacity: .52;
}

.rail-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  z-index: 60;
  min-height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 16, 18, .96);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(4px, -50%);
  transition: opacity .12s ease, transform .12s ease;
}

.rail-icon:hover::after,
.rail-icon:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.rail-separator {
  width: 100%;
  height: 1px;
  background: var(--line);
  margin: 12px 0 4px;
}

.editor-panel {
  min-width: 0;
  padding: 22px 28px;
  overflow: auto;
  background: var(--panel);
  border-right: 1px solid var(--line);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.panel-head h1,
.panel-head h2 {
  margin: 0;
  font-size: 24px;
}

.hero-editor-panel {
  display: flex;
  flex-direction: column;
}

.hero-editor-panel h1 {
  margin-bottom: 14px;
}

.panel-head .eyebrow {
  text-transform: none;
}

.module-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: -4px 0 16px;
}

.module-chip {
  min-width: 0;
  min-height: 74px;
  padding: 10px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  column-gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.module-chip:hover,
.module-chip:focus-visible {
  border-color: rgba(230, 75, 239, .72);
  background: var(--surface);
  outline: none;
  transform: translateY(-1px);
}

.module-chip.active {
  border-color: rgba(230, 75, 239, .8);
  box-shadow: inset 0 0 0 1px rgba(230, 75, 239, .22);
}

.module-chip.disabled {
  color: var(--muted);
  opacity: .72;
}

.module-chip span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(230, 75, 239, .14);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.module-chip b {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  line-height: 1.18;
  text-overflow: ellipsis;
}

.module-chip em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 900;
}

.panel-copy,
.hero-text,
.feature-grid p,
.price-card p,
.setting-card p,
.muted,
.empty,
.legal p,
.upload-status {
  color: var(--muted);
}

.panel-thumb {
  width: 100%;
  max-width: none;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  margin: 14px 0 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.slider-control {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.slider-head,
.balance-row,
.job-row,
.scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.slider-head b { font-size: 18px; }
.slider-head span { color: #fff; font-weight: 850; }

input[type="range"] {
  width: 100%;
  accent-color: var(--accent-2);
}

.panel-actions {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.canvas-stage {
  min-width: 0;
  min-height: 520px;
  padding: 52px 56px 64px;
  position: relative;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, .02) 1px, transparent 1px),
    var(--stage);
  background-size: 42px 42px;
}

.compare-frame {
  --split: 50%;
  --zoom: 1;
  --pan-x: 0px;
  --pan-y: 0px;
  width: min(100%, 1120px);
  aspect-ratio: 1.56 / 1;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #ececec;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .38);
  touch-action: none;
  cursor: default;
  user-select: none;
}

.compare-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: translate(var(--pan-x), var(--pan-y)) scale(var(--zoom));
  transform-origin: center;
  transition: filter .18s ease, opacity .18s ease;
  will-change: transform;
}

.compare-frame[data-zoomed="true"] {
  cursor: grab;
}

.compare-frame[data-zoomed="true"]:active {
  cursor: grabbing;
}

.compare-after {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 0 var(--split));
  transition: opacity .18s ease;
}

.compare-after img {
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
}

.compare-split {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 2px;
  background: rgba(255, 255, 255, .86);
  transform: translateX(-50%);
  z-index: 4;
  cursor: ew-resize;
  transition: opacity .18s ease;
}

.compare-handle {
  width: 66px;
  height: 36px;
  position: absolute;
  top: 50%;
  left: var(--split);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, .92);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  z-index: 5;
  cursor: ew-resize;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .16);
  transition: opacity .18s ease, box-shadow .18s ease;
}

.compare-handle:hover {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .36);
}

.compare-label {
  position: absolute;
  top: 18px;
  z-index: 3;
  min-height: 36px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, .9);
  color: #fff;
  font-weight: 900;
  transition: opacity .18s ease;
}

.compare-label.before { left: 22px; }
.compare-label.after { right: 22px; }

.compare-frame[data-state="selected"] img {
  filter: blur(22px) saturate(.9);
}

.compare-frame[data-state="processing"] img {
  filter: blur(6px) saturate(.98);
}

.compare-frame[data-state="selected"] .compare-after,
.compare-frame[data-state="selected"] .compare-label,
.compare-frame[data-state="selected"] .compare-split,
.compare-frame[data-state="selected"] .compare-handle,
.compare-frame[data-state="processing"] .compare-after,
.compare-frame[data-state="processing"] .compare-label,
.compare-frame[data-state="processing"] .compare-split,
.compare-frame[data-state="processing"] .compare-handle,
.compare-frame[data-state="idle"] .compare-after,
.compare-frame[data-state="idle"] .compare-label,
.compare-frame[data-state="idle"] .compare-split,
.compare-frame[data-state="idle"] .compare-handle {
  opacity: 0;
  pointer-events: none;
}

.compare-processing {
  position: absolute;
  inset: -20%;
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      105deg,
      transparent 0 18px,
      rgba(255, 255, 255, .18) 18px 20px,
      transparent 20px 42px
    ),
    linear-gradient(105deg, transparent 0 34%, rgba(230, 75, 239, .26) 45%, transparent 56%);
  transform: translateX(-45%);
}

.compare-frame[data-state="processing"] .compare-processing {
  opacity: 1;
  animation: processing-sweep 1.05s linear infinite;
}

@keyframes processing-sweep {
  from { transform: translateX(-45%); }
  to { transform: translateX(45%); }
}

.zoom-widget {
  position: absolute;
  right: 22px;
  bottom: 22px;
  min-height: 46px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  border-radius: 8px;
  background: rgba(16, 16, 18, .92);
  border: 1px solid var(--line);
  color: #fff;
  font-weight: 850;
}

.zoom-widget button {
  width: 24px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.zoom-widget button:hover:not(:disabled) {
  color: #fff;
}

.zoom-widget button:disabled {
  opacity: .35;
  cursor: default;
}

.hero-actions,
.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions {
  margin: 22px 0;
}

.hero-stats {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.hero-stats span,
.balance-row,
.job-row,
.mini-stat {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.hero-stats b,
.mini-stat b,
.price {
  display: block;
  color: #fff;
  font-size: 28px;
  line-height: 1.1;
}

.band,
.pricing,
.page,
.legal {
  padding: 52px 56px;
  background: var(--bg);
}

.page-shell {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  background: var(--bg);
}

.page-shell .icon-rail {
  min-height: calc(100vh - 72px);
}

.section-head {
  max-width: 820px;
  margin-bottom: 28px;
}

.section-head h1,
.section-head h2 {
  margin-bottom: 10px;
}

.compact { margin-bottom: 14px; }

.feature-grid,
.price-grid,
.settings-grid,
.job-grid,
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.feature-grid article,
.price-card,
.setting-card,
.auth-card,
.upload-box,
.table-wrap,
.legal,
.page-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.feature-grid article,
.price-card,
.setting-card,
.auth-card,
.upload-box,
.page-panel {
  padding: 22px;
}

.price-card,
.setting-card {
  display: grid;
  gap: 12px;
}

.price-card .button,
.setting-card .button {
  justify-self: start;
}

.settings-grid > .button {
  align-self: start;
  justify-self: start;
  min-height: 52px;
  padding: 0 28px;
}

.price-card .price {
  color: #fff;
}

.auth-shell {
  min-height: calc(100vh - 72px);
  padding: 40px 18px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 12%, rgba(230, 75, 239, .18), transparent 34%), var(--stage);
}

.auth-card {
  width: min(100%, 430px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
}

label {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  color: var(--muted);
  font-weight: 800;
}

input[type="email"],
input[type="password"],
input[type="text"],
input:not([type]) {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0b0d;
  color: var(--ink);
  font: inherit;
}

.file-picker {
  min-height: 58px;
  margin: 0;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px dashed rgba(230, 75, 239, .55);
  border-radius: 8px;
  background: rgba(230, 75, 239, .06);
  color: var(--muted);
  overflow: hidden;
  cursor: pointer;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-button {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 5px;
  background: rgba(255, 255, 255, .32);
  color: #fff;
  font-weight: 850;
}

.file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.workspace .editor-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.balance {
  display: grid;
  gap: 10px;
}

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

.balance-row span {
  color: var(--muted);
  font-size: 13px;
}

.balance-row b {
  color: #fff;
  font-size: 18px;
}

.workspace .balance-row {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
}

.workspace .balance-row b {
  font-size: 20px;
}

.upload-box {
  display: grid;
  gap: 14px;
}

.upload-status {
  min-height: 22px;
  margin: 0;
}

.mock-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(243, 189, 91, .35);
  border-radius: 8px;
  background: rgba(243, 189, 91, .1);
  color: #ffd98f;
}

.history {
  display: grid;
  gap: 10px;
}

.history-list {
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
  padding-right: 3px;
}

.job-row {
  align-items: flex-start;
}

.job-row p { margin-bottom: 8px; }

.status {
  min-height: 24px;
  padding: 3px 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.status.done { background: rgba(119, 223, 157, .13); color: var(--success); }
.status.failed { background: rgba(255, 119, 119, .13); color: var(--danger); }
.status.processing { background: rgba(230, 75, 239, .15); color: #ffc6ff; }
.error-text { color: #ffc7c7; }

.scale {
  color: var(--subtle);
  font-size: 13px;
}

.promo-line {
  max-width: 760px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.promo-line input {
  flex: 1;
  min-width: 220px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 13px;
}

.legal {
  max-width: 900px;
  margin: 44px auto;
  line-height: 1.7;
}

.legal h1 {
  font-size: 38px;
}

.legal h2 {
  margin-top: 28px;
}

.footer {
  display: grid;
  grid-template-columns: 1.35fr .8fr 1fr 1.15fr 1fr;
  gap: 28px;
  padding: 30px 40px;
  border-top: 1px solid var(--line);
  background: #101012;
  color: var(--ink);
}

.footer a,
.footer p {
  display: block;
  margin: 8px 0 0;
  color: var(--muted);
  text-decoration: none;
}

@media (max-width: 1180px) {
  .top-search {
    display: none;
  }

  .editor-hero,
  .workspace {
    grid-template-columns: 52px minmax(280px, 390px) minmax(0, 1fr);
  }

  .canvas-stage {
    padding: 52px 28px 64px;
  }
}

@media (max-width: 900px) {
  h1 { font-size: 36px; }
  h2 { font-size: 26px; }

  .topbar {
    height: auto;
    min-height: 72px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 12px 14px;
  }

  .top-spacer { display: none; }
  .nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }

  .editor-hero,
  .workspace {
    height: auto;
    min-height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .icon-rail {
    min-height: 56px;
    padding: 8px 12px;
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-separator {
    width: 1px;
    height: 34px;
    flex: 0 0 1px;
    margin: 2px 4px;
  }

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

  .canvas-stage {
    min-height: auto;
    padding: 28px 16px 72px;
  }

  .compare-frame {
    aspect-ratio: 4 / 3;
  }

  .subscription-modal {
    padding: 10px;
  }

  .subscription-dialog {
    max-height: calc(100vh - 20px);
    padding: 24px 10px 16px;
  }

  .subscription-head {
    margin-bottom: 14px;
  }

  .subscription-head h2 {
    font-size: 24px;
  }

  .subscription-head p {
    font-size: 12px;
  }

  .subscription-card-grid {
    grid-template-columns: 1fr;
  }

  .subscription-card-body {
    min-height: auto;
  }

  .rail-icon::after {
    display: none;
  }

  .page-shell {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .page-shell .icon-rail {
    min-height: 56px;
  }

  .band,
  .pricing,
  .page,
  .legal {
    padding: 34px 18px;
  }

  .footer {
    grid-template-columns: 1fr;
    padding: 28px 18px;
  }
}

@media (max-width: 560px) {
  .brand { font-size: 22px; }
  .subscribe-button { width: 100%; }
  .modal-close { top: 10px; right: 10px; }
  .subscription-head h2 { font-size: 23px; }
  .subscription-head p { font-size: 12px; }
  .subscription-price strong { font-size: 26px; }
  .subscription-price span { font-size: 12px; }
  .panel-thumb { width: 100%; }
  .compare-label { top: 10px; min-height: 30px; padding: 0 12px; }
  .compare-handle { width: 54px; height: 32px; }
  .zoom-widget { right: 12px; bottom: 12px; }
}
