:root {
  color-scheme: dark;
  --bg: #111310;
  --bg-2: #171a16;
  --surface: rgba(255, 255, 255, 0.075);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --surface-soft: rgba(215, 255, 115, 0.08);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(215, 255, 115, 0.38);
  --text: #f7f5eb;
  --muted: rgba(247, 245, 235, 0.68);
  --faint: rgba(247, 245, 235, 0.48);
  --lime: #bff76a;
  --yellow: #ffe45c;
  --green: #88e07f;
  --warning: #f8c45d;
  --danger: #ff7777;
  --white: #ffffff;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --glass-blur: blur(22px);
  --radius: 18px;
  --radius-sm: 12px;
  --page-gutter: 64px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC",
    "Microsoft YaHei", Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  min-width: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  background:
    radial-gradient(circle at 82% 12%, rgba(184, 255, 101, 0.2), transparent 24rem),
    radial-gradient(circle at 4% 30%, rgba(255, 228, 92, 0.14), transparent 24rem),
    radial-gradient(circle at 94% 82%, rgba(55, 208, 182, 0.14), transparent 26rem),
    linear-gradient(135deg, #171713 0%, #111310 52%, #151914 100%);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.9) 0 0.7px, transparent 0.9px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.6) 0 0.6px, transparent 0.8px);
  background-size: 5px 5px, 7px 7px;
}

body::after {
  content: "";
  position: fixed;
  inset: auto 0 8rem auto;
  z-index: -1;
  width: 28rem;
  max-width: min(28rem, 70%);
  height: 28rem;
  pointer-events: none;
  background: radial-gradient(circle, rgba(138, 224, 127, 0.16), transparent 70%);
  filter: blur(6px);
}

main,
.page,
section,
.section-inner {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 0 40px;
  background: rgba(17, 19, 16, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: var(--glass-blur);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: min(280px, 32vw);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.brand-logo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 42px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
}

.main-nav a {
  transition: color 160ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

#auth-entry {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-button {
  display: none;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 46px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 20px;
  font-weight: 800;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.primary-button {
  color: #17170f;
  background: linear-gradient(135deg, var(--yellow), var(--green));
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 34px rgba(190, 247, 106, 0.2);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 44px rgba(190, 247, 106, 0.3);
}

.secondary-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
}

.secondary-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.12);
}

.ghost-button {
  color: var(--text);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
}

.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
}

.integration-bar {
  display: none;
  background: rgba(17, 19, 16, 0.56);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

body.debug-mode .integration-bar {
  display: block;
}

.integration-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 12px;
  flex-wrap: wrap;
}

.integration-inner strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.integration-inner span {
  color: var(--faint);
  font-size: 12px;
}

.integration-form {
  display: flex;
  align-items: end;
  gap: 10px;
}

.integration-form label {
  display: grid;
  gap: 4px;
  color: var(--faint);
  font-size: 12px;
}

.integration-form input,
.integration-form select {
  min-height: 38px;
}

.integration-form input {
  width: min(320px, 38vw);
}

.internal-payment-test {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  min-width: min(100%, 420px);
  padding: 10px;
  border: 1px solid rgba(191, 247, 106, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(191, 247, 106, 0.06);
}

.internal-payment-test pre {
  grid-column: 1 / -1;
  max-height: 132px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.55;
}

.demo-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 228, 92, 0.35);
  border-radius: var(--radius-sm);
  color: #fff3b0;
  background: rgba(255, 228, 92, 0.11);
  font-size: 14px;
  font-weight: 800;
}

