/* =========================================================
   tattoodesigns.ai — UI framework (home + style + tool + topic pages)
   Visual language: clean white gallery (images carry the colour), near-black
   text and actions, one tattoo-red accent, bold condensed display type.
   ========================================================= */

/* ---------- 1. Tokens ----------
   Two schemes. .scheme-dark is used only for the single black promo band and
   for dark mode; .scheme-light puts a light card back inside it. */
:root, .scheme-light {
  --bg: #FFFFFF;               /* clean gallery canvas — images carry the colour */
  --bg-elev: #FFFFFF;
  --bg-sunken: #F4F4F5;
  --bg-hover: rgba(0, 0, 0, .04);
  --bg-active: rgba(0, 0, 0, .07);
  --paper: #F3F3F4;            /* image card / design sheet */
  --paper-ink: #111111;
  --fg: #2B2B2E;
  --fg-strong: #0E0E10;
  --fg-muted: #6E6E73;
  --fg-faint: #A1A1A6;
  --fg-on-ink: #FFFFFF;
  --border: rgba(0, 0, 0, .09);
  --border-strong: rgba(0, 0, 0, .18);
  --ring: rgba(212, 39, 31, .35);
  --ink: #0E0E10;              /* primary action */
  --ink-hover: #2B2B2E;
  --accent: #D4271F;           /* tattoo red — one accent, used sparingly */
  --accent-hover: #B51F18;
  --accent-soft: rgba(212, 39, 31, .08);
  --on-accent: #FFFFFF;
  --live: var(--accent); --live-soft: var(--accent-soft);
  --ok: #1F8A4C; --ok-soft: rgba(31, 138, 76, .1);
  --warn: #B7791F; --accent-red: var(--accent);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-sm: 0 0 0 1px var(--border);
  --shadow-md: 0 0 0 1px var(--border), 0 10px 28px -14px rgba(0, 0, 0, .18);
  --shadow-lg: 0 0 0 1px var(--border), 0 24px 60px -24px rgba(0, 0, 0, .28);
  color-scheme: light;
}
.scheme-dark {
  --bg: #0B0B0C; --bg-elev: #161618; --bg-sunken: #050506;
  --bg-hover: rgba(255, 255, 255, .06); --bg-active: rgba(255, 255, 255, .1);
  --paper: #F3F3F4; --paper-ink: #111111;
  --fg: #D4D4D8; --fg-strong: #FFFFFF; --fg-muted: #8E8E93; --fg-faint: #5C5C61; --fg-on-ink: #0E0E10;
  --border: rgba(255, 255, 255, .1); --border-strong: rgba(255, 255, 255, .2); --ring: rgba(255, 90, 80, .5);
  --ink: #FFFFFF; --ink-hover: #E4E4E7;
  --accent: #FF4A3F; --accent-hover: #FF6A60; --accent-soft: rgba(255, 74, 63, .14); --on-accent: #FFFFFF;
  --live: var(--accent); --live-soft: var(--accent-soft); --ok: #5BC388; --ok-soft: rgba(91, 195, 136, .14); --accent-red: var(--accent);
  --shadow-sm: 0 0 0 1px var(--border);
  --shadow-md: 0 0 0 1px var(--border), 0 12px 32px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 0 0 1px var(--border), 0 24px 64px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
:root[data-theme="dark"], :root[data-theme="dark"] .scheme-light, :root[data-theme="dark"] .scheme-dark {
  --bg: #262624; --bg-elev: #30302E; --bg-sunken: #1F1E1D;
  --bg-hover: rgba(240, 238, 230, .06); --bg-active: rgba(240, 238, 230, .1);
  --paper: #EDEBE4; --paper-ink: #1F1E1D;
  --fg: #D9D7CF; --fg-strong: #FAF9F5; --fg-muted: #A6A39A; --fg-faint: #75736C; --fg-on-ink: #1F1E1D;
  --border: rgba(222, 220, 209, .12); --border-strong: rgba(222, 220, 209, .24); --ring: rgba(226, 98, 74, .5);
  --ink: #ECEAE3; --ink-hover: #FAF9F5;
  --accent: #E2624A; --accent-hover: #EA7A64; --accent-soft: rgba(226, 98, 74, .15); --on-accent: #FFFFFF;
  --live: var(--accent); --live-soft: var(--accent-soft); --ok: #7DBE8E; --ok-soft: rgba(125, 190, 142, .14); --warn: #D9A64E; --accent-red: var(--accent);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);
  --shadow-sm: 0 0 0 1px var(--border);
  --shadow-md: 0 0 0 1px var(--border), 0 12px 32px -14px rgba(0, 0, 0, .5);
  --shadow-lg: 0 0 0 1px var(--border), 0 24px 64px -24px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]), :root:not([data-theme="light"]) .scheme-light, :root:not([data-theme="light"]) .scheme-dark {
    --bg: #262624; --bg-elev: #30302E; --bg-sunken: #1F1E1D;
    --bg-hover: rgba(240, 238, 230, .06); --bg-active: rgba(240, 238, 230, .1);
    --paper: #EDEBE4; --paper-ink: #1F1E1D;
    --fg: #D9D7CF; --fg-strong: #FAF9F5; --fg-muted: #A6A39A; --fg-faint: #75736C; --fg-on-ink: #1F1E1D;
    --border: rgba(222, 220, 209, .12); --border-strong: rgba(222, 220, 209, .24); --ring: rgba(226, 98, 74, .5);
    --ink: #ECEAE3; --ink-hover: #FAF9F5;
    --accent: #E2624A; --accent-hover: #EA7A64; --accent-soft: rgba(226, 98, 74, .15); --on-accent: #FFFFFF;
    --live: var(--accent); --live-soft: var(--accent-soft); --ok: #7DBE8E; --ok-soft: rgba(125, 190, 142, .14); --warn: #D9A64E; --accent-red: var(--accent);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);
    --shadow-sm: 0 0 0 1px var(--border);
    --shadow-md: 0 0 0 1px var(--border), 0 12px 32px -14px rgba(0, 0, 0, .5);
    --shadow-lg: 0 0 0 1px var(--border), 0 24px 64px -24px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
.scheme-light, .scheme-dark { color: var(--fg); }
.scheme-dark { background: var(--bg); }

:root {
  /* type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Oswald", "Arial Narrow", "Helvetica Neue Condensed", Impact, sans-serif;  /* display type (name kept for compatibility) */
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* radius */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-full: 999px;

  /* layout */
  --container: 1120px;
  --container-wide: 1260px;
  --container-prose: 720px;
  --gutter: 24px;
  --nav-h: 64px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--ink); color: var(--fg-on-ink); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
/* ---- Front-end standards: every interactive element says so to the pointer, the keyboard and touch ---- */
a[href], button, summary, select, label[for], [role=button], [role=tab], [role=switch], [role=menuitem], [role=option], [role=radio], [role=checkbox],
input[type=checkbox], input[type=radio], input[type=file], input[type=submit], input[type=button], input[type=color], [data-href], [tabindex]:not([tabindex="-1"]) { cursor: pointer; }
input[type=text], input[type=search], input[type=email], input[type=number], input[type=url], input:not([type]), textarea { cursor: text; }
input[type=range] { cursor: grab; } input[type=range]:active { cursor: grabbing; }
button:disabled, button[aria-disabled=true], [role=button][aria-disabled=true], input:disabled, select:disabled, textarea:disabled, a[aria-disabled=true] { cursor: not-allowed; }
[aria-busy=true], .is-loading { cursor: progress; }
a, button, summary, [role=button], [role=tab], label, input, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus:not(:focus-visible) { outline: none; }
button, [role=button], [role=tab], summary { user-select: none; -webkit-user-select: none; }
img { -webkit-user-drag: none; }
img:not([src]), img[src=""] { visibility: hidden; }
/* 24 px minimum touch targets for small text links (footer legal row, breadcrumbs, A–Z lists) */
.footer-legal a, .breadcrumb a, .az a, .footer-bottom a { display: inline-flex; align-items: center; min-height: 24px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 3. Type ---------- */
.display {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.05;
  color: var(--fg-strong);
}
.display-xl { font-size: clamp(44px, 6.4vw, 76px); }
.display-lg { font-size: clamp(36px, 4.8vw, 56px); }
.display-md { font-size: clamp(30px, 3.6vw, 42px); }
.display-sm { font-size: clamp(24px, 2.6vw, 30px); }
.display em { font-style: italic; color: var(--fg-muted); }
.h3 { font-size: 17px; font-weight: 600; color: var(--fg-strong); letter-spacing: -.005em; line-height: 1.35; }
.h4 { font-size: 15px; font-weight: 600; color: var(--fg-strong); }
.lead { font-size: 17px; line-height: 1.6; color: var(--fg-muted); }
.muted { color: var(--fg-muted); }
.faint { color: var(--fg-faint); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fg-muted);
}
.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  border: 1px solid var(--border); border-radius: 5px;
  font: 500 11px/1 var(--font-sans); color: var(--fg-muted); background: var(--bg-elev);
}

