:root {
  color-scheme: dark;
  --desktop-density: 0.82;
  --bg: #07090b;
  --fg: #fff7ea;
  --muted: rgba(255, 247, 234, 0.72);
  --soft: rgba(255, 247, 234, 0.52);
  --hairline: rgba(255, 247, 234, 0.18);
  --hairline-strong: rgba(255, 247, 234, 0.32);
  --gold: #d8a856;
  --gold-2: #f0c77b;
  --panel: rgba(10, 12, 14, 0.72);
  --panel-light: rgba(255, 247, 234, 0.08);
  --radius: 30px;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
  font-family: "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  background: var(--bg);
}

#app {
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hero-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  padding: 34px clamp(24px, 4vw, 66px) 46px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: image-set(
    url("./assets/lingshi-hero.webp") type("image/webp"),
    url("./assets/lingshi-hero.png") type("image/png")
  );
  background-position: 58% center;
  background-size: cover;
  transform: scale(1.035);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.9) 30%, rgba(0, 0, 0, 0.5) 46%, rgba(0, 0, 0, 0.12) 66%, rgba(0, 0, 0, 0.34) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, transparent 28%, rgba(0, 0, 0, 0.76) 100%),
    radial-gradient(circle at 65% 26%, rgba(240, 199, 123, 0.3), transparent 24%);
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 22px;
  position: relative;
  z-index: 3;
}

.top-actions,
.hero-cta,
.source-toggle {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-cta {
  gap: 26px;
}

.ghost-link,
.wordmark,
.simple-nav button {
  border: 0;
  color: var(--fg);
  background: transparent;
}

.ghost-link {
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 700;
}

.ghost-link:hover,
.simple-nav button:hover {
  color: var(--gold-2);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: center;
  width: max-content;
  padding: 6px 0;
  opacity: 0.86;
  transition: opacity 160ms ease;
}

.wordmark:hover {
  opacity: 1;
}

.logo-mark {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(240, 199, 123, 0.46);
  border-radius: 50%;
  color: var(--gold-2);
  background:
    radial-gradient(circle at 68% 35%, rgba(240, 199, 123, 0.34), transparent 18%),
    radial-gradient(circle at 42% 62%, rgba(255, 247, 234, 0.18), transparent 20%),
    rgba(0, 0, 0, 0.18);
  box-shadow: 0 0 34px rgba(240, 199, 123, 0.1);
  overflow: hidden;
}

.logo-mark::before,
.logo-mark::after,
.logo-mark i,
.logo-mark b {
  content: "";
  position: absolute;
  display: block;
}

.logo-mark::before {
  inset: 8px;
  border: 1px solid rgba(255, 247, 234, 0.18);
  border-radius: 50%;
}

.logo-mark::after {
  left: 12px;
  top: 13px;
  width: 18px;
  height: 18px;
  border-top: 2px solid rgba(240, 199, 123, 0.92);
  border-right: 2px solid rgba(240, 199, 123, 0.92);
  border-radius: 50%;
  transform: rotate(42deg);
}

.logo-mark i {
  left: 10px;
  bottom: 11px;
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 247, 234, 0.9), transparent);
  transform: rotate(-18deg);
}

.logo-mark b {
  right: 9px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 16px rgba(240, 199, 123, 0.55);
}

.logo-text {
  display: grid;
  gap: 2px;
}

.logo-text strong {
  color: rgba(255, 247, 234, 0.9);
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.logo-text small {
  color: rgba(255, 247, 234, 0.62);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.top-actions {
  align-self: center;
  justify-content: flex-end;
}

.pill-button,
.primary-pill,
.soft-pill,
.dock-submit {
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, opacity 180ms ease;
}

.pill-button {
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 247, 234, 0.76);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  opacity: 0.72;
  cursor: default;
}

.pill-button:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
  opacity: 1;
}

.dot-menu {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  gap: 6px;
  border: 0;
  padding: 8px;
  background: transparent;
}

.dot-menu span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

.hero-copy {
  width: min(650px, 38vw);
  margin-top: clamp(118px, 20vh, 205px);
}

