@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/Montserrat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

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

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

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

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

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

:root {
  --bg: #f5f8fc;
  --ink: #1a2e5c;
  --muted: #525668;
  --line: #dbe2ee;
  --card: #ffffff;
  --brand: #8dc53f;
  --brand-2: #7fb239;
  --accent: #1a2e5c;
  --accent-2: #182a53;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Montserrat", "Poppins", "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% -2%, rgba(141, 197, 63, 0.12) 0, transparent 42%),
    radial-gradient(circle at 95% 0%, rgba(26, 46, 92, 0.08) 0, transparent 36%),
    var(--bg);
  color: var(--ink);
}

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

.app-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 16px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(125deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 26px rgba(24, 42, 83, 0.25);
  position: relative;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  flex: 0 0 auto;
  transform: translateY(-3px);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0.88;
  text-transform: uppercase;
}

.session-label {
  font-size: 13px;
  opacity: 0.95;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.user-menu-button {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.user-menu-button:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.55);
}

.user-menu-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #cbd5e1;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.user-avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #334155;
}

.user-avatar-fallback svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.user-avatar.has-image .user-avatar-fallback {
  display: none;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.24);
  padding: 8px;
  display: grid;
  gap: 4px;
  z-index: 120;
}

.user-menu-header {
  font-size: 12px;
  color: #475569;
  padding: 6px 8px 8px;
}

.user-menu-item {
  border: 0;
  background: transparent;
  border-radius: 8px;
  text-align: left;
  font: inherit;
  font-size: 14px;
  color: #0f172a;
  padding: 8px;
  cursor: pointer;
}

.user-menu-item:hover {
  background: #eef2ff;
}

.user-menu-item.danger {
  color: #b91c1c;
}

.user-menu-item.danger:hover {
  background: #fee2e2;
}

.user-menu-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 4px 0;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.44);
  display: grid;
  place-items: center;
  padding: 16px;
}

.profile-overlay-card {
  width: min(900px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.profile-overlay-subtitle {
  color: var(--muted);
  font-size: 13px;
}

.profile-overlay-form {
  display: grid;
  gap: 10px;
}

.profile-overlay-layout {
  display: grid;
  grid-template-columns: minmax(0, 560px) 280px;
  gap: 14px;
  align-items: start;
  justify-content: start;
}

.profile-fields {
  display: grid;
  gap: 10px;
  max-width: 560px;
}

.profile-fields label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.profile-email-field {
  display: grid;
  gap: 4px;
}

.profile-email-field-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.profile-email-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #f8fafc;
}

.profile-email-value {
  font-size: 14px;
  color: #0f172a;
  word-break: break-all;
}

.profile-email-update-link {
  font-size: 12px;
  white-space: nowrap;
  justify-self: auto;
  margin-left: auto;
}

.profile-email-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-email-verify-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #e2e8f0;
  color: #334155;
}

.profile-email-verify-pill.verified {
  background: rgba(141, 197, 63, 0.2);
  color: #365314;
}

.profile-assets {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: center;
}

.profile-asset-group {
  display: grid;
  gap: 6px;
  width: 100%;
  justify-items: center;
}

.profile-asset-group + .profile-asset-group {
  margin-top: 24px;
}

.profile-asset-card-shell {
  position: relative;
  width: 100%;
  display: grid;
}

.profile-asset-card-shell.headshot {
  width: 60%;
  min-width: 130px;
}

.profile-asset-card-shell.logo {
  width: 50%;
  min-width: 120px;
}

.profile-asset-field-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
}

.profile-asset-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  cursor: pointer;
  padding: 0;
}

.profile-asset-card.headshot {
  aspect-ratio: 4 / 5;
}

.profile-asset-card.logo {
  aspect-ratio: 16 / 7;
}

.profile-asset-card.logo img {
  object-fit: contain;
  padding: 10px;
  background: #ffffff;
}

.profile-asset-card.compact {
  aspect-ratio: auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
  border-radius: 12px;
}

.profile-asset-card.compact img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-right: 0;
  background: #e2e8f0;
}

.profile-asset-preview-fill {
  width: 100%;
  height: 100%;
  display: none;
  background: #e2e8f0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 50%;
  transform-origin: 50% 50%;
  transform: none;
}

.profile-asset-card.compact.headshot {
  aspect-ratio: var(--profile-headshot-aspect, 0.8965517241);
  width: 100%;
}

