:root {
  --bg: #fff8f4;
  --bg-strong: #ffe9df;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #fffdfb;
  --surface-accent: #fff0ef;
  --ink: #251721;
  --muted: #705766;
  --line: rgba(96, 45, 62, 0.12);
  --line-strong: rgba(96, 45, 62, 0.2);
  --rose: #e54d74;
  --rose-deep: #c43c61;
  --rose-soft: #ffdde2;
  --gold: #ffbf70;
  --shadow: 0 22px 60px rgba(118, 53, 76, 0.14);
  --shadow-soft: 0 10px 30px rgba(118, 53, 76, 0.1);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 187, 202, 0.46), transparent 26rem),
    radial-gradient(circle at top right, rgba(255, 206, 144, 0.34), transparent 20rem),
    linear-gradient(180deg, #fffaf6 0%, #fff2ed 42%, #fff9f7 100%);
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 40px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 226, 232, 0.95), transparent 24rem),
    radial-gradient(circle at 85% 10%, rgba(255, 212, 167, 0.7), transparent 20rem),
    rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -3rem -4rem auto;
  width: 14rem;
  height: 14rem;
  background: radial-gradient(circle, rgba(229, 77, 116, 0.14), transparent 68%);
  transform: rotate(12deg);
  pointer-events: none;
}

.hero-nav,
.section-top,
.spotlight-top,
.panel-top,
.spotlight-meta,
.footer-links,
.hero-stats,
.section-actions,
.field-grid {
  display: flex;
  align-items: center;
}

.hero-nav,
.section-top,
.panel-top {
  justify-content: space-between;
}

.hero-nav {
  gap: 16px;
  margin-bottom: 26px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark::before {
  content: "♡";
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe2ea, #fff5df);
  color: var(--rose-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.nav-note,
.hero-lead,
.spotlight-meta,
.tip-card p,
.footer,
.field span,
.inline-field span,
.card-note,
.empty-state p {
  color: var(--muted);
}

.nav-note {
  margin: 0;
  font-size: 0.95rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 28px;
  align-items: start;
}

.hero-copy {
  padding: 18px 8px 8px;
}

.eyebrow,
.panel-kicker,
.spotlight-label {
  margin: 0 0 12px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--rose-deep);
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
  font-family: "DM Serif Display", serif;
  font-weight: 400;
}

h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 6vw, 5.3rem);
}

h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
}

h3 {
  font-size: 1.35rem;
}

