/* ==========================================================================
   WEB STYLE — App stylesheet
   Premium, minimal, editorial. System fonts only. No network dependencies.
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --text: rgba(20, 18, 14, 0.92);
  --text-strong: #14120e;
  --muted: rgba(20, 18, 14, 0.62);
  --faint: rgba(20, 18, 14, 0.42);
  --rule: rgba(20, 18, 14, 0.12);
  --rule-strong: rgba(20, 18, 14, 0.2);
  --fill: rgba(20, 18, 14, 0.04);
  --fill-strong: rgba(20, 18, 14, 0.07);
  --accent: #8a5a2b;
  --accent-strong: #6e4620;
  --accent-contrast: #fffaf2;
  --danger: #a13c3c;
  --shadow: 0 1px 2px rgba(20,18,14,.04), 0 8px 24px -12px rgba(20,18,14,.14);
  --radius-sm: 3px;
  --radius: 6px;
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', 'Noto Serif', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
  --maxw: 1180px;
}

/* Theme is explicit-only — set via data-theme on <html> by js/app.js.
   Light is always the first-launch default; dark only ever applies once
   the user has actively chosen it (and is then remembered). We do NOT
   read prefers-color-scheme here, so OS/browser dark mode never silently
   overrides the app's first-visit appearance. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131110;
  --surface: #1b1917;
  --surface-raised: #211e1b;
  --text: rgba(250, 248, 244, 0.92);
  --text-strong: #faf8f4;
  --muted: rgba(250, 248, 244, 0.62);
  --faint: rgba(250, 248, 244, 0.42);
  --rule: rgba(250, 248, 244, 0.14);
  --rule-strong: rgba(250, 248, 244, 0.22);
  --fill: rgba(250, 248, 244, 0.06);
  --fill-strong: rgba(250, 248, 244, 0.1);
  --accent: #d3a15c;
  --accent-strong: #e7b876;
  --accent-contrast: #1b1300;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--sans);
  overflow-x: hidden;
  min-height: 100vh;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--text-strong); margin: 0; line-height: 1.2; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  background: var(--text-strong); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font: 700 12px/1 var(--sans); letter-spacing: .04em;
}
.brand-text { font: 600 17px/1 var(--serif); letter-spacing: .01em; color: var(--text-strong); }
.topnav { display: flex; gap: 4px; }
.topnav a {
  padding: 8px 14px; border-radius: var(--radius-sm); font-size: 14px; color: var(--muted);
  transition: background .15s, color .15s;
}
.topnav a:hover { background: var(--fill); color: var(--text); }
.topnav a.active { color: var(--text-strong); background: var(--fill-strong); font-weight: 600; }

.nav-toggle {
  display: none; width: 36px; height: 36px; border: none; background: transparent;
  cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--text); display: block; border-radius: 2px; }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px;
  border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--surface);
  cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.theme-toggle:hover { border-color: var(--text); color: var(--text); }
.theme-toggle svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: inline-flex; align-items: center; gap: 7px; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.header-controls { display: flex; align-items: center; gap: 10px; }

@media (max-width: 760px) {
  .topnav {
    position: fixed; top: 61px; left: 0; right: 0; z-index: 39;
    background: var(--surface); border-bottom: 1px solid var(--rule);
    flex-direction: column; padding: 8px; gap: 2px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform .16s ease, opacity .16s ease;
  }
  .topnav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .topnav a { padding: 12px 14px; font-size: 15px; }
  .nav-toggle { display: flex; }
}

/* ---------- Layout shell ---------- */
#app { max-width: var(--maxw); margin: 0 auto; padding: 0 24px 64px; }
.view { animation: fadein .18s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: none; } }

/* ---------- Home ---------- */
.hero { padding: 64px 0 40px; text-align: center; max-width: 640px; margin: 0 auto; }
.hero .eyebrow {
  font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px; display: block;
}
.hero h1 { font-size: clamp(28px, 5vw, 42px); margin-bottom: 14px; }
.hero p.lede { font-size: 17px; color: var(--muted); line-height: 1.6; margin-bottom: 28px; }
.hero-stats { display: flex; justify-content: center; gap: 28px; margin: 28px 0 32px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font: 600 26px/1 var(--serif); color: var(--text-strong); }
.hero-stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: 600 14px/1 var(--sans); cursor: pointer; transition: transform .12s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--text-strong); color: var(--bg); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-accent { background: var(--accent); color: var(--accent-contrast); }
.btn-accent:hover { background: var(--accent-strong); }
.btn-outline { background: transparent; border-color: var(--rule-strong); color: var(--text); }
.btn-outline:hover { background: var(--fill); border-color: var(--text); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn[disabled] { opacity: .6; cursor: default; }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 56px 0 20px; }
.section-heading h2 { font-size: 22px; }
.section-heading .sub { color: var(--muted); font-size: 14px; }

