:root {
  --ink: #23324a;
  --muted: #64748b;
  --paper: #fffdf9;
  --paper-2: #edf7ff;
  --forest: #356fac;
  --forest-2: #dceeff;
  --moss: #55bca7;
  --sun: #a54141;
  --line: rgba(45, 91, 126, .16);
  --white: #ffffff;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(58, 111, 156, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, var(--paper) 48%, #f4faff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
  z-index: 50;
}

a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:where(a, button, input, select):focus-visible { outline: 3px solid #245f9b; outline-offset: 3px; }
.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: white; padding: 8px 12px; }
.skip-link:focus { left: 8px; }

.site-header {
  height: 76px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; position: relative; display: grid; place-items: center; border: 1px solid rgba(53,111,172,.28); border-radius: 50%; background: #f3f9ff; }
.brand-mark::before { content: "✦"; color: var(--sun); font-size: 13px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a, .nav-favorites { color: #52637a; text-decoration: none; font-size: .92rem; }
.nav-links a:hover, .nav-favorites:hover { color: var(--forest); }
.nav-favorites { border: 0; padding: 0; background: transparent; }
.nav-favorites span { display: inline-grid; min-width: 20px; height: 20px; padding: 0 5px; place-items: center; border-radius: 999px; color: white; background: var(--forest); font-size: .7rem; }
.nav-cta { border: 1px solid rgba(53,111,172,.25); border-radius: 999px; padding: 8px 15px; background: #f2f8ff; }
.menu-toggle { display: none; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #f4f9ff; font-size: 1.25rem; }

.hero {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 18%, rgba(105, 201, 220, .28), transparent 28%),
    radial-gradient(circle at 68% 88%, rgba(255, 181, 166, .26), transparent 34%),
    linear-gradient(138deg, #f4fbff 0%, #f3f0ff 54%, #fff8ee 100%);
}
.hero::after {
  content: "";
  position: absolute;
  width: 690px;
  height: 690px;
  right: -220px;
  top: -130px;
  border: 1px solid rgba(53,111,172,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 86px rgba(93,167,211,.035), 0 0 0 174px rgba(93,167,211,.024);
}
.hero-inner { min-height: 680px; padding: 80px 0 88px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: center; position: relative; z-index: 2; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--sun); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 750; }
.eyebrow::before { content: ""; width: 30px; height: 1px; background: currentColor; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; line-height: 1.05; letter-spacing: -.035em; }
h1 { font-size: clamp(3.5rem, 7vw, 6.7rem); margin: 0; max-width: 780px; }
h2 { font-size: clamp(2.2rem, 4vw, 4rem); margin: 0 0 18px; }
h3 { font-size: 1.55rem; margin: 0 0 10px; }
.hero-copy .lead { color: #607086; font-size: 1.12rem; max-width: 550px; margin: 24px 0 34px; }
.hero-notes { display: flex; flex-wrap: wrap; gap: 18px; color: #758398; font-size: .82rem; }
.hero-notes span { display: inline-flex; align-items: center; gap: 7px; }
.hero-notes span::before { content: "✦"; color: var(--sun); font-size: .65rem; }

.generator {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, .97);
  border-radius: 28px;
  padding: 28px;
  border: 1px solid rgba(53,111,172,.12);
  box-shadow: 0 32px 90px rgba(59, 111, 151, .18);
  backdrop-filter: blur(18px);
}
.generator-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.generator-kicker { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 5px; }
.generator h2, .generator h3 { margin: 0; font-size: 1.7rem; }
.seal { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; color: var(--forest); }
.form-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 14px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
label { color: var(--muted); font-size: .76rem; font-weight: 720; text-transform: uppercase; letter-spacing: .08em; }
select, input[type="text"] { width: 100%; border: 1px solid var(--line); background: #fbfdff; color: var(--ink); border-radius: 12px; padding: 12px 13px; outline: none; }
select, input, .segment { min-width: 0; }
select:focus, input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(53,111,172,.13); }
.segment { display: flex; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #edf6ff; }
.segment button { flex: 1; padding: 8px 7px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: .82rem; }
.segment button.active { color: white; background: linear-gradient(135deg, #3478b8, #756bc7); box-shadow: 0 5px 15px rgba(53,111,172,.22); }
.generate-btn { width: 100%; border: 0; border-radius: 13px; padding: 14px 18px; margin-top: 18px; color: white; background: linear-gradient(135deg, #3478b8, #716acb); font-weight: 760; letter-spacing: .01em; box-shadow: 0 12px 28px rgba(53,111,172,.24); }
.generate-btn:hover { background: linear-gradient(135deg, #27699f, #6259ba); transform: translateY(-1px); }
.result-list { display: grid; gap: 8px; margin-top: 18px; }
.name-result { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: white; animation: reveal .38s both; }
.name-result strong { display: block; font-family: Georgia, serif; font-size: 1.25rem; font-weight: 500; }
.name-result small { color: var(--muted); }
.result-actions { display: flex; gap: 6px; }
.icon-btn { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); }
.icon-btn:hover, .icon-btn.saved { background: var(--paper-2); color: var(--forest); }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }

.section { padding: 104px 0; }
.section.alt { background: linear-gradient(180deg, #edf8ff, #f6f2ff); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 44px; }
.section-head p { max-width: 550px; color: var(--muted); margin: 0; }
.text-link { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; font-size: .9rem; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.category-card { min-height: 245px; padding: 26px; text-decoration: none; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; transition: .25s ease; position: relative; overflow: hidden; }
.category-card:hover { color: white; background: linear-gradient(145deg, #3c83bc, #8276cf); transform: translateY(-3px); box-shadow: var(--shadow); }
.category-mark { color: var(--muted); font-size: .72rem; letter-spacing: .14em; }
.category-card h3 { margin-top: auto; font-size: 1.75rem; }
.category-card p { color: var(--muted); font-size: .9rem; margin: 0; }
.category-card:hover p, .category-card:hover .category-mark { color: rgba(255,255,255,.65); }

.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.topic-card { min-height: 270px; padding: 26px; border-radius: var(--radius); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; overflow: hidden; position: relative; background: linear-gradient(145deg, color-mix(in srgb, var(--card, #76a8d4) 24%, white), color-mix(in srgb, var(--card, #8f84cf) 35%, #f5fbff)); border: 1px solid rgba(53,111,172,.1); box-shadow: 0 18px 42px rgba(61,111,151,.12); }
.topic-card::before { content: ""; width: 200px; height: 200px; border: 1px solid rgba(53,111,172,.15); border-radius: 50%; position: absolute; right: -65px; top: -65px; box-shadow: 0 0 0 35px rgba(255,255,255,.22); }
.topic-card small { color: #6d7b8e; text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; }
.topic-card h3 { font-size: 2.15rem; margin-top: auto; }
.topic-card p { color: #5f6f84; margin: 0; font-size: .92rem; }
.topic-card .arrow { position: absolute; top: 22px; right: 24px; font-size: 1.3rem; transition: transform .2s; }
.topic-card:hover .arrow { transform: translate(4px,-4px); }

.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.story-art { aspect-ratio: 1 / .82; border-radius: 240px 240px 22px 22px; background: linear-gradient(180deg, #cfeeff, #e7e1fb 58%, #ffe6db); position: relative; overflow: hidden; box-shadow: var(--shadow); }
.story-art::before { content: ""; position: absolute; width: 44%; aspect-ratio: 1; left: 28%; top: 14%; background: linear-gradient(145deg, #fff7cf, #ffd2be 55%, #f7a7a5); border-radius: 50%; box-shadow: 0 0 80px rgba(255,190,165,.46); }
.story-art::after { content: ""; position: absolute; inset: 30% -5% -10%; background: url("data:image/svg+xml,%3Csvg viewBox='0 0 700 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%235b75a0'%3E%3Cpath d='M0 370L75 190l40 104 55-190 55 204 65-278 75 274 48-160 52 162 55-230 82 294z'/%3E%3C/g%3E%3C/svg%3E") bottom/cover no-repeat; }
.story-copy p { color: var(--muted); font-size: 1.03rem; }
.story-points { display: grid; gap: 14px; margin-top: 30px; }
.story-point { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; padding-top: 14px; border-top: 1px solid var(--line); }
.story-point b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--forest); color: white; font-size: .72rem; }
.story-point strong { display: block; }
.story-point span { color: var(--muted); font-size: .9rem; }

.site-footer { padding: 60px 0 28px; background: linear-gradient(135deg, #e5f4ff, #f1ecff 62%, #fff2e9); color: var(--ink); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr .6fr .6fr; gap: 60px; margin-bottom: 60px; }
.footer-copy { color: #68778b; max-width: 480px; }
.footer-links { display: grid; align-content: start; gap: 10px; }
.footer-links strong { color: var(--sun); text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; margin-bottom: 6px; }
.footer-links a { color: #52657d; text-decoration: none; font-size: .9rem; }
.footer-bottom { padding-top: 24px; border-top: 1px solid var(--line); color: #7a8798; font-size: .78rem; display: flex; justify-content: space-between; gap: 20px; }

/* Topics index */
.page-hero { padding: 82px 0 72px; color: var(--ink); background: radial-gradient(circle at 82% 10%, rgba(102,199,214,.26), transparent 25%), linear-gradient(135deg, #eef9ff, #f1efff 65%, #fff5eb); }
.page-hero h1 { font-size: clamp(3rem, 6vw, 5.8rem); }
.page-hero p { color: #66768b; max-width: 620px; font-size: 1.05rem; }
.catalog-tools { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; margin-bottom: 34px; }
.search { position: relative; max-width: 520px; }
.search input { padding-left: 44px; }
.search::before { content: "⌕"; position: absolute; left: 16px; top: 8px; font-size: 1.25rem; color: var(--muted); z-index: 2; }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-btn { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 8px 13px; color: var(--muted); font-size: .82rem; }
.filter-btn.active { background: var(--forest); color: white; border-color: var(--forest); }
.catalog-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.catalog-card { min-height: 190px; padding: 20px; display: flex; flex-direction: column; text-decoration: none; background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 16px; transition: .2s; }
.catalog-card:hover { background: white; transform: translateY(-3px); box-shadow: 0 14px 36px rgba(23,40,33,.08); }
.catalog-card .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--card); margin-bottom: 24px; }
.catalog-card h3 { font-size: 1.45rem; margin-top: auto; }
.catalog-card p { margin: 0; color: var(--muted); font-size: .84rem; }
.empty { grid-column: 1/-1; padding: 60px; text-align: center; color: var(--muted); }

/* Theme page */
.theme-hero { color: var(--ink); background: radial-gradient(circle at 82% 16%, rgba(99,194,211,.24), transparent 28%), linear-gradient(135deg, #eef9ff 0%, color-mix(in srgb, var(--theme, #8298d1) 18%, #f7f3ff) 62%, #fff5eb 100%); position: relative; overflow: hidden; }
.theme-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.32), transparent 72%); }
.theme-hero::after { content: ""; position: absolute; width: 520px; height: 520px; border: 1px solid rgba(53,111,172,.15); border-radius: 50%; right: -80px; top: -190px; box-shadow: 0 0 0 80px rgba(255,255,255,.16), 0 0 0 160px rgba(255,255,255,.1); }
.breadcrumb { display: flex; gap: 8px; color: #6c7c90; font-size: .8rem; margin-bottom: 42px; }
.breadcrumb a { text-decoration: none; }
.theme-hero-inner { min-height: 520px; padding: 54px 0 72px; position: relative; z-index: 2; display: grid; grid-template-columns: 1fr .4fr; align-items: end; gap: 70px; }
.theme-hero h1 { font-size: clamp(4rem, 9vw, 8.8rem); }
.theme-lead { max-width: 670px; font-family: Georgia, serif; font-size: clamp(1.25rem,2vw,1.7rem); color: #596a80; line-height: 1.35; }
.theme-number { font-family: Georgia, serif; font-size: 8rem; line-height: .8; color: rgba(53,111,172,.13); text-align: right; }
.theme-layout { display: grid; grid-template-columns: minmax(0,1fr) 410px; gap: 70px; align-items: start; }
.theme-layout > * { min-width: 0; }
.theme-content > section { padding: 0 0 60px; margin-bottom: 60px; border-bottom: 1px solid var(--line); }
.theme-content h2 { font-size: clamp(2.2rem,4vw,3.5rem); }
.theme-content p { color: var(--muted); font-size: 1.03rem; }
.pullquote { margin: 34px 0; padding: 24px 0 24px 28px; border-left: 2px solid var(--theme); font-family: Georgia, serif; font-size: 1.5rem; line-height: 1.35; }
.root-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-top: 24px; }
.root-item { display: grid; grid-template-columns: minmax(82px, .55fr) 1.45fr; align-items: start; gap: 16px; padding: 16px; border-radius: 12px; background: white; border: 1px solid var(--line); }
.root-item strong { font-family: Georgia, serif; font-size: 1.1rem; }
.root-item span { color: var(--muted); font-size: .78rem; }
.writing-prompt { margin: 28px 0 22px; padding: 20px 22px; border-left: 3px solid var(--theme); border-radius: 0 14px 14px 0; background: color-mix(in srgb, var(--theme) 7%, white); }
.writing-prompt strong { display: block; margin-bottom: 5px; color: var(--forest); text-transform: uppercase; letter-spacing: .09em; font-size: .7rem; }
.writing-prompt p { margin: 0; color: var(--ink); font-family: Georgia, serif; font-size: 1.16rem; line-height: 1.45; }
.ending-block { margin-top: 24px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-2); }
.ending-block > strong { display: block; margin-bottom: 12px; font-size: .86rem; }
.ending-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ending-row code { padding: 5px 9px; border-radius: 999px; background: white; color: var(--forest); border: 1px solid var(--line); font-size: .8rem; }
.theme-content a { color: var(--forest); font-weight: 680; text-underline-offset: 3px; }
.arc-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 28px; counter-reset: arc; }
.arc-card { min-height: 180px; padding: 20px; background: var(--paper-2); border-radius: 14px; }
.arc-card::before { counter-increment: arc; content: "0" counter(arc); color: var(--forest); font-size: .72rem; font-weight: 760; letter-spacing: .1em; }
.arc-card strong { display: block; margin: 28px 0 8px; }
.arc-card span { color: var(--muted); font-size: .86rem; }
.sticky-generator { position: sticky; top: 24px; }
.sticky-generator .generator { box-shadow: var(--shadow); border: 1px solid var(--line); }
.sticky-generator .form-grid { grid-template-columns: 1fr; }
.mood-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.mood-row span { padding: 7px 11px; background: color-mix(in srgb, var(--theme) 10%, white); color: var(--ink); border-radius: 999px; font-size: .8rem; }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.related-card { color: var(--ink); min-height: 180px; border-radius: 15px; padding: 18px; text-decoration: none; display: flex; flex-direction: column; background: linear-gradient(145deg, color-mix(in srgb, var(--card) 22%, white), color-mix(in srgb, var(--card) 34%, #f2f8ff)); border: 1px solid rgba(53,111,172,.1); }
.related-card strong { margin-top: auto; font-family: Georgia, serif; font-size: 1.35rem; }
.related-card span { color: #6b798b; font-size: .78rem; }

/* Information and policy pages */
.legal-hero {
  padding: 58px 0 76px;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 20%, rgba(102, 199, 214, .24), transparent 28%),
    radial-gradient(circle at 64% 90%, rgba(255,181,166,.22), transparent 28%),
    linear-gradient(135deg, #eff9ff, #f3f0ff 68%, #fff6ec);
}
.legal-hero .breadcrumb { margin-bottom: 56px; }
.legal-hero h1 { font-size: clamp(3.2rem, 6vw, 6rem); max-width: 900px; }
.legal-hero > .wrap > p:last-child { max-width: 760px; color: #627287; font-size: 1.08rem; }
.legal-section { padding: 86px 0 110px; }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 84px; justify-content: center; align-items: start; }
.legal-nav { position: sticky; top: 28px; display: grid; gap: 9px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.legal-nav strong { margin-bottom: 8px; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; }
.legal-nav a { color: var(--muted); text-decoration: none; font-size: .84rem; line-height: 1.35; }
.legal-nav a:hover, .legal-nav a:focus { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.legal-content > section { scroll-margin-top: 28px; padding-bottom: 48px; margin-bottom: 48px; border-bottom: 1px solid var(--line); }
.legal-content > section:last-child { margin-bottom: 0; }
.legal-content h2 { font-size: clamp(2rem, 3.5vw, 3rem); margin-bottom: 22px; }
.legal-content h3 { margin: 28px 0 8px; font-family: inherit; font-size: 1rem; font-weight: 760; letter-spacing: 0; }
.legal-content p, .legal-content li { color: #596a7f; }
.legal-content ul { margin: 18px 0; padding-left: 22px; }
.legal-content li + li { margin-top: 9px; }
.legal-content a { color: var(--forest); font-weight: 680; text-underline-offset: 3px; }
.legal-note { margin: 26px 0; padding: 22px 24px; border: 1px solid rgba(53,111,172,.18); border-radius: 16px; background: linear-gradient(135deg, rgba(234,247,255,.9), rgba(245,240,255,.82)); }
.legal-note strong { display: block; font-family: Georgia, serif; font-size: 1.25rem; font-weight: 500; }
.legal-note p { margin-bottom: 0; }
.data-row { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: start; margin: 22px 0; padding: 18px; border-radius: 13px; background: var(--paper-2); }
.data-row code { color: var(--forest); font-weight: 760; overflow-wrap: anywhere; }
.data-row span { color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 100; background: #2e5378; color: white; padding: 10px 16px; border-radius: 999px; font-size: .84rem; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

/* Saved names */
body.panel-open { overflow: hidden; }
.favorites-layer { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: 1fr min(430px, 94vw); }
.favorites-layer[hidden] { display: none; }
.favorites-backdrop { grid-column: 1; border: 0; background: rgba(24, 43, 66, .38); backdrop-filter: blur(3px); }
.favorites-panel { grid-column: 2; height: 100dvh; overflow-y: auto; padding: 30px; color: var(--ink); background: white; box-shadow: -24px 0 70px rgba(35, 50, 74, .18); }
.favorites-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.favorites-head h2 { margin: 0; font-size: 2.4rem; }
.favorites-head .eyebrow { margin-bottom: 8px; }
.favorites-intro { color: var(--muted); font-size: .9rem; }
.favorites-list { display: grid; gap: 9px; margin: 24px 0; }
.favorite-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper-2); }
.favorite-item strong { font-family: Georgia, serif; font-size: 1.2rem; font-weight: 500; }
.favorites-empty { margin: 34px 0; padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.favorites-empty[hidden], .clear-favorites[hidden] { display: none; }
.clear-favorites { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; color: #8a3030; background: #fff8f7; font-weight: 700; }

@media (max-width: 1000px) {
  .hero-inner, .story-grid, .theme-layout { grid-template-columns: 1fr; }
  .hero-inner { gap: 44px; padding-top: 60px; }
  .hero-copy { max-width: 740px; }
  .generator { max-width: 680px; }
  .category-grid, .catalog-grid { grid-template-columns: repeat(2,1fr); }
  .theme-hero-inner { grid-template-columns: 1fr; }
  .theme-number { display: none; }
  .sticky-generator { position: static; order: -1; }
  .legal-layout { grid-template-columns: 1fr; gap: 38px; }
  .legal-nav { position: static; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .legal-nav strong { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  body { overflow-x: hidden; }
  .wrap { width: min(100% - 26px, 1180px); }
  .site-header { height: 64px; }
  .menu-toggle { display: grid; }
  .nav-links { display: none; position: absolute; top: 52px; left: 0; right: 0; padding: 14px; align-items: stretch; gap: 5px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.98); box-shadow: var(--shadow); }
  .nav-links.open { display: grid; }
  .nav-links a, .nav-favorites { width: 100%; padding: 11px 12px; text-align: left; border-radius: 10px; }
  .nav-links a:hover, .nav-favorites:hover { background: var(--paper-2); }
  .nav-cta { padding: 10px 12px; }
  .hero-inner { min-height: auto; padding: 50px 0 60px; }
  h1 { font-size: 3.2rem; }
  .generator { padding: 20px; border-radius: 20px; }
  .sticky-generator { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .section { padding: 72px 0; }
  .section-head { display: block; }
  .featured-grid, .related-grid, .arc-grid { grid-template-columns: 1fr; }
  .category-grid, .catalog-grid { grid-template-columns: 1fr; }
  .story-grid { gap: 42px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { display: block; }
  .catalog-tools { grid-template-columns: 1fr; }
  .theme-hero-inner { min-height: 430px; padding-top: 34px; }
  .theme-hero h1 { font-size: 3.8rem; }
  .root-grid { grid-template-columns: 1fr; }
  .theme-content > section { padding-bottom: 42px; margin-bottom: 42px; }
  .legal-hero { padding: 34px 0 56px; }
  .legal-hero .breadcrumb { margin-bottom: 42px; }
  .legal-section { padding: 62px 0 82px; }
  .legal-nav { grid-template-columns: 1fr; }
  .data-row { grid-template-columns: 1fr; gap: 6px; }
  .favorites-layer { grid-template-columns: 1fr; }
  .favorites-backdrop { display: none; }
  .favorites-panel { grid-column: 1; padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