.debug-generation-panel {
  display: none;
  gap: 6px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(191, 247, 106, 0.24);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgba(191, 247, 106, 0.07);
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.debug-mode .debug-generation-panel {
  display: grid;
}

.debug-generation-panel strong {
  color: var(--text);
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.section-inner {
  width: min(1180px, calc(100% - var(--page-gutter)));
  max-width: calc(100% - var(--page-gutter));
  margin: 0 auto;
}

.section-band {
  background: rgba(255, 255, 255, 0.025);
  border-block: 1px solid rgba(255, 255, 255, 0.07);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.78fr);
  gap: 58px;
  align-items: center;
  min-height: calc(100vh - 118px);
  padding: 72px 0 82px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 10%;
  right: 22%;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--yellow), var(--green));
  filter: blur(0.2px);
  opacity: 0.88;
  z-index: -1;
}

.hero::after {
  content: "";
  position: absolute;
  right: 2%;
  bottom: 18%;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 228, 92, 0.78), rgba(86, 214, 142, 0.88));
  opacity: 0.5;
  filter: blur(12px);
  z-index: -1;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--lime);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

h1 {
  margin-bottom: 20px;
  max-width: 820px;
  font-size: 60px;
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 18px;
}

.title-line {
  display: block;
  max-width: 100%;
}

.hero-subtitle,
.page-head p,
.section-title p,
.member-teaser p,
.plan-card p,
.helper-panel p,
.history-item p {
  color: var(--muted);
}

.hero-subtitle {
  max-width: 650px;
  font-size: 17px;
}

.hero-copy,
.sample-panel,
.topic-card,
.topic-main {
  min-width: 0;
}

.hero-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  max-width: 720px;
  margin: 30px 0 18px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-form .primary-button {
  max-width: 100%;
  white-space: nowrap;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  outline: none;
}

.hero-form input {
  border-color: transparent;
  background: transparent;
}

textarea {
  resize: vertical;
}

select option {
  color: #111310;
}

input::placeholder,
textarea::placeholder {
  color: rgba(247, 245, 235, 0.42);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(191, 247, 106, 0.12);
}

.hero-proof,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-proof {
  gap: 12px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}

.hero-proof strong {
  margin-right: 5px;
  color: var(--text);
}

.chip-row span,
.topic-card .tag,
.plan-tag {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  border: 1px solid rgba(191, 247, 106, 0.22);
  border-radius: 999px;
  padding: 0 11px;
  color: #dafda7;
  background: rgba(191, 247, 106, 0.11);
  font-size: 13px;
  font-weight: 800;
}

.sample-panel,
.generator-card,
.helper-panel,
.topic-card,
.plan-card,
.metric-card,
.history-panel,
.usage-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.045));
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}

.sample-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
}

.sample-panel::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(191, 247, 106, 0.28), transparent 64%);
  pointer-events: none;
}

.lingdian-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(100%, 280px);
  margin-bottom: 18px;
  padding: 10px 14px 10px 10px;
  border: 1px solid rgba(191, 247, 106, 0.2);
  border-radius: var(--radius-sm);
  color: #e9ffbf;
  background: rgba(10, 12, 10, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.lingdian-hero picture,
.lingdian-hero img {
  display: block;
  width: 82px;
  height: 82px;
}

.lingdian-hero img {
  object-fit: contain;
  filter: drop-shadow(0 12px 26px rgba(191, 247, 106, 0.22));
}

.lingdian-hero span {
  min-width: 0;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.panel-head,
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head {
  justify-content: flex-start;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.status-dot {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--yellow), var(--green));
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(191, 247, 106, 0.52);
}

.sample-panel h2 {
  position: relative;
  font-size: 28px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

dl {
  position: relative;
  display: grid;
  gap: 12px;
  margin: 0;
}

dl div {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

dt {
  color: var(--faint);
  font-size: 12px;
  font-weight: 900;
}

dd {
  margin: 2px 0 0;
  color: var(--text);
}

.hero-metric-card {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(10, 12, 10, 0.36);
}

.hero-metric-card span,
.metric-card span,
.usage-card span {
  display: block;
  color: var(--faint);
  font-size: 12px;
}

.hero-metric-card strong,
.metric-card strong,
.usage-card strong {
  display: block;
  color: var(--text);
  font-size: 26px;
  line-height: 1.1;
}

.compact-section {
  padding: 74px 0;
}

.section-title {
  max-width: 760px;
  margin-bottom: 26px;
}

.steps-grid,
.topic-grid,
.audience-grid,
.pricing-grid,
.account-grid {
  display: grid;
  gap: 16px;
}

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

.steps-grid article,
.audience-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(14px);
}

.step-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 18px;
  color: #15170f;
  background: linear-gradient(135deg, var(--yellow), var(--green));
  border-radius: 50%;
  font-weight: 900;
}

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

.topic-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
}