.proof-line {
  margin: 0 0 26px;
  color: var(--gold-2);
  font-size: clamp(15px, 1.3vw, 20px);
  font-weight: 600;
  letter-spacing: 0.22em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero-copy h1 {
  margin-bottom: 34px;
  max-width: 650px;
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  font-size: clamp(54px, 5.4vw, 96px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.08em;
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
  text-wrap: balance;
}

.hero-lede {
  max-width: 620px;
  margin-bottom: 54px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 1.12vw, 21px);
  font-weight: 500;
  line-height: 1.92;
}

.primary-pill,
.soft-pill {
  min-height: 62px;
  padding: 0 34px;
  font-size: 18px;
}

.primary-pill {
  color: #15110d;
  background: #fff;
}

.soft-pill {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(18px);
}

.primary-pill:hover,
.soft-pill:hover,
.pill-button:hover,
.dock-submit:hover {
  transform: translateY(-2px);
}

.primary-pill:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.dock-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.dock-head span,
.section-kicker,
.persona-summary > span,
.persona-card > span,
.persona-card-head span {
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.dock-head strong {
  font-size: 15px;
}

.start-panel {
  display: grid;
  gap: 10px;
}

.name-field {
  display: grid;
  gap: 7px;
}

.name-field span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
}

input[type="text"] {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 0 16px;
  color: #fff;
  outline: none;
  background: rgba(0, 0, 0, 0.34);
}

input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.46);
}

input[type="text"]:focus {
  border-color: rgba(240, 199, 123, 0.7);
  box-shadow: 0 0 0 4px rgba(240, 199, 123, 0.12);
}

.source-toggle {
  gap: 8px;
}

.source-toggle button {
  flex: 1;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(0, 0, 0, 0.24);
}

.source-toggle button.active {
  color: #15110d;
  border-color: transparent;
  background: var(--gold-2);
}

.api-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: rgba(255, 247, 234, 0.62);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.api-status span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.18);
}

.api-status .ok {
  color: rgba(209, 246, 199, 0.9);
  border-color: rgba(142, 217, 126, 0.26);
}

.api-status .warn,
.api-status.muted {
  color: rgba(240, 199, 123, 0.9);
  border-color: rgba(240, 199, 123, 0.2);
}

.file-field {
  display: grid;
  min-height: 46px;
  align-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
}

.file-field.enabled {
  color: rgba(255, 255, 255, 0.86);
  border-color: rgba(240, 199, 123, 0.5);
}

.file-field input {
  display: none;
}

.dock-submit {
  min-height: 52px;
  color: #15110d;
  background: #fff;
}

.page-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  padding: 30px clamp(22px, 4vw, 64px) 46px;
  background:
    radial-gradient(circle at 80% 18%, rgba(240, 199, 123, 0.18), transparent 30%),
    radial-gradient(circle at 18% 82%, rgba(255, 247, 234, 0.08), transparent 34%),
    #07090b;
  background-size: 42px 42px, 42px 42px, auto, auto;
}

.chat-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.chat-page .simple-nav {
  margin-bottom: 22px;
}

.distill-page {
  padding-top: 18px;
}

.distill-page .simple-nav {
  margin-bottom: 18px;
}

.page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: image-set(
    url("./assets/lingshi-hero.webp") type("image/webp"),
    url("./assets/lingshi-hero.png") type("image/png")
  );
  background-position: right center;
  background-size: min(920px, 78vw) auto;
  background-repeat: no-repeat;
  opacity: 0.12;
  filter: blur(1px) saturate(0.9);
}

.page-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 9, 11, 0.96), rgba(7, 9, 11, 0.72) 48%, rgba(7, 9, 11, 0.9)),
    linear-gradient(180deg, rgba(7, 9, 11, 0.55), transparent 36%, rgba(7, 9, 11, 0.82));
}

.simple-nav,
.page-heading,
.page-card,
.create-layout,
.distill-layout,
.library-grid,
.chat-layout,
.empty-state {
  position: relative;
  z-index: 1;
}

.simple-nav,
.library-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.simple-nav {
  margin-bottom: clamp(42px, 7vh, 86px);
}

.simple-nav button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 14px;
  color: rgba(255, 247, 234, 0.68);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.simple-nav button:first-child {
  color: rgba(255, 247, 234, 0.9);
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  font-size: 22px;
  letter-spacing: 0.1em;
}