/* ---------- 4. Layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { width: 100%; max-width: calc(var(--container-wide) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container-prose { width: 100%; max-width: calc(var(--container-prose) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 112px 0; }
.section-sm { padding: 72px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head .lead { max-width: 520px; margin-top: 12px; }
.center { text-align: center; }
.stack-xs > * + * { margin-top: 6px; }
.stack-sm > * + * { margin-top: 12px; }
.stack > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: 32px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .section-sm { padding: 48px 0; }
}
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ---------- 5. Icons & logo ---------- */
.i { width: 18px; height: 18px; flex: none; display: inline-block; }
.i svg { width: 100%; height: 100%; }
.i-sm { width: 15px; height: 15px; }
.i-lg { width: 22px; height: 22px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-strong); }
.logo-mark { width: 26px; height: 26px; }
.logo-word { font-family: var(--font-serif); font-size: 24px; letter-spacing: -.01em; line-height: 1; }
.logo-word span { color: var(--fg-faint); }

/* ---------- 6. Buttons ---------- */
.btn {
  --h: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 16px;
  border-radius: var(--r-full);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .15s var(--ease), color .15s, box-shadow .15s, transform .1s;
  user-select: none;
}
.btn:active { transform: scale(.98); }
.btn-sm { --h: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { --h: 46px; padding: 0 22px; font-size: 15px; }
.btn-primary { background: var(--ink); color: var(--fg-on-ink); }
.btn-primary:hover { background: var(--ink-hover); }
.btn-secondary { background: var(--bg-elev); color: var(--fg-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--bg-sunken); }
.btn-ghost { color: var(--fg); }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.btn[aria-busy=true]:disabled { opacity: .6; cursor: progress; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--r-full); color: var(--fg-muted);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--fg-strong); }
.icon-btn.outlined { box-shadow: inset 0 0 0 1px var(--border-strong); }
.icon-btn.solid { background: var(--ink); color: var(--fg-on-ink); }
.icon-btn.solid:hover { background: var(--ink-hover); }
.icon-btn:disabled, .icon-btn.solid:disabled { background: var(--bg-active); color: var(--fg-faint); cursor: not-allowed; }
.link { color: var(--fg-strong); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.link:hover { text-decoration-color: currentColor; }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; color: var(--fg-strong); }
.link-arrow .i { width: 15px; height: 15px; transition: transform .15s; }
.link-arrow:hover .i { transform: translateX(2px); }

