/* ============================================================
   Aesthetic Font — site 2 theme (violet)
   ============================================================ */

:root {
  --brand: #7c3aed;
  --brand-dark: #2e1065;
  --brand-ink: #4c1d95;
  --bg: #f5f3ff;
  --card: #ffffff;
  --border: #e9e2fb;
  --text: #4b4163;
  --muted: #8b84a3;
  --shadow: 0 1px 3px rgba(76, 29, 149, 0.07), 0 4px 14px rgba(76, 29, 149, 0.06);
  --radius: 16px;
  --maxw: 1040px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

h1 { font-family: Georgia, "Bitter", serif; color: #37304e; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 4px 10px rgba(46, 16, 101, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
}

.brand-emoji { font-size: 1.4rem; }
.brand-tag { font-weight: 400; font-size: 0.85rem; color: #d9ccff; }

.nav-pills { display: flex; gap: 6px; flex-wrap: wrap; }

.pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: #fff;
  color: #2e1065;
  text-decoration: none;
  font-size: 0.85rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.pill:hover { border-color: #fff; transform: translateY(-1px); }
.pill.active { background: rgba(255, 255, 255, 0.18); color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.pill.light { background: rgba(255, 255, 255, 0.92); }

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}

.mobile-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}

@media (max-width: 820px) {
  .nav-pills { display: none; }
  .menu-btn { display: block; }
  .brand-tag { display: none; }
}

/* ---------- Hero & generator ---------- */

.hero, .page-hero {
  text-align: center;
  padding: 30px 0 18px;
}

.hero h1, .page-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  margin: 0 0 10px;
}

.accent { color: var(--brand); }

.lede {
  max-width: 720px;
  margin: 0 auto 22px;
  color: var(--muted);
}

.generator { max-width: 760px; margin: 0 auto; }

.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 8px 8px 14px;
  box-shadow: var(--shadow);
}

.input-emoji { font-size: 1.2rem; color: var(--muted); }

#user-text {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 1.1rem;
  padding: 10px 4px;
  background: transparent;
  color: #37304e;
}

.clear-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: #efeaf9;
  color: var(--muted);
  cursor: pointer;
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 4px;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  max-width: 320px;
  width: 100%;
  background: var(--card);
  color: var(--text);
}

.search-input:focus { outline: 2px solid var(--brand); }

.range-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

#fontRange {
  width: 140px;
  accent-color: var(--brand);
}

.grid-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 8px 0 10px;
}

.style-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.style-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.style-card:hover { border-color: var(--brand); box-shadow: 0 4px 18px rgba(124, 58, 237, 0.18); }

.style-text {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 19px;
  line-height: 1.6;
  color: #37304e;
  word-break: break-all;
  font-family: inherit;
  padding: 0;
}

.style-actions { display: flex; gap: 6px; flex-shrink: 0; }

.fav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: #f3eefb;
  color: #b3a8d1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fav-btn:hover { background: #ffe0ef; color: #ec4899; }
