:root {
  --bg: #f4f4f6;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 24px 64px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.04), 0 28px 72px rgba(0, 0, 0, 0.1);
  --radius: 28px;
  --radius-sm: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.aif-body {
  padding-top: 0;
  padding-block-start: 0;
  margin-block-start: 0;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.45);
  outline-offset: 2px;
}
.wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.narrow { width: min(760px, calc(100% - 48px)); }
.muted { color: var(--muted); }
.center { text-align: center; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0;
  margin-block-start: 0;
  background: rgba(251, 251, 253, 0.78);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
#content {
  margin: 0;
  margin-block-start: 0;
  padding: 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  letter-spacing: -0.04em;
  color: var(--text);
  font-size: 20px;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #1d1d1f;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.logo img { height: 28px; width: auto; }
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.nav a {
  color: var(--text);
  padding: 8px 10px;
  border-radius: 980px;
}
.nav a.is-current { background: rgba(0, 0, 0, 0.05); }
.nav-cta {
  background: var(--blue);
  color: #fff !important;
  padding: 8px 16px !important;
}
.nav-cta:hover { text-decoration: none; background: var(--blue-hover); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 980px; overflow: hidden; margin-left: 6px; }
.lang a { padding: 5px 11px; color: var(--muted); border-radius: 0; }
.lang a.is-active { background: #1d1d1f; color: #fff; }
.lang a:hover { text-decoration: none; }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #1d1d1f;
  position: relative;
  margin: 0 auto;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 40px;
  text-align: center;
}
.hero-glow {
  position: absolute;
  inset: -20% 10% auto;
  height: 420px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0, 113, 227, 0.16), transparent 60%),
    radial-gradient(ellipse at 80% 40%, rgba(90, 90, 110, 0.08), transparent 50%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.kicker {
  display: inline-flex;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 18px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.7);
}
h1, .hero h1 {
  font-size: clamp(44px, 7.2vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  font-weight: 600;
  margin: 0;
}
.lead {
  font-size: 21px;
  color: var(--muted);
  max-width: 680px;
  margin: 20px auto 0;
  line-height: 1.45;
}
.hero-actions { display: flex; justify-content: center; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.trust-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 28px;
  list-style: none;
  padding: 0;
  margin: 48px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.trust-bar li {
  position: relative;
}
.trust-bar li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -16px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d2d2d7;
  transform: translateY(-50%);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  border-radius: 980px;
  padding: 13px 24px;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-hover); }