.topic-card h3 {
  font-size: 18px;
  line-height: 1.35;
}

.topic-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.topic-card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.topic-card-actions button {
  min-height: 40px;
  padding: 0 14px;
}

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

.member-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 72px;
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 228, 92, 0.14), transparent 20rem),
    rgba(255, 255, 255, 0.075);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}

.faq-list {
  display: grid;
  gap: 12px;
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.055);
}

summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 900;
}

details p {
  margin: 10px 0 0;
  color: var(--muted);
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 54px 0 24px;
}

.page-head h1 {
  margin-bottom: 8px;
  font-size: 40px;
}

.usage-card {
  min-width: 150px;
  padding: 18px;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
  padding-bottom: 82px;
}

.generator-card,
.helper-panel {
  padding: 24px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

label,
.field-label {
  color: var(--text);
  font-weight: 900;
}

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

.segmented button,
.filter-row button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
}

.segmented button.active,
.filter-row button.active {
  color: #17170f;
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, var(--yellow), var(--green));
  font-weight: 900;
}

.advanced-box {
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.generate-submit {
  width: 100%;
}

.helper-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
}

.helper-panel button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.api-note {
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.results-head {
  align-items: flex-start;
}

.result-actions,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-row {
  padding-bottom: 18px;
}

.result-disclaimer {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 228, 92, 0.22);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgba(255, 228, 92, 0.07);
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.result-disclaimer span {
  display: block;
}

.topic-list {
  display: grid;
  gap: 16px;
  padding-bottom: 82px;
}

.topic-list .topic-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
}

.topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.topic-main h2 {
  margin-bottom: 12px;
  font-size: 24px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.topic-detail {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.content-package {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(191, 247, 106, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(191, 247, 106, 0.055);
}

.content-package-head,
.content-package-block {
  display: grid;
  gap: 6px;
}

.content-package-head span,
.content-package-block strong {
  color: var(--text);
  font-weight: 900;
}

.content-package-head small,
.content-package-block span,
.content-package-block p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.content-package-body {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.content-conversion-note {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 228, 92, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 228, 92, 0.065);
}

.content-conversion-note strong {
  color: #fff3b0;
}

.content-conversion-note span {
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.locked {
  border-color: rgba(255, 228, 92, 0.3);
  background: rgba(255, 228, 92, 0.08);
}

.centered-head {
  display: block;
  max-width: 780px;
  text-align: center;
}

.pricing-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  padding-bottom: 82px;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  padding: 26px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.plan-card.recommended {
  border-color: var(--line-strong);
  box-shadow: 0 24px 70px rgba(191, 247, 106, 0.12), var(--shadow);
}

.plan-tag {
  position: absolute;
  top: 18px;
  right: 18px;
}

.plan-card strong {
  display: block;
  max-width: 100%;
  font-size: 34px;
  line-height: 1.1;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.plan-card ul {
  display: grid;
  gap: 9px;
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--muted);
}

.plan-card button {
  width: 100%;
  max-width: 100%;
  margin-top: auto;
}

.internal-test-price {
  display: none;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 228, 92, 0.32);
  border-radius: var(--radius-sm);
  color: #fff3b0;
  background: rgba(255, 228, 92, 0.09);
}

body.internal-test-mode .internal-test-price {
  display: grid;
}

.internal-test-price span {
  font-size: 14px;
  font-weight: 900;
}

.internal-test-price small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.entitlement-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 18px;
}

.metric-card {
  padding: 22px;
}

.history-panel {
  margin-top: 18px;
  margin-bottom: 18px;
  padding: 24px;
}

.history-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
}

.history-item > div {
  min-width: 0;
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.history-meta span {
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(222, 255, 108, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  line-height: 1.25;
}

.history-item .secondary-button {
  flex: 0 0 auto;
  max-width: 100%;
}

.support-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 82px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(14px);
}

.support-strip span {
  min-width: 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 34px;
  color: var(--faint);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.debug-toggle {
  opacity: 0.48;
  transform: scale(0.96);
}

.debug-toggle:hover {
  opacity: 0.9;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(360px, calc(100% - 32px));
  padding: 12px 14px;
  color: #15170f;
  background: linear-gradient(135deg, var(--yellow), var(--green));
  border-radius: var(--radius-sm);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-weight: 900;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.generate-submit.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: normal;
  text-align: center;
}

.generate-submit.is-loading::before {
  content: "";
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  background: url("../assets/ip/lingdian-generating-small.png") center / contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(191, 247, 106, 0.4));
}

.login-dialog,
.feedback-dialog,
.account-dialog {
  width: min(430px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  color: var(--text);
  background: rgba(23, 26, 22, 0.94);
  box-shadow: var(--shadow);
}

.login-dialog::backdrop,
.feedback-dialog::backdrop,
.account-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.login-dialog form,
.feedback-dialog form,
.account-dialog form {
  display: grid;
  gap: 14px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 24px;
}

.account-summary-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.055);
}

.account-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #15170f;
  background: linear-gradient(135deg, var(--yellow), var(--green));
  font-weight: 900;
}

.account-summary-card p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.account-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-mini-grid div {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
}

.account-mini-grid span {
  display: block;
  color: var(--faint);
  font-size: 12px;
}

.account-mini-grid strong {
  display: block;
  margin-top: 4px;
}

.feedback-dialog {
  width: min(520px, calc(100% - 32px));
}

.feedback-lingdian {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(191, 247, 106, 0.18);
  border-radius: var(--radius-sm);
  color: #e9ffbf;
  background: rgba(191, 247, 106, 0.08);
}

.feedback-lingdian picture,
.feedback-lingdian img {
  display: block;
  width: 54px;
  height: 54px;
}

.feedback-lingdian img {
  object-fit: contain;
}

.feedback-lingdian span {
  min-width: 0;
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.feedback-meta {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--faint);
  background: rgba(255, 255, 255, 0.055);
  font-size: 12px;
}

.feedback-meta span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.feedback-meta strong {
  color: var(--muted);
}

.feedback-feishu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  text-decoration: none;
  font-size: 13px;
}

