:root {
  color-scheme: light;
  --paper: #f6f1e8;
  --ink: #171512;
  --muted: #6f6a61;
  --line: rgba(23, 21, 18, 0.14);
  --panel: rgba(255, 252, 246, 0.78);
  --black: #10100e;
  --green: #2f7d5c;
  --red: #c8432f;
  --yellow: #f2c14e;
  --blue: #316bff;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 21, 18, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 21, 18, 0.05) 1px, transparent 1px),
    var(--paper);
  background-size: 38px 38px;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(47, 125, 92, 0.18), transparent 28rem),
    radial-gradient(circle at 86% 14%, rgba(200, 67, 47, 0.14), transparent 26rem),
    radial-gradient(circle at 68% 88%, rgba(49, 107, 255, 0.12), transparent 30rem);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(18px, 4.6vw, 64px);
  background: rgba(246, 241, 232, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.hero-actions,
.workbench-toolbar,
.site-footer,
.scene-marquee {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fffaf0;
  background: var(--black);
  font-size: 17px;
  font-weight: 900;
}

.nav-links {
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a,
.header-action,
.primary-action,
.secondary-action,
.tool-card {
  transition:
    transform 160ms ease,
    color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
}

.header-action {
  justify-self: end;
  padding: 10px 16px;
  color: #fffaf0;
  background: var(--black);
  font-size: 14px;
  font-weight: 800;
}

.quota-pill {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: #fffaf0;
  background: var(--black);
  font-size: 14px;
  font-weight: 800;
}

.quota-pill strong {
  color: var(--yellow);
}

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  align-items: center;
  gap: clamp(36px, 6vw, 92px);
  padding: 112px clamp(18px, 5.6vw, 84px) 58px;
}

.hero-copy {
  max-width: 880px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 920px;
  margin-bottom: 28px;
  font-size: clamp(52px, 8.2vw, 116px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-text {
  max-width: 690px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.78;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  font-weight: 900;
}

.button-reset {
  appearance: none;
  cursor: pointer;
  font: inherit;
}

.button-reset:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.full-width {
  width: 100%;
}

.primary-action {
  color: #fffaf0;
  background: var(--black);
}

.secondary-action {
  background: rgba(255, 250, 240, 0.56);
}

.header-action:hover,
.primary-action:hover,
.secondary-action:hover,
.tool-card:hover {
  transform: translateY(-2px);
}

.workbench {
  position: relative;
  width: min(100%, 468px);
  justify-self: end;
  padding: 18px;
  border: 1px solid var(--ink);
  background: rgba(255, 252, 246, 0.84);
  box-shadow: 18px 18px 0 var(--black);
}

.workbench::before {
  content: "";
  position: absolute;
  left: -28px;
  bottom: 44px;
  width: 72px;
  height: 72px;
  background: var(--yellow);
  border: 1px solid var(--ink);
  z-index: -1;
}

.workbench-toolbar {
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.workbench-toolbar span {
  width: 11px;
  height: 11px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.workbench-toolbar span:nth-child(1) {
  background: var(--red);
}

.workbench-toolbar span:nth-child(2) {
  background: var(--yellow);
}

.workbench-toolbar span:nth-child(3) {
  background: var(--green);
}

.prompt-box {
  margin: 18px 0;
  padding: 18px;
  color: var(--black);
  background: #f1eadc;
  border: 1px solid var(--line);
  line-height: 1.68;
}

.prompt-box p {
  margin: 0;
}

.result-stack {
  display: grid;
  gap: 12px;
}

.result-stack article {
  padding: 18px;
  color: #fffaf0;
  background: var(--black);
}

.result-stack span {
  display: block;
  margin-bottom: 10px;
  color: #d6cfc1;
  font-size: 12px;
  font-weight: 800;
}

.result-stack strong {
  display: block;
  font-size: 18px;
  line-height: 1.45;
}

.tools-section,
.workflow,
.scenes {
  padding: 94px clamp(18px, 5.6vw, 84px);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.06;
  letter-spacing: 0;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 16px;
}

.tool-card {
  min-height: 282px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.tool-card.featured {
  color: #fffaf0;
  background: var(--green);
  border-color: var(--green);
}

.tool-card:hover {
  box-shadow: 8px 8px 0 rgba(16, 16, 14, 0.22);
}

.tool-index {
  display: inline-flex;
  margin-bottom: 62px;
  font-size: 13px;
  font-weight: 900;
}

.tool-card h3,
.workflow-grid h3 {
  margin-bottom: 14px;
  font-size: 28px;
  line-height: 1.1;
}

.tool-card p,
.workflow-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.tool-card.featured p {
  color: rgba(255, 250, 240, 0.76);
}

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

.workflow-grid article {
  min-height: 292px;
  padding: 28px 28px 34px 0;
}

.workflow-grid article + article {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.workflow-grid span {
  display: inline-flex;
  margin-bottom: 72px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.scenes {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  align-items: end;
  gap: 42px;
  background: rgba(255, 250, 240, 0.56);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.scene-marquee {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.scene-marquee span {
  padding: 12px 16px;
  color: #fffaf0;
  background: var(--black);
  font-weight: 900;
}

.scene-marquee span:nth-child(2n) {
  background: var(--red);
}

.scene-marquee span:nth-child(3n) {
  background: var(--blue);
}

.site-footer {
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 5.6vw, 84px);
  color: var(--muted);
  font-size: 14px;
}

.profile-hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.48fr);
  align-items: center;
  gap: clamp(34px, 6vw, 82px);
  padding: 112px clamp(18px, 5.6vw, 84px) 64px;
}

.profile-copy {
  max-width: 900px;
}

.profile-card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--ink);
  background: rgba(255, 252, 246, 0.84);
  box-shadow: 14px 14px 0 var(--black);
}

.profile-card::before {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 68px;
  height: 68px;
  border: 1px solid var(--ink);
  background: var(--yellow);
  z-index: -1;
}

.profile-year {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.profile-card h2 {
  margin: 36px 0 8px;
  font-size: clamp(34px, 4vw, 54px);
}

.profile-card p {
  color: var(--muted);
  font-weight: 800;
}

.profile-card dl {
  display: grid;
  gap: 18px;
  margin: 34px 0 0;
}

.profile-card div {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.profile-card dt {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.profile-card dd {
  margin: 8px 0 0;
  color: var(--ink);
  line-height: 1.6;
}

.personal-section {
  padding: 94px clamp(18px, 5.6vw, 84px);
}

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

.note-grid article {
  min-height: 260px;
  padding: 24px;
  background: rgba(255, 252, 246, 0.78);
}

.note-grid span,
.project-row span {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.note-grid h3 {
  margin: 76px 0 14px;
  font-size: 28px;
}

.note-grid p,
.project-row p,
.about-band p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.project-list {
  display: grid;
  border-top: 1px solid var(--ink);
}

.project-row {
  display: grid;
  grid-template-columns: 140px minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.project-row strong {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.12;
}

.about-band {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(260px, 0.72fr);
  gap: 36px;
  align-items: end;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.56);
}

.tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: end;
  gap: 36px;
  padding: 136px clamp(18px, 5.6vw, 84px) 56px;
}

.tool-hero h1 {
  max-width: 780px;
  font-size: clamp(44px, 6vw, 78px);
  line-height: 1.02;
}

.tool-hero h1 span {
  display: block;
}

.credit-box {
  padding: 22px;
  border: 1px solid var(--ink);
  background: rgba(255, 252, 246, 0.84);
  box-shadow: 10px 10px 0 var(--black);
}

.credit-box span,
.credit-box strong {
  display: block;
}

.credit-box span {
  color: var(--muted);
  font-weight: 800;
}

.credit-box strong {
  margin: 8px 0 22px;
  font-size: 34px;
  line-height: 1.08;
}

.generator-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding: 18px clamp(18px, 5.6vw, 84px) 96px;
}

.generator-form,
.generator-output {
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.78);
}

.generator-form {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.form-heading {
  margin-bottom: 8px;
}

.form-heading h2,
.output-top h2 {
  font-size: clamp(28px, 3.5vw, 42px);
}

.generator-form label {
  display: grid;
  gap: 8px;
  color: var(--black);
  font-size: 14px;
  font-weight: 900;
}

.generator-form input,
.generator-form select {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fffaf0;
  border-radius: 0;
  font: inherit;
}

.generator-form input:focus,
.generator-form select:focus {
  outline: 2px solid rgba(47, 125, 92, 0.34);
  outline-offset: 2px;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.generator-output {
  min-height: 698px;
  padding: 24px;
}

.output-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

#generation-status {
  flex: 0 0 auto;
  padding: 8px 11px;
  color: #fffaf0;
  background: var(--green);
  font-size: 13px;
  font-weight: 900;
}

#generation-status.status-error {
  background: var(--red);
}

.empty-output {
  display: grid;
  place-items: center;
  min-height: 460px;
  padding: 24px;
  color: var(--muted);
  border: 1px dashed var(--line);
  text-align: center;
  line-height: 1.7;
}

.empty-output[hidden],
.result-workspace[hidden] {
  display: none;
}

.result-workspace {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  min-height: 460px;
  border: 1px solid var(--line);
  background: #fffaf0;
}

.result-tabs {
  display: grid;
  align-content: start;
  gap: 1px;
  background: var(--line);
  border-right: 1px solid var(--line);
}

.result-tab {
  appearance: none;
  min-height: 64px;
  padding: 14px;
  border: 0;
  color: var(--ink);
  background: #fbf5ea;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  text-align: left;
}

.result-tab span {
  display: block;
  margin-bottom: 5px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.result-tab.is-active {
  color: #fffaf0;
  background: var(--black);
}

.result-tab.is-active span {
  color: var(--yellow);
}

.result-preview {
  display: flex;
  flex-direction: column;
  min-height: 460px;
  padding: 22px;
}

.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.preview-top span {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.result-preview p {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.86;
  white-space: pre-wrap;
}

.copy-button {
  appearance: none;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 124px;
  }

  .workbench {
    justify-self: start;
    box-shadow: 12px 12px 0 var(--black);
  }

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

  .scenes {
    grid-template-columns: 1fr;
  }

  .tool-hero,
  .generator-shell,
  .profile-hero,
  .about-band {
    grid-template-columns: 1fr;
  }

  .note-grid {
    grid-template-columns: 1fr;
  }

  .project-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .scene-marquee {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding: 14px 16px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .header-action {
    padding: 9px 12px;
  }

  .quota-pill {
    padding: 9px 11px;
  }

  .quota-pill span {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 104px 16px 54px;
  }

  h1 {
    font-size: clamp(44px, 13.6vw, 68px);
  }

  .hero-text {
    font-size: 16px;
  }

  .workbench {
    box-shadow: 8px 8px 0 var(--black);
  }

  .workbench::before {
    display: none;
  }

  .profile-hero {
    min-height: auto;
    padding: 104px 16px 56px;
  }

  .profile-card {
    box-shadow: 8px 8px 0 var(--black);
  }

  .profile-card::before {
    display: none;
  }

  .tools-section,
  .workflow,
  .scenes,
  .tool-hero,
  .personal-section {
    padding: 68px 16px;
  }

  .tool-hero {
    padding-top: 104px;
    padding-bottom: 36px;
  }

  .generator-shell {
    padding: 0 16px 68px;
  }

  .generator-output {
    min-height: 0;
  }

  .output-top {
    flex-direction: column;
    gap: 12px;
  }

  .result-workspace {
    grid-template-columns: 1fr;
  }

  .result-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .result-preview,
  .result-workspace {
    min-height: 0;
  }

  .tool-grid,
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .workflow-grid article,
  .workflow-grid article + article {
    min-height: 220px;
    padding: 24px 0;
    border-left: 0;
  }

  .workflow-grid article + article {
    border-top: 1px solid var(--line);
  }

  .workflow-grid span,
  .tool-index {
    margin-bottom: 40px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