.btn-dark { background: #1d1d1f; color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { background: #e8e8ed; color: #1d1d1f; }
.btn-small { padding: 7px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 28px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.news-card:hover, .platform-card:hover, .price-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.generator-section { padding: 8px 0 80px; }
.generator-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 22px; align-items: start; }
.generate-form, .result-card { min-height: 100%; }
.field-label { display: block; font-size: 13px; color: var(--muted); margin: 18px 0 8px; font-weight: 500; }
textarea, input[type="text"], input[type="email"], input[type="password"], input[type="search"] {
  width: 100%;
  border: 1px solid #d2d2d7;
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font: inherit;
  background: #fff;
  color: var(--text);
}
textarea { resize: vertical; min-height: 132px; }
textarea:focus, input:focus { outline: 4px solid rgba(0, 113, 227, 0.16); border-color: var(--blue); }
.examples-label { margin: 14px 0 8px; font-size: 12px; color: var(--muted); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; }
.example-chip {
  max-width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fbfbfd;
  color: var(--text);
  border-radius: 980px;
  padding: 7px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  line-height: 1.35;
}
.example-chip:hover { background: #fff; border-color: #c7c7cc; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 8px 13px;
  border-radius: 980px;
  background: #f5f5f7;
  font-size: 13px;
}
.chip input:checked + span { background: #1d1d1f; color: #fff; }
.form-row { display: flex; align-items: center; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.form-error { color: #c41a1a; font-size: 14px; min-height: 1.2em; }
.form-error.is-visible, .form-error:not([hidden]) { margin-top: 12px; }

.result-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.result-card h2, .result-card h3 { letter-spacing: -0.03em; }
.result-card h2 { margin: 0; font-size: 22px; }
.result-card h3 { font-size: 15px; margin: 22px 0 8px; }
.result-empty { color: var(--muted); margin: 28px 0 8px; }
.formula {
  background: #f5f5f7;
  border-radius: 16px;
  padding: 18px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
.formula-alt { background: #eef3fb; }
.result-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  margin-top: 28px;
}
.result-loading[hidden] { display: none; }
.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.section { padding: 88px 0; }
.section-alt { background: #fff; }
.section-kicker {
  text-align: center;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}
.section-title { text-align: center; font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.045em; margin: 0 0 12px; font-weight: 600; }
.section-title.left { text-align: left; font-size: 28px; }
.section-lead { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 40px; font-size: 18px; }
.steps, .platform-cards, .pricing-grid { display: grid; gap: 18px; }
.steps { grid-template-columns: repeat(3, 1fr); }
.platform-cards { grid-template-columns: repeat(3, 1fr); }
.pricing-grid { grid-template-columns: repeat(4, 1fr); margin: 40px 0 24px; }
.steps article {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.03);
}
.steps span {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #1d1d1f;
  color: #fff;
  font-size: 14px;
  margin-bottom: 16px;
}
.steps h3, .platform-card h3 { margin: 0 0 8px; letter-spacing: -0.03em; }
.privacy-note { margin-top: 36px; }

.library-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 28px;
}
.chip-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 980px;
  padding: 8px 16px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.chip-btn.is-active {
  background: #1d1d1f;
  color: #fff;
  border-color: #1d1d1f;
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.library-card h3 {
  margin: 8px 0 6px;
  font-size: 18px;
  letter-spacing: -0.03em;
}
.library-card p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.library-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: #f5f5f7;
  border-radius: 980px;
  padding: 4px 10px;
}
.library-formula { margin: 0 0 14px; font-size: 13px; }
.library-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.library-card.is-hidden { display: none; }
.library-note { margin-top: 28px; }
.library-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.share-stats { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.share-stats .btn.is-liked { background: #1d1d1f; color: #fff; }
.share-uses { font-size: 13px; color: var(--muted); }
.history-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.page { padding: 56px 0 104px; }
.page-head { margin-bottom: 36px; }
.page-head .lead, .article-head .lead { margin-left: 0; }
.center-head { text-align: center; }
.center-head .lead { margin-left: auto; margin-right: auto; }
.auth-form label { display: block; margin: 14px 0 8px; font-size: 13px; color: var(--muted); }
.auth-form .btn { width: 100%; margin-top: 20px; }
.switch-auth { margin-top: 20px; color: var(--muted); }
.account-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 28px; }
.account-stats { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 36px; }
.invite-card { margin: 0 0 36px; }
.invite-card .section-title { margin-bottom: 8px; }
.invite-row { display: flex; gap: 10px; align-items: stretch; margin-top: 16px; }
.invite-row input { width: auto; flex: 1; min-width: 0; }
.invite-row .btn { flex-shrink: 0; width: auto; }
.invite-stats { margin: 12px 0 0; }
.invite-note { margin: 0 0 18px; padding: 12px 16px; border-radius: 14px; background: #eef4ff; color: #1d3b8b; }
.stat-card { margin-bottom: 0; }
.stat { font-size: 44px; margin: 4px 0 0; letter-spacing: -0.05em; }
.stat-label { font-size: 28px; margin: 8px 0 0; letter-spacing: -0.04em; }
.pay-notice { margin: 0 0 24px; padding: 12px 16px; border-radius: 14px; background: #e8f8ee; color: #0f5132; }
.pay-notice.is-cancel { background: #fff4e5; color: #7a4b00; }
.price-error { text-align: center; min-height: 0; margin-bottom: 8px; }
.price-card .btn.is-busy { opacity: 0.7; }
.history-list { display: grid; gap: 16px; }
.history-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.price { font-size: 44px; letter-spacing: -0.05em; margin: 8px 0 16px; }
.price small { font-size: 16px; color: var(--muted); }
.price-card .btn { width: 100%; margin-top: 16px; }
.price-card.featured { outline: 2px solid #1d1d1f; position: relative; }
.price-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  background: #1d1d1f;
  color: #fff;
  padding: 4px 8px;
  border-radius: 980px;
}
.faq-list { display: grid; gap: 12px; margin-top: 32px; }
.faq-item { padding: 0; overflow: hidden; }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 26px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item h2, .faq-item h3 { font-size: 20px; letter-spacing: -0.03em; margin: 0; font-weight: 600; }
.faq-item p { margin: 0; padding: 0 26px 22px; color: var(--muted); }

.cta-band {
  padding: 96px 0;
  background: linear-gradient(180deg, #fff 0%, #f4f4f6 100%);
}
.cta-band .btn { margin-top: 8px; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; background: #fbfbfd; }
.footer-title { color: var(--text); font-weight: 650; font-size: 18px; display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr; gap: 40px; padding: 64px 0 36px; align-items: start; }
.footer-heading { color: var(--text); font-weight: 600; margin: 0 0 12px; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-inner nav { display: flex; flex-direction: column; gap: 10px; }
.footer-inner a { color: var(--text); }
.footer-copy { border-top: 1px solid var(--line); padding: 18px 0 40px; font-size: 13px; }
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  left: 8px;
  top: 8px;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  padding: 8px 12px;
  background: #1d1d1f;
  color: #fff;
  z-index: 100000;
}
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.search-form { display: flex; gap: 8px; align-items: center; }
.search-form label { flex: 1; }
.search-form input { min-width: 0; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.news-grid-wide { margin-top: 8px; }
.news-card { display: flex; flex-direction: column; padding: 0 0 22px; overflow: hidden; }
.news-card:not(:has(.news-thumb)) { padding-top: 22px; }
.news-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #eee; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card time, .news-card p, .news-card h2, .news-card h3, .news-card .card-more { padding-left: 22px; padding-right: 22px; }
.news-card time { color: var(--muted); font-size: 13px; margin-top: 18px; display: block; }
.news-card h2, .news-card h3 { font-size: 22px; letter-spacing: -0.03em; margin: 10px 0; }
.news-card h2 a, .news-card h3 a, .news-grid h3 a { color: var(--text); }
.news-card p { margin: 0 0 14px; color: var(--muted); flex: 1; }
.card-more { font-size: 14px; font-weight: 500; }
.article-head { margin-bottom: 28px; }
.article-head time, .article-head span { color: var(--muted); font-size: 14px; }
.article-head .dot { margin: 0 6px; }
.article-hero { margin: 0 0 32px; border-radius: 24px; overflow: hidden; }
.article-hero img { width: 100%; display: block; }
.article-body { font-size: 18px; line-height: 1.75; color: #1d1d1f; }
.article-body h2 { font-size: 28px; letter-spacing: -0.03em; margin: 36px 0 12px; }
.article-body h3 { font-size: 20px; margin: 24px 0 8px; }
.article-body p, .article-body li { margin: 0 0 16px; }
.article-cta { margin-top: 36px; }
.related-block { margin-top: 56px; }
.related-block h2 { font-size: 24px; letter-spacing: -0.03em; }
.related-grid { margin-top: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}
.formula-box { margin: 28px 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 28px; font-size: 13px; color: var(--muted); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: #c7c7cc; }
.related-list { padding-left: 18px; }
.pagination { margin-top: 40px; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex;
  min-width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
}
.pagination .current { background: #1d1d1f; color: #fff; }

@media (max-width: 980px) {
  .generator-grid, .steps, .platform-cards, .pricing-grid, .news-grid, .footer-inner, .library-grid, .account-stats { grid-template-columns: 1fr; }
  .invite-row { flex-direction: column; }
  .invite-row .btn { width: 100%; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: rgba(251, 251, 253, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 20px;
    gap: 4px;
  }
  .nav.is-open { display: flex; }
  .header-inner { position: relative; }
  .hero { padding-top: 36px; }
  .trust-bar li:not(:last-child)::after { display: none; }
  .wrap, .narrow { width: min(1180px, calc(100% - 32px)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