/* ---------- 7. Chips, badges, tabs ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: var(--r-full); background: var(--bg-elev);
  box-shadow: inset 0 0 0 1px var(--border);
  font-size: 13px; color: var(--fg); white-space: nowrap;
  transition: background .15s, box-shadow .15s;
}
.chip:hover { background: var(--bg-sunken); box-shadow: inset 0 0 0 1px var(--border-strong); }
.chip .i { width: 15px; height: 15px; color: var(--fg-muted); }
.chip.is-active { background: var(--ink); color: var(--fg-on-ink); box-shadow: none; }
.chip.is-active .i { color: inherit; }
.chip-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.chip-flat { background: transparent; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: var(--r-full);
  background: var(--bg-sunken); color: var(--fg-muted);
  font-size: 12px; font-weight: 500;
}
.badge-live { background: var(--live-soft); color: var(--live); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-ink { background: var(--ink); color: var(--fg-on-ink); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dot-pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.announce {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 6px 0 6px; border-radius: var(--r-full);
  background: var(--bg-elev); box-shadow: var(--shadow-sm); font-size: 13px; color: var(--fg);
}
.announce .badge { height: 22px; }
.announce .i { width: 14px; height: 14px; color: var(--fg-muted); margin-right: 4px; }
.announce:hover { box-shadow: 0 0 0 1px var(--border-strong); }

.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-full); background: var(--bg-sunken); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  height: 32px; padding: 0 14px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 500; color: var(--fg-muted); white-space: nowrap;
  transition: background .15s, color .15s;
}
.tab:hover { color: var(--fg-strong); }
.tab.is-active { background: var(--bg-elev); color: var(--fg-strong); box-shadow: var(--shadow-sm); }
.tabs-line { display: flex; gap: 22px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs-line .tab { height: 40px; padding: 0; border-radius: 0; box-shadow: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs-line .tab.is-active { color: var(--fg-strong); border-color: var(--ink); box-shadow: none; }

/* ---------- 8. Composer (the core object) ---------- */
.composer {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  width: 100%;
  padding: 14px 14px 12px 18px;
  background: var(--bg-elev);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  text-align: left;
  transition: box-shadow .2s var(--ease);
}
.composer:focus-within { box-shadow: 0 0 0 1px var(--border-strong), 0 18px 48px -14px rgba(0,0,0,.16); }
.composer textarea {
  width: 100%; min-height: 56px; max-height: 240px; resize: none;
  border: 0; outline: 0; background: transparent; padding: 4px 0 0;
  font-size: 16px; line-height: 1.55; color: var(--fg-strong);
}
.composer textarea::placeholder { color: var(--fg-faint); }
.composer-bar { display: flex; align-items: center; gap: 6px; }
.composer-bar .chip { height: 32px; }
.composer-send { width: 34px; height: 34px; }
.composer-attachments { display: flex; gap: 8px; flex-wrap: wrap; }
.composer-attachments:empty { display: none; }
.attachment {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 4px 10px 4px 4px;
  border-radius: var(--r-sm); background: var(--bg-sunken); font-size: 12px;
}
.attachment .thumb { width: 36px; height: 36px; border-radius: 7px; }
.composer-sm { border-radius: var(--r-lg); padding: 10px 10px 10px 16px; }
.composer-sm textarea { min-height: 28px; font-size: 15px; }
.composer-hint { font-size: 12px; color: var(--fg-faint); text-align: center; margin-top: 10px; }
.composer-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }

/* popover menu (style / placement pickers) */
.menu {
  position: absolute; z-index: 40; min-width: 220px; padding: 6px;
  background: var(--bg-elev); border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  display: none;
}
.menu.is-open { display: block; animation: pop .14s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.menu-label { padding: 8px 10px 4px; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-faint); }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: 8px; font-size: 14px; text-align: left;
}
.menu-item:hover { background: var(--bg-hover); }
.menu-item .i { color: var(--fg-muted); }
.menu-item .check { margin-left: auto; opacity: 0; }
.menu-item.is-selected .check { opacity: 1; }
.menu-item small { display: block; color: var(--fg-muted); font-size: 12px; }

/* ---------- 9. Cards & art frames ---------- */
.card {
  background: var(--bg-elev); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 24px; }
