:root {
  --ink: #171718;
  --muted: #66666A;
  --line: rgba(23, 23, 24, .14);
  --paper: #F3F3F1;
  --paper-2: #E9E9E6;
  --white: #FAFAF8;
  --night: #171718;
  --mint: #F3F3F1;
  --violet: #D0D0CD;
  --warm: #E9E9E6;
  --coral: #D0D0CD;
  --blue: #D0D0CD;
  --radius: 22px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 86% 2%, rgba(208, 208, 205, .38), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, textarea, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid #66666A; outline-offset: 3px; }

nav.nav {
  position: sticky;
  z-index: 100;
  top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 12px;
  background: rgba(243, 243, 241, .92) !important;
  border-bottom-color: rgba(23, 23, 24, .11) !important;
  backdrop-filter: blur(20px);
}

.nav .brand img { content: url("/saga-lockup-dark.svg"); filter: none; }
.nav-links a { color: #3F3F43 !important; }
.nav-links a.active { color: var(--ink) !important; }
.nav-right { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; margin-left: auto; }
.saga-account-balance {
  border-color: rgba(23, 23, 24, .16);
  background: rgba(250, 250, 248, .7);
  color: var(--ink);
  box-shadow: inset 0 1px rgba(255, 255, 255, .72);
}
.saga-account-balance-label { color: #66666A; }
.saga-account-balance-value { color: var(--ink); }
.saga-account-balance[data-tone="low"] { border-color: rgba(102, 102, 106, .58); }
.saga-account-balance[data-tone="empty"] { border-color: rgba(102, 102, 106, .46); }

.image-library-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #66666A;
  font-size: 12px;
  font-weight: 650;
}

.image-library-link svg { width: 15px; height: 15px; }

.image-profile {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(23, 23, 24, .18);
  border-radius: 50%;
  background: var(--night);
  color: white;
  font-size: 11px;
  font-weight: 750;
}

.image-shell {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 80px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #66666A;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.image-hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(560px, 1.1fr);
  min-height: 650px;
  overflow: hidden;
  border: 1px solid rgba(23, 23, 24, .12);
  border-radius: 28px;
  background: var(--white);
  box-shadow: 0 28px 80px rgba(23, 23, 24, .1);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 6vw, 92px);
}

.hero-copy > .eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #66666A;
}

.hero-copy > .eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #D0D0CD;
  box-shadow: 0 0 0 4px rgba(208, 208, 205, .12);
}

.hero-copy h1 {
  max-width: 670px;
  margin: 0;
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: clamp(50px, 6vw, 88px);
  font-weight: 510;
  letter-spacing: -.065em;
  line-height: .92;
}

.hero-copy h1 em {
  color: #66666A;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 420;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 610px;
  margin: 26px 0 0;
  color: #66666A;
  font-size: 16px;
  letter-spacing: -.015em;
  line-height: 1.65;
}

.image-compose {
  margin-top: 36px;
  overflow: hidden;
  border: 1px solid rgba(23, 23, 24, .17);
  border-radius: 18px;
  background: white;
  box-shadow: 0 12px 34px rgba(23, 23, 24, .08);
}

.image-compose-paths {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 12px 10px;
}

.image-compose-paths legend {
  padding: 0 6px;
  color: #66666A;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.image-compose-paths > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.image-compose-paths button {
  min-width: 0;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 8px;
  background: #F3F3F1;
  color: #66666A;
  cursor: pointer;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.image-compose-paths button:hover {
  border-color: rgba(102, 102, 106, .2);
  background: rgba(102, 102, 106, .07);
  color: #66666A;
}

.image-compose-paths button[aria-pressed="true"] {
  border-color: rgba(102, 102, 106, .28);
  background: rgba(102, 102, 106, .11);
  color: #66666A;
  box-shadow: inset 0 0 0 1px rgba(102, 102, 106, .04);
}

.image-compose-paths button svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.image-compose > label {
  display: block;
  padding: 16px 18px 0;
  color: #66666A;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.image-compose textarea {
  display: block;
  width: 100%;
  min-height: 94px;
  resize: none;
  border: 0;
  outline: 0;
  padding: 10px 18px 12px;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: -.015em;
  line-height: 1.45;
}

.image-compose textarea::placeholder { color: #66666A; }

.image-compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 10px;
}

.image-compose-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-left: 8px;
  color: #66666A;
  font-size: 11px;
}

