:root {
  --primary-50: #f0fdfa;
  --primary-100: #ccfbf1;
  --primary-200: #99f6e4;
  --primary-400: #2dd4bf;
  --primary-500: #14b8a6;
  --primary-600: #0d9488;
  --primary-700: #0f766e;
  --dark-700: #334155;
  --dark-800: #1e293b;
  --dark-900: #0f172a;
  --dark-950: #020617;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white: #ffffff;
  --bg: var(--gray-50);
  --text: var(--gray-900);
  --muted: var(--gray-500);
  --muted-strong: var(--gray-700);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.58);
  --border: rgba(226, 232, 240, 0.86);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 10px 40px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 0 30px rgba(20, 184, 166, 0.18);
}

:root[data-theme="dark"] {
  --bg: var(--dark-950);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --surface: rgba(30, 41, 59, 0.74);
  --surface-solid: #1e293b;
  --surface-soft: rgba(30, 41, 59, 0.54);
  --border: rgba(51, 65, 85, 0.72);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.22);
  --shadow-hover: 0 10px 40px rgba(0, 0, 0, 0.26);
  --shadow-glow: 0 0 34px rgba(20, 184, 166, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(at 40% 20%, rgba(20, 184, 166, 0.12) 0, transparent 46%),
    radial-gradient(at 80% 0%, rgba(6, 182, 212, 0.08) 0, transparent 44%),
    radial-gradient(at 0% 50%, rgba(20, 184, 166, 0.08) 0, transparent 44%),
    linear-gradient(135deg, var(--gray-50), var(--primary-50), var(--gray-100));
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(at 40% 20%, rgba(20, 184, 166, 0.16) 0, transparent 46%),
    radial-gradient(at 80% 0%, rgba(6, 182, 212, 0.1) 0, transparent 44%),
    radial-gradient(at 0% 50%, rgba(20, 184, 166, 0.09) 0, transparent 44%),
    linear-gradient(135deg, var(--dark-950), var(--dark-900), var(--dark-950));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 184, 166, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 184, 166, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  color: white;
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.28);
  font-size: 13px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 180ms ease, color 180ms ease;
}

.nav-links a {
  padding: 0 12px;
}

.nav-links a:hover,
.icon-btn:hover {
  background: rgba(148, 163, 184, 0.14);
  color: var(--text);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 38px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.btn,
.primary-btn,
.secondary-btn,
.top-action,
.filter-chip,
.case-generate,
.case-copy,
.code-head button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 12px;
  border: 0;
  padding: 0 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.btn:hover,
.primary-btn:hover,
.secondary-btn:hover,
.top-action:hover,
.filter-chip:hover,
.case-generate:hover,
.case-copy:hover,
.code-head button:hover {
  transform: translateY(-1px);
}

.primary-btn,
.top-action,
.case-copy,
.code-head button {
  background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
  color: white;
  box-shadow: 0 8px 20px rgba(20, 184, 166, 0.25);
}

.primary-btn:hover,
.top-action:hover,
.case-copy:hover,
.code-head button:hover {
  box-shadow: 0 12px 26px rgba(20, 184, 166, 0.3);
}

.secondary-btn,
.filter-chip,
.case-generate {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted-strong);
}

.secondary-btn:hover,
.filter-chip:hover,
.case-generate:hover {
  background: var(--surface-solid);
  box-shadow: var(--shadow-card);
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  min-height: calc(100vh - 64px);
  padding: clamp(54px, 8vw, 108px) 24px 44px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary-500);
  box-shadow: 0 0 18px rgba(20, 184, 166, 0.6);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 700px;
  margin-bottom: 20px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-title span {
  display: block;
  white-space: nowrap;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  letter-spacing: 0;
}

.hero-lede {
  max-width: 670px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-board {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-hover), var(--shadow-glow);
  backdrop-filter: blur(18px);
}

.board-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.board-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #fff;
}

.prompt-panel {
  margin: 0;
  padding: 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
}

.prompt-tag,
.case-kind,
.keyword-row span,
.case-ratio {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.prompt-tag,
.case-kind {
  margin-bottom: 10px;
  padding: 4px 10px;
  background: var(--primary-100);
  color: var(--primary-700);
}

:root[data-theme="dark"] .prompt-tag,
:root[data-theme="dark"] .case-kind {
  background: rgba(20, 184, 166, 0.16);
  color: var(--primary-200);
}

.prompt-panel p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.75;
}

.stats-band {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 24px;
  gap: 16px;
}

.stats-band div {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.stats-band strong {
  color: var(--text);
  font-size: 32px;
  line-height: 1;
}

.stats-band span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.case-section,
.inspiration-section,
.formula-section,
.workflow-section {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(46px, 7vw, 82px) 24px;
}

.section-note {
  max-width: 820px;
  margin: -12px 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-chip {
  min-height: 36px;
  padding: 0 14px;
}

.filter-chip.is-active {
  border-color: rgba(20, 184, 166, 0.3);
  background: var(--primary-50);
  color: var(--primary-700);
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.1);
}

:root[data-theme="dark"] .filter-chip.is-active {
  background: rgba(20, 184, 166, 0.16);
  color: var(--primary-200);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.case-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.case-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary-500) 30%, var(--border));
  box-shadow: var(--shadow-hover);
}

.case-visual {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--gray-100);
}

:root[data-theme="dark"] .case-visual {
  background: var(--dark-900);
}