.card-hover { transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.thumb {
  position: relative; overflow: hidden;
  aspect-ratio: 1 / 1; border-radius: var(--r-md);
  background: var(--paper); color: var(--paper-ink);
  --art-bg: var(--paper);
  display: grid; place-items: center;
}
.thumb > svg { width: 78%; height: 78%; }
.thumb-43 { aspect-ratio: 4 / 3; }
.thumb-34 { aspect-ratio: 3 / 4; }
.thumb-ink { background: #111111; color: #FFFFFF; --art-bg: #111111; }
.thumb-skin { background: radial-gradient(120% 90% at 30% 20%, #E9C9AE, #C99A79 70%, #B9876A); color: #2B2420; --art-bg: #D7AF92; }
.thumb-skin > svg { mix-blend-mode: multiply; opacity: .88; }
.thumb-grid { background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 20px 20px; background-color: var(--paper); }
.thumb .tag {
  position: absolute; left: 10px; top: 10px;
  height: 22px; padding: 0 8px; border-radius: var(--r-full);
  background: rgba(255,255,255,.92); color: #2B2B2E; font-size: 11px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 5px; backdrop-filter: blur(6px);
}

.case-card { display: flex; flex-direction: column; gap: 12px; padding: 10px 10px 16px; border-radius: var(--r-lg); background: var(--bg-elev); box-shadow: var(--shadow-sm); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.case-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.case-card .body { padding: 0 6px; }
.case-card .title { font-size: 15px; font-weight: 600; color: var(--fg-strong); line-height: 1.35; }
.case-card .desc { font-size: 13px; color: var(--fg-muted); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.case-card .meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--fg-faint); }
.case-card .meta .i { width: 13px; height: 13px; }

.feature { padding: 28px; border-radius: var(--r-lg); background: var(--bg-elev); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.feature .icon-wrap { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-sunken); color: var(--fg-strong); margin-bottom: 8px; }
.feature p { color: var(--fg-muted); font-size: 14px; }

/* ---------- 10. Site nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-nav.is-scrolled { border-bottom-color: var(--border); }
.site-nav .container-wide { height: 100%; display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { padding: 6px 12px; border-radius: var(--r-full); font-size: 14px; color: var(--fg); }
.nav-links a:hover { background: var(--bg-hover); color: var(--fg-strong); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-burger { display: none; }
.mobile-menu { display: none; }
@media (max-width: 860px) {
  .nav-links, .nav-actions .btn-ghost { display: none; }
  .nav-burger { display: inline-flex; }
  .mobile-menu.is-open {
    display: flex; flex-direction: column; gap: 2px;
    position: fixed; inset: var(--nav-h) 0 0 0; z-index: 49;
    padding: 16px var(--gutter); background: var(--bg);
  }
  .mobile-menu a { padding: 14px 4px; font-size: 18px; border-bottom: 1px solid var(--border); }
  .mobile-menu .btn { margin-top: 20px; }
}

/* ---------- 11. Hero ---------- */
.hero { padding: 88px 0 72px; text-align: center; }
.hero .display { margin: 26px auto 0; max-width: 900px; }
.hero .lead { margin: 18px auto 0; max-width: 560px; }
.hero-composer { max-width: 760px; margin: 40px auto 0; }
@media (max-width: 640px) { .hero { padding: 48px 0 40px; } }

/* ---------- 12. Breadcrumb, prose, tables, FAQ ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-muted); }
.breadcrumb a:hover { color: var(--fg-strong); }
.breadcrumb .i { width: 13px; height: 13px; color: var(--fg-faint); }

.prose { font-size: 16px; line-height: 1.75; color: var(--fg); }
.prose h2 { font-family: var(--font-serif); font-weight: 400; font-size: 34px; line-height: 1.15; color: var(--fg-strong); margin: 56px 0 16px; letter-spacing: -.01em; }
.prose h3 { font-size: 18px; font-weight: 600; color: var(--fg-strong); margin: 32px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--fg-faint); }
.prose strong { color: var(--fg-strong); font-weight: 600; }
.prose a { color: var(--fg-strong); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.prose blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--ink); font-family: var(--font-serif); font-size: 22px; line-height: 1.4; color: var(--fg-strong); }

.table-wrap { overflow-x: auto; border-radius: var(--r-md); box-shadow: var(--shadow-sm); background: var(--bg-elev); margin: 24px 0; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-weight: 500; color: var(--fg-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: var(--bg-sunken); }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { color: var(--fg-strong); font-weight: 500; }

.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0; font-size: 16px; font-weight: 500; color: var(--fg-strong);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { color: var(--fg-muted); transition: transform .2s var(--ease); }
.faq details[open] summary .i { transform: rotate(45deg); }
.faq details p { padding: 0 40px 22px 0; color: var(--fg-muted); line-height: 1.7; }

.toc { position: sticky; top: calc(var(--nav-h) + 24px); font-size: 13px; }
.toc a { display: block; padding: 6px 0 6px 14px; border-left: 1px solid var(--border); color: var(--fg-muted); }
.toc a:hover, .toc a.is-active { color: var(--fg-strong); border-left-color: var(--ink); }

/* ---------- 13. Generation states ---------- */
.thumb.is-loading { background: var(--bg-sunken); }
.thumb.is-loading::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite;
}
.scheme-dark .thumb.is-loading::after, :root[data-theme="dark"] .thumb.is-loading::after { background-image: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.06) 50%, transparent 80%); }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.progress { height: 3px; border-radius: 3px; background: var(--bg-active); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--ink); border-radius: 3px; transition: width .3s var(--ease); }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* ---------- 14. Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 64px 0 40px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); gap: 32px; }
.footer-col h4, .footer-col .footer-h { font-size: 13px; font-weight: 500; color: var(--fg-strong); margin-bottom: 14px; line-height: inherit; letter-spacing: normal; }
.footer-col a { display: block; padding: 4px 0; min-height: 24px; color: var(--fg-muted); font-size: 13px; }
.footer-col a:hover { color: var(--fg-strong); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--fg-muted); }
@media (max-width: 960px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 15. Misc utilities ---------- */
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-sunken); color: var(--fg-strong); font-size: 13px; font-weight: 600; flex: none; }
.avatar-sm { width: 24px; height: 24px; font-size: 11px; }
.fade-in { animation: fadeIn .4s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }

/* =========================================================
   16. Tool pages — top-to-bottom structure
   promo bar → H1 → generator → ideas → results → library → how-to → showcase → FAQ
   ========================================================= */
.promo-bar { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 44px; background: var(--bg-sunken); border-bottom: 1px solid var(--border); font-size: 13px; color: var(--fg-muted); position: relative; text-align: center; }
.promo-bar strong { color: var(--fg-strong); font-weight: 600; }
.promo-bar .btn { --h: 28px; padding: 0 12px; font-size: 12px; }
.promo-bar .close { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }

.tool-head { text-align: center; padding: 40px 0 28px; }
.tool-head .breadcrumb { justify-content: center; margin-bottom: 18px; }
.tool-head h1 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(36px, 5vw, 58px); line-height: 1.05; color: var(--fg-strong); letter-spacing: -.01em; }
.tool-head p { max-width: 640px; margin: 14px auto 0; font-size: 16px; color: var(--fg-muted); }
.tool-zone { background: var(--bg); padding-bottom: 48px; border-bottom: 1px solid var(--border); }

