:root {
  color-scheme: dark;
  --bg: #160c12;
  --bg-soft: #24141c;
  --surface: #fff4e6;
  --surface-2: #f8dcc4;
  --text: #fff8ed;
  --text-muted: #d7bfb4;
  --ink: #21151b;
  --accent: #d5a44f;
  --accent-2: #4fb7a7;
  --rose: #e87283;
  --line: rgba(255, 248, 237, 0.18);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.light {
  color-scheme: light;
  --bg: #f7efe8;
  --bg-soft: #eadccc;
  --surface: #24141c;
  --surface-2: #392333;
  --text: #251820;
  --text-muted: #684f59;
  --ink: #fff8ed;
  --line: rgba(37, 24, 32, 0.18);
  --shadow: 0 24px 60px rgba(74, 48, 37, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(232, 114, 131, 0.22), transparent 28rem),
    linear-gradient(135deg, var(--bg), #271829 55%, #0f2022);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--rose));
  color: #190f14;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  max-width: 220px;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.hero {
  min-height: calc(100vh - 92px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 440px);
  align-items: center;
  gap: clamp(28px, 6vw, 76px);
  padding: 22px 0 46px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.1rem, 8vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
}

.app-panel {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.mode-row,
.prompt-meta,
.controls,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.switch {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-weight: 700;
}

.switch input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-2);
}

.counter {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.category-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0 14px;
  padding: 0;
  border: 0;
}

.category-bar legend {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  white-space: nowrap;
}

.category {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.category.active {
  border-color: transparent;
  background: var(--accent);
  color: #1f1418;
}

.prompt-card {
  min-height: 282px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(22px, 5vw, 34px);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(248, 220, 196, 0.96)),
    var(--surface);
  color: var(--ink);
  transition: transform 160ms ease, opacity 160ms ease;
}

body.light .prompt-card {
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
}

.prompt-card.spin {
  transform: rotate(1.2deg) scale(0.985);
  opacity: 0.72;
}

.prompt-meta {
  color: color-mix(in srgb, var(--ink), transparent 28%);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.type-badge {
  padding: 6px 9px;
  border-radius: var(--radius);
  background: var(--accent-2);
  color: #071b1c;
}

#promptText {
  margin: 28px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 5.3vw, 2.35rem);
  line-height: 1.16;
}

.controls {
  margin-top: 14px;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  border-radius: var(--radius);
  font-weight: 900;
}

.primary-button {
  flex: 1 1 auto;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--rose));
  color: #1d1117;
}

.secondary-button {
  width: 136px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 0 42px;
}

.trust-strip div {
  min-height: 98px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip span {
  margin-top: 8px;
  color: var(--text-muted);
}

.seo-content {
  max-width: 780px;
  padding: 28px 0 56px;
}

.seo-content h2,
.seo-content h3 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.seo-content h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.seo-content h3 {
  margin-top: 28px;
  font-size: 1.45rem;
}

.seo-content p,
.site-footer {
  color: var(--text-muted);
  line-height: 1.7;
}

.text-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.blog-hero {
  max-width: 820px;
  padding: 54px 0 28px;
}

.blog-hero h1 {
  font-size: clamp(2.8rem, 8vw, 5.4rem);
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 34px;
  align-items: start;
  padding-bottom: 64px;
}

.prompt-section {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.prompt-section h2 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.prompt-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: prompts;
}

.prompt-list li {
  counter-increment: prompts;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  line-height: 1.5;
}

.prompt-list li::before {
  content: counter(prompts);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent);
  color: #1f1418;
  font-size: 0.85rem;
  font-weight: 900;
}

.blog-sidebar {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.blog-sidebar a {
  min-height: 42px;
  display: flex;
  align-items: center;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.site-footer {
  min-height: 76px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 22px, 560px);
  }

  .site-header {
    min-height: 68px;
  }

  .hero {
    min-height: auto;
    display: block;
    padding-top: 18px;
  }

  .hero-copy {
    margin-bottom: 22px;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.9rem);
  }

  .hero-lede {
    font-size: 1rem;
  }

  .app-panel {
    padding: 12px;
  }

  .category-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .prompt-card {
    min-height: 260px;
  }

  .controls {
    display: grid;
  }

  .secondary-button {
    width: 100%;
  }

  .trust-strip {
    grid-template-columns: 1fr;
    padding-top: 20px;
  }

  .blog-layout {
    display: block;
  }

  .blog-sidebar {
    position: static;
    margin-bottom: 26px;
  }

  .prompt-list li {
    grid-template-columns: 38px minmax(0, 1fr);
  }
}