.family-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 900px) { .family-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .family-grid { grid-template-columns: 1fr; } }

.family-card {
  display: block; padding: 22px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s;
  cursor: pointer;
}
.family-card:hover { border-color: var(--rule-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.family-card .fam-num { font: 600 12px/1 var(--mono); color: var(--accent); letter-spacing: .04em; }
.family-card h3 { font-size: 18px; margin: 8px 0 6px; }
.family-card p { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.family-card .fam-count { display: inline-block; margin-top: 12px; font-size: 12px; color: var(--faint); }

.recent-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.recent-chip {
  flex: 0 0 auto; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 999px;
  font-size: 13px; background: var(--surface); white-space: nowrap; cursor: pointer;
}
.recent-chip:hover { border-color: var(--rule-strong); background: var(--fill); }
.recent-chip .num { color: var(--accent); font-family: var(--mono); font-size: 11.5px; margin-right: 6px; }

.empty-state { padding: 40px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--rule-strong); border-radius: var(--radius); }
.empty-state p { margin-bottom: 12px; }

/* ---------- Explore toolbar ---------- */
.explore-head { padding-top: 40px; margin-bottom: 24px; }
.explore-head h1 { font-size: 30px; margin-bottom: 8px; }
.explore-head p { color: var(--muted); }

.toolbar { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; position: sticky; top: 61px; background: var(--bg); padding: 14px 0; z-index: 10; border-bottom: 1px solid transparent; }
.toolbar.stuck { border-bottom-color: var(--rule); }

.search-row { position: relative; }
.search-input {
  width: 100%; padding: 13px 16px 13px 42px; border-radius: var(--radius); border: 1px solid var(--rule-strong);
  background: var(--surface); color: var(--text); font-size: 15px; font-family: var(--sans);
}
.search-input:focus { outline: none; border-color: var(--accent); }
.search-row::before {
  content: ""; position: absolute; left: 15px; top: 50%; width: 15px; height: 15px; margin-top: -8px;
  border: 2px solid var(--faint); border-radius: 50%; box-sizing: border-box;
}
.search-row::after {
  content: ""; position: absolute; left: 25px; top: 50%; width: 8px; height: 2px; margin-top: 5px;
  background: var(--faint); transform: rotate(45deg); transform-origin: left center;
}

.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--surface);
  font-size: 12.5px; color: var(--muted); cursor: pointer; transition: all .12s;
}
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.active { background: var(--text-strong); border-color: var(--text-strong); color: var(--bg); font-weight: 600; }

.results-count { font-size: 13px; color: var(--faint); margin: -8px 0 18px; }

.style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 980px) { .style-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .style-grid { grid-template-columns: 1fr; } }

.style-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 18px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface);
  cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.style-card:hover { border-color: var(--rule-strong); box-shadow: var(--shadow); transform: translateY(-1px); }

/* Card header: number on the left; family label + favorite control grouped
   on the right, each with their own reserved space so neither can overlap
   or clip the other — no absolute positioning, no truncation. */