/* wide generator (homepage / main tool) */
.gen-card { background: var(--bg-elev); border-radius: var(--r-xl); box-shadow: var(--shadow-md); padding: 18px 18px 14px; position: relative; }
.gen-card textarea { width: 100%; min-height: 108px; max-height: 260px; resize: none; border: 0; outline: 0; background: transparent; font-size: 16px; line-height: 1.55; color: var(--fg-strong); padding: 4px 4px 0; }
.gen-card textarea::placeholder { color: var(--fg-faint); }
.gen-opts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0 12px; }
.gen-foot { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.gen-btn { --h: 42px; padding: 0 18px; gap: 10px; }
.gen-btn .cost { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: 12px; }
:root[data-theme="dark"] .gen-btn .cost { background: rgba(0,0,0,.12); }
.gen-btn.is-busy .i { animation: spin 1s linear infinite; }
.style-pick { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 4px 12px 4px 4px; border-radius: 12px; background: var(--bg-elev); box-shadow: inset 0 0 0 1px var(--border); text-align: left; transition: box-shadow .15s; }
.style-pick:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.style-pick .thumb { width: 36px; border-radius: 8px; }
.style-pick .thumb > svg { width: 84%; height: 84%; }
.style-pick small { display: block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-faint); line-height: 1.2; }
.style-pick strong { font-size: 13px; font-weight: 600; color: var(--fg-strong); line-height: 1.2; }
.style-pick .i { width: 15px; height: 15px; color: var(--fg-muted); margin-left: 4px; }
.style-menu { width: min(520px, calc(100vw - 32px)); padding: 10px; }
.style-menu .grid-sm { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.style-menu button { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 10px; font-size: 12px; color: var(--fg); text-align: left; }
.style-menu button:hover { background: var(--bg-hover); }
.style-menu button.is-selected { box-shadow: inset 0 0 0 1.5px var(--ink); }
.style-menu .thumb { border-radius: 8px; }
@media (max-width: 520px) { .style-menu .grid-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.ideas-row { display: flex; align-items: center; justify-content: space-between; margin: 18px 4px 10px; font-size: 13px; color: var(--fg-muted); }
.ideas-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.trust-row { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: var(--fg-muted); }
.trust-row span, .trust-row a { display: inline-flex; align-items: center; gap: 6px; }
.trust-row .i { width: 14px; height: 14px; }

/* two-column tool card (style template pages) — stacks on mobile */
.tool-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; padding: 16px; border-radius: var(--r-xl); background: var(--bg-elev); box-shadow: var(--shadow-md); }
.tool-preview { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tool-preview .main { position: relative; aspect-ratio: 1; border-radius: var(--r-lg); }
.tool-preview .main > svg { width: 76%; height: 76%; }
.tool-preview .label { position: absolute; left: 12px; top: 12px; }
.tool-preview .strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tool-preview .strip button .thumb { border-radius: 10px; }
.tool-preview .strip button.is-active .thumb { box-shadow: 0 0 0 2px var(--ink); }
.tool-preview .main-actions { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.tool-panel { display: flex; flex-direction: column; gap: 14px; padding: 4px; min-width: 0; }
.tool-panel textarea, .tool-panel .input { width: 100%; border: 0; outline: 0; resize: none; border-radius: var(--r-md); background: var(--bg-sunken); padding: 12px 14px; font-size: 15px; color: var(--fg-strong); min-height: 96px; }
.tool-panel .input { min-height: 0; height: 48px; }
.tool-panel textarea:focus, .tool-panel .input:focus { box-shadow: inset 0 0 0 1px var(--border-strong); background: var(--bg-elev); }
.opt { display: flex; flex-direction: column; gap: 8px; }
.opt-label { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--fg-strong); }
.opt-label output { font-weight: 500; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.opt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.opt-chips .chip { height: 30px; padding: 0 11px; font-size: 12.5px; }
.tool-panel .gen-btn { width: 100%; margin-top: auto; }
@media (max-width: 860px) { .tool-card { grid-template-columns: 1fr; } }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: var(--bg-active); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--bg-elev); box-shadow: 0 0 0 1px var(--border-strong), 0 1px 3px rgba(0,0,0,.2); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--bg-elev); border: 1px solid var(--border-strong); cursor: pointer; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 10px; background: var(--bg-sunken); }
.seg button { height: 30px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--fg-muted); white-space: nowrap; padding: 0 8px; }
.seg button.is-active { background: var(--bg-elev); color: var(--fg-strong); box-shadow: var(--shadow-sm); }
.switch { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--bg-active); flex: none; transition: background .15s; }
.switch::before { content: ""; position: absolute; inset: -8px -6px; } /* a 32 px touch target around the small track */
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s var(--ease); }
.switch[aria-checked=true] { background: var(--ink); }
.switch[aria-checked=true]::after { transform: translateX(14px); }

/* results (below the wide generator) */
.gen-results { margin-top: 28px; }
.gen-results:empty { display: none; }
.res-block + .res-block { margin-top: 28px; }
.res-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.res-head .p { font-size: 15px; color: var(--fg-strong); }
.res-head .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.res-head .acts { margin-left: auto; display: flex; gap: 6px; flex: none; }
.res-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.res { position: relative; border-radius: var(--r-md); text-align: left; }
.res .thumb { transition: box-shadow .2s; }
.res:hover .thumb { box-shadow: 0 0 0 1.5px var(--border-strong); }
.res .over { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; justify-content: center; gap: 4px; opacity: 0; transition: opacity .15s; }
.res:hover .over, .res:focus-visible .over { opacity: 1; }
.pill-light { height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.95); color: #2B2B2E; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; box-shadow: 0 1px 4px rgba(0,0,0,.12); white-space: nowrap; }
.pill-light .i { width: 13px; height: 13px; }
@media (hover: none) { .res .over { display: none; } }
@media (max-width: 700px) { .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .res-head .acts .btn span { display: none; } }

/* recent (per-viewer history, local only) */
.history { margin-top: 28px; }
.history-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 92px; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.history-strip .thumb { border-radius: 10px; }
.history-strip .thumb > svg { width: 82%; height: 82%; }