.profile-asset-card.compact.logo {
  aspect-ratio: 16 / 7;
  width: 100%;
  min-height: 64px;
}

.profile-asset-card.compact.logo img {
  object-fit: contain;
  padding: 12px;
  background: #ffffff;
}

.profile-asset-card.compact .profile-asset-empty {
  inset: 0;
  width: auto;
  font-size: 12px;
  text-align: center;
  padding: 0 8px;
}

.profile-asset-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 3;
}

.profile-asset-action-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.84);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.profile-asset-action-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.profile-asset-action-btn:hover {
  background: rgba(15, 23, 42, 0.98);
}

.profile-asset-card-shell .profile-asset-card.is-filled ~ .profile-asset-actions {
  display: flex;
}

.profile-asset-card-shell:hover .profile-asset-card.is-filled ~ .profile-asset-actions,
.profile-asset-card-shell:focus-within .profile-asset-card.is-filled ~ .profile-asset-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.profile-asset-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  background: #e2e8f0;
}

.profile-asset-card.is-filled img {
  display: block;
}

.profile-asset-card.is-filled .profile-asset-preview-fill {
  display: block;
}

.profile-asset-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.profile-asset-card.is-filled .profile-asset-empty {
  display: none;
}

.profile-asset-label {
  display: block;
  padding: 8px 10px;
  font-size: 12px;
  color: #334155;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid #e2e8f0;
  text-align: left;
}

.profile-asset-card:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 40%, white);
  outline-offset: 2px;
}

.panel-header {
  display: grid;
  gap: 4px;
}

.panel-header-split {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 10px;
}

.panel-header p {
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  gap: 12px;
}

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

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

.auth-stack {
  display: grid;
  justify-items: center;
}

.auth-card {
  width: min(420px, 100%);
}

.form-wide {
  gap: 14px;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.asset-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

input:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 35%, white);
  border-color: var(--brand);
}

.inline-form {
  display: flex;
  gap: 10px;
}

.listing-search-meta {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.listing-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.listing-page-btn {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  padding: 0 10px;
}

.listing-page-btn:hover {
  border-color: #a5b4cb;
}

.listing-page-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.listing-page-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn {
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  background: var(--brand-2);
}

.btn-alt {
  background: var(--accent);
  color: #fff;
}

.btn-alt:hover {
  background: var(--accent-2);
}

.btn.is-generating {
  animation: generate-breathe 1.3s ease-in-out infinite;
}

.btn-neutral {
  background: #64748b;
  color: #ffffff;
}

.btn-neutral:hover {
  background: #55657d;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
}

.text-link {
  border: 0;
  background: transparent;
  padding: 0;
  justify-self: start;
  font-size: 13px;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.text-link.center {
  justify-self: center;
  text-align: center;
}

.text-link.inline-link {
  justify-self: auto;
  text-align: inherit;
  font-size: inherit;
}

.text-link:hover {
  color: var(--accent-2);
}

.auth-helper-text {
  margin: 0;
  justify-self: center;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.card-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.card-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

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

.card .content {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: #eef2f7;
}

.template-card {
  position: relative;
}

.template-card .content {
  gap: 4px;
  align-content: start;
  grid-template-rows: 30px 34px 50px;
}

.template-card .content h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-card .content .btn {
  height: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  margin-top: auto;
  margin-bottom: 0;
}

.template-subtitle {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #64748b;
  font-weight: 600;
}

.template-card.coming-soon img {
  filter: saturate(0.75) brightness(0.96);
}

.template-card.coming-soon::after {
  content: "COMING SOON!";
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.btn-disabled,
.btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.btn-disabled:hover,
.btn:disabled:hover {
  background: #94a3b8;
}

.summary,
.result {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #f9fbff;
}

.verify-notice {
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: #fff8eb;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: #7c2d12;
  flex-wrap: wrap;
}

.feature-fieldset {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 0;
}

.feature-fieldset legend {
  padding: 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  gap: 8px;
}

.generate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
  align-items: start;
}

.builder-pane {
  display: grid;
  gap: 12px;
}

.preview-pane {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbff;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.preview-pane-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.preview-pane h3 {
  font-size: 16px;
}

.preview-pane p {
  color: var(--muted);
  font-size: 12px;
}

.preview-header-meta {
  text-align: right;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.preview-meta-line {
  color: #334155;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-meta-template {
  font-size: 12px;
  font-weight: 700;
}

.preview-meta-address {
  font-size: 12px;
  font-weight: 500;
}

.preview-meta-price {
  font-size: 13px;
  font-weight: 700;
}

.preview-pane-only {
  max-width: 780px;
  justify-self: center;
  width: 100%;
}

.mls-photo-warning {
  border: 1px solid #f59e0b;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
}

.flyer-preview-shell {
  position: relative;
  border: 1px solid #c9d4e6;
  border-radius: 12px;
  background: #ffffff;
  padding: 8px;
}

.preview-loading-overlay {
  position: absolute;
  inset: 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.38);
  color: #ffffff;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  z-index: 20;
  pointer-events: auto;
}

.flyer-preview-shell.is-loading .flyer-preview {
  filter: saturate(0.92) brightness(0.86);
}

.flyer-preview.is-locked {
  pointer-events: none;
}

.flyer-preview {
  width: 100%;
  aspect-ratio: 612 / 792;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  position: relative;
  container-type: inline-size;
}

.preview-photo-slot {
  border: 0;
  padding: 0;
  background: transparent;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.preview-photo-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 140ms ease;
  pointer-events: none;
  z-index: 2;
}

.preview-photo-slot.active {
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--brand) 45%, white);
}

.preview-photo-slot:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 50%, white);
  outline-offset: -2px;
}