.image-compose-footer > span svg { width: 14px; height: 14px; }

.image-compose .image-compose-submit,
.remove-button,
.canvas-empty button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 12px;
  background: var(--night);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}

.image-compose .image-compose-submit { padding: 13px 16px; }
.image-compose .image-compose-submit svg, .remove-button svg { width: 14px; height: 14px; }
.image-compose .image-compose-submit:hover, .remove-button:hover, .canvas-empty button:hover { transform: translateY(-1px); background: #171718; }

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.hero-metrics > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-right: 12px;
}

.hero-metrics strong {
  font-family: "DM Sans", sans-serif;
  font-size: 24px;
  font-weight: 570;
  letter-spacing: -.045em;
}

.hero-metrics small {
  margin-top: 3px;
  color: #66666A;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hero-gallery {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  min-height: 650px;
  padding: 3px;
  background: #D0D0CD;
}

.hero-gallery figure {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: #D0D0CD;
}

.hero-gallery .hero-tall { grid-row: 1 / 3; }

.hero-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}

.hero-gallery figure:hover img { transform: scale(1.025); }

.hero-gallery figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 44px 18px 16px;
  background: linear-gradient(transparent, rgba(23, 23, 24, .74));
  color: white;
}

.hero-gallery figcaption span { display: flex; flex-direction: column; gap: 3px; }
.hero-gallery figcaption small { color: rgba(255,255,255,.66); font-size: 9px; font-weight: 690; letter-spacing: .08em; text-transform: uppercase; }
.hero-gallery figcaption strong { font-size: 12px; font-weight: 650; }
.hero-gallery figcaption b { color: rgba(255,255,255,.7); font-size: 10px; font-weight: 650; }

.lab-index {
  position: sticky;
  z-index: 10;
  top: 64px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  padding: 9px 10px;
  border: 1px solid rgba(23, 23, 24, .12);
  border-radius: 15px;
  background: rgba(250, 250, 248, .9);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(23, 23, 24, .08);
}

.lab-index > span {
  padding: 0 13px 0 5px;
  color: #66666A;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.lab-index a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 9px;
  color: #3F3F43;
  font-size: 11px;
  font-weight: 690;
}