.style-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.style-num { flex: 0 0 auto; font: 600 11.5px/1.3 var(--mono); color: var(--accent); letter-spacing: .03em; padding-top: 3px; }
.style-card-top-right { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.style-fam-tag {
  flex: 0 1 auto; min-width: 0; padding-top: 3px;
  font-size: 10.5px; line-height: 1.35; text-transform: uppercase; letter-spacing: .06em; color: var(--faint);
  text-align: right; white-space: normal; word-break: normal; overflow-wrap: normal;
}
.style-card h3 { font-size: 16.5px; margin: 0; }
.style-personality { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.style-mechanic { font-size: 12px; color: var(--text); background: var(--fill); border-radius: var(--radius-sm); padding: 8px 10px; line-height: 1.5; }
.style-mechanic b { color: var(--accent); font-weight: 600; }
.style-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.view-link { font-size: 12.5px; font-weight: 600; color: var(--text-strong); }

.fav-btn {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--rule-strong); background: var(--surface); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.fav-btn:hover { border-color: var(--accent); }
.fav-btn svg { width: 13px; height: 13px; }
.fav-btn .star-fill { fill: none; stroke: var(--faint); stroke-width: 1.6; }
.fav-btn.is-fav .star-fill { fill: var(--accent); stroke: var(--accent); }

/* ---------- Style detail ---------- */
.detail-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 28px 0 20px; }
.detail-back:hover { color: var(--text); }

.detail-head { padding-bottom: 28px; border-bottom: 1px solid var(--rule); margin-bottom: 28px; }
.detail-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.detail-num { font: 600 13px/1 var(--mono); color: var(--accent); letter-spacing: .04em; margin-bottom: 10px; display: block; }
.detail-head h1 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 6px; }
.detail-fam-link { font-size: 13.5px; color: var(--muted); }
.detail-fam-link:hover { color: var(--accent); }

.detail-fav {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--rule-strong); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600;
  flex: 0 0 auto;
}
.detail-fav.is-fav { border-color: var(--accent); color: var(--accent-strong); }
.detail-fav svg { width: 14px; height: 14px; }
.detail-fav .star-fill { fill: none; stroke: var(--faint); stroke-width: 1.6; }
.detail-fav.is-fav .star-fill { fill: var(--accent); stroke: var(--accent); }

.snapshot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
@media (max-width: 760px) { .snapshot-grid { grid-template-columns: 1fr; gap: 16px; } }
.snapshot-item .label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 6px; }
.snapshot-item .value { font-size: 14.5px; line-height: 1.55; }
.snapshot-item.personality .value { font-style: italic; color: var(--text); }
.snapshot-item.mechanic .value { color: var(--accent-strong); font-weight: 600; }

/* Master instruction block */
.instruction-block {
  margin: 36px 0 40px; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--surface-raised); overflow: hidden; box-shadow: var(--shadow);
}
.instruction-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; background: var(--fill-strong); border-bottom: 1px solid var(--rule);
}
.instruction-head h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; font-family: var(--sans); font-weight: 700; }
.instruction-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.instruction-body { padding: 22px 24px; }
.instruction-body p { font-family: var(--mono); font-size: 13.5px; line-height: 1.75; white-space: pre-wrap; color: var(--text); }
.instruction-foot { padding: 14px 24px 20px; border-top: 1px solid var(--rule); }
.instruction-foot .hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.copy-btn { display: inline-flex; align-items: center; gap: 8px; min-width: 168px; justify-content: center; }
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn.copied { background: #3f7a4d; }

/* Expandable detail sections */
.detail-sections { display: flex; flex-direction: column; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin-bottom: 40px; }
.detail-section { background: var(--surface); }
.detail-section summary {
  list-style: none; cursor: pointer; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
  font: 600 14px/1 var(--sans); color: var(--text-strong);
}
.detail-section summary::-webkit-details-marker { display: none; }
.detail-section summary .chev { width: 10px; height: 10px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(-45deg); transition: transform .15s; }
.detail-section[open] summary .chev { transform: rotate(45deg); }
.detail-section .section-body { padding: 0 20px 20px; font-size: 14.5px; line-height: 1.7; color: var(--text); max-width: 72ch; }
.detail-section.avoid .section-body { color: var(--danger); }

.detail-nextsteps { padding: 24px; border-radius: var(--radius); background: var(--fill); margin-bottom: 40px; }
.detail-nextsteps h3 { font-size: 15px; margin-bottom: 10px; }
.detail-nextsteps ol { display: flex; flex-direction: column; gap: 6px; counter-reset: steps; margin: 0; padding: 0; list-style: none; }
.detail-nextsteps li { font-size: 13.5px; color: var(--muted); padding-left: 22px; position: relative; }
.detail-nextsteps li::before { counter-increment: steps; content: counter(steps); position: absolute; left: 0; top: 0; font: 600 11px/1.4 var(--mono); color: var(--accent); }

/* ---------- Favorites / Help pages ---------- */
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: 30px; margin-bottom: 8px; }
.page-head p { color: var(--muted); max-width: 60ch; }