.preview-photo-slot .preview-photo-fill {
  position: absolute;
  inset: 0;
  background: #dbe3ee;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.preview-photo-empty {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  place-items: center;
  padding: 0 10px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}

.preview-photo-slot.is-empty .preview-photo-empty {
  display: grid;
}

.preview-photo-slot.hero {
  position: absolute;
  inset: 0 0 auto 0;
  height: 48.7374%;
}

.preview-hero-compliance {
  position: absolute;
  left: -0.327%;
  bottom: 1.55%;
  width: 25.49%;
  height: auto;
  max-height: 10.36%;
  z-index: 3;
  object-fit: contain;
  pointer-events: none;
}

.preview-slot-actions {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: flex;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.95);
  transition: opacity 120ms ease, transform 120ms ease;
}

.preview-photo-slot:hover .preview-slot-actions,
.preview-photo-slot:focus-within .preview-slot-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.preview-photo-slot:hover::before,
.preview-photo-slot:focus-within::before {
  opacity: 1;
}

.preview-photo-slot.is-empty:hover::before,
.preview-photo-slot.is-empty:focus-within::before {
  background: rgba(15, 23, 42, 0.46);
}

.preview-photo-slot.is-empty:hover .preview-photo-empty,
.preview-photo-slot.is-empty:focus-within .preview-photo-empty {
  opacity: 0;
}

.preview-slot-action {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.84);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.preview-slot-action:hover {
  background: rgba(15, 23, 42, 0.98);
}

.preview-slot-action svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.preview-photo-slot.is-empty .preview-slot-action[data-photo-action="edit"] {
  width: 48px;
  height: 48px;
  background: rgba(15, 23, 42, 0.92);
}

.preview-photo-slot.is-empty .preview-slot-action[data-photo-action="edit"] svg {
  width: 26px;
  height: 26px;
}

.preview-hero-overlay {
  position: absolute;
  top: 1.64%;
  right: 3.92%;
  width: 84.97%;
  z-index: 4;
  text-align: right;
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
  display: grid;
  justify-items: end;
}

.preview-for-sale-wrap {
  display: grid;
  justify-items: end;
}

.preview-for-sale {
  font-size: 6.86cqw;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.065cqw;
}

.preview-for-sale-line {
  margin-top: 0.33cqw;
  margin-left: auto;
  width: 40cqw;
  border-top: 1px solid rgba(255, 255, 255, 0.95);
}

.preview-address-1 {
  margin-top: 0.33cqw;
  font-size: 2.94cqw;
  font-weight: 700;
  letter-spacing: 0.065cqw;
  line-height: 1.02;
}

.preview-address-2 {
  margin-top: 0.18cqw;
  font-size: 2.29cqw;
  font-weight: 400;
  letter-spacing: 0.065cqw;
  line-height: 1.05;
}

.preview-price-pill {
  position: absolute;
  top: 46.737%;
  left: 50%;
  transform: translateX(-50%);
  width: 38.562%;
  height: 5.455%;
  background: #fff;
  border-radius: 999px;
  font-size: 5.07cqw;
  font-weight: 600;
  color: #0f172a;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.01em;
}

