/* Cute Font Generator - single stylesheet. OKLCH tokens. */

:root {
  --bg: oklch(1 0 0);
  --surface: oklch(0.97 0.01 130);
  --surface-2: oklch(0.94 0.014 130);
  --ink: oklch(0.24 0.035 130);
  --muted: oklch(0.4 0.03 130);
  --primary: oklch(0.48 0.14 130);
  --primary-hover: oklch(0.42 0.14 130);
  --on-primary: oklch(1 0 0);
  --accent: oklch(0.55 0.19 18);
  --line: oklch(0.88 0.02 130);
  --ad-bg: oklch(0.96 0.012 130);
  --shadow: oklch(0.24 0.035 130 / 0.08);
  --preview-size: 22px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --nav-h: 64px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --wrap: 72rem;
  --z-sticky: 20;
  --z-header: 30;
  --z-toast: 40;
  --font: "Segoe UI", ui-rounded, ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg: oklch(0.16 0 0);
  --surface: oklch(0.22 0.012 130);
  --surface-2: oklch(0.26 0.016 130);
  --ink: oklch(0.95 0.012 130);
  --muted: oklch(0.78 0.02 130);
  --primary: oklch(0.58 0.14 130);
  --primary-hover: oklch(0.64 0.14 130);
  --on-primary: oklch(1 0 0);
  --accent: oklch(0.7 0.16 18);
  --line: oklch(0.32 0.02 130);
  --ad-bg: oklch(0.2 0.012 130);
  --shadow: oklch(0 0 0 / 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
}

img {
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--primary-hover);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: calc(var(--z-toast) + 1);
  background: var(--primary);
  color: var(--on-primary);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: min(100% - 1.5rem, var(--wrap));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: var(--nav-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo__mark {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 7px;
  background: var(--primary);
  color: var(--on-primary);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 800;
}

.nav {
  display: none;
  gap: 0.15rem;
  align-items: center;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-pill);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn,
.btn {
  font: inherit;
  cursor: pointer;
  border: 0;
}

.icon-btn {
  height: 2.25rem;
  padding: 0 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  font-size: 0.88rem;
}

.icon-btn:hover {
  background: var(--surface-2);
}

.icon-btn:active,
.btn:active,
.copy-btn:active {
  transform: scale(0.98);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
}

.nav-toggle[aria-expanded="true"] + .nav,
.nav.is-open {
  display: flex;
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }
}

.ad-slot {
  background: var(--ad-bg);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.ad-slot--banner {
  min-height: 90px;
  margin: var(--space-4) auto;
  width: min(100% - 1.5rem, var(--wrap));
}

.ad-slot--inarticle {
  min-height: 250px;
  margin: var(--space-6) auto;
  width: min(100% - 1.5rem, 40rem);
}

.tool-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: var(--z-sticky);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0;
}

.tool-bar__grid {
  display: grid;
  gap: 0.7rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--muted);
}

.field-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

#text-input {
  width: 100%;
  min-height: 3rem;
  resize: vertical;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  font: inherit;
  line-height: 1.4;
}

#text-input::placeholder {
  color: color-mix(in oklch, var(--muted) 80%, var(--ink));
}

#text-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

.ghost-btn {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0 0.9rem;
  font-weight: 650;
  white-space: nowrap;
}

.ghost-btn:hover {
  background: var(--surface);
}

.tool-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
}

.slider-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 12rem;
}

.slider-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
}

#size-value {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: var(--muted);
  min-width: 3.2rem;
}

.page-hero {
  padding: var(--space-6) 0 var(--space-4);
}

.page-hero h1 {
  margin: 0 0 0.6rem;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 18ch;
}

.prose p {
  max-width: 68ch;
  color: var(--ink);
  margin: 0 0 1rem;
}

.prose-block h2 {
  margin: 0 0 var(--space-4);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  max-width: 68ch;
  color: var(--ink);
}

.section {
  padding: var(--space-6) 0;
}

.section h2 {
  margin: 0 0 var(--space-4);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.steps {
  display: grid;
  gap: var(--space-4);
}

.step {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
}

.step p {
  margin: 0;
  color: var(--muted);
}

@media (min-width: 800px) {
  .page-hero h1 {
    font-size: 2.6rem;
  }

  .steps {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .tool-bar__grid {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.style-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.9rem 0.95rem 1rem;
  display: grid;
  gap: 0.65rem;
  min-width: 0;
}

.style-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.style-name {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}

.copy-btn {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.8rem;
  font-weight: 700;
  font-size: 0.82rem;
}

.copy-btn:hover {
  background: var(--primary-hover);
}

.preview {
  margin: 0;
  font-size: var(--preview-size);
  line-height: 1.45;
  word-break: break-word;
  min-height: 1.6em;
  color: var(--ink);
}

.history-list {
  display: grid;
  gap: 0.5rem;
}

.history-empty {
  margin: 0;
  color: var(--muted);
}

.history-item {
  display: grid;
  gap: 0.15rem;
  text-align: left;
  width: 100%;
  background: var(--surface);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.history-item:hover {
  background: var(--surface-2);
}

.history-item__name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.history-item__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related {
  display: grid;
  gap: 0.65rem;
}

.related-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.95rem 1.05rem;
}

.related-item a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.related-item a:hover {
  color: var(--primary);
}

.related-item span {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.9rem;
}

.faq {
  display: grid;
  gap: 0.65rem;
  max-width: 50rem;
}

.faq details {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.15rem 1rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.85rem 0;
}

.faq details p {
  margin: 0 0 0.95rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-6) 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0 0 0.4rem;
}

.toast {
  position: fixed;
  z-index: var(--z-toast);
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink);
  color: var(--bg);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}

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

.error-panel {
  min-height: calc(100dvh - var(--nav-h));
  display: grid;
  place-items: center;
  padding: var(--space-7) 0;
  text-align: center;
}

.error-panel h1 {
  margin: 0 0 0.5rem;
  font-size: 2.2rem;
  letter-spacing: -0.03em;
}

.error-panel p {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: var(--on-primary);
  text-decoration: none;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 0.7rem 1.15rem;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
}

.mobile-nav {
  display: none;
  position: absolute;
  inset: var(--nav-h) 0 auto 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0.75rem 0.85rem;
  flex-direction: column;
}

.site-header.is-open .mobile-nav {
  display: flex;
}

@media (min-width: 900px) {
  .mobile-nav {
    display: none !important;
  }
}