.simple-nav button:not(:first-child) {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.page-card,
.stage-list,
.persona-card,
.dialogue-panel,
.empty-state {
  border: 1px solid rgba(255, 247, 234, 0.16);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 247, 234, 0.09), rgba(255, 247, 234, 0.035)),
    rgba(8, 10, 12, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.narrow {
  width: min(680px, 100%);
  margin: 8vh 0 0;
  padding: clamp(24px, 4vw, 42px);
}

.create-layout {
  display: grid;
  grid-template-columns: minmax(420px, 720px) minmax(460px, 1fr);
  gap: clamp(28px, 3.6vw, 54px);
  align-items: stretch;
  max-width: 1800px;
  margin: 0 auto;
}

.create-card {
  min-height: 660px;
  padding: clamp(26px, 4vw, 46px);
}

.create-copy {
  max-width: 560px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.82;
}

.suggestion-panel {
  min-height: 660px;
  max-height: 660px;
  border: 1px solid rgba(255, 247, 234, 0.1);
  border-radius: 34px;
  padding: clamp(24px, 3vw, 36px);
  background:
    radial-gradient(circle at 78% 10%, rgba(240, 199, 123, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(255, 247, 234, 0.055), rgba(255, 247, 234, 0.02));
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.suggestion-panel h2 {
  margin: 12px 0 12px;
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  font-size: clamp(34px, 3.6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.suggestion-panel > p:not(.section-kicker) {
  max-width: 620px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.78;
}

.suggestion-carousel {
  position: relative;
  height: 350px;
  overflow: hidden;
  border-radius: 26px;
  mask-image: linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent);
}

.suggestion-carousel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border: 1px solid rgba(255, 247, 234, 0.08);
  border-radius: 26px;
}

.suggestion-track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  animation: suggestion-slide 58s linear infinite;
}

.suggestion-carousel:hover .suggestion-track {
  animation-play-state: paused;
}

@keyframes suggestion-slide {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(calc(-50% - 6px));
  }
}

.suggestion-card {
  min-height: 142px;
  border: 1px solid rgba(255, 247, 234, 0.13);
  border-radius: 24px;
  padding: 18px;
  color: var(--fg);
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255, 247, 234, 0.08), rgba(255, 247, 234, 0.025)),
    rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.suggestion-card:hover {
  transform: translateY(-3px);
  border-color: rgba(240, 199, 123, 0.45);
  background:
    linear-gradient(135deg, rgba(240, 199, 123, 0.12), rgba(255, 247, 234, 0.035)),
    rgba(0, 0, 0, 0.22);
}

.suggestion-card strong,
.suggestion-card span,
.suggestion-card small {
  display: block;
}

.suggestion-card strong {
  margin-bottom: 10px;
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.suggestion-card span {
  margin-bottom: 12px;
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 800;
}

.suggestion-card small {
  color: rgba(255, 247, 234, 0.64);
  font-size: 13px;
  line-height: 1.55;
}

.page-card h1,
.page-heading h1,
.dialogue-head h1 {
  margin-bottom: 16px;
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  font-size: clamp(46px, 5.4vw, 82px);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.07em;
}

.page-heading p {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.86;
}

.distill-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
  gap: 22px;
  align-items: start;
}

.distill-layout .page-heading {
  grid-column: 1 / -1;
}

.distill-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
}

.distill-head h1 {
  margin-bottom: 10px;
}

.stage-list {
  display: grid;
  gap: 14px;
  padding: 16px;
  max-height: min(720px, calc(100vh - 230px));
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(240, 199, 123, 0.55) rgba(255, 247, 234, 0.08);
}

.distill-layout > .persona-card {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  min-height: min(720px, calc(100vh - 230px));
  max-height: min(720px, calc(100vh - 230px));
  overflow: auto;
}

.persona-card-actions {
  position: sticky;
  bottom: -24px;
  margin: 18px -24px -24px;
  padding: 16px 24px 24px;
  background: rgba(8, 10, 12, 0.9);
}

.stage-list article {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  border: 1px solid rgba(255, 247, 234, 0.12);
  border-radius: 24px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.18);
}

.stage-list span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 247, 234, 0.18);
  color: var(--soft);
}

.stage-list article.done span,
.stage-list article.active span {
  color: #15110d;
  border-color: transparent;
  background: var(--gold-2);
}

.stage-list p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.stage-list small {
  display: block;
  margin-top: 10px;
  color: rgba(240, 199, 123, 0.78);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.6;
}

