:root {
  --bg: #ffffff;
  --text: #0a0a0a;
  --muted: #737373;
  --border: #e5e5e5;
  --surface: #fafafa;
  --green: #0f6a33;
  --green-bright: #1f8a45;
  --red: #ff4757;
  --pill: 999px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --font: "Geist", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

.shell {
  min-height: 100vh;
}

.page {
  position: relative;
  margin: 0 auto;
  min-height: 100vh;
  max-width: 414px;
  padding: 24px 20px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

@media (min-width: 768px) {
  .page {
    max-width: 414px;
    padding-left: 20px;
    padding-right: 20px;
  }
}

.page--scroll {
  justify-content: flex-start;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 12px;
}

.back-link {
  align-self: center;
  justify-self: start;
  padding: 8px 0;
  color: var(--muted);
  font-size: 14px;
}

.back-link.back-link--hidden {
  visibility: hidden;
}

.brand {
  min-width: 0;
  max-width: 9rem;
  justify-self: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}

.lang-toggle {
  justify-self: end;
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--text);
  border-radius: var(--pill);
  background: #fff;
  box-shadow: var(--shadow);
}

.lang-link {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(10, 10, 10, 0.7);
}

.lang-link.active {
  background: var(--text);
  color: #fff;
}

.center-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.logo {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid #d4d4d8;
  object-fit: contain;
  background: #fff;
  padding: 8px;
}

.logo.logo--sm {
  width: 84px;
  height: 84px;
}

.logo.logo--wide {
  width: min(56vw, 240px);
  height: min(22vw, 102px);
  max-width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  object-fit: cover;
  object-position: center 50%;
}

.logo.logo--sm-wide {
  width: min(52vw, 208px);
  height: min(19vw, 86px);
}

.heading {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
  text-align: center;
}

.heading.heading--left {
  text-align: left;
  width: 100%;
}

.subtle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.emoji {
  font-size: 58px;
  line-height: 1;
}

.primary-card,
.secondary-card,
.wide-button,
.wide-link {
  width: 100%;
  border-radius: 16px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.primary-card:hover,
.secondary-card:hover,
.wide-button:hover,
.wide-link:hover {
  transform: translateY(-1px);
}

.primary-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  padding: 16px 24px;
  background: var(--green-bright);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}

.primary-card strong {
  font-size: 16px;
}

.primary-card span {
  font-size: 15px;
  opacity: 0.9;
}

.secondary-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  padding: 16px 24px;
  border: 1px solid var(--red);
  color: var(--red);
  text-align: center;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.section-title {
  width: 100%;
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--muted);
}

.section-card {
  width: 100%;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f9faf8 0%, #f5f6f3 100%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.editor-platform-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 0 10px;
}

.editor-platform-badge svg {
  display: block;
}

.editor-platform-badge--google svg {
  width: 28px;
  height: 28px;
}

.editor-platform-badge--xhs svg {
  width: 28px;
  height: 28px;
}

.editor-intro {
  margin: 0;
  color: #787878;
  font-size: 14px;
  line-height: 1.5;
}

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

.chip {
  border: 1px solid var(--border);
  border-radius: var(--pill);
  padding: 9px 15px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
}

.chip.active {
  border-color: var(--green-bright);
  background: var(--green-bright);
  color: #fff;
}

.field-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 14px;
  font-weight: 500;
  color: #7a7a7a;
}

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

.input {
  height: 42px;
  padding: 10px 12px;
}

.textarea {
  min-height: 110px;
  resize: vertical;
  padding: 12px;
}

.review-text {
  min-height: 210px;
  border-radius: 22px;
  padding: 18px 20px;
  font-size: 15px;
  line-height: 1.75;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.review-text.review-text--revealing {
  color: #161616;
}

.review-cta-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--green-bright);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--green-bright);
  background: #fff;
  font-size: 14px;
  font-weight: 500;
}

.wide-button,
.wide-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.wide-button {
  background: var(--green-bright);
  color: #fff;
}

.wide-link {
  background: var(--green-bright);
  color: #fff;
}

.wide-link.wide-link--xhs,
.wide-button.wide-button--xhs {
  background: var(--red);
}

.wide-button.wide-button--outline {
  background: #fff;
  color: var(--green-bright);
  border: 2px solid var(--green-bright);
  box-shadow: none;
}

.wide-button:disabled,
.ghost-button:disabled {
  cursor: default;
  opacity: 0.8;
}

.generate-button svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.generate-button.is-loading svg {
  animation: sparkle-spin 1.25s linear infinite;
}

.generate-button.generate-button--pending {
  box-shadow: 0 0 0 3px rgba(31, 138, 69, 0.08);
}

.hint {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.hint--left {
  text-align: left;
}

.hint--progress {
  text-align: left;
  color: var(--green-bright);
  font-size: 13px;
  font-weight: 500;
}

.hint--warn {
  text-align: left;
  color: #6d6d6d;
  font-size: 13px;
}

.review-output-block {
  gap: 10px;
}

.review-ready {
  margin: 0;
  color: #7a7a7a;
  font-size: 14px;
  line-height: 1.45;
}

.review-loading {
  min-height: 210px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review-loading__line {
  height: 16px;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2f0 0%, #f8fbf9 48%, #eef2f0 100%);
  background-size: 220% 100%;
  animation: shimmer 1.2s linear infinite;
}

.review-loading__line--lg {
  width: 88%;
  height: 18px;
}

.review-loading__line--sm {
  width: 62%;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -20% 0;
  }
}

@keyframes sparkle-spin {
  from {
    transform: rotate(0deg) scale(0.96);
  }
  50% {
    transform: rotate(180deg) scale(1.04);
  }
  to {
    transform: rotate(360deg) scale(0.96);
  }
}

.option-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 80px;
  padding: 16px;
  border: 1px solid var(--text);
  border-radius: 16px;
  background: #fff;
}

.option-link__left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  flex: 1 1 auto;
}

.option-link__left > span:last-child {
  line-height: 1.15;
  text-align: left;
}

.option-link__right {
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
}

.service-badge--google {
  color: inherit;
}

.service-badge--xhs {
  color: inherit;
}

.service-badge svg {
  display: block;
  width: 100%;
  height: auto;
}

.service-badge--google svg {
  width: 28px;
}

.service-badge--xhs svg {
  width: 28px;
  height: 28px;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 10px;
  width: 100%;
}

.social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.social-bubble {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow);
}

.social-bubble svg {
  width: 30px;
  height: 30px;
  display: block;
}

.social-label {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
}

.media-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.media-preview {
  width: 196px;
  height: 196px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, #f7f7f7, #efefef);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.media-preview.media-preview--brand {
  width: min(100%, 320px);
  height: auto;
  aspect-ratio: 16 / 10;
  padding: 16px;
  object-fit: contain;
  background: #fff;
}

.media-preview.media-preview--uploaded {
  width: 196px;
  height: 196px;
  padding: 0;
  object-fit: cover;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--text);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  background: #fff;
}

.hidden-input {
  display: none;
}

.thanks-card {
  width: 100%;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, #f7fbf8, #ffffff);
  border: 1px solid #d6ebdc;
}

.tiny-link {
  margin: 4px auto 0;
  font-size: 12px;
  color: var(--muted);
}

.spacer-sm {
  height: 8px;
}

@media (max-width: 480px) {
  .page {
    padding-inline: 18px;
  }

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