.preview-thumb-row {
  position: absolute;
  left: 1.307%;
  right: 1.307%;
  top: 50.697%;
  height: 13.636%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.307%;
  z-index: 6;
}

.preview-photo-slot.thumb {
  height: 100%;
  aspect-ratio: auto;
  border-radius: 2px;
}

.preview-feature-row {
  position: absolute;
  left: 0;
  right: 0;
  top: 65.788%;
  height: 14.141%;
  padding: 0 2.2%;
  position: relative;
  z-index: 4;
}

.preview-feature-track {
  display: grid;
  gap: 0;
  height: 100%;
}

.preview-feature-item {
  border: 0;
  background: transparent;
  color: #111827;
  text-align: center;
  padding: 8% 6px 3%;
  cursor: pointer;
  display: grid;
  justify-items: center;
  gap: 6%;
  position: relative;
  align-content: start;
}

.preview-feature-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 140ms ease;
  pointer-events: none;
  z-index: 1;
}

.preview-feature-track > .preview-feature-item:not(:last-of-type)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 17.5%;
  height: 46.3%;
  border-right: 1px dotted #6b7280;
  z-index: 2;
}

.preview-feature-item img {
  width: 8.5cqw;
  height: 8.5cqw;
  object-fit: contain;
  z-index: 3;
}

.preview-feature-label {
  font-size: 1.8cqw;
  line-height: 1.05;
  font-weight: 500;
  text-transform: uppercase;
  z-index: 3;
}

.preview-feature-item:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 45%, white);
  outline-offset: -2px;
}

.preview-feature-actions {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.95);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 4;
}

.preview-feature-item:hover .preview-feature-actions,
.preview-feature-item:focus-within .preview-feature-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.preview-feature-item:hover::before,
.preview-feature-item:focus-within::before {
  opacity: 1;
}

.preview-feature-action {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.84);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.preview-feature-action:hover {
  background: rgba(15, 23, 42, 0.98);
}

.preview-feature-action svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.preview-feature-divider-add {
  position: absolute;
  right: 0;
  top: 40.65%;
  transform: translate(50%, -50%);
  width: 24px;
  height: 24px;
  border: 1px solid #94a3b8;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
  transition: opacity 120ms ease, background-color 120ms ease, color 120ms ease;
  z-index: 6;
}

.preview-feature-divider-add svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  fill: none;
  transform: translateX(-1px);
}

.preview-feature-divider-add:hover {
  background: #f8fafc;
  color: #0f172a;
}

.preview-feature-row:hover .preview-feature-divider-add,
.preview-feature-row:focus-within .preview-feature-divider-add {
  opacity: 1;
  pointer-events: auto;
}

.preview-feature-track {
  position: relative;
  overflow: visible;
}

.preview-feature-divider-add.is-right-edge {
  transform: translate(22%, -50%);
}

.preview-feature-add {
  border: 1px dashed #9ca3af;
  border-radius: 999px;
  width: 20px;
  height: 20px;
  align-self: center;
  justify-self: center;
  background: #fff;
  color: #475569;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.preview-promo {
  position: absolute;
  left: 0;
  right: 0;
  top: 77.8%;
  text-align: center;
  font-size: 2.78cqw;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.02em;
  z-index: 5;
}

.preview-footer {
  position: absolute;
  left: 0;
  right: 0;
  top: 83.333%;
  height: 16.667%;
  background: linear-gradient(90deg, #000000 0%, #737373 100%);
  overflow: visible;
  z-index: 3;
}

.preview-footer-headshot {
  position: absolute;
  bottom: 0;
  height: 130%;
  aspect-ratio: var(--profile-headshot-aspect, 0.8965517241);
  overflow: hidden;
  pointer-events: none;
}

.preview-footer-headshot-agent {
  left: -4.25%;
}

.preview-footer-headshot-lo {
  right: -4.25%;
}

.preview-footer-headshot-fill {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  transform-origin: center;
  transform: none;
}

.preview-footer-col {
  position: absolute;
  top: 3.03%;
  width: 21.5%;
  color: #e5e7eb;
  display: grid;
  gap: 0.24cqw;
}

.preview-footer-col-agent {
  left: 24%;
  text-align: left;
}

.preview-footer-col-lo {
  right: 24%;
  text-align: right;
}

.preview-footer-name {
  color: #ffffff;
  font-size: 1.96cqw;
  font-weight: 700;
  letter-spacing: 0.07cqw;
  line-height: 1.02;
  text-transform: uppercase;
}

.preview-footer-title {
  font-size: 1.47cqw;
  font-weight: 600;
  line-height: 1.1;
}

.preview-footer-line {
  font-size: 1.47cqw;
  font-weight: 400;
  line-height: 1.1;
}

.preview-footer-line-bold {
  font-weight: 700;
}

.preview-footer-logo-wrap {
  margin-top: 0.8cqw;
  display: flex;
  align-items: flex-start;
}

.preview-footer-logo-wrap-agent {
  justify-content: flex-start;
}

.preview-footer-logo-wrap-lo {
  justify-content: flex-end;
}

.preview-footer-logo {
  max-width: 100%;
  max-height: 5.05cqw;
  width: auto;
  object-fit: contain;
}

.generate-actions {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#generateBtn {
  width: 100%;
}

#generateBtn.is-generating {
  animation: generate-breathe 1.3s ease-in-out infinite;
}