.dialog-logo {
  width: 150px;
  max-width: 70%;
  height: auto;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dialog-head h2 {
  margin: 0;
  font-size: 22px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-size: 20px;
}

.empty-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.empty-lingdian {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 16px 34px rgba(191, 247, 106, 0.22));
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 1180px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }

  .brand {
    max-width: calc(100% - 88px);
  }

  .brand-logo img {
    height: 38px;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
  }

  .main-nav,
  .header-actions {
    display: none;
    width: 100%;
  }

  .main-nav.open,
  .header-actions.open {
    display: flex;
  }

  .main-nav.open {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .main-nav.open a,
  .header-actions.open button {
    min-height: 44px;
  }

  .header-actions.open {
    justify-content: stretch;
  }

  .header-actions.open button {
    flex: 1;
  }

  .integration-inner,
  .integration-form,
  .hero,
  .tool-layout,
  .topic-list .topic-card {
    grid-template-columns: 1fr;
  }

  .integration-inner,
  .integration-form {
    align-items: stretch;
    flex-direction: column;
  }

  .integration-form input {
    width: 100%;
  }

  .internal-payment-test {
    grid-template-columns: 1fr;
  }

  .helper-panel {
    position: static;
  }

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

  .plan-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .plan-card button {
    align-self: stretch;
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0;
  }

  .pricing-grid .recommended {
    order: -1;
  }

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

@media (max-width: 767px) {
  :root {
    --page-gutter: 32px;
  }

  .section-inner {
    width: calc(100% - var(--page-gutter));
    max-width: calc(100% - var(--page-gutter));
  }

  .hero,
  .hero-copy,
  .hero-form,
  .hero-subtitle,
  .sample-panel {
    width: 100%;
    max-width: 100%;
  }

  .hero.section-inner {
    width: calc(100% - var(--page-gutter));
    max-width: calc(100% - var(--page-gutter));
  }

  .hero {
    gap: 28px;
    min-height: auto;
    padding: 42px 0 54px;
  }

  .hero::before {
    top: 28px;
    right: 24px;
    width: 58px;
    height: 58px;
  }

  .hero::after {
    right: 0;
    bottom: 28%;
    width: 150px;
    max-width: 38%;
    height: 150px;
  }

  h1 {
    max-width: 100%;
    font-size: 30px;
    line-height: 1.12;
  }

  h2 {
    font-size: 26px;
  }

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

  .hero-form {
    grid-template-columns: minmax(0, 1fr);
    justify-self: start;
    width: 100% !important;
    max-width: 320px !important;
    padding: 12px;
    border-radius: 24px;
    overflow: visible;
  }

  .hero-form input {
    min-height: 48px;
  }

  .hero-form .primary-button,
  .primary-button,
  .secondary-button {
    min-height: 48px;
  }

  .hero-form .primary-button {
    justify-self: stretch;
    width: 100% !important;
    margin-inline: 0;
    padding-inline: 14px;
  }

  .hero-proof {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sample-panel {
    padding: 20px;
  }

  .sample-panel h2 {
    max-width: 100%;
    font-size: 18px;
    line-height: 1.28;
  }

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

  .compact-section {
    padding: 50px 0;
  }

  .steps-grid,
  .topic-grid,
  .audience-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .member-teaser,
  .page-head,
  .panel-title,
  .history-item,
  .support-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-title .ghost-button {
    width: 100%;
    max-width: 100%;
  }

  .history-item .secondary-button {
    width: 100%;
    max-width: 100%;
  }

  .page-head {
    padding-top: 34px;
  }

  .page-head h1 {
    font-size: 28px;
  }

  .tool-layout {
    padding-bottom: 104px;
  }

  .segmented {
    flex-wrap: nowrap;
    max-width: 100%;
    padding-inline-end: 16px;
    padding-bottom: 2px;
    overflow-x: auto;
  }

  .segmented button {
    flex: 0 0 auto;
  }

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

  .generate-submit {
    position: fixed;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 16px;
    z-index: 15;
    width: auto;
    box-shadow: 0 16px 40px rgba(191, 247, 106, 0.28);
  }

  .result-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .result-actions button {
    width: 100%;
  }

  .centered-head {
    max-width: 100%;
    text-align: left;
  }

  .topic-card-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topic-card-actions button {
    min-width: 0;
    padding: 0 8px;
    font-size: 13px;
  }

  .dialog-actions {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
}

@media (max-width: 375px) {
  :root {
    --page-gutter: 28px;
  }

  .section-inner {
    width: calc(100% - var(--page-gutter));
    max-width: calc(100% - var(--page-gutter));
  }

  .site-header {
    padding-inline: 14px;
  }

  .brand {
    max-width: calc(100% - 78px);
    font-size: 15px;
  }

  .brand-logo img {
    height: 36px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  .integration-form {
    gap: 8px;
  }

  .generator-card,
  .helper-panel,
  .topic-card,
  .plan-card,
  .history-panel {
    padding: 18px;
  }
}