.help-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 32px 0 44px; }
@media (max-width: 900px) { .help-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .help-steps { grid-template-columns: 1fr; } }
.help-step { padding: 18px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.help-step .n { font: 700 22px/1 var(--serif); color: var(--accent); margin-bottom: 10px; }
.help-step h4 { font-size: 14px; margin-bottom: 6px; font-family: var(--sans); }
.help-step p { font-size: 12.5px; color: var(--muted); line-height: 1.55; }

.callout {
  border: 1px solid var(--rule-strong); border-left: 3px solid var(--accent); border-radius: var(--radius);
  padding: 18px 20px; margin: 0 0 16px; background: var(--surface);
}
.callout p { font-size: 14px; line-height: 1.65; }
.callout p + p { margin-top: 10px; }
.callout strong { color: var(--text-strong); }

.boundary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0 44px; }
@media (max-width: 700px) { .boundary-grid { grid-template-columns: 1fr; } }
.boundary-card { padding: 20px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.boundary-card h4 { font-family: var(--sans); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.boundary-card ul { display: flex; flex-direction: column; gap: 7px; }
.boundary-card li { font-size: 13.5px; padding-left: 16px; position: relative; }
.boundary-card.no li::before { content: "–"; position: absolute; left: 0; color: var(--faint); }
.boundary-card.yes li::before { content: "–"; position: absolute; left: 0; color: var(--accent); }

/* ---------- Create Style Instruction ---------- */
.create-head { padding: 40px 0 8px; }
.create-head h1 { font-size: 30px; margin-bottom: 8px; }
.create-head p { color: var(--muted); max-width: 60ch; }

.selected-style-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 22px; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--surface); margin: 24px 0 32px;
}
.selected-style-card .label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 8px; }
.selected-style-card h2 { font-size: 20px; margin-bottom: 4px; }
.selected-style-card .meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.selected-style-card .mechanic { font-size: 13px; color: var(--accent-strong); font-weight: 600; }

.create-form { display: flex; flex-direction: column; gap: 20px; max-width: 680px; margin-bottom: 40px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field label { font: 600 13px/1 var(--sans); color: var(--text-strong); }
.form-field .optional-tag { font-weight: 400; color: var(--faint); margin-left: 4px; }
.form-field input[type="text"],
.form-field textarea,
.form-field select {
  padding: 11px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: 14.5px/1.5 var(--sans); width: 100%;
}
.form-field input[type="text"]:focus,
.form-field textarea:focus,
.form-field select:focus { outline: none; border-color: var(--accent); }
.form-field textarea { resize: vertical; min-height: 78px; }
.form-field .hint-text { font-size: 12px; color: var(--faint); }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.form-error { font-size: 12.5px; color: var(--danger); margin-top: -2px; }

.generated-wrap { max-width: 760px; margin-bottom: 48px; }
.generated-banner {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid var(--accent);
  margin-bottom: 20px; font-size: 14px; color: var(--accent-strong); font-weight: 600;
}
.generated-output {
  border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface-raised);
  overflow: hidden; box-shadow: var(--shadow);
}
.generated-output-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: var(--fill-strong); border-bottom: 1px solid var(--rule); }
.generated-output-head h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; font-family: var(--sans); font-weight: 700; }
.generated-output-body { padding: 22px 24px; max-height: 560px; overflow-y: auto; }
.generated-output-body pre { font-family: var(--mono); font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-wrap: break-word; color: var(--text); margin: 0; }
.generated-output-foot { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 24px 20px; border-top: 1px solid var(--rule); }

.create-note { font-size: 13px; color: var(--muted); margin-top: 18px; max-width: 60ch; line-height: 1.6; }
.create-note strong { color: var(--text-strong); }

/* ---------- Footer / toast ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 22px 24px; text-align: center; }
.site-footer p { font-size: 12.5px; color: var(--faint); max-width: 60ch; margin: 0 auto; }
.site-footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px);
  background: var(--text-strong); color: var(--bg); padding: 11px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
  z-index: 100; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Utility */
.mt-0 { margin-top: 0; }
@media (max-width: 480px) {
  .topbar-inner, #app { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 40px; }
  .theme-toggle .toggle-label { display: none; }
  .theme-toggle { padding: 8px; }
}
@media (max-width: 620px) {
  .selected-style-card { flex-direction: column; align-items: flex-start; }
  .generated-output-body { max-height: 420px; }
}