.fav-btn.faved { background: #ffd6e8; color: #db2777; }

.copy-btn {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: #f3eefb;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.style-card:hover .copy-btn,
.copy-btn.copied { background: var(--brand); color: #fff; }

.style-name {
  position: absolute;
  top: -9px;
  left: 16px;
  background: var(--brand);
  color: #fff;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  white-space: nowrap;
}

.style-card:hover .style-name { opacity: 1; }

.load-more-wrap { text-align: center; margin: 26px 0 10px; }

.btn {
  display: inline-block;
  border: 0;
  border-radius: 12px;
  padding: 12px 30px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35); }
.btn-primary:hover { background: var(--brand-ink); transform: translateY(-1px); }

/* ---------- Sections & content ---------- */

main section { margin: 44px 0; }

.content { max-width: 760px; margin: 44px auto; }
.content h2 { font-family: Georgia, serif; color: #37304e; }

.center { text-align: center; }
.muted { color: var(--muted); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.step-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.step-card h3 { margin: 10px 0 6px; color: #37304e; }
.step-card p { margin: 0; font-size: 0.9rem; color: var(--muted); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 10px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: all 0.15s ease;
}

.cat-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.cat-emoji { font-size: 1.6rem; }
.cat-name { font-size: 0.85rem; font-weight: 600; color: #37304e; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.center-chips { justify-content: center; }

.chip {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  transition: all 0.15s ease;
}

.chip:hover { border-color: var(--brand); color: var(--brand); }

.frame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.frame-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

.frame-demo { margin: 0 0 10px; font-size: 1.05rem; word-break: break-all; color: #37304e; }
.frame-name { margin: 8px 0 0; font-size: 0.72rem; color: var(--muted); }

.btn-copy-card {
  border: 0;
  border-radius: 8px;
  padding: 6px 16px;
  background: #f3eefb;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-card:hover, .btn-copy-card.copied { background: var(--brand); color: #fff; }

.plat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.plat-card {
  display: block;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.plat-card:hover { border-color: var(--brand); }
.plat-card h3 { margin: 0 0 6px; color: #37304e; }
.plat-card p { margin: 0; font-size: 0.88rem; color: var(--muted); }

.faq-list { max-width: 760px; margin: 18px auto 0; display: grid; gap: 10px; }

.faq {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: #37304e;
}

.faq-plus {
  float: right;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.faq[open] .faq-plus { transform: rotate(45deg); }
.faq p { margin: 10px 0 0; font-size: 0.9rem; color: var(--muted); }

/* ---------- Styles index ---------- */

.styles-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.style-index-card {
  display: block;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.style-index-card:hover { border-color: var(--brand); }
.style-index-card h2 { margin: 8px 0 4px; font-size: 1.05rem; color: #37304e; }

.card-top { display: flex; justify-content: space-between; align-items: center; }

.count-badge {
  background: #f3eefb;
  color: var(--brand-ink);
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 600;
}

.preview { margin: 4px 0 0; font-size: 1.15rem; color: var(--text); word-break: break-all; }

/* ---------- Copy cards / chips pages ---------- */

.copy-grid { display: grid; gap: 12px; margin-top: 16px; }
.copy-grid.two { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.copy-grid.three { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.copy-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease;
}

.copy-card:hover { border-color: var(--brand); }

.copy-card-text {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  color: #37304e;
  word-break: break-all;
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.7;
  padding: 0;
  transition: color 0.15s ease;
}

.copy-card-text:hover { color: var(--brand); }
.copy-card-text.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9rem; }

.copy-card .art-name { margin: 10px 0 0; font-size: 0.75rem; color: var(--muted); }

.chip-bank { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.sym {
  min-width: 48px;
  height: 48px;
  padding: 0 10px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s ease;
}

.sym:hover { border-color: var(--brand); background: #f0eaff; }
.sym.copied { border-color: var(--brand); background: var(--brand); color: #fff; }

/* ---------- Platform / blog ---------- */

.tip-list { display: grid; gap: 10px; margin-top: 14px; max-width: 760px; }

.tip-card {
  display: flex;
  gap: 10px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
}

.tip-star { color: var(--brand); }

.post-list { display: grid; gap: 16px; max-width: 760px; margin: 0 auto; }

.post-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.post-card h2 { margin: 8px 0; font-size: 1.25rem; }
.post-card h2 a { color: #37304e; text-decoration: none; }
.post-card h2 a:hover { color: var(--brand); }

.post-meta { display: flex; gap: 8px; font-size: 0.75rem; color: var(--muted); flex-wrap: wrap; }

.post-cat {
  background: #f3eefb;
  color: var(--brand-ink);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 600;
  font-size: 0.72rem;
}

.post-ex { color: var(--muted); font-size: 0.92rem; }

.more-link { color: var(--brand); font-weight: 600; text-decoration: none; }
.more-link:hover { text-decoration: underline; }

.article { max-width: 720px; margin: 26px auto; }
.article h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.25; }
.article-body { margin-top: 20px; }
.article-body h2 { font-family: Georgia, serif; color: #37304e; margin-top: 28px; }
.article-body p { color: var(--text); }
.article-body ul, .article-body ol { color: var(--text); }
.article-body li { margin: 6px 0; }

.cta-box {
  max-width: 720px;
  margin: 36px auto;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  padding: 26px;
  box-shadow: var(--shadow);
}

.cta-box p { margin: 0 0 12px; font-weight: 600; color: #37304e; }

.more-posts { list-style: none; padding-left: 0; }
.more-posts a { color: var(--brand); text-decoration: none; }
.more-posts a:hover { text-decoration: underline; }

/* ---------- Legal / 404 ---------- */

.legal a { color: var(--brand); }

.nf { text-align: center; padding: 60px 0; }
.nf-face { font-size: 4rem; margin: 0; }
.nf-chips { margin-top: 28px; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 22px 0 0;
}

.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.crumbs .cur { color: #37304e; font-weight: 600; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 60px;
  background: var(--brand-dark);
  color: #c9bdf0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 26px;
  padding-top: 40px;
  padding-bottom: 40px;
}

@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.f-brand { margin: 0 0 10px; font-weight: 700; color: #fff; }
.f-text { margin: 0; font-size: 0.85rem; }
.f-head { margin: 0 0 10px; font-weight: 600; color: #fff; font-size: 0.9rem; }

.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 5px 0; font-size: 0.85rem; }
.footer-grid a { color: #c9bdf0; text-decoration: none; }
.footer-grid a:hover { color: #fff; }

.footer-base { border-top: 1px solid rgba(255, 255, 255, 0.12); }

.footer-base-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 14px;
  padding-bottom: 16px;
  font-size: 0.75rem;
}

.footer-base nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-base a { color: #c9bdf0; text-decoration: none; }
.footer-base a:hover { color: #fff; }

/* toast copied indicator */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--brand);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 100;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