/* stats row */
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 20px; border-radius: var(--r-lg); background: var(--bg-elev); box-shadow: var(--shadow-sm); }
.stats-row > div { padding: 16px 20px; text-align: center; }
.stats-row > div + div { border-left: 1px solid var(--border); }
.stats-row b { display: block; font-family: var(--font-serif); font-weight: 400; font-size: 30px; color: var(--fg-strong); line-height: 1.1; }
.stats-row span { font-size: 12px; color: var(--fg-muted); }
@media (max-width: 600px) { .stats-row { grid-template-columns: repeat(2, 1fr); } .stats-row > div:nth-child(3) { border-left: 0; } .stats-row > div:nth-child(n+3) { border-top: 1px solid var(--border); } }

/* section heading (fontify-like: H2 + one line, left aligned) */
.sec-title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; color: var(--fg-strong); letter-spacing: -.01em; }
.sec-sub { margin-top: 10px; max-width: 680px; color: var(--fg-muted); font-size: 15px; }
.sec-head { margin-bottom: 28px; }
.sec-head.row-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* how-to: 3 numbered steps */
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps3 > div { padding: 24px; border-radius: var(--r-lg); background: var(--bg-elev); box-shadow: var(--shadow-sm); }
.steps3 .n { font-family: var(--font-serif); font-size: 34px; color: var(--fg-faint); line-height: 1; }
.steps3 h3 { font-size: 16px; font-weight: 600; color: var(--fg-strong); margin: 14px 0 6px; }
.steps3 p { font-size: 14px; color: var(--fg-muted); }
@media (max-width: 760px) { .steps3 { grid-template-columns: 1fr; } }

/* style library (template pages) */
.lib { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.lib-card { display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--bg-elev); box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.lib-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.lib-card .thumb { border-radius: 0; aspect-ratio: 4 / 3; }
.lib-card .thumb > svg { width: 62%; height: 62%; }
.lib-card .name { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; font-size: 13.5px; font-weight: 500; color: var(--fg-strong); }
.lib-card .name .i { width: 15px; height: 15px; color: var(--fg-muted); transition: transform .15s; }
.lib-card:hover .name .i { transform: translateX(2px); }
@media (max-width: 1000px) { .lib { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .lib { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 24px; }
.pager button, .pager a { min-width: 36px; height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; background: var(--bg-elev); box-shadow: var(--shadow-sm); display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.pager .is-active { background: var(--ink); color: var(--fg-on-ink); box-shadow: none; }

/* showcase (use cases → long-tail generator pages) */
.showcase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.show-card { display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--bg-elev); box-shadow: var(--shadow-sm); overflow: hidden; }
.show-card .thumb { border-radius: 0; aspect-ratio: 4 / 3; }
.show-card .thumb > svg { width: 56%; height: 56%; }
.show-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.show-card h3 { font-size: 15px; font-weight: 600; color: var(--fg-strong); }
.show-card p { font-size: 13px; color: var(--fg-muted); line-height: 1.55; }
.show-card .tagline { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12.5px; }
.show-card .tagline a { font-weight: 500; color: var(--fg-strong); display: inline-flex; align-items: center; gap: 4px; }
.show-card .tagline .i { width: 14px; height: 14px; }
@media (max-width: 960px) { .showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .showcase { grid-template-columns: 1fr; } }

/* dark promo band with before/after */
.promo-band { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 44px; border-radius: 28px; background: var(--bg); color: var(--fg); }
.promo-band h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; color: var(--fg-strong); }
.promo-band ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; font-size: 14px; }
.promo-band li { display: flex; gap: 10px; }
.promo-band li .i { width: 16px; height: 16px; margin-top: 2px; color: var(--accent); }
.promo-band .btn-light { background: var(--ink); color: var(--fg-on-ink); }
.promo-band .btn-dark { box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--fg-strong); }
.ba { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; user-select: none; touch-action: none; }
.ba > div { position: absolute; inset: 0; display: grid; place-items: center; }
.ba .before { background: var(--paper); color: var(--paper-ink); --art-bg: var(--paper); }
.ba .after { clip-path: inset(0 0 0 50%); }
.ba svg { width: 56%; height: 56%; }
.ba .handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; transform: translateX(-1px); }
.ba .handle::after { content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: #FFFFFF; color: #111111; display: grid; place-items: center; font-size: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.ba .cap { position: absolute; top: 12px; height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(0,0,0,.65); color: #FFFFFF; font-size: 11px; font-weight: 600; letter-spacing: .06em; display: inline-flex; align-items: center; }
@media (max-width: 860px) { .promo-band { grid-template-columns: 1fr; padding: 28px; } }

/* compact pricing */
.price-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 880px; margin: 0 auto; }
.price-duo > div { padding: 28px; border-radius: var(--r-xl); background: var(--bg-elev); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.price-duo .best { box-shadow: 0 0 0 1.5px var(--ink), var(--shadow-md); }
.price-duo .amt { font-family: var(--font-serif); font-size: 46px; color: var(--fg-strong); line-height: 1; }
.price-duo .amt small { font: 14px var(--font-sans); color: var(--fg-muted); }
@media (max-width: 640px) { .price-duo { grid-template-columns: 1fr; } }

/* font tool list */
.font-tool-input { display: flex; gap: 10px; align-items: center; padding: 10px 10px 10px 20px; border-radius: var(--r-xl); background: var(--bg-elev); box-shadow: var(--shadow-md); }
.font-tool-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 20px; color: var(--fg-strong); height: 48px; }
.font-tool-input input::placeholder { color: var(--fg-faint); }
.font-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.font-row { display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--bg-elev); box-shadow: var(--shadow-sm); overflow: hidden; }
.font-row .sample { display: grid; place-items: center; min-height: 128px; padding: 20px; background: var(--paper); color: var(--paper-ink); font-size: 42px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.font-row .bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px 10px 16px; font-size: 13px; }
.font-row .bar .name { font-weight: 600; color: var(--fg-strong); }
.font-row .bar .cat { color: var(--fg-muted); font-size: 12px; }
@media (max-width: 760px) { .font-list { grid-template-columns: 1fr; } .font-row .sample { font-size: 34px; min-height: 104px; } }