.persona-card {
  padding: 24px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.persona-card:not(.large) {
  min-height: 260px;
  cursor: pointer;
}

.persona-card:hover {
  border-color: var(--hairline-strong);
  transform: translateY(-2px);
}

.persona-card h2,
.persona-summary h2 {
  margin: 24px 0 10px;
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  font-size: clamp(34px, 3.2vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.persona-card p,
.persona-summary p {
  color: var(--muted);
  line-height: 1.65;
}

.persona-card strong {
  display: block;
  margin-top: 18px;
  color: var(--gold-2);
  line-height: 1.55;
}

.persona-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icon-action {
  border: 1px solid rgba(255, 247, 234, 0.14);
  border-radius: 999px;
  padding: 6px 10px;
  color: rgba(255, 247, 234, 0.72);
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.055);
}

.icon-action:hover {
  color: #fff;
  border-color: rgba(240, 123, 123, 0.45);
  background: rgba(160, 50, 50, 0.22);
}

.full {
  width: 100%;
  margin-top: 16px;
}

blockquote {
  margin: 18px 0;
  border-left: 3px solid var(--gold-2);
  padding-left: 14px;
  color: var(--fg);
  line-height: 1.65;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.chips strong {
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.05);
}

details {
  color: var(--muted);
}

summary {
  cursor: pointer;
  color: var(--fg);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.empty-state {
  padding: 22px;
  color: var(--muted);
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(290px, 380px) minmax(0, 1fr);
  gap: 22px;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

.dialogue-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  padding: 24px;
  overflow: hidden;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 0 10px;
}

.message-scroll-anchor {
  width: 1px;
  height: 1px;
  flex: 0 0 1px;
}

.message {
  max-width: min(780px, 84%);
  border: 1px solid rgba(255, 247, 234, 0.13);
  border-radius: 24px;
  padding: 16px 18px;
  line-height: 1.82;
  background: rgba(255, 255, 255, 0.055);
}

.message.user {
  align-self: flex-end;
  color: #15110d;
  background: linear-gradient(135deg, #fff7ea, var(--gold-2));
}

.message.assistant {
  align-self: flex-start;
}

.message.typing::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--gold-2);
  vertical-align: -0.16em;
  animation: caret-blink 900ms steps(2, start) infinite;
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

.chat-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

@media (max-width: 1120px) {
  .hero-shell {
    min-height: auto;
    padding: 24px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

  .wordmark {
    order: -1;
    justify-items: start;
  }

  .topnav {
    display: none;
  }

  .hero-copy {
    width: min(590px, 52vw);
    margin-top: 86px;
  }

  .distill-layout,
  .create-layout,
  .chat-layout {
    grid-template-columns: 1fr;
  }

  .distill-head {
    grid-template-columns: 1fr;
  }

  .distill-layout .stage-list,
  .distill-layout > .persona-card {
    grid-column: auto;
    grid-row: auto;
    min-height: auto;
    max-height: none;
  }
}

@media (min-width: 1121px) {
  #app {
    zoom: var(--desktop-density);
  }

  @supports not (zoom: 1) {
    #app {
      width: calc(100% / var(--desktop-density));
      transform: scale(var(--desktop-density));
      transform-origin: top left;
    }
  }

  .hero-shell,
  .page-shell {
    min-height: calc(100vh / var(--desktop-density));
  }

  .chat-page {
    height: calc(100vh / var(--desktop-density));
  }
}

@media (max-width: 760px) {
  .hero-shell,
  .page-shell {
    padding: 18px;
  }

  .hero-bg {
    background-position: 68% center;
  }

  .hero-vignette {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.52)),
      linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 30%, rgba(0, 0, 0, 0.82));
  }

  .topbar,
  .top-actions,
  .hero-cta,
  .chat-input,
  .library-head {
    grid-template-columns: 1fr;
    flex-wrap: wrap;
  }

  .ghost-link,
  .dot-menu {
    display: none;
  }

  .hero-copy {
    width: 100%;
    margin-top: 72px;
  }

  .hero-copy h1 {
    font-size: 54px;
    letter-spacing: -0.07em;
  }

  .hero-lede {
    font-size: 16px;
  }

  .library-grid {
    grid-template-columns: 1fr;
  }

  .suggestion-grid {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 100%;
  }
}