#registerSubmitBtn.is-registering {
  animation: generate-breathe 1.3s ease-in-out infinite;
}

@keyframes generate-breathe {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(141, 197, 63, 0.24);
  }
  50% {
    transform: scale(1.01);
    box-shadow: 0 6px 18px 0 rgba(141, 197, 63, 0.26);
  }
}

.generate-action-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.generate-action-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}

.feature-row {
  display: grid;
  grid-template-columns: auto 180px 1fr;
  gap: 8px;
  align-items: center;
}

.feature-row input[type="text"] {
  font-size: 13px;
  padding: 8px 10px;
}

.feature-builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.feature-builder-header p {
  font-size: 12px;
  color: var(--muted);
}

.feature-builder {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.feature-chip {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.feature-chip strong {
  font-size: 12px;
  color: #111827;
}

.feature-chip small {
  font-size: 11px;
  color: var(--muted);
}

.feature-chip.add {
  border-style: dashed;
  place-content: center;
  text-align: center;
}

.photo-fieldset {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 0;
  display: grid;
  gap: 10px;
}

.photo-fieldset legend {
  padding: 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.photo-help {
  color: var(--muted);
  font-size: 12px;
}

.photo-slot-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.photo-slot {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  display: grid;
  gap: 6px;
  cursor: pointer;
}

.photo-slot.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 18%, white);
}

.photo-slot-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.photo-slot-preview {
  width: 100%;
  height: 56px;
  border-radius: 8px;
  background: #e5ebf3;
  background-size: cover;
  background-position: center;
}

.photo-source-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
  height: 372px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.photo-source {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  display: grid;
  padding: 0;
}

.photo-source.active {
  border-color: var(--brand);
}

.photo-source-thumb {
  height: 108px;
  background: #e5ebf3;
  background-size: cover;
  background-position: center;
}

.photo-source-thumb.is-empty {
  background:
    linear-gradient(140deg, #e8edf5, #d7dfea);
}

.photo-source-label {
  padding: 4px 6px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-source-more {
  margin-top: 10px;
  width: 100%;
}

.photo-upload-label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.photo-upload-label input[type="file"] {
  width: 100%;
}

.photo-preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #f9fbff;
  display: grid;
  gap: 8px;
}

.photo-preview-hint {
  font-size: 12px;
  color: var(--muted);
}

.photo-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.photo-editor-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-focus-frame {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 10px;
  overflow: hidden;
  background: #e5ebf3;
  border: 1px solid var(--line);
  touch-action: none;
  cursor: grab;
}

.profile-focus-frame.logo {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  justify-self: stretch;
  cursor: default;
}

.profile-focus-frame.headshot {
  width: min(280px, 100%);
  height: auto;
  aspect-ratio: var(--profile-headshot-aspect, 0.8965517241);
  justify-self: center;
}

.profile-zoom-control {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  min-width: 0;
}

.profile-zoom-control input[type="range"] {
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
  height: 20px;
  accent-color: var(--brand);
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
}

.profile-zoom-control input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: #475569;
}

.profile-zoom-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--brand);
  border: 0;
  margin-top: -5px;
}

.profile-zoom-control input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: #475569;
}

.profile-zoom-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--brand);
  border: 0;
}

.profile-editor-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.profile-remove-bg-btn {
  white-space: nowrap;
}

.profile-focus-frame.logo .photo-focus-gridlines {
  display: none;
}

.photo-focus-frame.dragging {
  cursor: grabbing;
}