.lab-index a:hover { background: #E9E9E6; color: var(--ink); }
.lab-index a b { color: #66666A; font-size: 9px; }
.lab-index .index-action {
  margin-left: auto;
  background: var(--night);
  color: white;
}
.lab-index .index-action:hover { background: #171718; color: white; }
.lab-index .index-action svg { width: 14px; height: 14px; }

.lab-section,
.remove-section {
  padding: 104px 0 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  align-items: end;
  gap: 40px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: clamp(36px, 4vw, 60px);
  font-weight: 520;
  letter-spacing: -.055em;
  line-height: 1;
}

.section-heading > p {
  margin: 0;
  color: #66666A;
  font-size: 13px;
  line-height: 1.65;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.workflow-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 24px 18px;
  min-height: 310px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 25px;
  background: rgba(250, 250, 248, .55);
  cursor: pointer;
  text-align: left;
  transition: background .22s ease, transform .22s ease;
}

.workflow-card:hover {
  z-index: 1;
  background: var(--white);
  box-shadow: 0 18px 48px rgba(23, 23, 24, .1);
  transform: translateY(-2px);
}

.workflow-card.featured { background: var(--night); color: white; }
.workflow-card.featured:hover { background: #171718; }

.workflow-number {
  justify-self: end;
  color: #66666A;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .08em;
}
.featured .workflow-number { color: rgba(255,255,255,.46); }

.workflow-icon {
  display: grid;
  grid-column: 1;
  grid-row: 1 / 3;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: var(--mint);
  color: var(--mint-ink, #171718);
}
.workflow-icon.mint { background: var(--mint); }
.workflow-icon.warm { background: var(--warm); color: #171718; }
.workflow-icon.violet { background: var(--violet); color: #171718; }
.workflow-icon.coral { background: var(--coral); color: #171718; }
.workflow-icon.blue { background: var(--blue); color: #171718; }
.workflow-icon svg { width: 22px; height: 22px; }

.workflow-copy {
  display: flex;
  flex-direction: column;
  align-self: end;
}
.workflow-copy small { color: #66666A; font-size: 9px; font-weight: 720; letter-spacing: .09em; text-transform: uppercase; }
.featured .workflow-copy small { color: rgba(255,255,255,.53); }
.workflow-copy strong { margin-top: 7px; font-family: "DM Sans", sans-serif; font-size: 23px; font-weight: 560; letter-spacing: -.035em; }
.workflow-copy p { max-width: 300px; margin: 10px 0 0; color: #66666A; font-size: 12px; line-height: 1.55; }
.featured .workflow-copy p { color: rgba(255,255,255,.62); }

.workflow-meta {
  display: flex;
  grid-column: 2;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 17px;
}
.featured .workflow-meta { border-top-color: rgba(255,255,255,.14); }
.workflow-meta b { color: #66666A; font-size: 10px; font-weight: 700; }
.featured .workflow-meta b { color: rgba(255,255,255,.65); }
.workflow-meta i { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid var(--line); border-radius: 50%; }
.featured .workflow-meta i { border-color: rgba(255,255,255,.2); }
.workflow-meta svg { width: 12px; height: 12px; }

.profile-section {
  position: relative;
  margin-top: 104px;
  border: 1px solid rgba(23, 23, 24, .12);
  border-radius: 28px;
  padding: clamp(46px, 6vw, 78px);
  background:
    radial-gradient(circle at 92% 4%, rgba(208, 208, 205, .48), transparent 21rem),
    linear-gradient(145deg, rgba(255, 255, 255, .68), rgba(233, 233, 230, .72)),
    var(--paper-2);
  box-shadow: 0 24px 70px rgba(23, 23, 24, .07);
}
.profile-section .section-heading { grid-template-columns: minmax(0, 1fr) minmax(320px, 470px); }
.profile-heading-actions { display: grid; gap: 15px; align-items: start; }
.profile-heading-actions p { margin: 0; color: #66666A; font-size: 13px; line-height: 1.65; }
.profile-heading-actions button {
  display: inline-flex;
  width: fit-content;
  min-height: 41px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 11px;
  padding: 0 14px;
  background: var(--night);
  color: white;
  cursor: pointer;
  font-size: 10px;
  font-weight: 730;
}
.profile-heading-actions button:hover { background: #171718; }
.profile-heading-actions button svg { width: 14px; height: 14px; }

.profile-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 7px;
  background: rgba(250, 250, 248, .72);
}
.profile-filters { display: flex; min-width: 0; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.profile-filters::-webkit-scrollbar { display: none; }
.profile-filters button {
  min-height: 34px;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 11px;
  background: transparent;
  color: #66666A;
  cursor: pointer;
  font-size: 9px;
  font-weight: 690;
  white-space: nowrap;
}
.profile-filters button:hover { background: rgba(23, 23, 24, .045); color: var(--ink); }
.profile-filters button[aria-pressed="true"] {
  border-color: rgba(63, 63, 67, .2);
  background: rgba(63, 63, 67, .08);
  color: #3F3F43;
}
.profile-summary { padding-right: 8px; color: #66666A; font-size: 8.5px; font-weight: 700; white-space: nowrap; }

.profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.profile-skeleton {
  min-height: 330px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(100deg, #E9E9E6 20%, #E9E9E6 40%, #E9E9E6 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.profile-card {
  display: flex;
  min-width: 0;
  min-height: 330px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(250, 250, 248, .85);
  box-shadow: 0 12px 34px rgba(23, 23, 24, .045);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.profile-card:hover, .profile-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(23, 23, 24, .24);
  box-shadow: 0 22px 44px rgba(23, 23, 24, .08);
}
.profile-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 15%, rgba(208, 208, 205, .75), transparent 13rem),
    radial-gradient(circle at 15% 88%, rgba(243, 243, 241, .55), transparent 12rem),
    #E9E9E6;
}
.profile-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.profile-card:hover .profile-visual img { transform: scale(1.02); }
.profile-visual::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(23, 23, 24, .5), transparent 50%);
  content: "";
}
.profile-type, .profile-private {
  position: absolute;
  z-index: 1;
  top: 11px;
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(23, 23, 24, .62);
  color: white;
  font-size: 7.5px;
  font-weight: 740;
  letter-spacing: .07em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.profile-type { left: 11px; color: var(--mint); }
.profile-private { right: 11px; }
.profile-body { display: flex; flex: 1; flex-direction: column; padding: 15px; }
.profile-name { overflow: hidden; font-family: "DM Sans", sans-serif; font-size: 18px; font-weight: 580; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.profile-guidance {
  min-height: 38px;
  margin: 7px 0 0;
  overflow: hidden;
  color: #66666A;
  font-size: 10px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.profile-meta { margin-top: 11px; color: #66666A; font-size: 8px; font-weight: 700; }
.profile-actions { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-top: auto; border-top: 1px solid var(--line); padding-top: 13px; }
.profile-actions button {
  min-height: 37px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: transparent;
  color: #66666A;
  cursor: pointer;
  font-size: 9px;
  font-weight: 730;
}
.profile-actions button:hover { border-color: rgba(23, 23, 24, .3); color: var(--ink); }
.profile-actions button.primary { border-color: var(--night); background: var(--night); color: white; }
.profile-actions button.primary:hover { background: #171718; }
.profile-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 250px;
  border: 1px dashed rgba(23, 23, 24, .2);
  border-radius: 18px;
  padding: 40px;
  text-align: center;
}
.profile-empty span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: rgba(63, 63, 67, .08); color: #66666A; }
.profile-empty svg { width: 20px; height: 20px; }
.profile-empty strong { margin-top: 14px; font-family: "DM Sans", sans-serif; font-size: 18px; font-weight: 580; }
.profile-empty p { max-width: 430px; margin: 8px 0 0; color: #66666A; font-size: 11px; line-height: 1.55; }
.profile-empty button { margin-top: 17px; min-height: 38px; border: 0; border-radius: 10px; padding: 0 14px; background: var(--night); color: white; cursor: pointer; font-size: 9px; font-weight: 730; }
.profile-proof-note { display: flex; align-items: center; gap: 8px; margin: 13px 2px 0; color: #66666A; font-size: 8.5px; font-weight: 630; line-height: 1.5; }
.profile-proof-note svg { width: 14px; height: 14px; flex: 0 0 auto; color: #66666A; }

.asset-rail {
  display: grid;
  grid-auto-columns: minmax(265px, 1fr);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 16px;
  scrollbar-width: thin;
}

.asset-skeleton {
  min-height: 370px;
  border-radius: 18px;
  background: linear-gradient(100deg, #E9E9E6 20%, #E9E9E6 40%, #E9E9E6 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer { to { background-position-x: -200%; } }

.asset-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--white);
}

.asset-media {
  position: relative;
  display: block;
  height: 235px;
  overflow: hidden;
  background: #D0D0CD;
}
.asset-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.asset-media:hover img { transform: scale(1.025); }
.asset-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(23, 23, 24, .78);
  color: white;
  font-size: 8px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.asset-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px 15px 12px;
}
.asset-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 680; }
.asset-info small { color: #66666A; font-size: 9px; }

.asset-actions {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  padding: 9px;
}
.asset-actions button,
.asset-actions a {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: transparent;
  cursor: pointer;
  color: #66666A;
  font-size: 9px;
  font-weight: 700;
}
.asset-actions .primary { border-color: var(--night); background: var(--night); color: white; }

.empty-assets {
  grid-column: 1 / -1;
  display: grid;
  min-height: 300px;
  place-items: center;
  border: 1px dashed rgba(23, 23, 24, .22);
  border-radius: 20px;
  background: rgba(250, 250, 248, .5);
  text-align: center;
}
.empty-assets > div { display: flex; max-width: 360px; flex-direction: column; align-items: center; }
.empty-assets svg { width: 28px; height: 28px; color: #66666A; }
.empty-assets strong { margin-top: 16px; font-size: 18px; }
.empty-assets p { margin: 8px 0 14px; color: #66666A; font-size: 12px; line-height: 1.55; }
.empty-assets a { font-size: 11px; font-weight: 700; }

.tool-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--line);
}
.tool-ribbon a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 15px;
  background: var(--white);
}
.tool-ribbon a:hover { background: white; }
.tool-ribbon > a > svg { flex: 0 0 auto; width: 19px; height: 19px; color: #66666A; }
.tool-ribbon div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.tool-ribbon strong { font-size: 11px; font-weight: 700; }
.tool-ribbon small { color: #66666A; font-size: 9px; line-height: 1.35; }

.remove-section {
  margin-top: 104px;
  padding: 82px clamp(24px, 5vw, 72px) 72px;
  border-radius: 28px;
  background: var(--night);
  color: white;
}
.remove-section .eyebrow { color: rgba(255,255,255,.5); }
.remove-section .section-heading > p { color: rgba(255,255,255,.55); }

.background-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(330px, .72fr);
  min-height: 610px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 22px;
  background: #171718;
}

.background-canvas {
  position: relative;
  display: grid;
  min-height: 610px;
  place-items: center;
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,.12);
  background-color: #171718;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.055) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.055) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.055) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.055) 75%);
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
  transition: box-shadow .2s ease;
}
.background-canvas.dragover { box-shadow: inset 0 0 0 3px var(--mint); }
.background-canvas > img { width: 100%; height: 100%; object-fit: contain; }
.background-canvas.busy > img { opacity: .28; filter: blur(2px); }

.canvas-empty {
  display: flex;
  max-width: 420px;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  text-align: center;
}
.empty-icon {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 19px;
  background: rgba(255,255,255,.06);
}
.empty-icon svg { width: 25px; height: 25px; }
.canvas-empty strong { margin-top: 20px; font-family: "DM Sans", sans-serif; font-size: 23px; font-weight: 560; letter-spacing: -.035em; }
.canvas-empty p { margin: 10px 0 19px; color: rgba(255,255,255,.52); font-size: 12px; line-height: 1.55; }
.canvas-empty button { padding: 12px 16px; background: white; color: var(--ink); }
.canvas-empty button:hover { background: var(--mint); }

.background-progress {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(23, 23, 24, .64);
  backdrop-filter: blur(4px);
}
.progress-ring {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255,255,255,.17);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.background-progress strong { margin-top: 18px; font-size: 14px; }
.background-progress small { margin-top: 5px; color: rgba(255,255,255,.55); font-size: 10px; }

.result-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(23, 23, 24, .78);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .07em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.result-tag span { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }

.background-controls {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vw, 48px);
}

.private-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.private-badge > svg { width: 21px; height: 21px; color: var(--mint); }
.private-badge > span { display: flex; flex-direction: column; gap: 3px; }
.private-badge strong { font-size: 11px; }
.private-badge small { color: rgba(255,255,255,.48); font-size: 9px; }

.selected-source { padding: 30px 0 24px; }
.selected-source strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "DM Sans", sans-serif; font-size: 20px; font-weight: 550; letter-spacing: -.035em; }
.selected-source small { display: block; margin-top: 7px; color: rgba(255,255,255,.48); font-size: 9px; line-height: 1.5; }

.background-proof {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255,255,255,.11);
}
.background-proof li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 13px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,.11);
}
.background-proof b { color: rgba(255,255,255,.5); font-size: 9px; }
.background-proof span { display: flex; flex-direction: column; gap: 4px; }
.background-proof strong { font-size: 10px; }
.background-proof small { color: rgba(255,255,255,.46); font-size: 9px; }

.background-status {
  min-height: 16px;
  margin: auto 0 13px;
  color: rgba(255,255,255,.5);
  font-size: 9px;
  line-height: 1.4;
}

.remove-button {
  width: 100%;
  padding: 16px 18px;
  background: var(--mint);
  color: var(--mint-ink, #171718);
}
.remove-button:hover { background: #F3F3F1; }
.remove-button:disabled,
.canvas-empty button:disabled { cursor: not-allowed; opacity: .42; transform: none; }

.background-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 9px;
}
.background-result-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 11px 8px;
  color: rgba(255,255,255,.74);
  font-size: 9px;
  font-weight: 680;
}
.background-result-actions a:first-child { grid-column: 1 / 3; background: white; color: var(--ink); }
.background-result-actions svg { width: 13px; height: 13px; }

.background-error {
  min-height: 16px;
  margin: 10px 0 0;
  color: #D0D0CD;
  font-size: 10px;
  line-height: 1.4;
}

.models-section { padding-top: 120px; }

.image-provider-panel {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 10px;
  background:
    radial-gradient(circle at 0 0, rgba(243, 243, 241, .34), transparent 46%),
    rgba(250, 250, 248, .76);
  box-shadow: 0 12px 34px rgba(23, 23, 24, .045);
}

.image-provider-intro {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  padding: 0 5px;
  color: #66666A;
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.image-provider-intro strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: -.01em;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.image-providers {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.image-providers::-webkit-scrollbar { display: none; }

.image-providers button {
  display: inline-flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 0 12px;
  background: white;
  color: #66666A;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.image-providers button:hover {
  border-color: rgba(102, 102, 106, .2);
  color: #66666A;
}

.image-providers button[aria-pressed="true"] {
  border-color: rgba(102, 102, 106, .3);
  background: rgba(102, 102, 106, .1);
  color: #66666A;
}

.image-providers small {
  display: inline-flex;
  min-width: 20px;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(23, 23, 24, .06);
  color: inherit;
  font-size: 8px;
  font-weight: 780;
}

.model-explorer-toolbar {
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(0, 1.55fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 8px;
  background: rgba(250, 250, 248, .7);
  box-shadow: 0 12px 34px rgba(23, 23, 24, .045);
}

.model-search {
  display: flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 12px;
  background: white;
  color: #66666A;
}
.model-search:focus-within { border-color: rgba(102, 102, 106, .55); color: #66666A; }
.model-search svg { width: 15px; height: 15px; flex: 0 0 auto; }
.model-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 560;
}
.model-search input::placeholder { color: #66666A; }

.model-filters {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}
.model-filters::-webkit-scrollbar { display: none; }
.model-filters button {
  min-height: 35px;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 11px;
  background: transparent;
  color: #66666A;
  cursor: pointer;
  font-size: 9px;
  font-weight: 680;
  white-space: nowrap;
}
.model-filters button:hover { background: rgba(23, 23, 24, .045); color: var(--ink); }
.model-filters button[aria-pressed="true"] {
  border-color: rgba(102, 102, 106, .28);
  background: rgba(102, 102, 106, .09);
  color: #66666A;
}
.model-summary { padding-right: 7px; color: #66666A; font-size: 8.5px; font-weight: 700; white-space: nowrap; }

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

.model-skeleton {
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: linear-gradient(100deg, #E9E9E6 20%, #E9E9E6 40%, #E9E9E6 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.model-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 430px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(250, 250, 248, .72);
  box-shadow: 0 14px 36px rgba(23, 23, 24, .045);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.model-card:hover, .model-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(23, 23, 24, .25);
  box-shadow: 0 24px 50px rgba(23, 23, 24, .09);
}

.model-preview {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 16%, rgba(208, 208, 205, .8), transparent 15rem),
    radial-gradient(circle at 18% 90%, rgba(243, 243, 241, .55), transparent 14rem),
    #E9E9E6;
}
.model-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .65s cubic-bezier(.2, .7, .2, 1);
}
.model-card:hover .model-preview img { transform: scale(1.018); }
.model-preview::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(23, 23, 24, .48), transparent 44%);
  content: "";
}
.model-preview.is-empty::after { background: linear-gradient(to top, rgba(23, 23, 24, .12), transparent 50%); }
.model-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(23, 23, 24, .2);
  font-family: "DM Sans", sans-serif;
  font-size: clamp(58px, 7vw, 92px);
  font-weight: 560;
  letter-spacing: -.08em;
}
.model-preview-badge, .model-preview-spec {
  position: absolute;
  z-index: 1;
  top: 12px;
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(23, 23, 24, .58);
  color: white;
  font-size: 7.5px;
  font-weight: 730;
  letter-spacing: .06em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}
.model-preview-badge { left: 12px; gap: 6px; }
.model-preview-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(243, 243, 241, .9);
  content: "";
}
.model-preview-spec { right: 12px; }

.model-body { display: flex; flex: 1; flex-direction: column; padding: 17px; }
.model-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.model-name { display: grid; min-width: 0; gap: 5px; }
.model-name small { color: #66666A; font-size: 8px; font-weight: 720; letter-spacing: .09em; text-transform: uppercase; }
.model-name strong {
  overflow: hidden;
  font-family: "DM Sans", sans-serif;
  font-size: 17px;
  font-weight: 580;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model-tier {
  flex: 0 0 auto;
  border-radius: 7px;
  padding: 6px 8px;
  background: rgba(102, 102, 106, .09);
  color: #66666A;
  font-size: 8px;
  font-weight: 720;
}
.model-caps { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.model-caps span { border: 1px solid var(--line); border-radius: 7px; padding: 6px 7px; color: #66666A; font-size: 8px; font-weight: 650; }
.model-note {
  min-height: 28px;
  margin: 12px 0 0;
  overflow: hidden;
  color: #66666A;
  font-size: 9px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.model-card-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.model-live-price { display: grid; min-width: 0; gap: 4px; }
.model-live-price strong { color: var(--ink); font-size: 13px; font-weight: 760; }
.model-live-price small { overflow: hidden; color: #66666A; font-size: 7.5px; font-weight: 630; text-overflow: ellipsis; white-space: nowrap; }
.model-card-foot button {
  min-height: 35px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 11px;
  background: transparent;
  color: #66666A;
  cursor: pointer;
  font-size: 9px;
  font-weight: 720;
  white-space: nowrap;
}
.model-card-foot button:hover { border-color: rgba(23, 23, 24, .3); color: var(--ink); }
.model-card-foot button.primary { border-color: var(--night); background: var(--night); color: white; }
.model-card-foot button.primary:hover { background: #171718; }
.model-empty { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 16px; padding: 50px; color: #66666A; text-align: center; }
.model-proof-note { display: flex; align-items: center; gap: 8px; margin: 13px 2px 0; color: #66666A; font-size: 8.5px; font-weight: 620; line-height: 1.5; }
.model-proof-note svg { width: 14px; height: 14px; flex: 0 0 auto; color: #66666A; }

.finish-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .86fr);
  gap: clamp(50px, 8vw, 120px);
  margin-top: 120px;
  border-radius: 28px;
  padding: clamp(48px, 7vw, 90px);
  background: #E9E9E6;
}
.finish-copy h2 {
  max-width: 720px;
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 520;
  letter-spacing: -.06em;
  line-height: .97;
}
.finish-copy > p:not(.eyebrow) { max-width: 640px; margin: 22px 0 0; color: #66666A; font-size: 13px; line-height: 1.65; }
.finish-copy > div { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 30px; }
.finish-copy a { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 720; }
.finish-copy a svg { width: 14px; height: 14px; }
.finish-copy .primary-link { border-radius: 11px; padding: 13px 15px; background: var(--night); color: white; }

.finish-flow {
  display: grid;
  align-content: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.finish-flow li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 15px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(23, 23, 24, .14);
}
.finish-flow li:first-child { border-top: 1px solid rgba(23, 23, 24, .14); }
.finish-flow > li > span { color: #66666A; font-size: 9px; font-weight: 720; }
.finish-flow div { display: flex; flex-direction: column; gap: 4px; }
.finish-flow strong { font-size: 12px; }
.finish-flow small { color: #66666A; font-size: 9px; }

.image-toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  max-width: min(380px, calc(100vw - 44px));
  opacity: 0;
  transform: translateY(12px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  padding: 12px 15px;
  background: rgba(23, 23, 24, .94);
  color: white;
  font-size: 11px;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  backdrop-filter: blur(18px);
}
.image-toast.show { opacity: 1; transform: none; }

[hidden] { display: none !important; }

@media (max-width: 1180px) {
  .image-library-link span:last-child { display: none; }
  .image-hero { grid-template-columns: 1fr 1fr; }
  .hero-copy { padding: 50px; }
  .hero-copy h1 { font-size: 62px; }
  .workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-ribbon { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .model-explorer-toolbar { grid-template-columns: minmax(220px, .75fr) minmax(0, 1.45fr); }
  .model-summary { grid-column: 1 / -1; padding: 0 5px 3px; }
}

@media (max-width: 900px) {
  .image-library-link { display: none; }
  .image-shell { width: min(100% - 28px, 760px); padding-top: 20px; }
  .image-hero { grid-template-columns: 1fr; }
  .hero-gallery { min-height: 540px; }
  .hero-copy { padding: 48px 34px; }
  .lab-index { overflow-x: auto; }
  .lab-index > span { display: none; }
  .lab-index a { flex: 0 0 auto; }
  .section-heading { grid-template-columns: 1fr; align-items: start; gap: 15px; }
  .profile-section .section-heading { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .background-workbench { grid-template-columns: 1fr; }
  .background-canvas { min-height: 500px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .background-status { margin-top: 28px; }
  .image-provider-panel { grid-template-columns: 1fr; }
  .model-explorer-toolbar { grid-template-columns: 1fr; }
  .model-summary { grid-column: auto; }
  .model-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finish-section { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 76px; }
  nav.nav .nav-links { display: none; }
  nav.nav .saga-create { right: 112px; }
  nav.nav .saga-create + .nav-right { margin-left: auto !important; }
  .image-profile { width: 36px; height: 36px; }
  .image-shell { width: 100%; padding: 0 0 36px; }
  .image-hero { min-height: 0; border-width: 0 0 1px; border-radius: 0; box-shadow: none; }
  .hero-copy { padding: 44px 20px 36px; }
  .hero-copy h1 { font-size: clamp(45px, 14vw, 62px); }
  .hero-copy > p:not(.eyebrow) { font-size: 14px; }
  .image-compose-paths > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .image-compose-paths button { min-height: 44px; font-size: 11px; }
  .image-compose-footer > span { display: none; }
  .image-compose .image-compose-submit { width: 100%; min-height: 44px; }
  .hero-metrics { grid-template-columns: repeat(2, 1fr); gap: 18px 0; }
  .hero-gallery { grid-template-columns: 1fr 1fr; min-height: 420px; }
  .hero-gallery .hero-tall { grid-row: 1 / 3; }
  .lab-index { top: 54px; margin: 10px 12px 0; }
  .lab-index { gap: 0; padding: 6px; }
  .lab-index a { gap: 4px; padding: 8px 6px; font-size: 9px; }
  .lab-index .index-action { display: none; }
  .lab-section { padding: 74px 16px 0; }
  .profile-section { margin-top: 74px; border-width: 1px 0; border-radius: 0; padding: 58px 16px; }
  .profile-toolbar { align-items: stretch; flex-direction: column; }
  .profile-summary { padding: 0 7px 4px; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-card { min-height: 330px; }
  .remove-section { margin-top: 74px; border-radius: 0; padding: 66px 16px 50px; }
  .section-heading h2 { font-size: 39px; }
  .workflow-grid { grid-template-columns: 1fr; }
  .workflow-card { min-height: 270px; }
  .asset-rail { grid-auto-columns: 82vw; }
  .tool-ribbon { grid-template-columns: 1fr; }
  .background-canvas { min-height: 410px; }
  .background-controls { padding: 28px 20px; }
  .model-wall { grid-template-columns: 1fr; }
  .model-card { min-height: 420px; }
  .model-search input { font-size: 12px; }
  .model-card-foot button { padding: 0 10px; }
  .finish-section { margin-top: 76px; border-radius: 0; padding: 58px 20px; }
  .finish-copy h2 { font-size: 43px; }
}

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