.case-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #fff;
  transition: transform 360ms ease;
}

.case-card:hover .case-visual img {
  transform: scale(1.015);
}

.case-kind {
  position: absolute;
  left: 14px;
  top: 14px;
  margin: 0;
  backdrop-filter: blur(10px);
}

.case-body {
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.case-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.case-title-row h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.32;
}

.case-ratio {
  flex: 0 0 auto;
  padding: 3px 8px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted);
}

.case-desc {
  min-height: 46px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.prompt-block {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-solid) 68%, transparent);
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.72;
}

.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.keyword-row span {
  padding: 4px 8px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted-strong);
}

.case-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.case-param {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.case-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.case-generate,
.case-copy {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.inspiration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.inspiration-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.inspiration-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.12);
  overflow: hidden;
}

.inspiration-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.inspiration-source {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--primary-100);
  color: var(--primary-700);
  font-size: 12px;
  line-height: 1.15;
  font-weight: 700;
}

:root[data-theme="dark"] .inspiration-source {
  background: rgba(20, 184, 166, 0.16);
  color: var(--primary-200);
}

.inspiration-heading {
  margin-bottom: 14px;
}

.inspiration-heading strong {
  display: block;
  color: var(--text);
  font-size: 20px;
  line-height: 1.32;
  text-wrap: balance;
}

.inspiration-heading span:last-child {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.image-credit {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-credit:hover {
  color: var(--primary-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

:root[data-theme="dark"] .image-credit:hover {
  color: var(--primary-200);
}

.inspiration-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.inspiration-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.inspiration-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.inspiration-prompt {
  margin: 0 0 16px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.78;
  line-break: strict;
  overflow-wrap: break-word;
  text-wrap: pretty;
  display: -webkit-box;
  min-height: calc(13px * 1.78 * 5);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.inspiration-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.inspiration-actions a,
.inspiration-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 36px;
  min-width: 92px;
  border-radius: 10px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--muted-strong);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  appearance: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.inspiration-actions button[data-copy-inspiration] {
  border-color: transparent;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
  color: #fff;
  box-shadow: 0 8px 20px rgba(20, 184, 166, 0.2);
}

.inspiration-actions a:hover,
.inspiration-actions button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.generator-layout,
.formula-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.78fr);
  gap: 20px;
  align-items: start;
}

.generator-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  padding: 20px;
}

.generator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field span {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.generated-prompt {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.field input,
.field select {
  min-height: 42px;
  padding: 0 12px;
}

.field textarea,
.generated-prompt {
  resize: vertical;
  padding: 11px 12px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.generated-prompt:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.option-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 600;
}

.option-row input {
  accent-color: var(--primary-500);
}

.generator-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.generator-output-card {
  position: sticky;
  top: 84px;
}

.generated-prompt {
  display: block;
  min-height: 520px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Microsoft YaHei", monospace;
  font-size: 13px;
  line-height: 1.78;
}

.formula-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: formula;
}

.formula-list li {
  position: relative;
  min-height: 140px;
  padding: 18px 18px 18px 58px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.formula-list li::before {
  counter-increment: formula;
  content: counter(formula, decimal-leading-zero);
  position: absolute;
  left: 18px;
  top: 18px;
  color: var(--primary-600);
  font-size: 14px;
  font-weight: 800;
}

.formula-list span {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
}

.formula-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.formula-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-card);
}

:root[data-theme="dark"] .formula-card {
  background: var(--dark-900);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 700;
}

.code-head button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Microsoft YaHei", monospace;
  font-size: 13px;
  line-height: 1.78;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.workflow-steps article {
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.workflow-steps span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 28px;
  border-radius: 12px;
  background: var(--primary-100);
  color: var(--primary-700);
  font-size: 14px;
  font-weight: 800;
}

:root[data-theme="dark"] .workflow-steps span {
  background: rgba(20, 184, 166, 0.16);
  color: var(--primary-200);
}

.workflow-steps h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 700;
}

.workflow-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow-hover);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  color: var(--muted);
  font-size: 14px;
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--primary-600);
  font-weight: 700;
}

@media (max-width: 1080px) {
  .hero,
  .generator-layout,
  .formula-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-board {
    max-width: 560px;
  }

  .generator-output-card {
    position: static;
  }

  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inspiration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    position: static;
    height: auto;
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .brand {
    flex: 1 1 auto;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 4px;
  }

  .nav-links a {
    flex: 1;
    padding: 0 8px;
  }

  .top-action {
    display: none;
  }

  .hero {
    padding: 42px 16px 24px;
  }

  h1 {
    font-size: clamp(34px, 10.4vw, 48px);
    line-height: 1.08;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

  .stats-band,
  .case-grid,
  .inspiration-grid,
  .generator-grid,
  .formula-list,
  .workflow-steps {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .stats-band,
  .case-section,
  .formula-section,
  .workflow-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-heading {
    display: block;
  }

  .case-title-row,
  .case-footer,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .case-desc {
    min-height: 0;
  }

  .case-actions,
  .case-generate,
  .case-copy {
    width: 100%;
  }

  .case-actions {
    flex-direction: column;
  }

  .generator-actions {
    flex-direction: column;
  }

  .generator-actions .primary-btn,
  .generator-actions .secondary-btn {
    width: 100%;
  }

  .generated-prompt {
    min-height: 420px;
  }
}
