:root {
  --bg: #fbf8f4;
  --card: #ffffff;
  --text: #23201d;
  --muted: #7c7168;
  --accent: #b8946a;
  --accent-dark: #8c6a45;
  --border: #eadfd4;
  --shadow: 0 18px 40px rgba(35, 32, 29, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Poppins', Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #fff 0, var(--bg) 42%, #f5eee7 100%);
}

.hero {
  text-align: center;
  padding: 54px 20px 32px;
}

.brand {
  display: inline-block;
  margin-bottom: 18px;
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent-dark);
  background: rgba(255,255,255,.75);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 600;
}

h1 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.04;
}

.hero p, footer p, .hint {
  color: var(--muted);
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 40px;
}

.input-card {
  position: sticky;
  top: 12px;
  z-index: 10;
  margin-bottom: 26px;
  padding: 20px;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

input {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 18px;
  outline: none;
  background: #fff;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(184, 148, 106, .14);
}

.hint { margin: 10px 0 0; font-size: 14px; }

.fonts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.font-card {
  min-height: 190px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(35, 32, 29, .055);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.preview {
  min-height: 82px;
  display: flex;
  align-items: center;
  overflow-wrap: anywhere;
  font-size: 38px;
  line-height: 1.12;
}

.meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}

.font-name {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  color: #fff;
  background: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

button:hover { background: var(--accent-dark); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 18px;
  border-radius: 999px;
  color: #fff;
  background: #23201d;
  opacity: 0;
  transition: .25s ease;
  pointer-events: none;
}

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

footer {
  text-align: center;
  padding: 8px 20px 36px;
}

@media (max-width: 520px) {
  .hero { padding-top: 36px; }
  .preview { font-size: 32px; }
  .input-card { top: 8px; }
}