.hero-lead {
  max-width: 58ch;
  margin: 18px 0 0;
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-stats {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.stat-pill {
  min-width: 140px;
  padding: 16px 18px;
  border: 1px solid rgba(229, 77, 116, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.stat-value {
  display: block;
  margin-bottom: 6px;
  color: var(--rose-deep);
  font-size: 1.05rem;
  font-weight: 700;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.generator-panel,
.section-block,
.tip-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}

.generator-panel {
  padding: 24px;
}

.panel-top {
  gap: 16px;
  margin-bottom: 18px;
}

.panel-top h2 {
  font-size: 2.1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field span,
.inline-field span {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.field-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}

.field-grid .field {
  flex: 1 1 180px;
}

.field textarea,
.field select,
.inline-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field textarea,
.field select {
  padding: 14px 16px;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.55;
}

.field select,
.inline-field input {
  min-height: 52px;
}

.field textarea:focus,
.field select:focus,
.inline-field input:focus {
  outline: none;
  border-color: rgba(229, 77, 116, 0.5);
  box-shadow: 0 0 0 4px rgba(229, 77, 116, 0.12);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chip-btn,
.ghost-btn,
.primary-btn,
.copy-chip,
.preset-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.chip-btn,
.ghost-btn,
.preset-copy {
  padding: 11px 16px;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(229, 77, 116, 0.12);
  color: var(--ink);
}

.ghost-btn {
  background: transparent;
  border: 1px solid rgba(229, 77, 116, 0.22);
  color: var(--rose-deep);
}

.primary-btn,
.copy-chip {
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--rose), #f47f6b);
  color: white;
  box-shadow: 0 14px 26px rgba(229, 77, 116, 0.22);
}

.preset-copy {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(229, 77, 116, 0.18);
  color: var(--rose-deep);
}

.chip-btn:hover,
.ghost-btn:hover,
.primary-btn:hover,
.copy-chip:hover,
.preset-copy:hover,
.result-card:hover {
  transform: translateY(-2px);
}

.primary-btn:hover,
.copy-chip:hover {
  box-shadow: 0 16px 28px rgba(229, 77, 116, 0.28);
}

.spotlight-card {
  margin-top: 20px;
  padding: 20px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 248, 249, 0.95), rgba(255, 240, 240, 0.88));
  border: 1px solid rgba(229, 77, 116, 0.12);
}

.spotlight-top {
  justify-content: space-between;
  gap: 16px;
}

.spotlight-preview {
  margin: 18px 0 14px;
  padding: 20px;
  min-height: 144px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(229, 77, 116, 0.1);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.spotlight-meta {
  justify-content: space-between;
  gap: 16px;
  font-size: 0.92rem;
}

.main-content {
  padding-top: 28px;
}

.section-block,
.tips-strip {
  margin-top: 24px;
}

.section-block {
  padding: 24px;
}

.tips-strip {
  padding-bottom: 10px;
}

.section-top {
  gap: 18px;
  margin-bottom: 18px;
}

.section-top.compact {
  justify-content: flex-start;
}

.section-actions {
  gap: 12px;
}

.inline-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 290px;
}

.inline-field input {
  padding: 0 16px;
}

.result-grid,
.preset-grid,
.tips-grid {
  display: grid;
  gap: 16px;
}

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

.library-sections {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.library-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.library-copy {
  display: flex;
  justify-content: flex-start;
}

.library-copy .preset-copy {
  width: auto;
}

.library-heading {
  font-size: 1.7rem;
}

.library-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.preset-grid--symbols,
.preset-grid--emoji,
.preset-grid--cards {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

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

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

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

.result-card,
.preset-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.result-card.is-active {
  border-color: rgba(229, 77, 116, 0.4);
  box-shadow: 0 18px 38px rgba(229, 77, 116, 0.18);
}

.result-card:focus-visible,
.chip-btn:focus-visible,
.ghost-btn:focus-visible,
.primary-btn:focus-visible,
.copy-chip:focus-visible,
.preset-copy:focus-visible {
  outline: 3px solid rgba(229, 77, 116, 0.24);
  outline-offset: 3px;
}

.result-card::before,
.preset-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, rgba(229, 77, 116, 0.72), rgba(255, 191, 112, 0.8));
}

.card-head,
.preset-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.card-note,
.result-tags {
  font-size: 0.9rem;
}

.preset-compact-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.preset-compact-footer .preset-copy {
  width: auto;
  flex-shrink: 0;
}

.preset-label {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.result-tags {
  margin-top: 12px;
  color: var(--rose-deep);
  font-weight: 500;
}

.generated-output,
.preset-output {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-accent);
  border: 1px solid rgba(229, 77, 116, 0.08);
  white-space: pre-wrap;
  word-break: break-word;
}

.generated-output {
  min-height: 132px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.preset-output {
  min-height: 92px;
  font-size: 1.28rem;
  line-height: 1.55;
}

.preset-card.is-symbol,
.preset-card.is-emoji,
.preset-card.is-card {
  padding: 14px;
}

.preset-output.is-symbol,
.preset-output.is-emoji,
.preset-output.is-card,
.preset-output.is-combo,
.preset-output.is-border {
  display: grid;
  place-items: center;
  text-align: center;
}

.preset-output.is-symbol,
.preset-output.is-card {
  min-height: 84px;
  font-size: 2rem;
}

.preset-output.is-emoji {
  min-height: 84px;
  font-size: 2rem;
}

.preset-output.is-combo {
  min-height: 96px;
  font-size: 1.3rem;
}

.preset-output.is-border {
  min-height: 80px;
  font-size: 1.08rem;
}

.preset-output.is-art {
  font-size: 0.88rem;
  line-height: 1.3;
  font-family: "SFMono-Regular", Consolas, monospace;
  overflow-x: auto;
}

.preset-tags {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.copy-chip,
.preset-copy {
  align-self: flex-start;
}

.tip-card {
  padding: 22px;
}

.tip-card h3 {
  margin-bottom: 10px;
  font-size: 1.45rem;
}

.tip-card p {
  margin: 0;
  line-height: 1.65;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.blog-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.blog-meta {
  margin: 0 0 12px;
  color: var(--rose-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.blog-link {
  color: var(--ink);
  text-decoration: none;
}

.blog-link:hover {
  color: var(--rose-deep);
}

.blog-excerpt {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.seo-section {
  overflow: hidden;
}

.seo-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.seo-block {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.seo-block h3,
.seo-faq h3 {
  margin-bottom: 10px;
}

.seo-block h3:not(:first-child) {
  margin-top: 24px;
}

.seo-block p,
.seo-block li,
.seo-faq p {
  color: var(--muted);
  line-height: 1.8;
}

.seo-block p {
  margin: 0;
}

.seo-block ul {
  margin: 0;
  padding-left: 22px;
}

.seo-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.seo-faq {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
}

.seo-faq p {
  margin: 0;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 28px;
  border-radius: 26px;
  border: 1px dashed rgba(229, 77, 116, 0.22);
  background: rgba(255, 255, 255, 0.75);
  text-align: center;
}

.empty-state h3 {
  margin-bottom: 10px;
}

.footer {
  padding: 28px 12px 12px;
  text-align: center;
}

.footer p {
  margin: 0;
}

.footer-links {
  justify-content: center;
  gap: 18px;
  margin-top: 12px;
}

.footer-links a {
  color: var(--rose-deep);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(37, 23, 33, 0.92);
  color: white;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .hero-grid,
  .result-grid,
  .tips-grid,
  .blog-grid,
  .seo-copy,
  .seo-faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preset-grid--symbols,
  .preset-grid--emoji,
  .preset-grid--cards,
  .preset-grid--combos,
  .preset-grid--art {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .preset-grid--borders {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    align-items: stretch;
  }
}

@media (max-width: 800px) {
  .page-shell {
    width: min(100% - 24px, 100%);
    padding-top: 12px;
  }

  .hero {
    padding: 18px;
    border-radius: 28px;
  }

  .hero-nav,
  .section-top,
  .panel-top,
  .spotlight-top,
  .spotlight-meta,
  .field-grid,
  .section-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-grid,
  .result-grid,
  .tips-grid,
  .blog-grid,
  .seo-copy,
  .seo-faq-grid {
    grid-template-columns: 1fr;
  }

  .preset-grid--symbols,
  .preset-grid--emoji,
  .preset-grid--cards,
  .preset-grid--combos,
  .preset-grid--borders,
  .preset-grid--art {
    grid-template-columns: 1fr;
  }

  .inline-field {
    min-width: 100%;
  }

  .primary-btn,
  .ghost-btn,
  .copy-chip,
  .preset-copy {
    width: 100%;
    justify-content: center;
  }

  .spotlight-meta {
    gap: 8px;
  }
}

@media (max-width: 520px) {
  h1 {
    max-width: 100%;
    font-size: 2.7rem;
  }

  h2 {
    font-size: 2rem;
  }

  .section-block,
  .generator-panel,
  .tip-card {
    border-radius: 22px;
  }

  .generated-output,
  .spotlight-preview {
    min-height: 116px;
  }
}