/* =========================================================
   17. Design viewer (dialog) — image on top, controls below
   ========================================================= */
.viewer { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 24px; background: var(--bg-elev); color: var(--fg); box-shadow: var(--shadow-lg); overflow: hidden; }
.viewer::backdrop { background: rgba(20, 19, 17, .45); backdrop-filter: blur(4px); }
.viewer[open] { display: flex; flex-direction: column; animation: pop .18s var(--ease); }
.viewer-top { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--border); }
.viewer-top .t { font-size: 14px; font-weight: 500; color: var(--fg-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-body { overflow-y: auto; padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.viewer-stage { position: relative; border-radius: 16px; overflow: hidden; display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--bg-sunken); }
.viewer-stage .paper { position: absolute; inset: 0; display: grid; place-items: center; background: var(--paper); color: var(--paper-ink); --art-bg: var(--paper); }
.viewer-stage .paper.ink { background: #111111; color: #FFFFFF; --art-bg: #111111; }
.viewer-stage .paper > svg { height: 82%; width: auto; max-width: 90%; }
.viewer-stage .body { position: absolute; inset: 0; touch-action: none; }
.viewer-stage .body > svg, .viewer-stage .body > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.viewer-stage .overlay { position: absolute; left: 50%; top: 50%; aspect-ratio: 1; color: #221C17; --art-bg: transparent; cursor: grab; mix-blend-mode: multiply; }
.viewer-stage .overlay > svg { width: 100%; height: 100%; }
.viewer-stage .sheet { height: 92%; aspect-ratio: 210 / 297; background: #fff; color: #5B3FC4; --art-bg: #fff; position: relative; display: grid; place-items: center; box-shadow: 0 8px 24px -10px rgba(0,0,0,.3); }
.viewer-stage .sheet > svg { width: 60%; height: auto; }
.viewer-stage .sheet .spec { position: absolute; left: 10px; right: 10px; bottom: 8px; display: flex; justify-content: space-between; font: 8px var(--font-mono); color: #6E6A62; }
.viewer-stage .tag-tr { position: absolute; right: 12px; top: 12px; }
.viewer-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.viewer-opts .full { grid-column: 1 / -1; }
.viewer-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.viewer-actions .primary { margin-left: auto; }
@media (max-width: 600px) { .viewer-opts { grid-template-columns: 1fr; } .viewer-actions .primary { margin-left: 0; width: 100%; } .viewer-stage { aspect-ratio: 1; } }

.toast { position: fixed; left: 50%; top: 16px; transform: translate(-50%, -16px); opacity: 0; z-index: 9999; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--fg-on-ink); font-size: 13px; display: flex; align-items: center; gap: 8px; transition: opacity .2s, transform .2s var(--ease); pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
/* shown as a popover (top layer, above an open dialog): without the browser's popover box */
.toast[popover] { inset: auto; top: 16px; left: 50%; right: auto; bottom: auto; margin: 0; border: 0; overflow: visible; width: max-content; max-width: calc(100vw - 32px); height: auto; color: var(--fg-on-ink); background: var(--ink); }
.toast .i { width: 15px; height: 15px; }

/* native select styled as a chip (placement / color pickers) */
.chip-select {
  -webkit-appearance: none; appearance: none; height: 36px; padding: 0 30px 0 12px; border: 0; border-radius: var(--r-full);
  background: var(--bg-elev) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23858481' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
  box-shadow: inset 0 0 0 1px var(--border); font-size: 13px; color: var(--fg); cursor: pointer;
}
.chip-select:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.chip-select.is-set { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--fg-strong); font-weight: 500; }
.ref-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: var(--r-full); box-shadow: inset 0 0 0 1px var(--border); font-size: 13px; cursor: pointer; }
.ref-btn:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.ref-btn .i { width: 15px; height: 15px; color: var(--fg-muted); }
.size-inline { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px; border-radius: var(--r-full); box-shadow: inset 0 0 0 1px var(--border); font-size: 13px; color: var(--fg-muted); }
.size-inline input { width: 120px; }
.size-inline output { color: var(--fg-strong); font-weight: 500; min-width: 40px; }
.credit-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-full); background: var(--bg-sunken); font-size: 13px; color: var(--fg); }
.credit-pill .i { width: 14px; height: 14px; }
@media (max-width: 640px) { .size-inline input { width: 90px; } .gen-foot .gen-btn { width: 100%; } }

/* mobile header + promo tidy */
[data-logo] { display: inline-flex; flex: none; }
.logo-mark { flex: none; }
@media (max-width: 640px) {
  .promo-bar { padding: 8px 40px 8px 12px; gap: 8px; }
  .promo-bar > span { display: none; }
  .nav-actions .credit-pill { display: none; }
  .site-nav .container-wide { gap: 12px; }
  .gen-card { padding: 14px 14px 12px; }
  .tool-head { padding: 28px 0 20px; }
}

/* =========================================================
   18. Tattoo accent — one red, a few places only
   eyebrow labels · ".ai" in the logo · step numbers · badges
   promo CTA · open FAQ · active TOC · link arrows · selection
   ========================================================= */
::selection { background: var(--accent); color: var(--on-accent); }
.eyebrow { color: var(--accent); }
.logo-word span { color: var(--accent); }
.steps3 .n { color: var(--accent); }
.badge-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-hover); }
.link { text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.link:hover, .prose a:hover { text-decoration-color: var(--accent); }
.link-arrow .i, .show-card .tagline a .i { color: var(--accent); }
.lib-card:hover .name .i { color: var(--accent); }
.faq details[open] summary .i { color: var(--accent); }
.toc a.is-active { border-left-color: var(--accent); }
.prose blockquote { border-left-color: var(--accent); }
.credit-pill .i { color: var(--accent); }
.promo-bar .btn-primary { background: var(--accent); color: var(--on-accent); }
.promo-bar .btn-primary:hover { background: var(--accent-hover); }
.price-duo .best { box-shadow: 0 0 0 1.5px var(--accent), var(--shadow-md); }
.dot-pulse { color: var(--accent); }

/* warm-black tool zone: H1 + tool on a dark band, the tool itself stays a light card */
.tool-zone.scheme-dark { border-bottom: 0; padding-bottom: 56px; }
.tool-zone.scheme-dark .tool-head h1 { color: var(--fg-strong); }
.tool-zone.scheme-dark .breadcrumb a:hover { color: var(--fg-strong); }
.tool-zone.scheme-dark .chip:hover { background: var(--bg-active); }
.tool-zone.scheme-dark .gen-card, .tool-zone.scheme-dark .tool-card, .tool-zone.scheme-dark .font-tool-input { box-shadow: 0 0 0 1px rgba(255,236,210,.08), 0 24px 60px -24px rgba(0,0,0,.7); }
.tool-zone.scheme-dark .font-row { box-shadow: 0 0 0 1px rgba(255,236,210,.06); }
.tool-zone.scheme-dark .stats-row { background: var(--bg-elev); }
.tool-zone.scheme-dark .stats-row b { color: var(--fg-strong); }

/* =========================================================
   19. Clean gallery restyle — bold condensed display type
   ========================================================= */
.display, .sec-title, .coll-h1, .hero-h1, .detail-h1, .tool-head h1, .promo-band h2, .prose h2,
.price-duo .amt, .stats-row b, .hero-stats b, .size-readout, .logo-word, .steps3 .n, .trend .rank, .az-block b {
  font-weight: 600; letter-spacing: -.01em;
}
.logo-word { font-size: 23px; letter-spacing: .005em; }
.logo-word span { font-weight: 500; }
.display em, .hero-h1 em { font-style: normal; color: var(--accent); }
.prose h2 { font-size: 30px; }
.eyebrow { font-weight: 600; letter-spacing: .1em; }
.btn-primary { background: var(--ink); }
.chip { box-shadow: inset 0 0 0 1px var(--border); }
.promo-bar { background: var(--fg-strong); color: rgba(255,255,255,.7); border-bottom: 0; }
.promo-bar strong { color: #FFFFFF; }
.promo-bar .close { color: rgba(255,255,255,.7); }
.promo-bar .close:hover { background: rgba(255,255,255,.1); color: #FFFFFF; }
.site-nav { background: color-mix(in srgb, var(--bg) 92%, transparent); }
.site-nav.is-scrolled { border-bottom-color: var(--border); }
.thumb { border-radius: 12px; }
.thumb-skin { background: radial-gradient(120% 90% at 30% 20%, #EBCDB4, #CFA283 70%, #BB8B6E); }

/* =========================================================
   20. Dark mode details (Claude-style warm charcoal; tokens in section 1)
   The promo bar is an inverted band in light mode; in dark mode it sits flush as a quiet strip,
   and pure-white stencil sheets are softened to warm paper so they don't glare.
   ========================================================= */
:root[data-theme="dark"] .promo-bar { background: var(--bg-sunken); color: var(--fg-muted); border-bottom: 1px solid var(--border); }
:root[data-theme="dark"] .promo-bar strong { color: var(--fg-strong); }
:root[data-theme="dark"] .promo-bar .close { color: var(--fg-muted); }
:root[data-theme="dark"] .promo-bar .close:hover { background: var(--bg-hover); color: var(--fg-strong); }
:root[data-theme="dark"] .thumb-stencil, :root[data-theme="dark"] [data-view="stencil"] .thumb.thumb, :root[data-theme="dark"] [data-v="stencil"] .thumb.thumb { background: #F6F4EE; --art-bg: #F6F4EE; }
:root[data-theme="dark"] .viewer::backdrop { background: rgba(15, 14, 13, .6); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .promo-bar { background: var(--bg-sunken); color: var(--fg-muted); border-bottom: 1px solid var(--border); }
  :root:not([data-theme="light"]) .promo-bar strong { color: var(--fg-strong); }
  :root:not([data-theme="light"]) .promo-bar .close { color: var(--fg-muted); }
  :root:not([data-theme="light"]) .promo-bar .close:hover { background: var(--bg-hover); color: var(--fg-strong); }
  :root:not([data-theme="light"]) .thumb-stencil, :root:not([data-theme="light"]) [data-view="stencil"] .thumb.thumb, :root:not([data-theme="light"]) [data-v="stencil"] .thumb.thumb { background: #F6F4EE; --art-bg: #F6F4EE; }
  :root:not([data-theme="light"]) .viewer::backdrop { background: rgba(15, 14, 13, .6); }
}

/* Pictures: no dragging out, no long-press save sheet on phones; the right-click menu is the site's (tool.js). */
img, .thumb, .pp, .detail-stage { -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none; }
.img-menu { position: fixed; inset: auto; margin: 0; z-index: 10000; width: min(292px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: auto; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elev); color: var(--fg); box-shadow: var(--shadow-lg); animation: img-menu-in .14s ease-out; }
.img-menu-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; padding: 6px 9px 8px; font-size: 12px; }
.img-menu-head span { font-weight: 600; color: var(--fg-strong); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-menu-head b { flex: none; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-muted); }
.img-menu > button { width: 100%; min-height: 46px; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 9px; border: 0; border-radius: 8px; background: transparent; color: inherit; text-align: left; cursor: pointer; outline: none; }
.img-menu > button:hover, .img-menu > button:focus-visible { background: var(--bg-hover); }
.img-menu > button .i { width: 16px; height: 16px; color: var(--fg-muted); }
.img-menu > button span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.img-menu > button b { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.img-menu > button small { font-size: 11px; line-height: 1.25; color: var(--fg-muted); }
.img-menu > i { display: block; height: 1px; margin: 5px 8px; background: var(--border); }
@keyframes img-menu-in { from { opacity: 0; transform: translateY(-3px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .img-menu { animation: none; } }