.photo-focus-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: 50% 50%;
}

.photo-focus-gridlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, transparent 33.333%, rgba(255, 255, 255, 0.4) 33.333%, rgba(255, 255, 255, 0.4) 34%, transparent 34%),
    linear-gradient(to right, transparent 66.666%, rgba(255, 255, 255, 0.4) 66.666%, rgba(255, 255, 255, 0.4) 67.333%, transparent 67.333%),
    linear-gradient(to bottom, transparent 33.333%, rgba(255, 255, 255, 0.4) 33.333%, rgba(255, 255, 255, 0.4) 34%, transparent 34%),
    linear-gradient(to bottom, transparent 66.666%, rgba(255, 255, 255, 0.4) 66.666%, rgba(255, 255, 255, 0.4) 67.333%, transparent 67.333%);
}

.photo-focus-empty {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(140deg, #e8edf5, #d3dbe8);
}

.photo-focus-frame.is-empty .photo-focus-empty {
  display: grid;
}

.photo-focus-frame.is-empty .photo-focus-image {
  opacity: 0;
}

.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.42);
  display: grid;
  place-items: center;
  z-index: 80;
}

.dialog-card {
  width: min(520px, calc(100vw - 24px));
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.dialog-card p {
  color: var(--muted);
  font-size: 13px;
}

.dialog-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.feature-label-editor {
  display: grid;
  gap: 6px;
}

.feature-label-editor label {
  color: var(--muted);
  font-size: 13px;
}

.feature-label-editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.feature-label-composer {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
  line-height: 1.35;
  color: #111827;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  cursor: text;
}

.feature-label-composer:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 35%, white);
  border-color: var(--brand);
}

.feature-label-composer.chip-selected {
  caret-color: transparent;
}

.feature-mls-actions {
  display: inline-grid;
  justify-items: stretch;
  gap: 4px;
  width: max-content;
}

.feature-mls-value {
  width: 100%;
  min-height: 32px;
  border: 1px solid #d1d5db;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
  cursor: default;
}

.feature-mls-add-link {
  border: 0;
  background: transparent;
  color: #2563eb;
  text-decoration: underline;
  padding: 0;
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.feature-mls-add-link:hover {
  color: #1d4ed8;
}

.feature-mls-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #93c5fd;
  background: #dbeafe;
  color: #1e3a8a;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.feature-mls-chip-text {
  white-space: nowrap;
}

.feature-mls-chip.is-selected {
  outline: 2px solid #60a5fa;
  outline-offset: 1px;
}

.dialog-list {
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.dialog-list button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.dialog-list button:hover {
  border-color: var(--brand);
}

.dialog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.email-update-card {
  width: min(420px, calc(100vw - 24px));
}

.toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 24px));
  z-index: 220;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.18);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  animation: toast-in 0.18s ease-out;
}

.toast-message {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.toast-close {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  opacity: 0.75;
}

.toast-close:hover {
  opacity: 1;
}

.toast-close svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.toast-info {
  border-left: 4px solid #2563eb;
}

.toast-success {
  border-left: 4px solid #16a34a;
}

.toast-warning {
  border-left: 4px solid #d97706;
}

.toast-error {
  border-left: 4px solid #dc2626;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.icon-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  border-radius: 999px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.photo-source-section {
  display: grid;
  gap: 0;
}

.feature-icon-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-height: 150px;
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
}

.feature-icon-option {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #334155;
  padding: 6px;
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.feature-icon-option img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 8px;
  background: #f3f6fb;
  border: 1px solid #e2e8f0;
}

.feature-icon-option span {
  font-size: 11px;
  line-height: 1.2;
}

.feature-icon-option.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 16%, white);
}

.panel-log {
  background: #101827;
  color: #d1d5db;
}

.log {
  margin: 0;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  max-height: 220px;
  overflow: auto;
}

.hidden {
  display: none !important;
}

@media (max-width: 800px) {
  .generate-layout {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .inline-form {
    flex-direction: column;
  }

  .panel-header-split {
    grid-template-columns: 1fr;
  }

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

  .topbar-brand {
    width: 100%;
  }

  .topbar-logo {
    width: 68px;
    height: 68px;
  }

  .topbar-actions {
    align-self: flex-end;
  }

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

  .preview-pane-only {
    max-width: 100%;
  }

  .profile-overlay-layout {
    grid-template-columns: 1fr;
  }
}
